I've given one of my modded creatures the ability to summon a copy of itself. My intent was that the creature would summon a single copy of itself, then wait for a while before doing so again. Problem is, this was the result:
Does anyone know a way to stop this from happening? The code for the interaction and creature CDI is below:
[INTERACTION:SUMMON_AMALGAM]
[I_TARGET:A:LOCATION]
[IT_LOCATION:CONTEXT_LOCATION]
[I_TARGET:B:LOCATION]
[IT_LOCATION:RANDOM_NEARBY_LOCATION:A:5]
[I_EFFECT:SUMMON_UNIT]
[IE_TARGET:B]
[CREATURE:SLIME:AMALGAM]
[CAN_DO_INTERACTION:SUMMON_AMALGAM]
[CDI:ADV_NAME:Create Amalgam copy]
[CDI:TARGET:SELF_ONLY]
[CDI:TARGET_RANGE:0]
[CDI:MAX_TARGET_NUMBER:1]
[CDI:USAGE_HINT:DEFEND]
[CDI:VERB:fission a clone:fissions a clone:NA]
[CDI:TARGET_VERB:fission a clone:fissions a clone]
[CDI:WAIT_PERIOD:3000]
Couple of things.
- You can try extending its wait time, but know that fortress mode happens faster than adventurer mode (time passes 'faster'), plus it may spam it anyway.
- You can try making the interaction add a tag to the slime that explicitly prohibits it using the interaction for a time. In fact, I think its better to have the interaction
remove a tag to make it so that new mons will spawn with the tag.
- You have to consider what the new monsters will do. In all liklihood they will use that interaction themselves as soon as possible. I havent tested it, but try making the new creature a different caste that cannot use the interaction.
- I once tried to make 'legion' from castlevania by adding parts to it that would melt when loaded into the reality bubble and the having it reanimate those parts located after. Think of you ripping off your elbows and reanimating your hands. But with more hands. it . . . worked, but with some side effects.
- Try making several castes of 'slime', ones that will use the above tag principle to create wait times for itself.
- ie slime caste 1 make slime 2 (caste 2), and slime 1 loses its 'like fighting' tag for 2400 ticks.
Slime 2 turns itself into caste 3 via interaction, and loses 'likes fighting for 4800 ticks.
Then, when the interaction expires they gain their tags back and split again
I havent explicitly tested these out, but they have varying levels of promise. if it all fails you can try to use dfhack commands.