Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Why don't these interactions work?  (Read 707 times)

Dubya

  • Bay Watcher
    • View Profile
Why don't these interactions work?
« on: June 04, 2020, 07:42:07 pm »


Here's my interaction file

Code: [Select]
[OBJECT:INTERACTION]


[INTERACTION:BLOOD_CRAZE]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
  [IT_MANUAL_INPUT:focus]
[IT_REQURIES:HAS_BLOOD]
[IE_ARENA_NAME:blood craze]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[SYN_NAME:blood craze]
[CE_ADD_TAG:CRAZED:START:1:END:600]
[CE_ERRATIC_BEHAVIOR:SEV:10000:RESISTABLE:START:1:PEAK:5:END:600]
[CE_FEEL_EMOTION:RAGE:rage:SEV:10000:RESISTABLE:START:1:PEAK:5:END:600]

[INTERACTION:SAVAGE_KICK]
[I_SOURCE:ATTACK]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
  [IT_MANUAL_INPUT:target]
[I_EFFECT:PROPEL_UNIT]
[IE_TARGET:A]
[IE_IMMEDIATE]
[IE_PROPEL_FORCE:300000]
[IE_ARENA_NAME:savage kick]


[INTERACTION:SAVAGE_KICK2]
[I_TARGET:B:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
  [IT_MANUAL_INPUT:target]
[I_EFFECT:PROPEL_UNIT]
[IE_TARGET:B]
[IE_IMMEDIATE]
[IE_PROPEL_FORCE:300000]
[IE_ARENA_NAME:savage kick]

and my creature file

Code: [Select]
[ATTACK:KICK:BODYPART:BY_TYPE:STANCE]
[ATTACK_SKILL:STANCE_STRIKE]
[ATTACK_VERB:kick:kicks]
[ATTACK_CONTACT_PERC:100]
[ATTACK_FLAG_WITH]
[ATTACK_PRIORITY:MAIN]
[ATTACK_PREPARE_AND_RECOVER:5:5]
[SPECIALATTACK_INTERACTION:SAVAGE_KICK]

[CAN_DO_INTERACTION:BLOOD_CRAZE]
[CDI:ADV_NAME:Blood craze]
[CDI:USAGE_HINT:ATTACK]
[CDI:TARGET:LINE_OF_SIGHT]
[CDI:FREE_ACTION]
[CDI:TARGET_RANGE:A:40]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:VERB:transfix your gaze:transfixes its gaze:NA]
[CDI:TARGET_VERB:contorts their face with ill intent:contorts their face with ill intent]
[CDI:WAIT_PERIOD:500]


[CAN_DO_INTERACTION:SAVAGE_KICK2]
[CDI:ADV_NAME:Savage kick]
[CDI:USAGE_HINT:ATTACK]
[CDI:TARGET:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:B:2]
[CDI:FREE_ACTION]
[CDI:MAX_TARGET_NUMBER:B:1]
[CDI:VERB:unleashes a powerful kick:unleashes a powerful kick:NA]
[CDI:WAIT_PERIOD:100]

Doing my testing in the arena

The blood craze applies the syndrome, but the unit that it gets applied to does nothing. It doesn't attack anybody, friendly or neutral, it just does nothing. Neither of the PROPEL_UNIT interactions work either. The castable one can be selected in a menu while in arena mode, but once you actually target something and use it nothing happens. It doesn't go on cooldown and I don't even get the "unleashes a powerful kick" text. Likewise, the interaction tied to the kick attack doesn't work either. The creature will land a kick and nothing else happens as far as I can tell.
Logged

Loam

  • Bay Watcher
  • a Moal
    • View Profile
Re: Why don't these interactions work?
« Reply #1 on: June 07, 2020, 11:17:01 am »

First, testing in the arena doesn't always work. The arena messes with creatures' morale, emotions, and loyalty, so syndromes that affect these probably won't work as intended. Adventure Mode is best for that kind of testing - make a creature that uses your interactions naturally, then give them [OUTSIDER_CONTROLLABLE] (or whatever the tag is) and make an adventurer of one.

There's a couple errors in BLOOD_CRAZE:
   1) [IE_ARENA_NAME] should go under [I_EFFECT], not [I_TARGET]. Not sure if that's really serious or not.
   2) CE_FEEL_EMOTION should look like this: [CE_FEEL_EMOTION:EMOTION:RAGE:SEV:10000 <etc>]. You've dropped the extra EMOTION and included a string "rage" which isn't called for.
   3) Not really an "error," but try setting START:0 for all of these (instead of 1) - should make it happen sooner.

PROPEL_UNIT actually requires two targets. SAVAGE_KICK should look like this:
Code: [Select]
[INTERACTION:SAVAGE_KICK]
[I_TARGET:A:LOCATION]
[IT_LOCATION:CONTEXT_LOCATION]
[I_TARGET:B:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_MANUAL_INPUT:target]
[I_EFFECT:PROPEL_UNIT]
[IE_PROPEL_FORCE:100000]
[IE_TARGET:A]
[IE_TARGET:B]
[IE_IMMEDIATE]
and the corresponding creature entry:
Code: [Select]
[CAN_DO_INTERACTION:SAVAGE_KICK]
[CDI:ADV_NAME:Savage kick]
[CDI:TARGET:B:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:B:2]
[CDI:USAGE_HINT:ATTACK]
        [CDI:FREE_ACTION]
[CDI:VERB:unleash a powerful kick:unleashes a powerful kick:NA]
[CDI:MAX_TARGET_NUMBER:B:1]
[CDI:WAIT_PERIOD:100]

Target A is, I think, the point away from which target B (the victim) will be propelled. Since you can't manually select it, it will always be the location of the interaction user - hence, the interaction propels target B away from the user.

I suspect trying to make SAVAGE_KICK work on an actual kick is fruitless. The SPECIALATTACK_INTERACTION tag is used for default werebeasts and seems tailored specifically to their bite-curse-transfer mechanism. It's probably an issue with the multiple targets that PROPEL_UNIT takes.
Logged
Thob Goes to the Surface (Adventure Mode story, in progress)

Dubya

  • Bay Watcher
    • View Profile
Re: Why don't these interactions work?
« Reply #2 on: June 07, 2020, 03:05:38 pm »

Propel unit works correctly now, thanks a ton man! Really appreciate the insight about multi-target interactions and attacks too, will be helpful to not run into that in the future.
Logged