No idea about JS in general btw.
Used to using yanfly's base parameters to increase HP based on DEF. But unsure what the code is supposed to be in this version, or if its even setup to be able to do it?
Parameter Settings -> Basic Parameters -> JS: Formula:
This appears to be a ''how to'' but an example would help 😛
I tried adding this but didn't work.
let mhp = (base + plus) * paramRate * buffRate + flatBonus + a.def * 2;
Used to using yanfly's base parameters to increase HP based on DEF. But unsure what the code is supposed to be in this version, or if its even setup to be able to do it?
Parameter Settings -> Basic Parameters -> JS: Formula:
// Determine the variables used in this calculation.
let paramId = arguments[0];
let base = this.paramBase(paramId);
let plus = this.paramPlus(paramId);
let paramRate = this.paramRate(paramId);
let buffRate = this.paramBuffRate(paramId);
let flatBonus = this.paramFlatBonus(paramId);
// Formula to determine total parameter value.
let value = (base + plus) * paramRate * buffRate + flatBonus;
// Determine the limits
const maxValue = this.paramMax(paramId);
const minValue = this.paramMin(paramId);
// Final value
return Math.round(value.clamp(minValue, maxValue));
let paramId = arguments[0];
let base = this.paramBase(paramId);
let plus = this.paramPlus(paramId);
let paramRate = this.paramRate(paramId);
let buffRate = this.paramBuffRate(paramId);
let flatBonus = this.paramFlatBonus(paramId);
// Formula to determine total parameter value.
let value = (base + plus) * paramRate * buffRate + flatBonus;
// Determine the limits
const maxValue = this.paramMax(paramId);
const minValue = this.paramMin(paramId);
// Final value
return Math.round(value.clamp(minValue, maxValue));
This appears to be a ''how to'' but an example would help 😛
I tried adding this but didn't work.
let mhp = (base + plus) * paramRate * buffRate + flatBonus + a.def * 2;