By default, actor parameters are calculated when needed:
(base + plus) * traitRate * buffRate
...where:
base is from the actor's class/level.
plus is from the Change Parametercommand, i.e. the addParam method.
- (This is only available for basic params: MHP, MMP, ATK, DEF, MAT, MDF, AGI, LUK).
traitRate is from parameter rate traits.
buffRate is from any active buffs/debuffs.
Without a plugin, there's no function to simply set a parameter to a specific value.
However, you could try something like this in a
Script command:
JavaScript:
var actor = $gameActors.actor(1);
var add = 10 - actor.paramPlus(2);
actor.addParam(2, add);
In theory this will make the ATK of actor 1 equal to 10
before traits/buffs are applied. Note that this does not remember the previous value!
It did not work and I think I know why.
But I have good news, your information gave me the answer.
I found out thanks to you that the modifications I was doing were being added to "paramPlus".
So I just need to set "base" = 10 in character creator, and when I use "$ gameActors.actor (actorId) .addParam (paramId, n);" and then want to remove the added values (whether or not you know the value) it would only be enough to establish that I want to subtract "paramPlus".
In short, the code that I was looking for is:
JavaScript:
var actor = $gameActors.actor(1);
var add = actor.paramPlus(2);
actor.addParam(2, - add);
Thank you very much caethyril.
😂