Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: I don't understand interactions  (Read 197 times)

Derpy Dev

  • Bay Watcher
  • Normal Person Doing Normal Things
    • View Profile
I don't understand interactions
« on: March 20, 2017, 05:08:05 pm »

So I am trying to mod in a witch. It isn't working as I would have hoped.

I am trying to give the witch a poison attack, but I keep getting this message in the errorlog:

WITCH_DERPYDEV:Unrecognized Interaction Token: CAN_DO_INTERACTION
CDI token precedes any CAN_DO_INTERACTION tagADV_NAME
CDI token precedes any CAN_DO_INTERACTION tagUSAGE_HINT
CDI token precedes any CAN_DO_INTERACTION tagBP_REQUIRED
CDI token precedes any CAN_DO_INTERACTION tagMATERIAL
CDI token precedes any CAN_DO_INTERACTION tagTARGET
CDI token precedes any CAN_DO_INTERACTION tagTARGET_RANGE
CDI token precedes any CAN_DO_INTERACTION tagMAX_TARGET_NUMBER
CDI token precedes any CAN_DO_INTERACTION tagWAIT_PERIOD


Creatures that I try to make witches simply don't become witches. The game doesn't label them as such or anything of the sort.

Here is the code for the interaction:

Code: [Select]
[INTERACTION:WITCH_DERPYDEV]
[I_SOURCE:SECRET]
[IS_NAME:powers given by forgotten gods]
[IS_SPHERE:DARKNESS]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/secret_death.txt]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_REQUIRES:MORTAL]
[IT_REQUIRES:CAN_LEARN]
[IT_REQUIRES:CAN_SPEAK]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[IE_ARENA_NAME:Witch]
[SYNDROME]
 [CAN_DO_INTERACTION:MATERIAL_EMISSION]
  [CDI:ADV_NAME:Breath custom material]
  [CDI:USAGE_HINT:ATTACK]
  [CDI:BP_REQUIRED:BY_CATEGORY:MOUTH]
  [CDI:MATERIAL:DEMONS_KISS_DERPYDEV:TRAILING_VAPOR_FLOW]
  [CDI:TARGET:C:LINE_OF_SIGHT]
  [CDI:TARGET_RANGE:C:15]
  [CDI:MAX_TARGET_NUMBER:C:1]
  [CDI:WAIT_PERIOD:50]

I don't think the custom material is the problem though, but I'll post its code here regardless:

Code: [Select]
[INORGANIC:DEMONS_KISS_DERPYDEV]
[USE_MATERIAL_TEMPLATE:BLOOD_TEMPLATE]
       [STATE_NAME:ALL_SOLID:demons kiss]
       [STATE_ADJ:ALL_SOLID:demons kiss]
       [STATE_NAME:LIQUID:demons kiss]
       [STATE_ADJ:LIQUID:demons kiss]
       [STATE_NAME:GAS:demons kiss]
       [STATE_ADJ:GAS:demons kiss]
       [PREFIX:NONE]
       [SYNDROME]
           [SYN_NAME:broken soul]
           [SYN_AFFECTED_CLASS:GENERAL_POISON]
           [CE_PAIN:SEV:10000:PROB:100:START:0:PEAK:500:END:1000]

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: I don't understand interactions
« Reply #1 on: March 20, 2017, 05:52:02 pm »

In a syndrome you want the CreatureEffect tokens, CE_ like: [CE_CAN_DO_INTERACTION:START:0]
Logged
Engraved here is a rendition of an image of the Dwarf Fortress learning curve. All craftsdwarfship is of the highest quality. It depicts an obsidian overhang which menaces with spikes of obsidian and tears. Carved on the overhang is an image of Toady One and the players. The players are curled up in a fetal position. Toady One is laughing. The players are burning.
The VectorCurses+1 tileset strikes the square set and the severed part sails off in an arc!

Derpy Dev

  • Bay Watcher
  • Normal Person Doing Normal Things
    • View Profile
