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 2733 times)

Ladygolem

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

Just one thing - I don't believe that two crazed gnolls will turn on one another.

Of course! That simplifies things quite a bit. Are crazed individuals still controllable in Fort Mode in the absence of enemy units? ANd migrants would still be aggressive... but that could be worked into a feature, actually. Instead of migrants you have feral gnolls overcome with the Hunger (let's call it that cause why not) and only once they're sated will they join your fort. Just set up a food stockpile outside your fort before they get a chance to do any damage. Easy!

It still might be difficult at embark to make sure, say, if gnoll #1 feeds first because they just happen to be standing closer to the wagon (can you even embark with meat?) then would gnolls #2 through #7 immediately turn on them?

This aside, I do think that if this concept is to take off it'd be best done through DFHack. Are there any good resources on how one would get started with this? Do I essentially have to become a programmer?

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #16 on: October 17, 2014, 01:57:07 am »

That CRAZED idea has a number of holes in it - most importantly, CRAZED citizens will never eat.  Also you cannot control them in any way.  They are basically berserk.
Also, syndromes won't stack - if a creature eats a food that has a syndrome they already have, it will have no effect and the syndrome counter will not reset.
There are workarounds, but they are complicated.  I would suggest the following:

1. Make a self-targeting interaction to 'get hungry', and give it a long cooldown time (3 months or so).  Give this interaction the tag CANNOT_TARGET_IF_SYNDROME_CLASS:ATE_MEAT.  This interaction waits until nearly the end of the cooldown period (give the syndrome a late START tag), then gives a syndrome that lasts a very short amount of time (until the end of the cooldown period) and grants the ability to use the interaction 'get hungrier'.
2. Make an interaction 'get hungrier' that gnolls do NOT originally have.  This interaction can also not target if the gnoll has the syndrome tag ATE_MEAT.  This interaction, like the previous, waits a while (say, a month or two) and then gives a syndrome that grants a THIRD interaction for a short amount of time (like, a day), 'go crazy'.
3. Make the 'go crazy' interaction, which ALSO cannot target if the gnoll has the syndrome tag ATE_MEAT, and causes temporary addition of the CRAZED token.
4. Give meat a syndrome with the class ATE_MEAT that lasts some multiple of 3 months.  It takes 3 months for a creature to get hungry, so this should hopefully ensure that they never eat while the ATE_MEAT syndrome is already active.

You may have to adjust the cooldown and syndrome timing to get the gameplay result you want.  The point is that, although a gnoll may, if you are unlucky, happen to reach the point where they can use the interaction 'get hungrier' at the same moment they are missing the ATE_MEAT syndrome, they will never have the opportunity to use all three interactions in a row before eating meat at least once, thereby halting the advancing hunger process.  For testing purposes, you may want to make gnolls flash with different symbols depending on their hunger level.

Of course, you could just give them the CARNIVORE tag... but I'm guessing you don't want to do that?

Using DFHack would require you to become a programmer, yes.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #17 on: October 17, 2014, 09:34:17 am »

Using DFHack would require you to become a programmer, yes.
Just to clarify a bit, using DFHack can use interpreted scripts in human-readable files.  You can edit the script and run it again during the same game session to do your troubleshooting.

For most applications, you wouldn't need to delve into compiled C++ or anything (though that opportunity is there if you're interested).
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 #18 on: October 17, 2014, 01:47:25 pm »

That CRAZED idea has a number of holes in it - most importantly, CRAZED citizens will never eat.  Also you cannot control them in any way.  They are basically berserk.
Also, syndromes won't stack - if a creature eats a food that has a syndrome they already have, it will have no effect and the syndrome counter will not reset.
There are workarounds, but they are complicated.  I would suggest the following:

1. Make a self-targeting interaction to 'get hungry', and give it a long cooldown time (3 months or so).  Give this interaction the tag CANNOT_TARGET_IF_SYNDROME_CLASS:ATE_MEAT.  This interaction waits until nearly the end of the cooldown period (give the syndrome a late START tag), then gives a syndrome that lasts a very short amount of time (until the end of the cooldown period) and grants the ability to use the interaction 'get hungrier'.
2. Make an interaction 'get hungrier' that gnolls do NOT originally have.  This interaction can also not target if the gnoll has the syndrome tag ATE_MEAT.  This interaction, like the previous, waits a while (say, a month or two) and then gives a syndrome that grants a THIRD interaction for a short amount of time (like, a day), 'go crazy'.
3. Make the 'go crazy' interaction, which ALSO cannot target if the gnoll has the syndrome tag ATE_MEAT, and causes temporary addition of the CRAZED token.
4. Give meat a syndrome with the class ATE_MEAT that lasts some multiple of 3 months.  It takes 3 months for a creature to get hungry, so this should hopefully ensure that they never eat while the ATE_MEAT syndrome is already active.

