Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Obscure interaction/syndrome question (not sure it fits in the general thread)  (Read 984 times)

Shophaune

  • Bay Watcher
    • View Profile

Is it possible to pass a material down through a CAN_DO_INTERACTION, into a syndrome that has a CE_CAN_DO_INTERACTION? So like, I want a set of elemental "bomb" syndromes where one can be placed on an enemy through an interaction, which then gains the ability to do an UNDIRECTED_DUST breath attack of a specific material. Is it possible to pass this material down from the interaction that places the bomb initially, or do I need a seperate syndrome for each kind of bomb?

e.g. Can I do something like
Code: [Select]
[CAN_DO_INTERACTION:BOMB]
...
   [CDI:MATERIAL:<whatever>:UNDIRECTED_DUST]
   [CDI:TARGET:B:LINE_OF_SIGHT]

[INTERACTION:BOMB]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:MATERIAL]
   [IT_MATERIAL:CONTEXT_MATERIAL]
[I_TARGET:B:CREATURE]
   [IT_LOCATION:CONTEXT_CREATURE]
[I_EFFECT:ADD_SYNDROME]
   [IE_TARGET:C]
   [SYNDROME]
      [SYN_NAME:Bombed]
      [CE_CAN_DO_INTERACTION:START:100:END:200]
         [CDI:INTERACTION:BOMB_EXPLODE]
         [CDI:USAGE_HINT:GREETING]
         [CDI:MATERIAL:A:UNDIRECTED_DUST]
         [CDI:TARGET:C:LINE_OF_SIGHT]
         [CDI:TARGET_RANGE:3]
         [CDI:WAIT_PERIOD:100]

[INTERACTION:BOMB_EXPLODE]
        [I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:MATERIAL]
[IT_MATERIAL:CONTEXT_MATERIAL]
[I_TARGET:B:LOCATION]
[IT_LOCATION:CONTEXT_LOCATION]
[I_TARGET:C:LOCATION]
[IT_LOCATION:CONTEXT_CREATURE_OR_LOCATION]
[IT_MANUAL_INPUT:target]
[I_EFFECT:MATERIAL_EMISSION]
[IE_TARGET:A]
[IE_TARGET:B]
[IE_TARGET:C]
[IE_IMMEDIATE]

And have the <whatever> material be released as undirected dust by the targeted enemy 100-200 ticks later?

TL;DR: Can you pass a material in from a CAN_DO_INTERACTION, down through the interaction into a syndrome? And then further through the syndrome into a CE_CAN_DO_INTERACTION?
« Last Edit: September 08, 2019, 04:58:43 am by Shophaune »
Logged
HB, I have an idea. It involves harassment.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist

Yeah, that works, but can easily spiral and end up affecting everyone on the map.

There are a couple of disease/epidemic mods out there that use the same idea.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Shophaune

  • Bay Watcher
    • View Profile

Yeah, that works, but can easily spiral and end up affecting everyone on the map.

There are a couple of disease/epidemic mods out there that use the same idea.

Oh I don't plan on having the released material cause these syndromes itself, I just wanted to double check if I could get away with one interaction/syndrome for multiple materials (because I'm planning like seven different types of 'bomb') because I hate having to repeat myself constantly in code.
Logged
HB, I have an idea. It involves harassment.