Re: I don't understand interactions
« Reply #2 on: March 20, 2017, 06:50:53 pm »

In a syndrome you want the CreatureEffect tokens, CE_ like: [CE_CAN_DO_INTERACTION:START:0]

So instead of this
[CE_PAIN:SEV:10000:PROB:100:START:0:PEAK:500:END:1000]
I should have this?
[CE_CAN_DO_INTERACTION:SEV:10000:PROB:100:START:0:PEAK:500:END:1000]

skelepound

  • Bay Watcher
  • Deciever, I name thee Cael
    • View Profile
Re: I don't understand interactions
« Reply #3 on: March 20, 2017, 08:16:48 pm »

      [CE_PHYS_ATT_CHANGE:STRENGTH:500:0:TOUGHNESS:200:0:START:0]
if you want to enhance stats, you use the CE tage before whatever you want to enhance. However, CE_CAN_DO_INTERACTION tends to refer to giving your spellcaster a specific spell. An example:


 [CE_CAN_DO_INTERACTION:START:0]
            [CDI:ADV_NAME:Summon Raven]
            [CDI:INTERACTION:CALL_RAVEN]
            [CDI:TARGET:A:LINE_OF_SIGHT]
            [CDI:TARGET_RANGE:A:1]
            [CDI:VERB:gesture:gestures:NA]
            [CDI:TARGET_VERB:h: disappears, and a raven appears]
            [CDI:WAIT_PERIOD:100]

[INTERACTION:CALL_RAVEN]
   [I_TARGET:A:CORPSE]
      [IT_LOCATION:CONTEXT_ITEM]
      [IT_AFFECTED_CLASS:GENERAL_POISON]
      [IT_REQUIRES:FIT_FOR_ANIMATION]
      [IT_FORBIDDEN:NOT_LIVING]
      [IT_MANUAL_INPUT:corpses]
   [I_EFFECT:ANIMATE]
      [IE_TARGET:A]
      [IE_IMMEDIATE]
      [IE_ARENA_NAME:Summoned Raven]
      [SYNDROME]
      [CE_BODY_TRANSFORMATION:START:0]
         [CE:CREATURE:RAVEN:MALE]
         [CE_DISPLAY_NAME:NAME:raven:ravens:raven:START:0]

This calls a seperately programmed interaction(which i prefer to keep in the same txt file as the original spellcaster) whenever you try and cast whatever spell you've given your witch. So if you want the witch to have a Pain spell, you would want something like this:

 [CE_CAN_DO_INTERACTION:START:0]
            [CDI:ADV_NAME:Psionic Assault]
            [CDI:INTERACTION:MINDLOCK]
            [CDI:TARGET:A:LINE_OF_SIGHT]
            [CDI:TARGET_RANGE:A:3]
            [CDI:VERB:gesture:gestures:NA]
            [CDI:TARGET_VERB:feel an excruciating pain in your head:feels an excruciating pain in their head]
            [CDI:WAIT_PERIOD:400]

[INTERACTION:MINDLOCK]
   [I_SOURCE:CREATURE_ACTION]
   [I_TARGET:A:CREATURE]
      [IT_LOCATION:CONTEXT_CREATURE]
      [IT_AFFECTED_CLASS:GENERAL_POISON]
      [IT_MANUAL_INPUT:target]
   [I_EFFECT:ADD_SYNDROME]
      [IE_TARGET:A]
      [IE_IMMEDIATE]
      [SYNDROME]
      [SYN_NAME:psionic assualt]
         [SYN_AFFECTED_CLASS:GENERAL_POISON]
                        [SYN_CONTACT]
                        [SYN_INJECTED]
                        [SYN_INGESTED]
         [CE_PAIN:SEV:1000000:PROB:100:BP:BY_TYPE:HEAD:ALL:START:0:PEAK:50:END:525]

