Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Interactions: having problem with overenthusiastic targeting  (Read 760 times)

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Interactions: having problem with overenthusiastic targeting
« on: January 30, 2014, 08:25:20 am »

Interaction in the creature raw:
Spoiler (click to show/hide)

Interactions in the interactions file:
Spoiler (click to show/hide)

The intent is to have the cave dragon start out in an incredibly aggresive state*, and have this state be switched off by taming. But there's no off switch at the moment, because I haven't gotten the on switch working properly.

For testing, I've been embarking with 20 cut-price cave dragons and immediately drafting the dwarves and stationing them in a corner. The actual berserking happens as planned, with all 20 cave dragons becoming crazed in perfect harmony, but there are assorted issues and oddities.
1. The wagon animals get the 'inspired to kill all other creatures' message in the combat log, but never go berserk.
2. The 'observes and hates all other creatures' message appears 20 times, but only on about a third of the dragons. I don't get it.
3. Loyalty issues -- in one test, a wandering animal drew a dragon too close to the dwarves, and the dragon killed most of them. When the dragon went to rejoin the others in hanging around the wagon location, it was set upon and killed. This did not start a loyalty cascade, but I'll keep it in mind for future aggressive reactions to being crowded.

The main problem is #1. The interactions should only ever be targeting cave dragons, but other creatures get caught in the berserk bomb's radius.

*Given that cave dragons are very big large predators and buildingdestroyer:2, this may be unecessary...
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile
Re: Interactions: having problem with overenthusiastic targeting
« Reply #1 on: January 30, 2014, 08:45:18 am »

I think they use it on others (or try to) because of the [CDI:TARGET:B] you left there, which is entirely unecessary.

Remove [CDI:TARGET:B] and [CDI:TARGET_RANGE:B:10] from [INTERACTION:KILL_ALL_THINGS_START] and [IE_TARGET:B] from [INTERACTION:KILL_ALL_THINGS_ACTIVATE]
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Interactions: having problem with overenthusiastic targeting
« Reply #2 on: January 30, 2014, 10:05:10 am »

Doing that stops them from doing the berserk interaction at all.

Going further and removing [I_TARGET:B:CREATURE] and its associated lines from KILL_ALL_THINGS_ACTIVATE causes them to use the interaction on themselves only, triggering the crazed state at different times and causing infighting.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Di

  • Bay Watcher
    • View Profile
Re: Interactions: having problem with overenthusiastic targeting
« Reply #3 on: January 31, 2014, 07:45:41 am »

Well, for the first one, you've made syndrome affect only cave dragons, but not the interaction itself. Wiki says IT_AFFECTED_CREATURE can help with this.

For the second one, do other dragons never use their interaction or it's only a third of dragons getting angry simultaneously?
I remember indigo_phoenix complaining that they use interactions randomly, right away when they get a chance.
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

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Interactions: having problem with overenthusiastic targeting
« Reply #4 on: January 31, 2014, 01:45:33 pm »

Aha, that was the missing link. I looked the interactions over and over but couldn't find anywhere else for the (not needed) token to go.

Quote
For the second one, do other dragons never use their interaction or it's only a third of dragons getting angry simultaneously?
I remember indigo_phoenix complaining that they use interactions randomly, right away when they get a chance.
Yep, that's why the rage activation is a self + others interaction. Self-only means they use it at staggered intervals, which is no good for the CRAZED token. If they applied NO_AGING to themselves first I think it'd be safe for them to activate OPPOSED_TO_LIFE on themselves at staggered intervals. That was the original reason for the delay in activating the 'activate rage' interaction, but then I realised that there was nothing in OTL that wasn't covered by CRAZED.

The self + others format means that as soon as one creature decides to use an interaction, all the other creatures in range who could have used it have it used for them. In this case it's a necessity, since cave dragon do not mess around once they want something dead. Because of that I can't tell if 'activating rage' after being attacked halts any further attacks.

As for the modified version, removing only the suggested parts stopped the berserking (this may or may not be one of the tricks used for the Great Devourer -- I don't quite understand the targeting trick). Removing all references to Target B caused the dragons to berserk only themselves at staggered intervals, which is what I expected to happen.

Here are the current interactions:
Spoiler (click to show/hide)

The interaction in the creature raws remains unchanged.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.