Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Valdemar

Pages: [1]
1
DF Modding / 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.

2
Currently, the behavior for soldiers with no orders is to revert to their civilian profession. From here, they engage in individual combat training if they have the hard-working and/or self-motivated traits, or resume their civilian duties if they are not.

This is sub-optimal for several reasons:
  • There is no way to specify that you want all your off duty soldiers to resume their civilian duties even if they are very hard-working and want to train.
  • The announcements are constantly flooded with notifications that so-and-so has changed their profession, and their icons constantly switch from civilian to military
  • Soldiers often jump around in the units list and are often mixed in with the civilians; the only way to manage them is to give custom nicknames to each one, which is far from ideal.

I propose a new toggle on the military schedule screen next to the 'Inactive = [Uniformed/Civ clothes]' toggle that would work the same way for 'Inactive = [Soldiers/Civilians]'. It could even just be tied to that toggle, (Uniformed = Soldiers, Civ clothes = Civilians), though that would take away some of the control.

Dwarves in squads with the toggle set to 'Civilians' would turn into civilians the same as now when they have no orders or are the 'extra' dwarves when there are orders (i.e. when you have a squad of 5 and order 3 to station somewhere, I am referring to the 2 extras). They would resume their civilian jobs, and not perform individual combat drills no matter how motivated they are. A good use for this setting could be if you give some of your starting 7 dwarves some military skills, put them in a squad, and order one to always stand guard outside the fort and allow the others to work. The one on guard would rotate just like in the current system.

Dwarves in squads with the toggle set to 'Soldiers' would always remain military dwarves even when they have no orders, are the 'extra' dwarves, or are temporarily off duty to eat/drink/sleep. If they are self-motivated they will train in their off time, and if they are not they will just mill around in the barracks/meeting hall. Under no conditions will they ever switch professions to civilian, trigger an announcement, or change icons. This would be useful for more developed forts with a dedicated military which you want to always keep separated from the civilians.

Under both systems, giving a direct order through the squads menu will immediately force all dwarves to become military, take up arms, and execute your orders like in the current system.

3
DF General Discussion / The new military screen is 100% mouse enabled!
« on: April 07, 2010, 07:21:12 pm »
Over in the Dwarf Therapist thread, I just read that the new military screen is 100% mouse enabled, and it is absolutely true. You can click on squads, uniforms, dwarves, schedules, and anything else to select them, and on the keyboard shortcuts at the top to activate them.

This completely revolutionized my usage of the military screen. It seems to be relatively unknown at this point, so I'm just trying to get the word out.

For me, it doesn't work in full screen, only in windowed mode (neither does mouse painting of burrows). Somewhat odd, since the mouse support on the designation screen works perfectly. I assume it's a bug that will be fixed soon.

4
DF Suggestions / Integrated Dwarf Foreman (with functional prototype)
« on: April 05, 2010, 08:28:29 pm »
Dwarf Foreman (or its most recent incarnations like Dwarf Manager and Dwarf Therapist) are considered by many to be absolutely essential tools for properly managing a fortress. This has been proposed many times, and currently ranks fairly high in the Eternal Suggestion Voting. But how can such a seemingly complicated feature be implemented?

I've thought about this problem, and coded up a fully functional prototype of what this screen could look like in Javascript. It looks fairly similar to the new military screen, with the same general format as Dwarf Foreman/Manager/Therapist:


(this is just an image, follow the link above for the actual working version)

To be clear, this is not a utility, but a working prototype for what the integrated Dwarf Foreman could look like. I would suggest putting it under the Units screen with the hotkey "f".

Use the arrow keys to move around the screen. Shift + an arrow key will move 10 units in any direction. The full name, profession, and current labor column are displayed at the bottom, since each is highly abbreviated (especially the labors). The numbers indicate the relative skill levels, and the shaded in cells are enabled labors. I've fit almost all the labors on the one screen, though a second page will be required for the animal/hunting and medical labors. At the very right are the hauling professions; obviously there is no skill for these, but labors can still be easily toggled.

Press Enter in any cell to toggle the labor for the current dwarf. Shift-Enter will toggle the labor for all dwarves with the same custom profession as the currently selected dwarf. Control-Enter will toggle the entire labor group (the ones with the same color) for the selected dwarf; this is mostly intended for quickly turning hauling on and off.

Professions can be edited directly on this page with the y key. An underscore will pop up under the profession name at the bottom, and you can type and use backspace to edit the name. Press enter when you're done.

Another feature I put in that currently has no equivalent in normal Dwarf Fortress is editing the color of dwarves. It always annoys me when dwarves have a completely different color than their actual job, so you can press c to change the color of the current dwarf to that of the current labor. Ideally this would resort the list, but I haven't implemented that. If this goes contrary to DF design in some way, this need not actually be implemented.

