I was wondering if it would be possible to have a regeneration effect based on a parameter.
For example, each turn the character recovers (parameter value)/2 HP. So if they had 20 vitality (or whatever param) they would recover 10 HP.
If possible, I would like to make it work with a state, so I can use yanfly's passive states and tick based regen.
In MV, it can be easily done with a lunatic mode parameter on Yanfly's Buff and State's core. For example, here's the code I use to regenerate 2 * the caster's MAT in a state (ignore the fact the variable is called damage, I use the same code for poisons too, and didn't want to change the name of the variable):
<Custom Regenerate Effect>
var damage = origin.mat * 2.0;
// Heal the amount of HP stored in damage.
target.gainHp(damage);
// Check if the target is dead.
if (target.isDead()) {
// If the target is dead, make it collapse.
target.performCollapse();
}
</Custom Regenerate Effect>
Change the code in line 1 to regenerate whatever you wish.
What'd you change line 1 to? It will calculate whatever you change line 1 to for your regen.
Also, keep in mind that CTB was never designed to work well for low AGI values, so you may run into a lot of trouble with that alone. The only fix is to raise your AGI values if that is causing a problem.