I'm trying to make a state that increases damage if past a threshold of gold.
I have a plugin that allows me to put damage increases in states
This is the current formula but it isn't working:
<state damage modifier: attacker>
if (v[18] > 1000)
return (Math.round(d * 1.5))
</state damage modifier>
v[18] is not a programming syntax, \\v[18] is only used inside Game Messages. Use $gameVariables.value(18) instead.
I changed it to:
<state damage modifier: attacker>
if ($gameVariables.value(18) > 1000)
return (Math.round(d * 1.5))
</state damage modifier>
and it is still not working.
I apologise for not having any code knowledge
which is the plugin you're using?
sometimes they need specific formats, and in this case the return function might or might not be correct use...
so we need to check the website of the plugin for instructions.
Yes sorry, it was Hime's State Damage Modifiers
The issue I was having was an error code of an unexpected identifier.
I put in the new code and it doesn't seem to work still.
When I put:
<state damage modifier: attacker>
if (v[18] > 1000)
d = (Math.round(d * 1.5));
return d;
</state damage modifier>
It doesn't seem to add the bonus
and when I put:
<state damage modifier: attacker>
if ($gameVariables.value(18) > 1000)
d = (Math.round(d * 1.5));
return d;
</state damage modifier>
It gives me the same error as before.
That has stopped it from giving me an error, but it still isn't giving me any damage bonus when the variable is larger than 1000.
That worked perfectly! Thank you for the help!