Bay 12 Games Forum

Please login or register.

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

Author Topic: [CE:COUNTER_TRIGGER]  (Read 3633 times)

ydaraishy

  • Bay Watcher
    • View Profile
[CE:COUNTER_TRIGGER]
« on: April 03, 2012, 11:43:15 pm »

Has anyone figured out the details on how this tag works?  Searching for it only gave me custom vampire interactions very similar to generated vanilla ones, which isn't where I'm going here.  There seems to be much more to how this tag works.

Looking at the string-dump, I see the following arguments which appear to be associated with it:
Spoiler (click to show/hide)

The only one that appears in vanilla is DRINKING_BLOOD, which is used to lengthen vampire teeth when they're feeding. As for the others, they seem to be related to what their names suggest (e.g. COMBATHARDNESS to amount of trauma suffered), but I cannot find any info on what criteria they refer to.

Also, I'm puzzled about the arguments following that (in vampires it's [CE:COUNTER_TRIGGER:DRINKING_BLOOD:1:NONE:REQUIRED].  I'm guessing that the "1" is either the number of times it's happened, or some kind of time period.  Is there anyway to set it, so that the syndrome that goes with it takes effect before, e.g. DRINKING_BLOOD?
Logged

NobodyPro

  • Bay Watcher
    • View Profile
Re: [CE:COUNTER_TRIGGER]
« Reply #1 on: April 04, 2012, 01:05:33 am »

I am intrigued... but am unable to conduct !!Science!! at the moment.
Logged

davros

  • Bay Watcher
    • View Profile
Re: [CE:COUNTER_TRIGGER]
« Reply #2 on: April 07, 2012, 05:21:32 am »

I'd like to know what it does.
Logged
Quote from: Malarauko
I had an above ground garden built in the grounds of my castle and two young dwarves spent time socialising there over the summer and at the end of the summer they were in love. Remember those long summers of your childhood? That first kiss in the gardens while crossbows dwarves shoot goblins above your head? The rain of dead birds as the hunters get to work? Truly Spearhills is a paradise.

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: [CE:COUNTER_TRIGGER]
« Reply #3 on: June 10, 2012, 02:38:11 pm »

There seem to be a whole bunch, and for all kinds of things.  I wonder if it's possible to make creatures do interesting things when at parties, or to encourage (without forcing) above-ground play by causing nasty effects to creatures that spend too much time in caves.

EmperorJon

  • Bay Watcher
  • Still waiting...
    • View Profile
Re: [CE:COUNTER_TRIGGER]
« Reply #4 on: June 10, 2012, 02:47:27 pm »

Some more info here.

I might try some SCIENCE... see if I can get Dwarves to mutate into a mad beast if they don't have alcohol for long enough.
Logged
I think it's the way towns develop now. In the beginning, people move into a town. Then they start producing tables, which results in more and more tables. Soon tables represent a significant portion of the population, they start lobbying for new laws and regulations, putting people to greater and greater disadvantage...
Link for full quote. 'tis mighty funny.

EmeraldWind

  • Bay Watcher
  • Hey there, dollface...
    • View Profile
Re: [CE:COUNTER_TRIGGER]
« Reply #5 on: June 11, 2012, 10:41:22 am »

Some more info here.

I might try some SCIENCE... see if I can get Dwarves to mutate into a mad beast if they don't have alcohol for long enough.

I am getting sober... you won't like me, when I'm sober.
Logged
We do not suffer from insanity. We enjoy every single bit of it.

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: [CE:COUNTER_TRIGGER]
« Reply #6 on: June 13, 2012, 04:18:15 pm »

Been running some tests with the tag.  Usage of counter triggers opens up whole new possibilities!

For instance, I wanted to make a species with negative cave adaptation - it gradually grows dizzier and less efficient as it grows cave adapted, thereby encouraging you to build the bulk of your fortress above the surface without hindering short trips below ground to get stone and such.  The following interaction accomplishes this objective quite nicely.

