Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Chosen By Gods interaction  (Read 3405 times)

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Chosen By Gods interaction
« on: February 16, 2012, 10:24:30 pm »

So I had the awesome idea of a reverse necromancer: the gods choose a hero to go forth and smite evil, and they gain the ability to burn the undead! Only, I need some help on the code:
Code: [Select]
interaction_chosen

[INTERACTION:CHOSEN_ONE]

[I_SOURCE:DEITY]
[IS_USAGE_HINT:MAJOR_CURSE]--Dunno what to change to, hoping to avoid 'profaning temple'
[IS_HIST_STRING_1: chosen ]
[IS_HIST_STRING_2: to seek out and destroy the powers of evil]

[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_REQUIRES:CAN_LEARN]
[IT_REQUIRES:CAN_SPEAK]
[IT_FORBIDDEN:NOT_LIVING]
[IT_FORBIDDEN:OPPOSED_TO_LIFE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:WERECURSE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:VAMPCURSE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:DISTURBANCE_CURSE]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[IE_ARENA_NAME:Chosen One]
[SYNDROME]
[CE_DISPLAY_TILE:TILE:165:5:0:1:START:0]--Don't have access to tile list, so can't change this now
[CE_DISPLAY_NAME:NAME:necromancer:necromancers:necromantic:START:0]
[CE_ADD_TAG:NO_SLEEP:NOFEAR:NOEXERT]--A hero is fearless and tireless!
[CE_CAN_DO_INTERACTION:START:0]
[CDI:ADV_NAME:Burn evil]
[CDI:INTERACTION:BURN EVIL]
[CDI:TARGET:A:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:A:10]
[CDI:VERB:shine holy light:shines holy light:NA]
[CDI:TARGET_VERB:is set aflame:are set aflame]
[CDI:WAIT_PERIOD:10]

[INTERACTION:BURN EVIL]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_ITEM]
[IT_REQUIRES:OPPOSED_TO_LIFE]
[IT_MANUAL_INPUT:target]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]--Not sure how to make zombies burst into flames :(
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Re: Chosen By Gods interaction
« Reply #1 on: February 16, 2012, 11:09:51 pm »

Check out the fire interactions in the fire imp/fire man creatures (creature_subterranean). Not sure how to convert the syntax to a regular interaction, but if nothing else you could make a new creature that has it and apply a transformation effect. Or maybe the [I_EFFECT:MATERIAL_EMISSION] tag could be adapted to target creatures instead of whole regions.

edit: Never mind, look at interaction_standard instead. The creatures appear to be specifying CONTEXT_MATERIAL for their MATERIAL_EMISSION interactions. Instead you could make a copy of MATERIAL_EMISSION and specify the fire material there, so that it doesn't have to be tied to a creature.
« Last Edit: February 16, 2012, 11:22:48 pm by Eagleon »
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: Chosen By Gods interaction
« Reply #2 on: February 16, 2012, 11:40:50 pm »

I can't seem to get them to work. Do interactions work if they are in the example folder?
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Re: Chosen By Gods interaction
« Reply #3 on: February 16, 2012, 11:51:35 pm »

No, those are just from Toady to demonstrate some of their uses - actually most of the ones in the example folder won't work if you put them in the raws, since they specify creatures and materials that don't exist. By itself there are hard-coded interactions for vampires, weres, secrets, etc. which will appear unless you change worldgen to limit them.
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: Chosen By Gods interaction
« Reply #4 on: February 16, 2012, 11:52:53 pm »

Any suggestions on how to modify the code?
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Re: Chosen By Gods interaction
« Reply #5 on: February 17, 2012, 12:02:05 am »

Instead of [I_EFFECT:ADD_SYNDROME], on the second interaction (BURN EVIL) replace it with [I_EFFECT:MATERIAL_EMISSION], and follow the basic pattern of the interaction (I keep wanting to type reaction) in interaction_standard. That is, add targets for a material, an emitter, and a target, and change the material in [IT_MATERIAL:CONTEXT_MATERIAL] to something like in the example in interaction_region. The CONTEXT_LOCATION entries are also probably vital to what you need. Keep the letter identifiers ([I_TARGET:B:LOCATION], for instance) the same and I don't think there will be any problems.

Also, if you didn't know (not saying you don't, but just in case), you can use the interactions in the arena so that you can test things quickly instead of generating a world, hehe.
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: Chosen By Gods interaction
« Reply #6 on: February 17, 2012, 12:04:00 am »

