Bay 12 Games Forum

Please login or register.

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

Author Topic: Playing around with the ALCOHOL_DEPENDANT tag  (Read 2769 times)

Ladygolem

  • Bay Watcher
    • View Profile
Playing around with the ALCOHOL_DEPENDANT tag
« on: October 16, 2014, 12:56:05 pm »

I'm working on a Gnoll mod and wondering: is there a way to use the ALCOHOL_DEPENDANT behaviour, but somehow change the substance required? I want to make it so that essentially a gnoll would "require fresh meat to get through the working day". I'm sure the behaviour of that specific token is hard coded, but is there some sort of way to emulate its effects with a different material? Maybe through some variation of whatever tokens are used by vampires? Or are those hard coded as well?

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #1 on: October 16, 2014, 01:07:23 pm »

I'm working on a Gnoll mod and wondering: is there a way to use the ALCOHOL_DEPENDANT behaviour, but somehow change the substance required? I want to make it so that essentially a gnoll would "require fresh meat to get through the working day". I'm sure the behaviour of that specific token is hard coded, but is there some sort of way to emulate its effects with a different material? Maybe through some variation of whatever tokens are used by vampires? Or are those hard coded as well?
I can think of two work-arounds using only raw modding, though they're not particularly elegant.  You can give your gnolls low speed and put a gnoll-affecting syndrome into all meats that speed them up for a set period.  You could also make them alcohol dependent, remove all brewing, and make the meat alcoholic.  Then for extra points a localization patch can change the in-game text to make it refer to meat rather than booze.

You can probably do something much better using DFHack.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Ladygolem

  • Bay Watcher
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #2 on: October 16, 2014, 01:30:08 pm »

DfHack might be the way to go, the other options seem kinda ehhh. I'm less concerned about the speed bonus/penalty and more about the happiness effect, to emulate a starving gnoll turning on their pack-mates, ha ha. I'm looking through the DfHack forums now, to see if I can find anything relevant. Unfortunately I'm not a coder - editing textfile raws in Dwarf Fortress or Dominions 4 are my only experience in modding.

Illogical_Blox

  • Bay Watcher
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #3 on: October 16, 2014, 02:08:11 pm »

I'm working on a Gnoll mod and wondering: is there a way to use the ALCOHOL_DEPENDANT behaviour, but somehow change the substance required? I want to make it so that essentially a gnoll would "require fresh meat to get through the working day". I'm sure the behaviour of that specific token is hard coded, but is there some sort of way to emulate its effects with a different material? Maybe through some variation of whatever tokens are used by vampires? Or are those hard coded as well?
Cool - I'm working on a mod that adds a load of D&D creatures.

DFhack is probably your main option.
Logged
Me: "Just imagine a load of dwarves sitting round a table, and one of them says, 'I like stranglers for... for their... their...'"
Brother: "SOFT HANDS!"

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #4 on: October 16, 2014, 03:39:46 pm »

You could also make them alcohol dependent, remove all brewing, and make the meat alcoholic.

That wouldn't work, since booze doesn't work that way - alcohol dependency is only affected by consuming a DRINK item, regardless of material (whereas LIQUID_MISC items have no effect, again regardless of material).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #5 on: October 16, 2014, 03:52:40 pm »

You could also make them alcohol dependent, remove all brewing, and make the meat alcoholic.

That wouldn't work, since booze doesn't work that way - alcohol dependency is only affected by consuming a DRINK item, regardless of material (whereas LIQUID_MISC items have no effect, again regardless of material).
So, no rum cake?  Pity.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

heydude6

  • Bay Watcher
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #6 on: October 16, 2014, 05:37:47 pm »

DfHack might be the way to go, the other options seem kinda ehhh. I'm less concerned about the speed bonus/penalty and more about the happiness effect, to emulate a starving gnoll turning on their pack-mates, ha ha. I'm looking through the DfHack forums now, to see if I can find anything relevant. Unfortunately I'm not a coder - editing textfile raws in Dwarf Fortress or Dominions 4 are my only experience in modding.

If you want a starving gnoll turning on their packmates, make them naturally born crazed but give them a self-targeted interaction that temporarily removes that crazed status, then modify meat so it also removes that crazed status temporaily, so when the gnolls haven't eaten meat in a while they will turn crazed. Although if you want to prevent loyalty cascades you should make them turn opposed to life instead, but that should work.
Logged
Lets use the ancient naval art of training war parrots. No one will realize they have been boarded by space war parrots until it is to late!
You can fake being able to run on water. You can't fake looking cool when you break your foot on a door and hit your head on the floor.

