Probably my most "famous" creation is the random deck generator at http://www.wargamerandomdeck.com/ which I fully suggest all people use for all games at all times because nothing ever goes wrong when you use a random deck.
But you're likely here for one of my other two creations, located at http://www.wargamerandomdeck.com/tools/
Table Exporter (current version 1.0.0
Usage: WGTableExporter.exe <file.dat> [<file.ndfbin|file.dic>] [<tablename>]
Will export the specified table from an ndf file, or the specified dic/ndf file from a .dat file, or everything in the .dat file, depending on the number of arguments. It can extract TGVs (but not individually right now), but it cannot recurse into PPK files, so you'll need to extract those yourself first.
NDF Patcher (current version 2.2.0
Usage: WGPatcher.exe [action] [...]
(most commonly, WGPatcher.exe apply NDFWin.dat patch.xml)
Fully documenting this will take me some time, so bear with me, but for now there's two actions you'll be concerned about:
- apply or patch (equivalent): Will apply a patch XML file to a .dat file, producing a new .dat file named "[...]_patched.dat" with the changes.
- index: Will produce a CSV detailing where the newest version of any given file is. This can recurse into PPKs, so you can use this to locate where TGV files are to replace.
Two small example patches are included to show you how it works.
Both of these tools make a reasonable attempt to explain their arguments if you don't provide enough, so if you type for example "WGPatcher.exe apply" it will tell you what that particular action requires. If one's missing documentation let me know.
Both come with a copy of moddingSuite (which may be out of date) which they require to operate. Both are currently built against .NET 4.5, though I may move them forward to newer versions of the framework at a future date if I need to.
Though I am somewhat busy I'll still watch this thread for comments in case anyone has questions or requests for new features. Bollywood Baloney is already responsible for like 30% of the XML patcher's features so don't be afraid to ask!
http://www.wargamerandomdeck.com/tools/ has a link to a new, 2.0 version. Changes include:
- Added operator "select". Use this to navigate inside lists to perform operations on nested lists (see below). Context resets to outermost when the next patch element is encountered.
- Added new special matchcondition "__createdby" which allows you to directly reference objects created by an earlier ndfcreate
- Added operator "null" (sets value to null). Note that you could actually already do this with type="Unset" but now there's a shortcut
- The "type" attribute is no longer necessary in many cases even if the existing value is Unset; the patcher will attempt to figure out the type based on other instances of this class if possible. Specifying a type will always override the inferred type. Note that inference is impossible when inside a nested loop context via use of the select operator.
- Operation names are now case-insensitive
- Added some extra input error checking, it should complain a lot more about files that are partially malformed
- Fixed "multiple matches found, first will be used" to ACTUALLY use the first instead of returning null
- Fixed remove not working on lists of maps (it was actually setting the value which did god knows what)
So the exciting part is this:
Code: Select all
<!-- This will insert a record into an instance the below table (chosen by being the first one I found with nested list) -->
<ndfpatch ndf="pc\ndf\patchable\gfx\everything.ndfbin" table="TIASkirmishDescriptor" name="Nested Lists">
<!-- Add a map. Here, type is required for it to insert a Map and not overwrite the property with a new MapList
I'm not sure how to fix that without breaking the file format -->
<change operation="add" property="MissionAndUnitList_OnlyForTest" type="map">
<value type="List" />
<!-- Navigate inwards to the selected list. Note the specification of the key -->
<change operation="select" property="MissionAndUnitList_OnlyForTest" key="16" />
<!-- Add a record to the inner list we created earlier -->
<change operation="add" type="ObjectReference">
<!-- And update it by specifying its key (0-indexed) -->
<change operation="set" key="0" type="ObjectReference">
(this is included with the download)
It SHOULD be able to work on lists of lists of lists (etc...) if you just repeat the select operation to navigate into the next layer down but I admit I didn't actually find one of those to try it with.
I had to redo most of the internals to get this to work, so there's no guarantee I didn't break something as I definitely haven't had the time to write automated tests for this thing. If I did break someone's mod, please let me know. In the meantime I left the link to the old one just in case.
I'll try to hang around for any specific issues from this until work murders my productivity again, and I hope this effort helps someone! Also hopefully nobody minds me resurrecting my own thread but a quick glance at the main forum didn't show anything that looked more relevant.