That, of course, only targets a specific body part - but if you want, you can target multiple body parts with varying degrees of pain. Or all of them the same, for that matter. Hope this helped!
Logged
My magic mod, Schools of Magic:
----------------------------------
http://www.bay12forums.com/smf/index.php?topic=162596.0
----------------------------------
GENERATION 28:
The first time you see this, copy it into your signature on any forum and add 1 to the generation. Social experiment.

Derpy Dev

  • Bay Watcher
  • Normal Person Doing Normal Things
    • View Profile
Re: I don't understand interactions
« Reply #4 on: March 20, 2017, 08:20:24 pm »

Okay, now I get it. Thanks for the help!

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: I don't understand interactions
« Reply #5 on: March 20, 2017, 08:23:16 pm »

In a syndrome you want the CreatureEffect tokens, CE_ like: [CE_CAN_DO_INTERACTION:START:0]

So instead of this
[CE_PAIN:SEV:10000:PROB:100:START:0:PEAK:500:END:1000]
I should have this?
[CE_CAN_DO_INTERACTION:SEV:10000:PROB:100:START:0:PEAK:500:END:1000]
Not quite, it's like shorthand, CreatureEffect_PAIN:SEV:10000 applies a pain Effect to that Creature, so you want CE_PAIN there, if you want it to be able to do an interaction you use the can_do_interaction line, and so forth.
Logged
Engraved here is a rendition of an image of the Dwarf Fortress learning curve. All craftsdwarfship is of the highest quality. It depicts an obsidian overhang which menaces with spikes of obsidian and tears. Carved on the overhang is an image of Toady One and the players. The players are curled up in a fetal position. Toady One is laughing. The players are burning.
The VectorCurses+1 tileset strikes the square set and the severed part sails off in an arc!

Derpy Dev

  • Bay Watcher
  • Normal Person Doing Normal Things
    • View Profile
Re: I don't understand interactions
« Reply #6 on: March 20, 2017, 09:02:41 pm »

So I completely replaced the code for the material emission attack the witch had with the Psionic Assault code you gave me.

It didn't work, so that might not be why the witch isn't working.

skelepound

  • Bay Watcher
  • Deciever, I name thee Cael
    • View Profile
Re: I don't understand interactions
« Reply #7 on: March 20, 2017, 10:32:32 pm »

You also didnt write [OBJECT:INTERACTION] at the very top - maybe that is part of le problem. I just compared it to my Warlock, and you seem to only be missing that
Logged
My magic mod, Schools of Magic:
----------------------------------
http://www.bay12forums.com/smf/index.php?topic=162596.0
----------------------------------
GENERATION 28:
The first time you see this, copy it into your signature on any forum and add 1 to the generation. Social experiment.

Derpy Dev

  • Bay Watcher
  • Normal Person Doing Normal Things
    • View Profile
Re: I don't understand interactions
« Reply #8 on: March 20, 2017, 10:48:22 pm »

You also didnt write [OBJECT:INTERACTION] at the very top - maybe that is part of le problem. I just compared it to my Warlock, and you seem to only be missing that

That's there, I just didn't post it.

Derpy Dev

  • Bay Watcher
  • Normal Person Doing Normal Things
    • View Profile
Re: I don't understand interactions
« Reply #9 on: March 20, 2017, 10:55:21 pm »

So I feel like a dummy. When it stopped working, it stopped using the custom tile color I gave witches and wouldn't refer to them as witches. Somewhere along the lines, I edited out the code that changed this and assumed it wasn't working.

Psionic assault does work. Thank you for having the patience to help me deal with my own mistakes  :-[

skelepound

  • Bay Watcher
  • Deciever, I name thee Cael
    • View Profile
Re: I don't understand interactions
« Reply #10 on: March 20, 2017, 11:15:55 pm »

Thats great! For a minute i was worried i would have to do bugfixing, and im busy on like 10 projects right now - so huge headache.
Logged
My magic mod, Schools of Magic:
----------------------------------
http://www.bay12forums.com/smf/index.php?topic=162596.0
----------------------------------
GENERATION 28:
The first time you see this, copy it into your signature on any forum and add 1 to the generation. Social experiment.