v50 Steam/Premium information for editors
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.
Editing User:Jifodus/Dwarf Fortress Utility Framework
Jump to navigation
Jump to search
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | I'm currently writing a framework for Dwarf Fortress utilities. The general idea is to use C++ interfaces in a cross-compiler fashion that is very easy to use | + | I'm currently writing a framework for Dwarf Fortress utilities. The general idea is to use C++ interfaces in a cross-compiler fashion that is very easy to use. |
− | + | Please note, since this is still currently under development, I don't have the time to make a pretty WikiPage. I also will not post the interface & file format document for the same reason. Once there is a release, I will have a solid data format that will probably never change, as well as unchanging interfaces. | |
− | + | I'm scheduling the initial release date to be December 15, 2007. At that time, the following features will be in place: | |
− | I'm | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* Written in C++, using interfaces | * Written in C++, using interfaces | ||
− | * Memory data | + | * Memory data |
+ | ** Stored in a Lua format | ||
+ | ** Stored in a CSV format | ||
+ | ** Stored in an XML format? | ||
* Sample utility for implementation reference: reimplementation of StartProfile | * Sample utility for implementation reference: reimplementation of StartProfile | ||
+ | * Library self-contained in DLL | ||
* API header & library | * API header & library | ||
+ | * Cross-compiler portable | ||
* Complete source code | * Complete source code | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | After the first release, and it's been thouroghly bug checked, the next release will have: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* Auto-retrieve memory data off the internet | * Auto-retrieve memory data off the internet | ||
* Auto-update framework code itself | * Auto-update framework code itself | ||
* Have an installer that will install the DLL and data file to a shared location, so multiple utilities can use the same library | * Have an installer that will install the DLL and data file to a shared location, so multiple utilities can use the same library | ||
− | + | * Implement specific subsets of the std library; reduce utility size more, no large dependencies | |
− | |||
− | |||
− | * Implement specific subsets of the std library; reduce utility size more, no large dependencies | ||
** std::string | ** std::string | ||
** std::vector | ** std::vector | ||
− | |||
** Console IO | ** Console IO | ||
** File IO | ** File IO | ||
+ | |||
+ | And further down the road (through auto-update): | ||
* Easy to use GUI framework; for making tools with a nice GUI | * Easy to use GUI framework; for making tools with a nice GUI | ||
* Cross-process memory allocation | * Cross-process memory allocation | ||
− | + | Expected Data Format/Requirements | |
+ | |||
+ | Native/internal type strings: | ||
+ | * string | ||
+ | * vector | ||
+ | * pointer | ||
+ | * dword | ||
+ | * word | ||
+ | * byte | ||
+ | * float | ||
+ | * double | ||
+ | * raw (array fixed-size array of bytes; size defined by the type) | ||
− | + | Object Data Requirements | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | * string | |
− | The | + | ** length : dword -- The length of the string |
− | * | + | ** capacity : dword -- The capacity of the string |
− | * | + | ** buffer : raw -- [Optional] The 16 byte string buffer embedded in the string object |
+ | ** buffer_ptr : pointer -- A pointer to the character data | ||
+ | * vector | ||
+ | ** begin : pointer -- The start of the vector | ||
+ | ** end : pointer -- The end of the vector | ||
+ | ** last : pointer -- The just beyond the last possible item in the vector | ||
− | + | Requirements For Data Files | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Stuff between {} denotes a set of information | |
− | |||
− | == | + | -- To format a new type |
− | + | { | |
− | + | type_name, -- [Required] | |
− | + | size, -- [Optional], [Default: 0] In bytes | |
− | + | -- Any number of members can be included into a type definition | |
− | + | member = { | |
− | + | type, -- [Required] | |
+ | offset, -- [Required] | ||
+ | size, -- [Optional] | ||
+ | subtypes = { -- [Optional], Used to specify the type the vector wraps | ||
+ | array, | ||
+ | of, | ||
+ | more, | ||
+ | types | ||
+ | }, -- (end subtypes) | ||
+ | fixed_size_array_count -- [Optional] [Default: 1] | ||
+ | }, -- (end member) | ||
+ | -- more? | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | -- To format a memory location | |
− | + | { | |
+ | pointer_name, | ||
+ | type, | ||
+ | address | ||
+ | } | ||
− | + | So for example a string can be formatted like this: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{ | { | ||
− | + | "string", | |
− | + | 28, -- 4 + 16 + 4 + 4 | |
− | + | "length" = { dword, 20 }, | |
− | + | "capacity" = { dword, 24 }, | |
− | + | "buffer" = { type = raw, offset = 4, fixed_size_array_count = 16 } | |
− | + | "buffer_ptr" = { type = pointer, offset = 4 } | |
− | + | } | |
− | + | ||
− | + | A pointer to the creature vector could be | |
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{ | { | ||
− | + | "main_creature_vec_location", | |
− | + | { type = vector, subtypes = { creature } }, | |
− | + | "0x0141FA30" | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
− | + | Of course, this is just a basic idea of what the data files will need. The data will also have to at least include version information. | |
+ | |||
+ | Anyway, a quick overview of the framework as it's supposed to be for the first release. |