Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How do interactions work?  (Read 1835 times)

peregarrett

  • Bay Watcher
  • Гномовержец Enjoyed throwing someone recently
    • View Profile
How do interactions work?
« on: August 22, 2012, 07:40:07 am »

Hi all. I'm trying some tests with interactions, but failing, so let this thread be Interactions Study Class.

here's what I tried - an interaction that transforms all dogs into cats. Should work at any biome - this part copypasted from generated resurrection interaction.

Code: [Select]
[INTERACTION:TEST_REGION_INTERACTION]
[I_SOURCE:REGION]
[IS_REGION:ANY]
[IS_FREQUENCY:100]
[I_TARGET:dog_m:CREATURE]
[IT_LOCATION:CONTEXT_REGION]
[IT_AFFECTED_CREATURE:DOG:MALE]
[I_TARGET:dog_f:CREATURE]
[IT_LOCATION:CONTEXT_REGION]
[IT_AFFECTED_CREATURE:DOG:FEMALE]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:dog_m]
[IE_IMMEDIATE]
[SYNDROME]
[CE_BODY_TRANSFORMATION:START:0]
[CE:CREATURE:CAT:MALE]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:dog_f]
[IE_IMMEDIATE]
[SYNDROME]
[CE_BODY_TRANSFORMATION:START:0]
[CE:CREATURE:CAT:MALE]
What have I screwed here?
Logged
Did you know that the Russian word for "sock" is "no sock"?
I just saw a guy with two broken legs push a minecart with a corpse in it. Yeah.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: How do interactions work?
« Reply #1 on: August 22, 2012, 11:26:13 am »

In what way is it not working?
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.

peregarrett

  • Bay Watcher
  • Гномовержец Enjoyed throwing someone recently
    • View Profile
Re: How do interactions work?
« Reply #2 on: August 22, 2012, 11:38:22 am »

In literal way. I took some dogs at embark and they didn't turn into cats.
Don't know how to debug it.
I thought it should work as undeads rising in evil biomes.
Logged
Did you know that the Russian word for "sock" is "no sock"?
I just saw a guy with two broken legs push a minecart with a corpse in it. Yeah.

Godlysockpuppet

  • Bay Watcher
  • [Insert wit here]
    • View Profile
Re: How do interactions work?
« Reply #3 on: August 22, 2012, 12:16:29 pm »

Hey terribly sorry to piggy back on your thread, but I was messing around with interactions and can't seem to get mine working either :P
Spoiler (click to show/hide)
It's meant to turn anything attacked by the "monster" into a sub caste of this monster called the converted, it's based of the vampire interaction and I can't get it to work :( I also tried using the werebeast as a template and wrote the whole thing up again and it still wont work. What's wrong with it?? (I of course, probrably just don't understand enough about this, and am making some stupid mistake) Help anyone?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: How do interactions work?
« Reply #4 on: August 22, 2012, 12:29:36 pm »

You do know that your interaction is going to turn female dogs into male cats, right? >_>

Try changing the target identifiers to A and B--I haven't really tried anything other than those, so I'm not sure if they'll work.

peregarrett

  • Bay Watcher
  • Гномовержец Enjoyed throwing someone recently
    • View Profile
Re: How do interactions work?
« Reply #5 on: August 23, 2012, 02:44:50 am »

You do know that your interaction is going to turn female dogs into male cats, right? >_>

Try changing the target identifiers to A and B--I haven't really tried anything other than those, so I'm not sure if they'll work.
Fixed male/female bug, changed IDs to A, B - still nothing. I guess I'm missing something here...

EDIT. Okay, I just give up this to someone who's more experienced. Screw you, interactions!
« Last Edit: August 23, 2012, 03:00:15 am by peregarrett »
Logged
Did you know that the Russian word for "sock" is "no sock"?
I just saw a guy with two broken legs push a minecart with a corpse in it. Yeah.

Di

  • Bay Watcher
    • View Profile
Re: How do interactions work?
« Reply #6 on: August 23, 2012, 12:33:15 pm »

Interactions that target creatures have [IT_LOCATION:CONTEXT_CREATURE] rather than[IT_LOCATION:CONTEXT_REGION].
Second, looks like regional interactions work with [IE_INTERMITTENT:WEEKLY] only, [IE_IMMEDIATE] isn't supported.
Finally, if else fails, my test regional interaction had [IE_ARENA_NAME:].
Logged
Quote from: Creamcorn
Dwarf Fortress: Where you meet the limit of your imagination, moral compass, sanity and CPU processor.
http://www.bay12forums.com/smf/index.php?topic=103080.0 Fix sober vampires!
http://www.bay12forums.com/smf/index.php?topic=91442.0 Dwarven Cognitive Science

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: How do interactions work?
« Reply #7 on: August 23, 2012, 03:26:03 pm »

Also make sure "[OBJECT:INTERACTION]" is at the top of the file
Logged

peregarrett

  • Bay Watcher
  • Гномовержец Enjoyed throwing someone recently
    • View Profile
Re: How do interactions work?
« Reply #8 on: August 24, 2012, 08:05:04 am »

Interactions that target creatures have [IT_LOCATION:CONTEXT_CREATURE] rather than[IT_LOCATION:CONTEXT_REGION].
Second, looks like regional interactions work with [IE_INTERMITTENT:WEEKLY] only, [IE_IMMEDIATE] isn't supported.
Finally, if else fails, my test regional interaction had [IE_ARENA_NAME:].
Greatly thanks!
IT_LOCATION:CONTEXT_CREATURE worked, along with IE_INTERMITTENT:WEEKLY. All stray animals, wild animals and embark team is slowly transformed into cats, one by one.
Strange, but when all of citizens transformed into animals, game doesn't stop
Code: [Select]
interaction_test

[OBJECT:INTERACTION]

[INTERACTION:TEST_REGION_INTERACTION]
[I_SOURCE:REGION]
[IS_REGION:ANY_TERRAIN]
[IS_FREQUENCY:100]
[IS_REGION:NORMAL_ALLOWED]
[IS_REGION:EVIL_ALLOWED]
[IS_REGION:GOOD_ALLOWED]
[IS_REGION:SAVAGE_ALLOWED]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_AFFECTED_CLASS:GENERAL_POISON]
[IT_IMMUNE_CREATURE:CAT:MALE]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_INTERMITTENT:WEEKLY]
[SYNDROME]
[CE_BODY_TRANSFORMATION:START:0]
[CE:CREATURE:CAT:MALE]
maybe I added too much IS_REGION's, but I wanted to make that sure.

Btw, is there any way to customize announcement that is printed when syndrome is applied? Found only CE_DISPLAY_NAME, that change name of creature.
« Last Edit: August 24, 2012, 08:13:43 am by peregarrett »
Logged
Did you know that the Russian word for "sock" is "no sock"?
I just saw a guy with two broken legs push a minecart with a corpse in it. Yeah.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: How do interactions work?
« Reply #9 on: August 24, 2012, 11:46:11 am »

Nope.