I have a weapon that is supposed to restore 1% MP per round, so I have it with the effect of MRG+1%, but... no MP is gained back automatically during battle.
Does it not work with weapons or could this be a result of script conflict or something?
I've just tested to be sure, if you only have 1% of MRG, then you need a bare minimum of 100 mp in order to recover any at all. How much mp does the actor with the MRG+1% weapon have? That's the first thing to check.
The reason for the problem is that integers cut off/round down fractions. Which means that any regeneration rate that results in less than one point per round will become zero.
The script code above simply adds one to the MP no matter what the regen rate really is - which is not the same as "minimum +1", because if the MMP were 100 and the MRG were 1%, it would result in adding +2 MP instead of +1.
Actually I tested it rather thoroughly, with 0 MRG, there is no recovery, with 1% MRG, you will always get at least 1 mp recovery, if you qualify for 1 mp recovery already, it doesn't add any more. Compare it to the original method.
def regenerate_mp @result.mp_damage = -(mmp * mrg).to_i self.mp -= @result.mp_damageendIt hasn't had a chance to "clear" the @result.mp_damage data so it should still be usable, which I have verified with the default scripts.I do agree with you on what caused the problem in the first place tho, the snippet I posted in the above post simply puts a minimum mp recovery in place for positive amounts of MRG.