I've been working on a mod manager as it may be awhile before official support for mods is added. Dredmor Mod Manager v1.0.1 - Supports loading mods from .zip files - Automatically merges XML - Includes 3 example mods Currently only XML based mods are supported. This is written in Java so I'm only distributing the .jar file. Example Mods Better Wand Lore - Added ability to smelt burned out wands into Arcane Wands - Made Arcane Wands into joke wands that don't cast anything - Swapped Wand Hack and Rod Charge order in the skill tree Better Potions - Changed Spatial Instability Infusion to teleport you more vigorously - Changed Potion of Midas to invoke Curse of the Golden Ratio on hit Lutefisk Stacks Fix - Changed Lutefisk divider to treat stacks the same as individual items when Skoling them Download Windows 32-bit Windows 64-bit Mac 32-bit Mac 64-bit Note: I haven't tested the 64-bit or Mac versions. If you have any problems let me know. Changelog 1.0.0: - Initial release 1.0.1: - Added version string to window title - Changed craftDB.xml merging rules to insert mod XML at the top of the file. This now allows mod recipes to show up in-game. Be sure to read the readme as it explains how to make your own mods. Warning: Using mods can mess up your save file! Always use the same mods with the same save file.
- Changed Spatial Instability Infusion to teleport you more vigorously That sounds awkward....and slightly wrong... But nice to see this.
@Patch Well in theory I just have to rebuild it with the Mac version of the SWT library I'm using for the native-style GUI. Just thought I'd test it on a Mac first before releasing that. It already prompts you to select your dredmor folder.
It no workey for me. === Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SW T libraries on 64-bit JVM at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source) at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source) at org.eclipse.swt.internal.C.<clinit>(Unknown Source) at org.eclipse.swt.widgets.Widget.<clinit>(Unknown Source) at App.Main.getShell(Main.java:366) at App.Main.loadConfig(Main.java:66) at App.Main.init(Main.java:631) at App.Main.main(Main.java:697)
@decarthado Yeah, just realised that I'll also need to include the 64-bit version of the SWT library. Maybe I should've just used Swing... I'll try to have some compatible versions up later today. Reading about including all versions of the library in one Jar. Thanks for checking it out though!
Very cool, thanks for putting this together J-Factor, seems to be working A-Ok for me! How did you figure out the directory / file structure etc. for modding? Just experimenting with it or is it documented somewhere?
Just experimenting. All of the game's XML files are in the same directory which simplifies things. I started with a general-case for the merging logic: copy the mod's XML into the game's equivalent XML file at the start of the 'main' tag (e.g. just after <code><craftDB></code>). I then specialised depending on the file: - tweakDB.xml needed the mod XML to be <i>after</i> the game's XML in order to overrule it. - skillDB.xml needed the ability to modify existing skills. In this case I had to actually replace parts of the game's XML instead of just appending to it. Here I replace any skill that has the same skill number (e.g. 30) and level if the mod has defined it. This let me swap Wand Hack and Rod Charge in my example mod. I had to do the same with spellDB.xml to let me change the 'Touch of Midas' effects. I imagine I'll need to keep adding tweaks as I try out modding the rest of the XML files. A lot of this depends on various quirks in the way the game loads the XML files.
Alright I've uploaded versions for Win/Mac and 32bit/64bit. Let me know if you have any problems. I'm planning on updating the mod "format" to support all of the game's directories instead of just the XML "game" directory. This would allow mods to add custom graphics, sounds, etc.
Is it known what causes the recipes to show up or not. I cannot see a recipe I made when I load it (and the itemDB) using a mod, but if I shift the recipe to the top of the file it seems to show the recipe just fine.
@rusticdog Thanks for the feedback. I've uploaded v1.0.1 which now includes: - A version string in the window title so people know which version they're running - craftDB.xml now merges the mod XML at the top of the file instead of the bottom This should fix the issue for you. I'm not sure why the recipes aren't shown when they're at the bottom (and I'm hoping it's not some kind of hard-coded limit that means new recipes at the top 'push off' recipes at the bottom). I'll try testing some more.
Yeap that's showing all the wands from the example mod as well that weren't there previous. I unhid a few of the lower recipes and they still loaded as well, so I've not noticed any weirdness by placing at the top just yet. Unfortunately I didn't realise lockpicks weren't in the item file, so there's no lockpick item type....which probably explains the autoloot bug when they weren't being picked up.....but means no lockpick recipe for me ....will have to stick to burglary for the time being.
@kriegshetzer Is any error message shown or does it just silently fail to start when you double click the jar? You shouldn't have to manually open it with javaw.exe, although it should work with the command <code>javaw.exe -jar "Dredmor Mod Manager.jar"</code>. Did you download the correct version? There's a 32-bit and 64-bit jar depending on your OS. If you're running Windows 7 you can find out if you're 64-bit by going into Control Panel : System. Otherwise all I can suggest is updating your Java version. @rusticdog You could try making a kind of interstitial object, like the Odious Puffball, that when used triggers the Lucky Pick spell.
@J-Factor Yeah, that was something I'd fooled around with, it does bother me slightly he eats a chicken to create lockpicks, but it's working none-the-less My new icon for the 'Thieves Tools' keeps reverting to 4bit and not 8bit. Which is a problem as 4bit PNGs crash DoD when you try to bring up the crafting screen. Will keep tooling around
This is pretty nice J-Factor. Did some mucking about to see the format you used, assuming it just appends the lines to the end of the XML files? Looking to fix a few things myself, like make Blasting damage actually work, so Viking Magic isn't total garbage, along with countless weapons.
@OgreSamanosuke It's mostly just appending although I had to do some tweaks for skillDB.xml and spellDB.xml. For these I first remove any of the existing spells/skills that match the ones that have been defined by the mod. For example, with spellDB.xml: <code>newGameFileLines = filterOutTagsWithPatterns( gameFileLines, modFileLines, "(<spell name=\"[\\s\\w]+\")", "(</spell>)" );</code> This removes any of the existing spells that have the same <code><spell name="...</code> start tag as one of the mod's spells. I explain some of this <a href="#Comment_5317">here</a>. I've uploaded 1.0.1 again except with the source included. Rename the .jar to .zip and you can find it in the App folder. The whole thing is just a single 700 line file called "Main.java".
Well, I can fix the spells that use blasting, but no clue where the item enchant modifiers are stored, so any item that gives/resists blasting is still broken. Debating if I should bother posting it as it, does at least make Viking Magic less suck. As for the source, you don't need to do that. If you right click on a Jar file and select Open with... and pick WinRAR, it'll inherently tear it open for you, no need to rename.