ON_DAMAGED and ON_DAMAGED_AMOUNT effects

Post Reply
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

ON_DAMAGED and ON_DAMAGED_AMOUNT effects

Post by Midonik »

@Endru1241 , @Savra , any other JSONers, have you ever used effects triggered as-in-title? I thought that they are supposed to give an unit some kind of effect when damaged, but when I tried to use it like that, it doesn't seem to do anything.

Also, with the _AMOUNT one, where exactly are you supposed to enter the amount?
Attachments
unit_ins_inf_warriors_juggernauts.json
Failed attempt
(4.21 KiB) Downloaded 45 times
effect_affect_adrenaline_release.json
(1.81 KiB) Downloaded 44 times
adrenaline_release_effect.json
(1.01 KiB) Downloaded 45 times
adrenaline_release.json
(1.03 KiB) Downloaded 50 times
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
User avatar
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: ON_DAMAGED and ON_DAMAGED_AMOUNT effects

Post by Endru1241 »

I'd try to use it like another, working effect using trigger - veteraning.
It applies effect affect (unit json), given in trnActionUnitID every time specific effectTriggers are met.
So it seems from your jsons, that only EFFECT_AFFECT_GROUND (which is probably only filter) is applied on event ON_DAMAGED
Meanwhile effect related is set to be executed on cast, except - there is no cast.

So I'd change it to:
"effectDefIDRelated":null,
"trnActionUnitID":"EFFECT_AFFECT_ADRENALINE_RELEASE",

But it's not temporary, but permanent change.

To make it temporary maybe set "trnEffectAffectTurnsLeft":["2:EFFECT_ADRENALINE_RELEASE_EFFECT"], in effect_affect_adrenaline_release.json
Although - I'm not sure if it won't crash the game after 2 turns.
I'm also not sure if behaviour ENCHANTMENT would work - if I remember right it only works when applied by aura. I'd try ENCHANTMENT_VANISHING.

Also, I'm not 100%, but I have bleak idea, that ON_DAMAGED_AMOUNT just applies set effect affect this many times, as the number of damage.
I probably once experimented with ON_DAMAGES_AMOUNT and that's why I'd have some not very clear memory of it. Again - not sure.
Age of Strategy design leader
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: ON_DAMAGED and ON_DAMAGED_AMOUNT effects

Post by Midonik »

You're right about all that. Adding the trnEffectAffectTurnsLeft stuff does crash the game when the effect would be inflicted. The _AMOUNT does also multiply the effect by the amount of damage. This isn't quite what I was looking for, but it's nice to know that there's such a possibility.
Attachments
effect_affect_adrenaline_release.json
(1.81 KiB) Downloaded 47 times
adrenaline_release.json
(1.04 KiB) Downloaded 43 times
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: ON_DAMAGED and ON_DAMAGED_AMOUNT effects

Post by Stratego (dev) »

if u send me crash report i can probably fix it easily.
however i am not sure that is a "legal" setting - as i do not understand what both of you wrote above :)
Post Reply

Return to “Ask questions here”