About that, I can't seem to use any interactions in the arena. May sound stupid, but do I just press to u button, or is there a secret trick?
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Re: Chosen By Gods interaction
« Reply #7 on: February 17, 2012, 12:05:46 am »

I think they're in a separate menu if I recall, x if I'm not mistaken. I don't know how it would appear, I'm still working out some of this stuff myself in between play.
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: Chosen By Gods interaction
« Reply #8 on: February 17, 2012, 12:18:59 am »

I mean, in the create creature menu, I cannot seem to assign syndromes (arena mode)
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Re: Chosen By Gods interaction
« Reply #9 on: February 17, 2012, 12:27:28 am »

'u', where it says 'no effect' :P Should cycle through what's available.
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: Chosen By Gods interaction
« Reply #10 on: February 17, 2012, 12:38:41 am »

'u', where it says 'no effect' :P Should cycle through what's available.

But it's not. Looks like I'll have to get someone else to test things for me :(
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

Alluvian_Est-Endrati

  • Bay Watcher
  • [ENGRAVERY:MISGUIDED]
    • View Profile
Re: Chosen By Gods interaction
« Reply #11 on: February 17, 2012, 12:42:16 am »

In order to accommodate your request, here is what I attempted:

Code: [Select]
interaction_chosen

[OBJECT:INTERACTION]

[INTERACTION:CHOSEN_ONE]

[I_SOURCE:DEITY]
[IS_USAGE_HINT:MAJOR_CURSE]--Dunno what to change to, hoping to avoid 'profaning temple'
[IS_HIST_STRING_1: chosen ]
[IS_HIST_STRING_2: to seek out and destroy the powers of evil]

[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_REQUIRES:CAN_LEARN]
[IT_REQUIRES:CAN_SPEAK]
[IT_FORBIDDEN:NOT_LIVING]
[IT_FORBIDDEN:OPPOSED_TO_LIFE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:WERECURSE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:VAMPCURSE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:DISTURBANCE_CURSE]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[IE_ARENA_NAME:Chosen One]
[SYNDROME]
[CE_DISPLAY_TILE:TILE:165:5:0:1:START:0]--Don't have access to tile list, so can't change this now
[CE_DISPLAY_NAME:NAME:chosen one:chosen one:chosen one:START:0]
[CE_ADD_TAG:NO_SLEEP:NOFEAR:NOEXERT]--A hero is fearless and tireless!
[CE_CAN_DO_INTERACTION:START:0]
[CDI:ADV_NAME:Burn evil]
[CDI:INTERACTION:BURN_EVIL]
[CDI:USAGE_HINT:ATTACK]
[CDI:TARGET:A:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:A:10]
[CDI:VERB:shine holy light:shines holy light:NA]
[CDI:TARGET_VERB:is set aflame:are set aflame]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:WAIT_PERIOD:10]

[INTERACTION:BURN_EVIL]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
IT_REQUIRES:OPPOSED_TO_LIFE
[IT_MANUAL_INPUT:target]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[CE_CAN_DO_INTERACTION:START:0]
[CDI:ADV_NAME:Die in a Fire]
[CDI:INTERACTION:MATERIAL_EMISSION]
[CDI:USAGE_HINT:ATTACK]
[CDI:MATERIAL:CREATURE_MAT:ELEMENTMAN_FIRE:FLAME:UNDIRECTED_GAS]
[CDI:TARGET:A:SELF_ONLY]
[CDI:WAIT_PERIOD:1]

I had to remove the [IT_REQUIRES:OPPOSED_TO_LIFE] from the targeted syndrome, as it would not allow me to select an animated dead (despite it having that tag). I am not certain that is a valid value, NOT_LIVING may have to be used instead (but I did not try it).