You may have to adjust the cooldown and syndrome timing to get the gameplay result you want.  The point is that, although a gnoll may, if you are unlucky, happen to reach the point where they can use the interaction 'get hungrier' at the same moment they are missing the ATE_MEAT syndrome, they will never have the opportunity to use all three interactions in a row before eating meat at least once, thereby halting the advancing hunger process.  For testing purposes, you may want to make gnolls flash with different symbols depending on their hunger level.

Of course, you could just give them the CARNIVORE tag... but I'm guessing you don't want to do that?

Using DFHack would require you to become a programmer, yes.

Ah, this makes more sense. And no, the Carnivore would lead to a) simply gnolls simply starving to death and b) would fuck them up in worldgen. Of course, this may very well do that as well, but that's a bridge that can be crossed later.

Is ATE:MEAT a valid trigger? I can't find it on the interaction token page. I didn't read that right. My bad.
« Last Edit: October 17, 2014, 02:02:19 pm by Ladygolem »
Logged

Illogical_Blox

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

I don't think carnivorous creatures will starve to death in worldgen anymore. My Piscesi don't.
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!"

Ladygolem

  • Bay Watcher
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #20 on: October 17, 2014, 02:39:59 pm »

I don't think carnivorous creatures will starve to death in worldgen anymore. My Piscesi don't.

Oh nice! That... simplifies a lot, actually. But I'll still try to get this system working - it'd seem unfitting for a giant hyena monster to just fade away in hunger with nary a whimper. Also, you end up with a lot less leeway wrt to food this way - by the time a dwarf starts getting serious unhappy thoughts, a gnoll will be tearing into the livestock / comrades. Idk, we'll see. Thanks for the tip though. Does BONECARN also work?

Also: For the interactions, what would the I_SOURCE be? CREATURE_ACTION? Would this mean that the gnoll would have to explicitly startthe hunger process?
« Last Edit: October 17, 2014, 03:32:54 pm by Ladygolem »
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #21 on: October 17, 2014, 04:14:30 pm »

I don't think carnivorous creatures will starve to death in worldgen anymore. My Piscesi don't.
Also: For the interactions, what would the I_SOURCE be? CREATURE_ACTION? Would this mean that the gnoll would have to explicitly startthe hunger process?
According to what I can find, a CREATURE_ACTION interaction with no usage hint will be used willy-nilly on all eligible targets (in this case, the creature itself).  I have not had a lot of success getting that to work as advertised, but my set-up was a bit more complex (three syndromes, two of which has CAN_DO_INTERACTIONs in them).

I ended up using syndrome-trigger and a lua script.
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 #22 on: October 17, 2014, 05:35:48 pm »

So... For the [ATE_MEAT] syndrome, what's the effect type? ADD_TAG? CAN_DO_INTERACTION? I don't think it'll let me specify a syndrome without a symptom...

(Sorry for being a massive pain, btw - you all must think me a total nuisance! I'll learn, eventually, I hope. ;) )

Featheredragon

  • Bay Watcher
  • If someone says they are sane, then they're crazy.
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #23 on: October 18, 2014, 10:22:42 am »

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.

Awww; I just started making a Pathfinder mod... Have all the PDF's and it includes all the info you could possibly need about a race. Any conversions from standard measurements to DF measurements and back?
Logged

Illogical_Blox

  • Bay Watcher
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #24 on: October 18, 2014, 11:22:36 am »

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.

Awww; I just started making a Pathfinder mod... Have all the PDF's and it includes all the info you could possibly need about a race. Any conversions from standard measurements to DF measurements and back?
Dunno if you were talking to me, but I'll respond anyway - I'm basing it largely off of 4e (though some are from older versions) and my measuring system consists of finding sizes I think are fair based on description,  common sense and images. Also, some racial descriptions.
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!"

Featheredragon

  • Bay Watcher
  • If someone says they are sane, then they're crazy.
    • View Profile
Re: Playing around with the ALCOHOL_DEPENDANT tag
« Reply #25 on: October 19, 2014, 05:10:59 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.

Awww; I just started making a Pathfinder mod... Have all the PDF's and it includes all the info you could possibly need about a race. Any conversions from standard measurements to DF measurements and back?
Dunno if you were talking to me, but I'll respond anyway - I'm basing it largely off of 4e (though some are from older versions) and my measuring system consists of finding sizes I think are fair based on description,  common sense and images. Also, some racial descriptions.

Sorry for being vague. I mean do the numbers in the raws correspond to any measurement system. And if so is the same system use in all the raws, for all things.
Logged
Pages: 1 [2]