Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: DFHack Script: Unbutcherable Sentient Workaround for fortress and adventure mode  (Read 5685 times)

Amostubal

  • Bay Watcher
    • View Profile

ptw
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

Altivera

  • Bay Watcher
    • View Profile

I'm seeming to have a problem with the script on the dfhack 44.05 version. The script you posted is refusing to load.
Logged

burrito25man

  • Bay Watcher
    • View Profile

I'm seeming to have a problem with the script on the dfhack 44.05 version. The script you posted is refusing to load.

works fine for me as of 44.05. Make sure you change the extension of the file from .txt to .lua, or dfhack won't read it.
Logged
It's a slippery slope.  You start out modding, then move on to hard DFHacking, and next thing you know you're making your own games...

LUA Script: Workaround for butchering Sentients
 - http://www.bay12forums.com/smf/index.php?topic=165414.0

Altivera

  • Bay Watcher
    • View Profile

I'm not sure how to test it. Do I need to wait for an enemy invader from another civ to test it on fortress mode. I tried running the script in the object testing arena. Haven't tried adventure mode since I don't play that mode very much.
Logged

burrito25man

  • Bay Watcher
    • View Profile

I'm not sure how to test it. Do I need to wait for an enemy invader from another civ to test it on fortress mode. I tried running the script in the object testing arena. Haven't tried adventure mode since I don't play that mode very much.

I used fort mode for testing, so I am unsure how the script would function during object testing arena(as the script checks for a current civ association). To check, kill an intelligent creature and run gui/gm-editor on the corpse. This will show you all the flags associated with the corpse.

Under flags2, the dead_dwarf flag should be set to false (if the dead creature isnt part of your current civ).

I used modtools/create-unit to bring in intelligent victims, but technically you can just start killing anyone (such as merchants). As long as they arent part of your civ the script should set that flag to false.
Logged
It's a slippery slope.  You start out modding, then move on to hard DFHacking, and next thing you know you're making your own games...

LUA Script: Workaround for butchering Sentients
 - http://www.bay12forums.com/smf/index.php?topic=165414.0

Altivera

  • Bay Watcher
    • View Profile

Tested it out. I can't enable the script at all. The errors are saying something about it having no enable/disable commands.
Logged

burrito25man

  • Bay Watcher
    • View Profile

Tested it out. I can't enable the script at all. The errors are saying something about it having no enable/disable commands.

are you possibly trying:

fix-sentient-butcher enable

because to run it it only needs the the line

fix-sentient-butcher

adding in the enable will case an error
Logged
It's a slippery slope.  You start out modding, then move on to hard DFHacking, and next thing you know you're making your own games...

LUA Script: Workaround for butchering Sentients
 - http://www.bay12forums.com/smf/index.php?topic=165414.0

Altivera

  • Bay Watcher
    • View Profile

Oh so that's what the problem was.
Logged

DaStormDragon

  • Bay Watcher
    • View Profile

If a modded civ has different ethics, would they be ok eating any corpse with this script?
Logged

burrito25man

  • Bay Watcher
    • View Profile

If a modded civ has different ethics, would they be ok eating any corpse with this script?

It depends on how their ethics are set up (specifically EAT_SAPIENT_OTHER and EAT_SAPIENT_KILL).

I tested this with a modded dwarf civ (EAT_SAPIENT_OTHER and EAT_SAPIENT_KILL were set to REQUIRED) and they chopped up elves with glee. But when I tested it with a vanilla dwarf civ (EAT_SAPIENT_OTHER and EAT_SAPIENT_KILL set to UNTHINKABLE), dead elves we tossed into the refuse pile never to be touched again.
Logged
It's a slippery slope.  You start out modding, then move on to hard DFHacking, and next thing you know you're making your own games...

LUA Script: Workaround for butchering Sentients
 - http://www.bay12forums.com/smf/index.php?topic=165414.0

DaStormDragon

  • Bay Watcher
    • View Profile

sorry if i was unclear, i meant would a civ with EAT_SAPIENT_OTHER:ACCEPTABLE eat corpses of their own species with this script
Logged

burrito25man

  • Bay Watcher
    • View Profile

sorry if i was unclear, i meant would a civ with EAT_SAPIENT_OTHER:ACCEPTABLE eat corpses of their own species with this script

Oh! I see. The way the script is written only creatures not from your current civ will be butchered. So elves can butcher elves from a dwarven civ, but wont touch naturalized goblins.

If you were so inclined, I included a modified version of the script to allow for it. I have no idea what kind of weirdness it would cause though, so modder beware  :P :P

Spoiler (click to show/hide)
Logged
It's a slippery slope.  You start out modding, then move on to hard DFHacking, and next thing you know you're making your own games...

LUA Script: Workaround for butchering Sentients
 - http://www.bay12forums.com/smf/index.php?topic=165414.0

DaStormDragon

  • Bay Watcher
    • View Profile

Thanks!
Logged

DaStormDragon

  • Bay Watcher
    • View Profile

This may be a bit off topic, but does anyone know a way to use dfhack to get civilized creatures to eat more food? I.e in fortress mode
Logged

DaStormDragon

  • Bay Watcher
    • View Profile

Also, how would this work if a creature was resurrected?
Logged
Pages: 1 [2]