Page 1 of 1
Status Effect Power
Posted: Wed Feb 08, 2017 9:47 am
by Shinzaku
Hey all,
I've been noticing in a lot of the scripts for status effects, there are functions for getPower and getSubpower. I am confused as to where exactly it is pulling these values from in order to modify them.
Could anyone provide a hint? Thanks!
Re: Status Effect Power
Posted: Wed Feb 08, 2017 9:49 am
by whasf
The database. I'm not in front of my machine right now so I can't tell you exactly which table, but you should be able to figure it out by looking at those functions in the core.
Re: Status Effect Power
Posted: Wed Feb 08, 2017 7:20 pm
by Shinzaku
I'm a little bad with code.
It looks like in the core when it calls setPower to set that value, it's gathering it from a LUA value. However I cannot find any tables of data in the LUA relating to status effect power.
Under the database, there seems to be no columns indicating power or subpower. @_@; I apologize for the ignorance.
Edit: I found that it saves status effects with their current power and subpower under char_effects. Still searching for the origin of the values.
Re: Status Effect Power
Posted: Wed Feb 08, 2017 9:14 pm
by TeoTwawki
Their origin is whatever a scritp told the effect to get "born" with. The whole point of that existing is so it can be differnet things. It it were always the same we'd just have a static number and never need to "get" it.
Code: Select all
someEntity:addStatusEffect(EffectHere, PowerHere, TickIntervalHere, DurationHere, SubPowerHere, TierHere);
Code: Select all
player:addStatusEffect(EFFECT_STR_BOOST, 12, 0, 60);
I didn't use subpower or tier for that str boost effect. They can be omitted when nto used. Tick however, had to be set. If I just said "12,60" and left out that zero it would error.
Re: Status Effect Power
Posted: Wed Feb 08, 2017 9:43 pm
by Shinzaku
Ah that makes sense.
I'm particularly curious about looking at modifying Dia values to make the def down a little stronger. Looks like the subpower parameter is setting a flag, whereas the tier is the power of the def down.
target:addStatusEffect(EFFECT_DIA,3+dotBonus,3,duration,FLAG_ERASABLE, 15);
Thanks guys! I'll start to figure out more effects and spells from here.
Re: Status Effect Power
Posted: Wed Feb 08, 2017 10:09 pm
by TeoTwawki
Now I'm wondering where FLAG_ERASABLE gets defined before those scripts use it, because I only see
in status.lua and status_effect.h
..hmm...