The Dwarf Fortress Mod Manager allows you to create and edit mods, and easily merge them together for installation. It can import existing mods, and export them into compact patch-like files for easy distribution and compatibility with future versions of DF. Other features include splitting mods, showing clearly what each mod changes, and allowing tweaks to mods that do not affect the original.
ScreenshotsDownloadDFMM is available as Python source code (requires
Python and
wxPython) or a compiled EXE.
Python Source [0.7.1]Compiled EXE [0.7] (sorry, 0.7.1 exe is delayed)
DFMM source and the development log are also available on
GitHub.
InstallationUnzip the program into your DF directory so that the “dfmm” folder that contains dfmm.py or dfmm.exe is on the same level as the DF executable. Back up any mods you currently have installed and restore your raw/objects directory to vanilla DF. When you run DFMM for the first time, it will copy the core raw files to its own directory.
CompatibilityDFMM is currently written for DF 0.31.21, and should be compatible with future versions of DF unless the raws format changes significantly, which is unlikely. When upgrading to a new version of DF, you can keep your ‘mods’ directory since everything is internally stored as .dfmod files, but delete your ‘core’ directory and let DFMM read in the new core raw files.
Importing ModsDFMM won’t be very useful until you import some mods into it through the Import menu. Mods can be imported from a directory, as current DF mods are typically distributed. Make sure the directory doesn’t contain any extraneous files, and point DFMM to it. Core files included in the directory are assumed to be intended exactly as written, with any missing objects deleted. Missing core files are assumed to be unmodified, and extra files are assumed to be added. Mods can also be imported from .dfmod files, DFMM’s own format, or zip files containing multiple .dfmod files.
Managing ModsMods can be enabled or disabled by double clicking on them. Disabled mods will not be installed. You can also reorder mods by dragging and dropping. Mod order is critical for determining which takes precedence in conflicts (see next section).
Installing ModsWhen you select File -> Install mods, DFMM will merge together all of your currently installed and enabled mods and install them to your raws/objects directory. Enable, disable, and reorder your mods from the right-click menu. DFMM tries to be as intelligent as possible about merging mods, but conflicts can occur:
- If a mod deletes an object and a later mod attempts to modify it, the modification will fail.
- If a mod modifies an object and a later mod attempt to delete it, the deletion will fail unless you check the “Delete overrides edit” option.
- If a mod modifies an object and a later mod also attempts to modify it, DFMM will attempt to merge the changes. If you uncheck the “Merge changes” option, the second modification will simply be discarded. If the second modification cannot be fully applied, if for example they change exactly the same tag, all the changes for the second mod will be discarded. However, if you check the “Allow partial merges” option, the successfully applied changes will be kept.
Watch the console window for messages from DFMM about merges and discarded changes. Be careful of merges and especially partial merges, as they have the potential to misformat your raw files. I recommend scanning over the results of merges to make sure everything is in order before starting DF.
The Mod EditorThe mod editor lets you more easily create and edit mods. Create a new mod with File -> New mod in the main window, or right click an existing mod and select Edit. In the editor, first select the type of object to edit with the top tabs, pick an object in the list to the left, and edit its data in the right panel.
As you view an object's data, text the mod has added to the mod is highlighted in green. Press Control-D to switch to viewing the core data for that object. In this view, text the mod has removed from the core data is highlighted in red.
Changes to object data are saved immediately, but the mod itself will not be saved until you select File -> Save. Add, delete, or revert (restore data to that of core DF or undelete) objects from the Object menu. Objects in the list are marked with whether they have been added (+), deleted ([D]), or modified (*) in the current mod.
Merging and SplittingAll currently selected mods can be merged using the File -> Merge Mods. They will be merged together using the same logic as installation, and saved as a new mod file.
The mod splitter can be accessed through the "Split mod" option in the mod context menu. All changes made by the selected mod will be displayed on the left pane of the splitter. Changes can be transferred to the right pane with a double click. When you click Save, the changes in each pane will be saved as new mods with the names you specify. The "Meta" option will save the right mod as a metamod (see next section) of the left one.
MetamodsA metamod is a mod that uses another mod's data as its core data. They are useful to modders to provide optional parts of a mod that can be turned on or off, or to users to tweak parts of a mod without affecting the original. Create a metamod through a mod's context menu. When a metamod is opened in the editor, only changes the metamod makes over the parent mod are shown; The parent mod's data is shown as if it was the core data.
Exporting ModsMods can be exported back to directories or to .dfmod files through their right-click menu. .dfmod files act like compact patch files, storing only the differences between core and your mod. For example, here is a simple mod that adds a single tag to [ENTITY:MOUNTAIN]:
!DFMM|NAME|Test
!DFMM|MODIFY|entity_default.txt|ENTITY|ENTITY|MOUNTAIN|@@ -49,16 +49,27 @@
:DWARF%5D%0A
+%5BTEST_TAG%5D%0A
%5BDIGGER:
A mod with metamods can also be exported as a .zip file of .dfmod files. This is intended for easier distribution of a mod with its metamods included.
Possible problems and solutions- If mods you import are from a different version of DF, DFMM will claim that each is making some of the same modifications, which are really modifications to the core files, and probably fail to merge them since they’re the same. If this happens, open up the problem mods and manually remove the changes (Revert Object is your friend here). Mods distributed as .dfmod files will not have this problem.
- If DF (the game itself) crashes after installing mods, it is likely due to a failed merge that left the raw files corrupted or a mod half-applied. Review the installation log in the console for merge conflicts and look for merged files, and review them for problems.