Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Having some trouble getting my interactions to work correctly (or test them)  (Read 2150 times)

wooks

  • Bay Watcher
    • View Profile

I've pieced together a series of interaction based on some that I found looking around here and through mods, and am attempting to get the secrets to propagate in worldgen. So far I can manage to get many initial secret slabs started, but so far no one outside the first person has learned from or copied the slabs (despite a long and large world gen, and some very promising scholar candidates).  This would probably be enough for me, except that I haven't managed to get anything to work properly in the arena where I am trying to test them, as in when I control the units and use the reactions I dont see associated changes in attributes and stats. I was hoping one you you might know why.

Thanks!

 an excerpt:
Code: [Select]
interaction_conglomerate_magic

[OBJECT:INTERACTION]

[INTERACTION:WEAK_RECUPERATION]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
[IT_MANUAL_INPUT:recipient]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[SYN_NAME:Weak Recuperation]
[SYN_CONTACT]
[SYN_INHALED]
[SYN_INGESTED]
[SYN_INJECTED]
[CE_PHYS_ATT_CHANGE:RECUPERATION:250:2500:START:150:END:3650]

[INTERACTION:MORTALITY_SPELL]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
[IT_MANUAL_INPUT:recipient]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[SYN_NAME:Spell of Mortality]
[SYN_CONTACT]
[SYN_INHALED]
[SYN_INGESTED]
[SYN_INJECTED]
[CE_REMOVE_TAG:NO_AGING:START:0:END:0]

[INTERACTION:CURSE_OF_LUCK]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
[IT_MANUAL_INPUT:recipient]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[SYN_NAME:Minor Curse of Luck]
[SYN_CONTACT]
[SYN_INHALED]
[SYN_INGESTED]
[SYN_INJECTED]
[CE_SKILL_ROLL_ADJUST:PERC:50:PERC_ON:20:START:0:END:1500]

[INTERACTION:MUNDANE_SPELL_ADD_TRANCES]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
[IT_MANUAL_INPUT:recipient]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[SYN_NAME:Spell of the Martial Trance]
[SYN_CONTACT]
[SYN_INHALED]
[SYN_INGESTED]
[SYN_INJECTED]
[SYN_IMMUNE_CREATURE:DWARF:ALL]
[CE_ADD_TAG:TRANCES:START:0:END:2400]

[INTERACTION:FUNDAMENTALIST_MAGIC]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:BALANCE]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:BOUNDARIES]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:CREATION]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:DAWN]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:DREAMS]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:FAME]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:INSPIRATION]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:LAWS]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:LUCK]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:OATH]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:RUMORS]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:SACRIFICE]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:SCHOLARSHIP]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:TRUTH]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:WISDOM]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_SOURCE:SECRET]
[IS_NAME:the basics of magic casting]
[IS_SPHERE:WRITING]
[IS_SECRET_GOAL:IMMORTALITY]
[IS_SECRET:SUPERNATURAL_LEARNING_POSSIBLE]
[IS_SECRET:MUNDANE_RESEARCH_POSSIBLE]
[IS_SECRET:MUNDANE_TEACHING_POSSIBLE]
[IS_SECRET:MUNDANE_RECORDING_POSSIBLE:objects/text/book_instruction.txt:objects/text/sphere_WISDOM.txt]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_REQUIRES:CAN_LEARN]
[IT_REQUIRES:CAN_SPEAK]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[IE_ARENA_NAME:Magic Initiate]
[SYNDROME]
[CE_DISPLAY_NAME:NAME:magic initiate:magic initiates:magic initiate:START:0]
[CE_CAN_DO_INTERACTION:START:0]
[CDI:ADV_NAME:Spell of Minor Recuperation]
[CDI:INTERACTION:WEAK_RECUPERATION]
[CDI:USAGE_HINT:FLEEING]
[CDI:USAGE_HINT:CLEAN_FRIEND]
[CDI:TARGET:A:SELF_ALLOWED:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:A:10]
[CDI:MAX_TARGET_NUMBER:A:5]
[CDI:BP_REQUIRED:BY_TYPE:GRASP]
[CDI:VERB:gesture:gestures:NA]
[CDI:TARGET_VERB:begin to heal faster:seems to heal faster]
[CDI:WAIT_PERIOD:100]
[CE_CAN_DO_INTERACTION:START:0]
[CDI:ADV_NAME:Spell of Imposed Mortality]
[CDI:INTERACTION:MORTALITY_SPELL]
[CDI:USAGE_HINT:ATTACK]
[CDI:TARGET:A:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:A:10]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:BP_REQUIRED:BY_TYPE:GRASP]
[CDI:VERB:gesture:gestures:NA]
[CDI:TARGET_VERB:begin to feel an existential dread:feels an existential dread]
[CDI:WAIT_PERIOD:180]
[CE_CAN_DO_INTERACTION:START:0]
[CDI:ADV_NAME:Curse for the unlucky]
[CDI:INTERACTION:CURSE_OF_LUCK]
[CDI:USAGE_HINT:ATTACK]
[CDI:TARGET:A:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:A:25]
[CDI:MAX_TARGET_NUMBER:A:10]
[CDI:BP_REQUIRED:BY_CATEGORY:MOUTH]
[CDI:VERB:mutter:mutters:NA]
[CDI:TARGET_VERB:feel unlucky:feels unlucky]
[CDI:WAIT_PERIOD:300]
[CE_CAN_DO_INTERACTION:START:0]
[CDI:ADV_NAME:Words for the martial spirit]
[CDI:INTERACTION:MUNDANE_SPELL_ADD_TRANCES]
[CDI:USAGE_HINT:CLEAN_FRIEND]
[CDI:USAGE_HINT:CLEAN_SELF]
[CDI:USAGE_HINT:FLEEING]
[CDI:TARGET:A:SELF_ALLOWED:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:A:5]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:BP_REQUIRED:BY_CATEGORY:MOUTH]
[CDI:VERB:mutter:mutters:NA]
[CDI:TARGET_VERB:feel martial:feels martial]
[CDI:WAIT_PERIOD:400]
« Last Edit: October 19, 2019, 05:09:59 pm by wooks »
Logged
In a game like Dwarf Fortress, going to the wiki being cheating is like saying bringing a parachute is cheating for skydiving.
"Has it been 4 days? Better check if my penis is still there again."