Here's the interaction (the time periods and severity of the syndromes can be adjusted):
Code: [Select]
[INTERACTION:SPELUNCAPHOBIA]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[CE_DIZZINESS:SEV:10:PROB:100:RESISTABLE:START:0:PEAK:1]
[CE:COUNTER_TRIGGER:CAVE_ADAPT:8400:16800:REQUIRED]
[CE_DIZZINESS:SEV:100:PROB:100:RESISTABLE:START:0:PEAK:1]
[CE:COUNTER_TRIGGER:CAVE_ADAPT:16800:33600:REQUIRED]
[CE_DIZZINESS:SEV:1000:PROB:100:RESISTABLE:START:0:PEAK:1]
[CE:COUNTER_TRIGGER:CAVE_ADAPT:33600:NONE:REQUIRED]

And put this part in the creature:
Code: [Select]
[CAVE_ADAPT]
[CAN_DO_INTERACTION:SPELUNCAPHOBIA]
[CDI:TARGET:A:SELF_ONLY]
[CDI:WAIT_PERIOD:33600]
[CDI:FREE_ACTION]

expwnent

  • Bay Watcher
    • View Profile
Re: [CE:COUNTER_TRIGGER]
« Reply #7 on: June 13, 2012, 06:45:40 pm »

Great stuff! Have you figured out what the arguments mean? Is 33600 the maximum amount of cave adapation, or is that just something you picked?

Also, why the WAIT_PERIOD?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [CE:COUNTER_TRIGGER]
« Reply #8 on: June 13, 2012, 07:09:58 pm »

33600 is a month, which I think is the time for the first stage of cave adaptation.

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: [CE:COUNTER_TRIGGER]
« Reply #9 on: June 13, 2012, 07:28:24 pm »

Great stuff! Have you figured out what the arguments mean? Is 33600 the maximum amount of cave adapation, or is that just something you picked?

Also, why the WAIT_PERIOD?

True since these never end you might as well add [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]

Been running some tests with the tag.  Usage of counter triggers opens up whole new possibilities!

For instance, I wanted to make a species with negative cave adaptation - it gradually grows dizzier and less efficient as it grows cave adapted, thereby encouraging you to build the bulk of your fortress above the surface without hindering short trips below ground to get stone and such.  The following interaction accomplishes this objective quite nicely.

Here's the interaction (the time periods and severity of the syndromes can be adjusted):
Code: [Select]
[INTERACTION:SPELUNCAPHOBIA]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[CE_DIZZINESS:SEV:10:PROB:100:RESISTABLE:START:0:PEAK:1]
[CE:COUNTER_TRIGGER:CAVE_ADAPT:8400:16800:REQUIRED]
[CE_DIZZINESS:SEV:100:PROB:100:RESISTABLE:START:0:PEAK:1]
[CE:COUNTER_TRIGGER:CAVE_ADAPT:16800:33600:REQUIRED]
[CE_DIZZINESS:SEV:1000:PROB:100:RESISTABLE:START:0:PEAK:1]
[CE:COUNTER_TRIGGER:CAVE_ADAPT:33600:NONE:REQUIRED]

And put this part in the creature:
Code: [Select]
[CAVE_ADAPT]
[CAN_DO_INTERACTION:SPELUNCAPHOBIA]
[CDI:TARGET:A:SELF_ONLY]
[CDI:WAIT_PERIOD:33600]
[CDI:FREE_ACTION]

Exellent science. Now time for me to play with these as well

EDIT:
where is this list of counters? like the CAVE_ADAPT

EDIT2:
Derp I glazed over it in the wiki page http://dwarffortresswiki.org/index.php/DF2012:Syndrome
But how did ydaraishy find "COMBATHARDNESS"?
« Last Edit: June 13, 2012, 07:36:33 pm by Hugo_The_Dwarf »
Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: [CE:COUNTER_TRIGGER]
« Reply #11 on: June 14, 2012, 08:34:37 am »

Great stuff! Have you figured out what the arguments mean? Is 33600 the maximum amount of cave adapation, or is that just something you picked?

Also, why the WAIT_PERIOD?

