Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Help with CE_REGROW_PARTS syndrome  (Read 1681 times)

Rekov

  • Bay Watcher
  • Elf Aficionado
    • View Profile
Help with CE_REGROW_PARTS syndrome
« on: March 14, 2021, 05:41:42 pm »

I'm trying to apply a syndrome to my plant-based creatures which allows them to regrow limbs, and I'm having trouble getting this to work at multiple points.

I'm using an interaction to apply the syndrome to the creature:
Code: [Select]
[INTERACTION:REGROWTH]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
[IT_MANUAL_INPUT:creature]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[SYN_NAME:regrowth]
[SYN_AFFECTED_CLASS:PLANT_BASED]
[CE_REGROW_PARTS:SEV:1:PROB:100:START:0]

My creatures have the following CDI:
Code: [Select]
[CAN_DO_INTERACTION:REGROWTH]
[CDI:TARGET:A:SELF_ONLY]
[CDI:FREE_ACTION]

Problem #1
The creatures do the interaction and get the syndrome in arena mode, but don't seem to ever do so during fortress mode. Do I have to have a CDI_USAGE_HINT for fortress mode or something?

Problem #2
When testing in arena mode, I find that limbs instantly regrow the moment they're separated. Changing the SEV value seems to have no effect on this. How do I make limbs regrow slowly over time, instead?

Concern #3
This is not so much a problem but a question. If I also want to add CE_CLOSE_OPEN_WOUNDS or CE_HEAL_TISSUES to my syndrome, how do I target what gets healed. The wiki says these affect the targeted bodypart, but I'm trying to target the whole creature. How would I go about that?
Logged

Rekov

  • Bay Watcher
  • Elf Aficionado
    • View Profile
Re: Help with CE_REGROW_PARTS syndrome
« Reply #1 on: March 14, 2021, 07:24:42 pm »

Trying an alternate approach for giving the syndrome:
Code: [Select]
[USE_MATERIAL_TEMPLATE:SM_SAP:PLANT_EXTRACT_TEMPLATE]
[STATE_COLOR:ALL_SOLID:AMBER]
[STATE_NAME:ALL_SOLID:frozen sap]
[STATE_ADJ:ALL_SOLID:frozen sap]
[STATE_COLOR:LIQUID:AMBER]
[STATE_NAME:LIQUID:sap]
[STATE_ADJ:LIQUID:sap]
[STATE_COLOR:GAS:WHITE]
[STATE_NAME:GAS:boiling sap]
[STATE_ADJ:GAS:boiling sap]
[DISPLAY_COLOR:6:0:1]
[SYNDROME]
[SYN_NAME:regrowth]
[SYN_AFFECTED_CLASS:PLANT_BASED]
[SYN_CONTACT][SYN_INGESTED]
[CE_CLOSE_OPEN_WOUNDS:SEV:100:PROB:100:START:0]
[CE_REGROW_PARTS:SEV:1:PROB:100:START:0]

[BLOOD:LOCAL_CREATURE_MAT:SM_SAP:LIQUID]

[SECRETION:LOCAL_CREATURE_MAT:SM_SAP:LIQUID:BY_CATEGORY:ALL:VINE]

This seems to work, the downside being that the creature is constantly covered with contaminants. Is there any way to secrete a material internally, as opposed to externally?

Also, when looking at the active syndrome, what do phases/seconds mean here exactly? Are they just going to keep counting up forever?



Logged

pitaden

  • Escaped Lunatic
  • Oh right, I have a forum account! I forgor.
    • View Profile
    • Neocities
Re: Help with CE_REGROW_PARTS syndrome
« Reply #2 on: March 17, 2021, 08:35:19 am »

I don't remember exactly how to do it, but you can make an internal organ like the brain or heart secrete the sap, where it'll still affect the creature but won't be spread around. As for the interaction not being cast in fortress mode, afaik a creature will never use an interaction if it has no usage hint. If you set the USAGE_HINT to GREETING, it'll cast the interaction whenever its near other friendly creatures, which should work for what you're doing
Logged

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: Help with CE_REGROW_PARTS syndrome
« Reply #3 on: March 17, 2021, 10:58:03 am »

Since its trying to heal its own injuries, DEFEND would also work, as it will use it whenever its in combat.

The syndromes are picky in that they won't take effect again until the syndrome is reapplied, so it can't just be an ongoing effect, because it doesn't seem to re-trigger on its own. So a syndrome attached to their sap won't reapply until the sap is washed off and then allowed to recontaminate the creature. You could give them a cleaning interaction to repeatedly clean themselves and make the healing syndrome very short lived, and make sure it allows them to reapply it even while under its effects.

Healing tissues and closing wounds will work just fine if you set them to target BP:BY_CATEGORY:ALL:ALL, then it will affect every tissue of every body part. I'm on my phone right now so there might be a typo in there though.

I've also noticed best results when a healing effect has around 3 stages of the same effects repeated, which each take affect partway through the previous. They seem to have a tendency to just not trigger sometimes, but giving it multiple chances to trigger makes it more likely to work. So i stagger it like 1st stage; 0 to 3 ticks, 2nd stage 1 to 4 ticks, 3rd stage 2 to 5 ticks, then end.
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

Rekov

  • Bay Watcher
  • Elf Aficionado
    • View Profile
Re: Help with CE_REGROW_PARTS syndrome
« Reply #4 on: March 17, 2021, 01:45:31 pm »

Healing tissues and closing wounds will work just fine if you set them to target BP:BY_CATEGORY:ALL:ALL, then it will affect every tissue of every body part. I'm on my phone right now so there might be a typo in there though.

How do I do that exactly? Do I need to add the targeting to the interaction, or to the syndrome itself somehow?
Logged

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: Help with CE_REGROW_PARTS syndrome
« Reply #5 on: March 18, 2021, 12:44:41 am »

Within the synrome effect line, after the sev and prob flags
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.