Since one will probably have more dwarves than will fit, the screen will probably need to page in some way. Either automatically scrolling when you reach the bottom with the arrow keys or using + and - or / and * would work fine, though I haven't implemented that.

I hope this prototype will be a useful demonstration of what an integrated Dwarf Foreman could look like. I know I would be thrilled if something like this made it into Dwarf Fortress.

5
DF Dwarf Mode Discussion / Mud now disappears?
« on: December 16, 2007, 07:57:00 pm »
Mud seems to now disappear during winter in 33f. I've never experienced this in any of my other new version forts. The dev notes say that mud/blood spreading was disabled, but make no mention of it disappearing during winter. Is this intentional, of just an unintended side effect?

Also pretty strange is that the farm plots themselves do not disappear, they just say "No seeds available for this location", leading me to believe it is a bug.


6
DF Bug Reports / Tiny typo in refuse orders
« on: December 30, 2007, 07:06:00 pm »
In the refuse standing orders screen (o->r), the k option toggles to 'Dwarves Chasm Other', when it should probably be 'Dwarves Dump Other'. Well, I guess it's not really a typo, it just didn't get changed from the old version like the others on the page.

7
DF General Discussion / Auto-designation macro 2.0
« on: March 16, 2008, 08:49:00 pm »
This tool no longer works. Please see the 1.0 version here.

Spoiler (click to show/hide)

8
DF General Discussion / Bedroom-building macro
« on: November 22, 2007, 03:36:00 pm »
Designating bedrooms can get tedious very quickly, so I wrote an AutoHotKey macro that can do it for you.
http://www.dwarffortresswiki.net/index.php/User:Valdemar

Instructions and usage examples are in the readme file.

UPDATE - The macro can now place furniture in the rooms and you can define several .ini configuration files that are swappable with just a press of Alt-1 through 9.

Demo Videos -
Part 1
Part 2

[ November 23, 2007: Message edited by: Valdemar ]


9
DF General Discussion / Auto-designation macro
« on: December 30, 2007, 01:55:00 pm »
Note - Version 2 of this program has been released. It can instantly designate the patterns. Link

The auto-designation macro is an AutoHotKey macro that can read a design out of a spreadsheet and designate it in Dwarf Fortress. It takes a spreadsheet like this:
       
and creates this:
       
Instructions


  1. Create a spreadsheet. In it, use a blank cell for an unmined space, or a cell with a letter in it corresponding to the in-game designation (D=mine, I=up/down stair, etc). It should be bordered in # signs.
  2. Save as a .csv file. CSV files are like spreadsheets, but in a much easier to parse format. If your spreadsheet program asks you for CSV options, leave them at their default.
  3. Name your file roomdef#.csv, where # is a number 1-9 that you will use to access it from the macro
  4. Run the macro and press Alt-#, where # is the number from last step
  5. Run the game, go into the designation menu, move the cursor to the top-left square of the area you want designated, and press Alt-B
  6. Watch the printer-like operation of the macro

I've also written a program that can parse an image and generate the CSV, but it's definitely not robust enough to distribute. It's what I used to generate the second definition. If you have an image you'd like parsed, post it and I'll try.

Update! The macro can now do constructions as well. Create your construction definition files the same way you do the designation ones, using the construction hotkeys like w=wall, f=floor, etc. Name them "Croomdef#.csv", with the C in front. Before pressing Alt-B, press Alt-C to enter construction mode. You can then use Alt-# to switch files just like with designations. Then, press b-C-w to bring up the cursor and move it to the top-left corner of your desired construction, and press Alt-B. Alt-D will return you to designation mode afterwards.

Update 2! You can now choose which corner of the area you would like to indicate. Use Alt-Q to use the top-left (default), Alt-W to use the top-right, Alt-A to use the bottom-left, and Alt-S to use the bottom-right.

Demo Movie
Here's what the demo movie would have produced if I hadn't cut it off:
       
Download

[ December 30, 2007: Message edited by: Valdemar ]

[ January 03, 2008: Message edited by: Valdemar ]

[ January 28, 2008: Message edited by: Valdemar ]

[ April 01, 2008: Message edited by: Valdemar ]


10
DF General Discussion / Rewall Macro
« on: November 16, 2007, 04:23:00 pm »
I've seen many requests for an AutoHotKey macro to automate rewalling, so here it is. Instructions for using it are on the page.

http://dwarf.lendemaindeveille.com/index.php/User:Valdemar


11
DF General Discussion / The fractal bedroom macro
« on: December 25, 2007, 09:32:00 pm »
My older bedroom macro is not really aesthetically pleasing, so I wrote this macro, which builds an entire bedroom and dining room complex. It has 56 bedrooms and the dining room can easily fit 24 tables.

Here's how I envision the dining room being furnished:

Note - the macro is much faster than in the movie - it is done in just under a minute, not the movie's 4! Speed it up to 4x or so to get an idea of how it really works.
Demo Movie
Download


Pages: [1]