Anyways I was able to successfully give the animated corpse the 'Die in a Fire' ability. However they would not use it on their own. When I switched to the affected creature, I could manually activate it (and they would be surrounded in flames) but unlike other creatures with material emissions this one was not going off properly for some reason.
Logged
"I’m going to keep bloody gambling! Bloody, bloody gambling and drinking! Where’s my bloody drink? Anyone want to gamble for it?”

Send in the Clowns: &.&

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: Chosen By Gods interaction
« Reply #12 on: February 17, 2012, 12:43:56 am »

So we can shine holy light upon foul undead, but we must ask them pretty please to light themselves on fire? :D
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Chosen By Gods interaction
« Reply #13 on: February 17, 2012, 12:51:30 am »

I think in your original post the [IT_LOCATION:CONTEXT_ITEM] should be [IT_LOCATION:CONTEXT_CREATURE].
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Trapezohedron

  • Bay Watcher
  • No longer exists here.
    • View Profile
Re: Chosen By Gods interaction
« Reply #14 on: February 17, 2012, 12:56:31 am »

In order to accommodate your request, here is what I attempted:

Code: [Select]
interaction_chosen

[OBJECT:INTERACTION]

[INTERACTION:CHOSEN_ONE]

[I_SOURCE:DEITY]
[IS_USAGE_HINT:MAJOR_CURSE]--Dunno what to change to, hoping to avoid 'profaning temple'
[IS_HIST_STRING_1: chosen ]
[IS_HIST_STRING_2: to seek out and destroy the powers of evil]

[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_REQUIRES:CAN_LEARN]
[IT_REQUIRES:CAN_SPEAK]
[IT_FORBIDDEN:NOT_LIVING]
[IT_FORBIDDEN:OPPOSED_TO_LIFE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:WERECURSE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:VAMPCURSE]
[IT_CANNOT_HAVE_SYNDROME_CLASS:DISTURBANCE_CURSE]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[IE_ARENA_NAME:Chosen One]
[SYNDROME]
[CE_DISPLAY_TILE:TILE:165:5:0:1:START:0]--Don't have access to tile list, so can't change this now
[CE_DISPLAY_NAME:NAME:chosen one:chosen one:chosen one:START:0]
[CE_ADD_TAG:NO_SLEEP:NOFEAR:NOEXERT]--A hero is fearless and tireless!
[CE_CAN_DO_INTERACTION:START:0]
[CDI:ADV_NAME:Burn evil]
[CDI:INTERACTION:BURN_EVIL]
[CDI:USAGE_HINT:ATTACK]
[CDI:TARGET:A:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:A:10]
[CDI:VERB:shine holy light:shines holy light:NA]
[CDI:TARGET_VERB:is set aflame:are set aflame]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:WAIT_PERIOD:10]

[INTERACTION:BURN_EVIL]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
IT_REQUIRES:OPPOSED_TO_LIFE
[IT_MANUAL_INPUT:target]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[CE_CAN_DO_INTERACTION:START:0]
[CDI:ADV_NAME:Die in a Fire]
[CDI:INTERACTION:MATERIAL_EMISSION]
[CDI:USAGE_HINT:ATTACK]
[CDI:MATERIAL:CREATURE_MAT:ELEMENTMAN_FIRE:FLAME:UNDIRECTED_GAS]
[CDI:TARGET:A:SELF_ONLY]
[CDI:WAIT_PERIOD:1]

I had to remove the [IT_REQUIRES:OPPOSED_TO_LIFE] from the targeted syndrome, as it would not allow me to select an animated dead (despite it having that tag). I am not certain that is a valid value, NOT_LIVING may have to be used instead (but I did not try it).

Anyways I was able to successfully give the animated corpse the 'Die in a Fire' ability. However they would not use it on their own. When I switched to the affected creature, I could manually activate it (and they would be surrounded in flames) but unlike other creatures with material emissions this one was not going off properly for some reason.

Much science and experimenting has lead me to discover that undead cannot use acquired abilities. The living can use it, however, since I tried making a boiling stone reaction that infected someone else with knowledge.

Undead have no problems using natural abilities (aka interactions defined in creature raws).
Logged
Thank you for all the fish. It was a good run.
Pages: [1] 2