Hi,
I just uploaded PFM version 2.4 containing new functions to improve your mods' compatability with others.
A prevalent question in the Workshop comments is "Is this compatible with Radious/DarthMod"? So compatability is kind of a major "selling point" for smaller mods, and with Steam Workshop support, it's very possible that we'll see several minor mods addressing different aspects of the game; if a player wants to use several of them, it's good to have each one only change the data they actually mean to modify.
One of the things that makes mods incompatible with each other is that they're working on the same DB table: If the DB files have the same name, the game will only load data from one of them (although I'm not 100% sure about that). If that file contains all lines from the original game, including ones changed by another mod, that mod's changes will be overwritten.
This is where PFM's new features "Rename all Files" and "Minimize DB files" (found in the Postprocess menu) come in.
- The "Rename All Files" will prompt for a prefix to prepend to your mod's files' names (like aum_).
This will put that string in front of all files in the pack, minimizing the chance that another mod will overwrite the file (or be overwritten by it).
- The "Minimize DB files" removes all data rows from the db/ tree in the pack that have not changed from the game files.
This will ensure that only the lines you edited will get loaded; the other data is already present, so no need to load it again anyway; it would only overwrite other mod's changes to it.
Let's look at an example.
Mod ashigaru_reprice changes the cost of ashigaru upkeep to half. This means that in the table units, there are lines like yari_ashigaru...40 (for the upkeep). Samurai entries have not been changed by the mod.
Mod samurai_buff adds additional attack values to Yari and Katana Samurai. This means, there are lines like yari_samurai...12 (attack value) and katana_samurai...15. Here, Ashigaru entries have not been modified.
What modders usually do is to edit the units table, change the values they want, save the pack and put it up as their mod. Now for our two mods, if both keep "units" as the name of their changed table files, the game will load both of them, so the one that gets loaded later will overwrite changes by the first.
So here's what our modders do: the first chooses "Rename files" in PFM and enters arm_ (for "ashigaru reprice mod"). This will rename the units file into "arm_units". The second modder uses "sbm_ (for "samurai buff mod") for his rename, resulting in an "sbm_units" file.
The game will still load both of them though, so the data still gets overwritten. So what each one does is use "minimize DB files". For "ARM", this will get rid of all non-Ashigaru units; for "SBM", this will remove all but the Yari and Katana Samurai lines. Now the files stand perfectly independent from each other and can both be used side by side.
DB files that have not changed at all will be removed from the pack altogether; non-DB files will be left untouched. All this will _not_ overwrite your current pack file; the changes are opened with the name "optimized_<yourmod>.pack" so you can save it separately.
This obviously doesn't prevent all incompatabilies; mods still may want to change the same lines (for instance, an Ashigaru Buff Mod would still conflict with ARM). But it does minimize the possibility for conflicts, and it won't hurt the mod's changes being applied at all.
I'm not entirely sure the file name change is neccessary, but it's certainly a good idea (and not really much effort). It's probably best to have a working pack, containing all data, and only use "minimize" before a release; this way, you still have the other entries you can edit, and the other tables you can look into. Also, you might need to keep track of indices that need to be unique with a file.
This all works flawlessly with the smaller changes I've been doing; if you could comment how it works for you (I'd especially be interested in behavior for the larger mods), that would be great.
TL;DR:
Before releasing your mod, in PFM:
- select the db folder, then in the "Postprocess" menu "Rename->Selected"
- enter the prefix you want for your mod's files
- select "Postprocess"->"Minimize DB Files"
- save the pack
Now your mod is as compatible as can be and still works on its own.





Reply With Quote