Enemy post

  • Bay Watcher
  • Modder/GM
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #7 on: October 16, 2014, 06:59:20 pm »

If you want a starving gnoll turning on their packmates, make them naturally born crazed but give them a self-targeted interaction that temporarily removes that crazed status, then modify meat so it also removes that crazed status temporaily, so when the gnolls haven't eaten meat in a while they will turn crazed. Although if you want to prevent loyalty cascades you should make them turn opposed to life instead, but that should work.
Won't that make newborn babies attack people sometimes?
Logged
My mods and forum games.
Enemy post has claimed the title of Dragonsong the Harmonic of Melodious Exaltion!

heydude6

  • Bay Watcher
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #8 on: October 16, 2014, 07:07:51 pm »

Well the point is that the newborn babies immediately when they're born activate an interaction that temporarily removes the crazed status. After that, it's meat from here on out
Logged
Lets use the ancient naval art of training war parrots. No one will realize they have been boarded by space war parrots until it is to late!
You can fake being able to run on water. You can't fake looking cool when you break your foot on a door and hit your head on the floor.

Ladygolem

  • Bay Watcher
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #9 on: October 16, 2014, 07:33:18 pm »

DfHack might be the way to go, the other options seem kinda ehhh. I'm less concerned about the speed bonus/penalty and more about the happiness effect, to emulate a starving gnoll turning on their pack-mates, ha ha. I'm looking through the DfHack forums now, to see if I can find anything relevant. Unfortunately I'm not a coder - editing textfile raws in Dwarf Fortress or Dominions 4 are my only experience in modding.

If you want a starving gnoll turning on their packmates, make them naturally born crazed but give them a self-targeted interaction that temporarily removes that crazed status, then modify meat so it also removes that crazed status temporaily, so when the gnolls haven't eaten meat in a while they will turn crazed. Although if you want to prevent loyalty cascades you should make them turn opposed to life instead, but that should work.

Holy shit, this is great stuff! Looks like I have a lot of research to to with regards to setting up interactions then. Would I have to modify the meat itself to remove this status, or would that be on the creature side? If it's the meat, can I just set it once or do I have to define it seperately for the flesh of every single extant species? Would the meat, thus modified, also remove crazed/opposed to life status for all creatures, or just gnolls? That would make things interesting wrt zombies if you could sate them for a while, long enough to make your escape or whatever. Sorry for all the questions, I'm still learning when it comes to mod-crafting!

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #10 on: October 16, 2014, 07:41:00 pm »

DfHack might be the way to go, the other options seem kinda ehhh. I'm less concerned about the speed bonus/penalty and more about the happiness effect, to emulate a starving gnoll turning on their pack-mates, ha ha. I'm looking through the DfHack forums now, to see if I can find anything relevant. Unfortunately I'm not a coder - editing textfile raws in Dwarf Fortress or Dominions 4 are my only experience in modding.

If you want a starving gnoll turning on their packmates, make them naturally born crazed but give them a self-targeted interaction that temporarily removes that crazed status, then modify meat so it also removes that crazed status temporaily, so when the gnolls haven't eaten meat in a while they will turn crazed. Although if you want to prevent loyalty cascades you should make them turn opposed to life instead, but that should work.

Holy shit, this is great stuff! Looks like I have a lot of research to to with regards to setting up interactions then. Would I have to modify the meat itself to remove this status, or would that be on the creature side? If it's the meat, can I just set it once or do I have to define it seperately for the flesh of every single extant species? Would the meat, thus modified, also remove crazed/opposed to life status for all creatures, or just gnolls? That would make things interesting wrt zombies if you could sate them for a while, long enough to make your escape or whatever. Sorry for all the questions, I'm still learning when it comes to mod-crafting!
I think you can put the syndrome into the muscle template, but I'm not sure.  In any case, you can definitely target the syndrome with [SYN_AFFECTED_CREATURE:GNOLL:ALL].  That "ALL" refers to all castes... you could actually make a different syndrome for each caste if you want the complexity.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Ladygolem

  • Bay Watcher
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #11 on: October 16, 2014, 08:44:17 pm »