33600 is a month, but was completely arbitrary.  The first noticeable stage of cave adaptation is a year (403200) when going outside causes bad thoughts, they start vomiting from going outside at 1.5 years (604800) and 800000 is the maximum.  By the way, cave adaptation doesn't go away instantly when they go outside, it seems to decline slowly as they spend time outside.

The WAIT_PERIOD was also arbitrary - really the action only operates once, since the effect lasts for life, but I put in a large wait period to keep them from constantly trying to use the interaction, which might cause slowdown maybe.

COMBATHARDNESS just showed up recently on the wiki, I think.  That one could be fun... giving a warrior race bonuses as they experience more of the battlefield...

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: [CE:COUNTER_TRIGGER]
« Reply #12 on: June 14, 2012, 12:49:56 pm »

Great stuff! Have you figured out what the arguments mean? Is 33600 the maximum amount of cave adapation, or is that just something you picked?

Also, why the WAIT_PERIOD?

33600 is a month, but was completely arbitrary.  The first noticeable stage of cave adaptation is a year (403200) when going outside causes bad thoughts, they start vomiting from going outside at 1.5 years (604800) and 800000 is the maximum.  By the way, cave adaptation doesn't go away instantly when they go outside, it seems to decline slowly as they spend time outside.

The WAIT_PERIOD was also arbitrary - really the action only operates once, since the effect lasts for life, but I put in a large wait period to keep them from constantly trying to use the interaction, which might cause slowdown maybe.

COMBATHARDNESS just showed up recently on the wiki, I think.  That one could be fun... giving a warrior race bonuses as they experience more of the battlefield...
Wow combat hardness just did. anyways

[INTERACTION:SPELUNCAPHOBIA]
      [I_TARGET:A:CREATURE]
      [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
      [IT_LOCATION:CONTEXT_CREATURE]
   [I_EFFECT:ADD_SYNDROME]
      [IE_TARGET:A]
      [IE_IMMEDIATE]
      [SYNDROME]
         [CE_DIZZINESS:SEV:10:PROB:100:RESISTABLE:START:0:PEAK:1]
            [CE:COUNTER_TRIGGER:CAVE_ADAPT:8400:16800:REQUIRED]
         [CE_DIZZINESS:SEV:100:PROB:100:RESISTABLE:START:0:PEAK:1]
            [CE:COUNTER_TRIGGER:CAVE_ADAPT:16800:33600:REQUIRED]
         [CE_DIZZINESS:SEV:1000:PROB:100:RESISTABLE:START:0:PEAK:1]
            [CE:COUNTER_TRIGGER:CAVE_ADAPT:33600:NONE:REQUIRED]

Should make it a one time deal, because all those syndromes never end. So it is always affected. I'm also liking the idea of weakness from being in the caves too long, since I want to restrict humans from living in caves

I also wounder can be alter these COUNTERs with syndromes like COMBATHARDNES? say drink a potion and not care about anything anymore
other then adding NOEMOTION. could brew stronger booze that numbs ones mind.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [CE:COUNTER_TRIGGER]
« Reply #13 on: June 14, 2012, 12:56:56 pm »

COMBATHARDNESS?

Holy shit. I've been waiting for that one for a while.

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: [CE:COUNTER_TRIGGER]
« Reply #14 on: June 14, 2012, 02:26:34 pm »

Should make it a one time deal, because all those syndromes never end. So it is always affected. I'm also liking the idea of weakness from being in the caves too long, since I want to restrict humans from living in caves

Something about certain counter tags - the REQUIRED part, I think - causes them to end once the trigger is not operating.  So although the effects don't have END tags, they ends as soon as you leave the cave, but restart when you go back in.  I don't think it's resetting the timer entirely when you leave the cave because if you spend a longer time inside, then go outside for a little bit, then go back in, it takes a shorter time to become dizzy from the effect than it did initially (the longer you spend inside, the longer the 'rest period' needs to be).

We need more !!science!! here, but this syndrome does exactly what you're saying very efficiently - just adjust the timing and severity according to how sensitive you want your species to be (this particular variety is very sensitive - it was designed for a race that wasn't supposed to be able to dig at all, but I didn't want them to be stuck without any access to stone).
Pages: [1] 2