Dwarf Fortress > DF Modding

What element would you rather see added?

(1/2) > >>

asialsky:
Firstly, don't assume I will finish any of these. I'll announce it if I get anywhere.

Before anyone cries "BUT THAT'S NOT POSSIBRU," calm down. I've got a decompiler open in the other window, and am studying underlying functions within the exe. Any result of my tampering would be unstable, buggy, and likely cause frequent crashes. I know.

With that said:

Hello! I've lurked around for quite a few years, only releasing a few simplistic mods. My preferred modding method is directly editing what I'm not supposed to. I've been busy modding other games like Superhot MCD (ZA WARUDO mod) and Exanima (Playable ogre, inventory editor), and haven't made any hard-coded mods for DF yet. I just want an idea of what the community wants, so if anything happens to work out, I know what to focus on. I already have an idea of how I'll do most of these, so here's a quick summary.


LIQUID BLOOD Pretty simple, actually. After I find the definitions for water, I just need to copy it, rename the new functions, and set it to be destroyed by water/magma. Getting it to spawn from damaged creatures would require adding a new token, but w/e. It'd get a little wonky if you dropped a bucket of water in a blood pit, but it'd be a start.

LIQUID OIL: This is more or less the same as above, except being what basically would amount to flammable water.

GUNPOWDER: Recipe of saltpeter + charcoal to keep things simple. Changing how it reacts when burned is difficult, so my plan is to create a custom "workshop" that causes a "cave-in" when destroyed. Adding a burning dust variant would be the easiest part.

BASIC SPELLS: I have this half working even without modding the exe directly, but it doesn't like fortress mode currently.


Other suggestions are welcome.

vjmdhzgr:
I think the real liquids are the more interesting ones since we can kind of do gunpowder and spells anyway. I will say that your casual tone about this kind of makes me doubt your chances of success, but if you did find a way to do this then that'd be pretty cool.

Urlance Woolsbane:
This reminds me: I had a WIP patch that allowed one to embark with fewer than 7 dwarves. It worked, though I never got round to giving them skills; the hardcoded skill assignations didn't work, as I'd made it treat all embark-dwarves like the dynamic, reclaim sort. Mind you, it was a fairly simple fix and I'm sure someone with more skill than I could easily replicate it.

bloop_bleep:
Um... what “definitions” for water? Do you mean function definitions? If so, definitions for what functions? Do you mean functions dealing with liquid flow?

I can assure you, adding new liquids isn’t going to be as easy as copying a couple functions. For one, how are you going to store the additional data? DF only allocates one bit for liquid type for each tile — allowing only for two possible liquid types. You could still try to take advantage of DF flow calculations by setting the liquid type of blood to be the same as water, and then setting a custom flag elsewhere to keep track of what’s water and what’s blood, but then how can you make the liquid flow control function  destroy blood when it touches water like you suggest, instead of simply merging with it? You’d have to replace every check of “is this water” in the code with “is this water (but with the same blood flag value as the tile currently being handled)” and then add separate checks for blood-water and blood-magma interaction, neither of which are small tasks.

And you’re a bit late to the party with the “basic spells” suggestion. Eric Blank has a rather extensive pure-RAW magic mod called Spellcrafts, and Roses has written a Spells system as a DFHack script. Not that systems with more features aren’t welcome.

thefriendlyhacker:

--- Quote from: bloop_bleep on January 20, 2019, 06:30:12 pm ---...
I can assure you, adding new liquids isn’t going to be as easy as copying a couple functions. For one, how are you going to store the additional data? DF only allocates one bit for liquid type for each tile — allowing only for two possible liquid types.
...

--- End quote ---
I suspect the best idea would be to create a parallel data structure holding map liquid properties so that you don't have to alter every function that looks at a map tile (which I believe would be necessary if you screw around with how the data structure for tiles is layed out).  That way, I think you would "only" have to modify the functions that save/load your data to disk and the ones that load new map tiles (which happens dynamically during adventure mode), in addition to whatever functions implement the special features you are adding.

Navigation

[0] Message Index

[#] Next page

Go to full version