So, just to get a sort of idea of what to do here:

  • Give gnolls [CRAZED].
  • Define a syndrome (?) (where?) that only affects gnolls and that removes their [CRAZED] status for a set amount of time. (is this possible?)
  • Set up an interaction that removes the [CRAZED] token temporarily, which would be triggered by being born? Perhaps set this to last until adulthood, to create a sort of 'rite of passage'  ;D
  • Make it so the interaction is triggered also upon embark or map enter, so your seven starter gnolls don't immediately rip each other apart, and neither do migrants. (Is this possible?)
  • Apply the syndrome to the default body part materials (muscle, fat, blood, etc.) so that it would be applied upon ingestion of said material. (do syndromes persist through cooking?)
Am I anywhere close to the mark? Or am I totally off track here? I don't know if half the things in that list are even possible...

PS. In this scenario, would it be possible to make the crazed gnolls use a seperate tile? I'm working on a graphics set, mostly based off of Spacefox's dwarves, and a seperate 'frenzied gnoll' tile would really make the whole concept come together imo. Ty for all the help, by the way, this has been an incredible response so far!!!
« Last Edit: October 16, 2014, 08:53:06 pm by Ladygolem »
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #12 on: October 16, 2014, 09:14:12 pm »

So, just to get a sort of idea of what to do here:

  • Give gnolls [CRAZED].
  • Define a syndrome (?) (where?) that only affects gnolls and that removes their [CRAZED] status for a set amount of time. (is this possible?)
  • Set up an interaction that removes the [CRAZED] token temporarily, which would be triggered by being born? Perhaps set this to last until adulthood, to create a sort of 'rite of passage'  ;D
  • Make it so the interaction is triggered also upon embark or map enter, so your seven starter gnolls don't immediately rip each other apart, and neither do migrants. (Is this possible?)
  • Apply the syndrome to the default body part materials (muscle, fat, blood, etc.) so that it would be applied upon ingestion of said material. (do syndromes persist through cooking?)
Am I anywhere close to the mark? Or am I totally off track here? I don't know if half the things in that list are even possible...

PS. In this scenario, would it be possible to make the crazed gnolls use a seperate tile? I'm working on a graphics set, mostly based off of Spacefox's dwarves, and a seperate 'frenzied gnoll' tile would really make the whole concept come together imo. Ty for all the help, by the way, this has been an incredible response so far!!!
You have the gist of it.  Not sure how to keep then unCrazed upon entering the map (or in worldgen for that matter).
A syndrome can have a symptom that changes a unit's tile, and it can have a syndrome that changes the flashing indicator.  You could even do both if you needed to, though I'd stick with one or the other.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Ladygolem

  • Bay Watcher
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #13 on: October 16, 2014, 09:28:23 pm »

So, just to get a sort of idea of what to do here:

  • Give gnolls [CRAZED].
  • Define a syndrome (?) (where?) that only affects gnolls and that removes their [CRAZED] status for a set amount of time. (is this possible?)
  • Set up an interaction that removes the [CRAZED] token temporarily, which would be triggered by being born? Perhaps set this to last until adulthood, to create a sort of 'rite of passage'  ;D
  • Make it so the interaction is triggered also upon embark or map enter, so your seven starter gnolls don't immediately rip each other apart, and neither do migrants. (Is this possible?)
  • Apply the syndrome to the default body part materials (muscle, fat, blood, etc.) so that it would be applied upon ingestion of said material. (do syndromes persist through cooking?)
Am I anywhere close to the mark? Or am I totally off track here? I don't know if half the things in that list are even possible...

PS. In this scenario, would it be possible to make the crazed gnolls use a seperate tile? I'm working on a graphics set, mostly based off of Spacefox's dwarves, and a seperate 'frenzied gnoll' tile would really make the whole concept come together imo. Ty for all the help, by the way, this has been an incredible response so far!!!
You have the gist of it.  Not sure how to keep then unCrazed upon entering the map (or in worldgen for that matter).
A syndrome can have a symptom that changes a unit's tile, and it can have a syndrome that changes the flashing indicator.  You could even do both if you needed to, though I'd stick with one or the other.

Well, the thing is that the crazed status is in fact the lack of a syndrome. I'd end up with a bazillion varieties of berserk soapmakers, fishery workers, bookkeepers, but the moment they'd go back to normal they'd all end up sharing a tile! Perhaps this avenue is best left untouched.

Illogical_Blox

  • Bay Watcher
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #14 on: October 16, 2014, 09:47:05 pm »

Just one thing - I don't believe that two crazed gnolls will turn on one another.
Logged
Me: "Just imagine a load of dwarves sitting round a table, and one of them says, 'I like stranglers for... for their... their...'"
Brother: "SOFT HANDS!"
Pages: [1] 2