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!
Status Effect Power
Re: Status Effect Power
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.
-- Whasf
Re: Status Effect Power
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.
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
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.
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.
Code: Select all
someEntity:addStatusEffect(EffectHere, PowerHere, TickIntervalHere, DurationHere, SubPowerHere, TierHere);
Code: Select all
player:addStatusEffect(EFFECT_STR_BOOST, 12, 0, 60);
Hi, I run The Demiurge server.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGSPLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
Re: Status Effect Power
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.
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
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...
Code: Select all
EFFECTFLAG_ERASABLE = 0x0002
..hmm...
Hi, I run The Demiurge server.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGSPLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE