Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 9

Author Topic: DF Mod Manager [0.7.1 release]  (Read 48124 times)

Valdemar

  • Bay Watcher
    • View Profile
DF Mod Manager [0.7.1 release]
« on: January 09, 2011, 10:39:54 pm »

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.

Screenshots
Spoiler (click to show/hide)

Download
DFMM 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.

Installation
Unzip 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.

Compatibility
DFMM 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 Mods
DFMM 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 Mods
Mods 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 Mods
When 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 Editor
The 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 Splitting
All 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.

Metamods
A 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 Mods
Mods 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]:
Spoiler (click to show/hide)
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.
« Last Edit: March 09, 2012, 10:17:44 pm by Valdemar »
Logged

rephikul

  • Bay Watcher
  • [CURIOUSBEAST_IDEA]
    • View Profile
Re: DF Mod Manager [0.1 release]
« Reply #1 on: January 09, 2011, 11:52:38 pm »

wasnt there something like this a while back?
Logged
Intensifying Mod v0.23 for 0.31.25. Paper tigers are white.
Prepacked Dwarf Fortress with Intensifying mod v.0.23, Phoebus graphics set, DFhack, Dwarf Therapist, Runesmith and a specialized custom worldgen param.

Valdemar

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.1 release]
« Reply #2 on: January 10, 2011, 12:10:36 am »

wasnt there something like this a while back?
I searched around a little, and the ones I found (Uristmod and DF Raw Patcher) required rewrites of mods, supported only one mod at a time, and/or had no GUIs. I hope my version can be of use to someone.

splinteredmind

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.1 release]
« Reply #3 on: January 15, 2011, 01:24:26 pm »

Okay I've been playing around with this for a few days and so far I like what I see.
It's simple and easy to use. I've already managed to create .dfmod versions of the Creation Forge and Dungeon Master workaround.

However I am trying to .dfmod Deons Genesis mod and keep hitting the following error when I try and import:

Spoiler (click to show/hide)

Can you help at all?

 - Splinter
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: DF Mod Manager [0.1 release]
« Reply #4 on: January 15, 2011, 01:29:25 pm »

Yes, there were a few tools by Sean Mirrsen, but they are all for old versions.

Now, this is something I wanted to do but didn't want to learn GUI scripting to do it.

Basically I want to separate my Genesis mod into components (i.e. make races/plants/items optional) and if I can do it using your tool, that would be awesome.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Valdemar

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.2 release]
« Reply #5 on: January 18, 2011, 10:12:03 pm »

Version 0.2 released.

New Features
  • Changes to modified files are now shown directly in the editor. Characters added are highlighted in green. This may be toggled in the View menu.
  • You can now view the unmodified core file for a given object directly in the editor through the View menu. Characters deleted from the core file will be highlighted in red when combined with the View Changes option. While in this mode the editor is colored gray to remind you that the data cannot be edited.
  • Hotkeys added to several editor functions.
Bug Fixes
  • Fixed an issue where DFMM would interpret exclamation marks in object descriptions as the "!DFMM" control code and fail to parse mods such as Intensifying Mod.
  • Fixed DFMM not recognizing the BUILDING_FURNACE object type, causing it to fail to import mods such as Genesis. (re splinteredmind)
  • Fixed CP437 character encoding issues that caused DFMM to fail to import mods such as Genesis.

« Last Edit: January 18, 2011, 10:13:50 pm by Valdemar »
Logged

Valdemar

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.2 release]
« Reply #6 on: January 30, 2011, 09:45:50 pm »

Version 0.3 released.

New Features
  • Mod merging: File -> Merge mods will merge together all of the currently selected mods just like installation, but save the result as a new mod instead.
  • Mod splitting: Right click mod -> Split mod will bring up an interface where you can split the mod into two new mods. All the object changes will be shown on the left side. Double click a change to transfer it to the other side. Double click a folder to transfer all changes to that object type. You can also transfer multiple changes with Shift or Control, as long as you keep the modifier held down as you double click. Give the new mods names at the top of each tree. (re Deon, this should help you split Genesis)

Bug Fixes
  • DFMM will no longer silently overwrite any mods with the same name when importing or creating a new mod.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: DF Mod Manager [0.3 release]
« Reply #7 on: January 31, 2011, 03:41:45 am »

Valdemar, it's kinda sad to see no responses here. I really like what you do.

The question is: would it be possible to modify it to make some components mutually exclusive and otherwise required?

I.e. if I wanted to make Minerals or Simple ores components which are mutually exclusive and when one is enabled another one is disabled, and it's impossible to disable both at once? Kinda like options.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Valdemar

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.3 release]
« Reply #8 on: January 31, 2011, 08:04:00 am »


The question is: would it be possible to modify it to make some components mutually exclusive and otherwise required?

This will fall under the metamod feature that I'm working on. You'd be able to put one set of minerals into core Genesis, then create a metamod removing that set and adding a different one. You could never have both sets active, and you would have to disable all of Genesis to disable both. I should have this update out sometime in the next few days.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: DF Mod Manager [0.3 release]
« Reply #9 on: January 31, 2011, 09:04:19 am »

Also would it be possible not to butcher existing tabulations? Because of that it screws my body file where indentation is needed.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

splinteredmind

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.3 release]
« Reply #10 on: January 31, 2011, 10:03:52 am »

Very impressed with this utility so far.
Keep up the good work my friend.

 - Splinter
Logged

Aramco

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.3 release]
« Reply #11 on: February 02, 2011, 02:46:34 pm »

Alright, so maybe this is a stupid question, but... how do I open it? It read my DF files, but now it won't do anything.
Logged
Or maybe there's a god who's just completely insane and sends you to Detroit, Michigan in a new body if you ever utter the name "Pat Sajak".

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: DF Mod Manager [0.3 release]
« Reply #12 on: February 04, 2011, 03:49:21 am »

Alright, so maybe this is a stupid question, but... how do I open it? It read my DF files, but now it won't do anything.
Double click it? :) Maybe you lack something like .NET framework installed?


Valdemar, can you make it to read non-token info too (and tabulations)? I have some problems with it because it removes indentation, tabulation and comments which I placed in RAW files.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Aramco

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.3 release]
« Reply #13 on: February 04, 2011, 03:09:06 pm »

Alright, the whole time it has flashed text on screen before disappearing. Now, after trying to get a picture of the words (and wishing I had better reflexes), I finally got a picture of it. What does it mean?
Spoiler (click to show/hide)
Logged
Or maybe there's a god who's just completely insane and sends you to Detroit, Michigan in a new body if you ever utter the name "Pat Sajak".

Valdemar

  • Bay Watcher
    • View Profile
Re: DF Mod Manager [0.3 release]
« Reply #14 on: February 04, 2011, 05:26:05 pm »

Alright, the whole time it has flashed text on screen before disappearing. Now, after trying to get a picture of the words (and wishing I had better reflexes), I finally got a picture of it. What does it mean?
Spoiler (click to show/hide)

That error means it was unable to locate an [OBJECT:<something>] tag at the start of one of your raws files. What version of DF are you using? Maybe there's an extraneous .txt file in your raws directory, like a readme for a mod.

Valdemar, can you make it to read non-token info too (and tabulations)? I have some problems with it because it removes indentation, tabulation and comments which I placed in RAW files.

I'll work on this for the next release. It and the metamod features are shaping up to be more complex than I expected; it'll probably take until sometime next week.
Pages: [1] 2 3 ... 9