Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Non-destructive Creature Edit  (Read 1133 times)

Murble

  • Escaped Lunatic
    • View Profile
Non-destructive Creature Edit
« on: July 19, 2021, 08:12:55 pm »

I want to modify some of the raw files for creatures without modifying the vanilla files to make it easy to install and uninstall as you please and have less chance of being overwritten by other mods.
An example of what I mean would be for adding new body parts. Instead of just going into the body_default.txt file and adding stuff in there, you can add a body_additions.txt file and make new body parts in there. This is beneficial since if you download a mod in the future that add their own body parts it won't overwrite the changes you made in your mod.

This method works when adding things which didn't exist, but now I want to add those body parts to some vanilla creatures. Is there a way to modify vanilla creatures in a way like this, where you would add a new creature_additions.txt.

The closest thing I can see to this would be with Animals and Animal Men. Like with the Bluejay Man, it starts off by putting [COPY_TAGS_FROM:BIRD_BLUEJAY] which does as you'd expect. Then you can put [GO_TO_END] and it will be as though you are then writing everything at the end of BIRD_BLUEJAY. The problem though with this is that there is now a Bluejay and a Bluejay man. I would like to make it so if I add horns to a dwarf (Just first thing to pop in my head), that will be the default dwarf. So, I'd like to copy all the tags from the default dwarf over to my modified dwarf creature, while making the original dwarf no longer exist, and be replaced with my dwarf creature from another creatures file. So, while this animal man is making a variation of the animal, I want to edit the original without adding a new creature. Furthermore, I want to be able to do this without editing the original raw files, meaning if you have to add something in creature_standard.txt it won't do.

Think I got my intent across but just to simplify my goal further, is it possible to have a [CREATURE:DWARF] in one file and [CREATURE:DWARF] in another and somehow have them merge together. Seems when I try doing this exact thing, I wind up with duplicate dwarves (2 females and 2 males).

Reason I want to do this:
Sucks when you have a mod that say, adjusts elves height to make them taller like in other games, but if any other mod now edits the creature_standard.txt file, it will overwrite the elf mod. Even if one mod edited the elves and the other the dwarves, they would conflict...
Not to mention, tilesets usually overwrite the creatures file since in needs to assign their new tile. This can make it so you don't have to rewrite your mod to work with different tilesets.

Edit:
Pretty much looking for something similar to SELECT_CASTE, just for creatures. Would be nice being able to do [SELECT_CREATURE:DWARF] and it would start adding everything you put into there to the original Dwarf creature. Though that would be hard to implement I guess since if you have multiple mods all editing the Dwarf, you'd have to have a way to set which one will have priority.
« Last Edit: July 20, 2021, 06:12:44 pm by Murble »
Logged

Mobbstar

  • Bay Watcher
  • aka Mossbird
    • View Profile
    • my website
Re: Non-destructive Creature Edit
« Reply #1 on: July 21, 2021, 08:11:54 am »

I have not looked into the tools described at the wiki but it seems like there are "mod loaders" which assemble raw files.

Beyond that, I'm only Posting To Watch. :)

voliol

  • Bay Watcher
    • View Profile
    • Website
Re: Non-destructive Creature Edit
« Reply #2 on: July 21, 2021, 12:38:43 pm »

The merging of mods being such a bother is what has driven many discussions here on the modding subforum, but until now I had thought no such tools existed. But perhaps PyDwarf might be what we were looking for all along, somehow hidden in plain sight. It seems to have some sort of learning curve, but also promises ”an enormous reduction in tedium”, and to ”make it much easier for the player to install mods”. If it works, that’s something everyone should know about.

Edit: Of course, there’s a slim possibility that the new mod handling implemented with the Steam release (and thus Steam workshop) will be that, allowing raw objects to be added to/edited by other separate files. I know it’s been suggested, but it remains to be seen what the official workshop handling will be, and of course there’s some time left before the Steam release arrives.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Non-destructive Creature Edit
« Reply #3 on: December 11, 2022, 10:38:48 pm »

Since this is showing up in searches:

Quote
Would be nice being able to do [SELECT_CREATURE:DWARF]

This is straight-up possible now.