wooks

  • Bay Watcher
    • View Profile

I spent the day doing more science on this. I looked at everything under the sun about the spells I am using and it seems that there is just no feedback in the game when attributes of creatures change with (timed?) reactions. So, they are currently working, but you wouldn't know that unless you did what I did and ran a bunch of fights in the arena for comparison. Also as someone else stated in another thread on the topic of world gen secrets, you must include their own [I_SOURCE:SECRET] block for every sphere or you wont see them used in world gen. I have yet to get them to propagate via world gen libraries, but that may be a fools endeavor. For now I will settle for a rich availability of slabs.

Also, it appears that megabeasts, and maybe semi-megabeasts get the ability to bestow slabs on their worshipers if they align in sphere, meaning you get a whole lot of dragon-fire slabs.

Also, also, it seems like for some reason historical figures which manage to get bestowed one slab, more often than I would have expected, manage to get bestowed a second slab for a different types of magic. In some cases I would say this can be explained by a sphere overlapping two or more areas of magic, but in many cases it seems that they managed to convince completely separate deities, often of a different sphere than the initial, to bestow upon them a second level of knowledge. That's pretty cool. On the more funny note, it also seems that deities can bestow slabs to creatures which cant read them if the spheres are just right, when that happens they end up getting placed on some bookshelf somewhere with no one the wiser to the magics they contain.
« Last Edit: October 19, 2019, 09:52:15 pm by wooks »
Logged
In a game like Dwarf Fortress, going to the wiki being cheating is like saying bringing a parachute is cheating for skydiving.
"Has it been 4 days? Better check if my penis is still there again."

Unknown72

  • Bay Watcher
  • Undead Enthusiast, at your service.
    • View Profile

I don't know about tags, but for things like STRENGTH, RECUPERATION (I think), AGILITY, etc you can see if it worked via using Dwarf Therapist and testing it in Fortress Mode.

For example, to see if an interaction works for a secret, I first give something similar to it to the dwarf caste's, then run Fortress mode, maybe spawn an enemy with DFHack so that the interaction goes off, pause, then pull up Dwarf Therapist and refresh the attributes page. Repeat the last 2 steps during the entire combat until something changes, if combat ends and nothing changed over the course of it, then it didn't work and something's going wrong.

It's a bit lengthy but it's a lot quicker then having to compare the speeds of different sessions of combat and seeing how fast/slow they ended and the like. I've had to get really familiar with how interactions and syndromes work recently cause of the magic mod i'm making and how semi-complicated it can get sometimes.

Hope this helps!
Logged
You guys ought to fix Unknown72's turn to some point later in the order. Maybe after Sanctume. Normally that's what happens when someone fesses up to having real life going up like a storm of explosive diarrhoea blasted into a fan.

@me on Discord: Multi#0897

wooks

  • Bay Watcher
    • View Profile

Tons! Thank you very much for the insight! It crossed my mind to use therapist to view all the extra values, but when it didn't work in arena mode it totally escaped me to try it in fortress mode like that.
Logged
In a game like Dwarf Fortress, going to the wiki being cheating is like saying bringing a parachute is cheating for skydiving.
"Has it been 4 days? Better check if my penis is still there again."

Unknown72

  • Bay Watcher
  • Undead Enthusiast, at your service.
    • View Profile

Yea I had the same thought of using it for Arena mode too tbh! Would've been even faster if it did. Then it just randomly occurred to me that I could just generate a pocket world with 5 year history and work from there since it'll work doing so.

Can't wait to see what you come up with interactions wise!
Logged
You guys ought to fix Unknown72's turn to some point later in the order. Maybe after Sanctume. Normally that's what happens when someone fesses up to having real life going up like a storm of explosive diarrhoea blasted into a fan.

@me on Discord: Multi#0897

wooks

  • Bay Watcher
    • View Profile

SUCCESS! I got the secret to spread via a library in world gen! -- ignore the way it fails to read out the secret correctly and gives a sphere tag, and also the game recognizes they aren't necromancers. I think the third party legends viewer is taking some shortcuts that are less than mod friendly.
Spoiler (click to show/hide)
« Last Edit: October 20, 2019, 12:29:54 pm by wooks »
Logged
In a game like Dwarf Fortress, going to the wiki being cheating is like saying bringing a parachute is cheating for skydiving.
"Has it been 4 days? Better check if my penis is still there again."

wooks

  • Bay Watcher
    • View Profile

here is another image from the regular legends viewer that shows how a slab might make a bunch of wizards and then also end up as an artifact in your fort.

Spoiler (click to show/hide)
Logged
In a game like Dwarf Fortress, going to the wiki being cheating is like saying bringing a parachute is cheating for skydiving.
"Has it been 4 days? Better check if my penis is still there again."