I have it, in the good order and up to date.
The thing is, my passive state is added, but only once instead of twice (when the augment is equipped twice).
And the Augment is a common item, so the passive state can't be added on it.
EDIT : I think it doesn't apply it a second time because both augments are applying the same effect.
I think I need a condition saying
If this state is applied and if you want to apply it a second time, then apply this state *2 (or something like this)
by default, no state can be added more than once. If a state already is available, applying it again only resets the timer (if any).
I know there are plugins that change the engine to allow stackable states, but those have to be implemented and configured before this idea can work.
The main issue right now is that the passive state can only apply once. Adding the passive state a second time, by default, doesn't cause it to stack. So technically, the passive state is working as intended, it just isn't working the way you want it to.
Some custom code may be needed to fix this problem. Try something like this in the state notetag instead of Amplify:
<Custom Apply Effect>
user._waterAmp = user._waterAmp || 0;
user._waterAmp += 1;
</Custom Apply Effect>
<Custom Remove Effect>
user._waterAmp -= 1;
if (user._waterAmp === 0) user._waterAmp = undefined;
</Custom Remove Effect>
<Custom Confirm Effect>
user._waterAmp = user._waterAmp || 1;
var elements = this.getItemElements();
if (elements.contains(waterId#)) {
var increase = user._waterAmp;
value = Math.floor(1 + (.05 * increase));
}
</Custom Confirm Effect>
I'm not certain if this will work with passive states, but it's worth a shot.
Edit: Also, you'll need Buffs & States Core for this to work.
OK, I see the issue. I put in the wrong equation near the end. This line:
value = Math.floor(1 + (.05 * increase));
Should be this:
value *= 1 + (.05 * increase);
Works almost like i'd like
weather or not I have 1 or 2 accessories with the augment equipped, it deal 120HP dmg
when the damage is applied, the damage pop up writes 115 5
I may have given the wrong value again. The current version may be keeping decimals. Try this one:
value = Math.floor(value * (1 + .05 * increase));
works when 1 augment is equipped and writing the pop up damage correctly
doesn't work when 2 augments are equipped. It deals the exact same damage as when 1 augment is equipped.
I was afraid that might happen. Once the passive is attached once, it won't apply the state a second time. The code needs to be changed in a way that changes the waterAmp variable through something other than the state. Unfortunately, I'm not sure if the augment item can support code that affects the actor, so I'm a bit lost at this point.
As I wrote far above there should be plugins that allow for stacking states, you need to find one of them and install that one
Thanks to both of you for the help.
I'm gonna check for that kind of plugin.