Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

Of these, which would you rather see attempted first?

Liquid Blood
Liquid Oil
Gunpowder
Basic Spells (Spawn fireball/creature, etc.)

Author Topic: What element would you rather see added?  (Read 953 times)

asialsky

  • Bay Watcher
    • View Profile
What element would you rather see added?
« on: January 19, 2019, 11:43:02 pm »

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.
« Last Edit: January 23, 2019, 01:53:19 am by asialsky »
Logged
Off defending the fortress from dragons with a tank, I'm sure.
"All I want is for you to be happy. You won't be happy until I'm happy, so hurry up and shoot the zombies!"

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: What element would you rather see added?
« Reply #1 on: January 20, 2019, 03:06:31 pm »

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.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Urlance Woolsbane

  • Bay Watcher
    • View Profile
Re: What element would you rather see added?
« Reply #2 on: January 20, 2019, 05:20:03 pm »

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.
Logged
"Hey papa, your dandruff is melting my skin. Is that normal?"
"SKREEEONK!!!"
"Yes, daddy."

bloop_bleep

  • Bay Watcher
    • View Profile
Re: What element would you rather see added?
« Reply #3 on: January 20, 2019, 06:30:12 pm »

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.
« Last Edit: January 20, 2019, 06:31:53 pm by bloop_bleep »
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.

thefriendlyhacker

  • Bay Watcher
    • View Profile
Re: What element would you rather see added?
« Reply #4 on: January 20, 2019, 09:18:18 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.
...
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.
Logged
Fallout Equestria Redux - that's right, it's back

asialsky

  • Bay Watcher
    • View Profile
Re: What element would you rather see added?
« Reply #6 on: January 22, 2019, 11:22:45 pm »

-your casual tone about this kind of makes me doubt your chances of success-
Good. By all means, don't get your hopes up.
I have a very ... unique way of modding, to say the least. I mean, rather than finding a way to automate finding a hex string for my save editor, I had it run the save through CertUtil to convert it to Base64, find/replace, then pass it back. Did I mention my save editor was a 1.4MB batch script? Now there's a nightmare.

Progress on liquids is slow, if only because water/magma has no strings associated with its functions, meaning I get to sift through around a literal million individual functions until I find something relative, like depth calculations.

Thx for the feedback, guys. Nice to know what you want. Blood.
« Last Edit: January 22, 2019, 11:24:40 pm by asialsky »
Logged
Off defending the fortress from dragons with a tank, I'm sure.
"All I want is for you to be happy. You won't be happy until I'm happy, so hurry up and shoot the zombies!"