- Joined
- Mar 13, 2013
- Messages
- 69
- Reaction score
- 11
- First Language
- English
- Primarily Uses
- N/A
(feel free to move this elsewhere if this isn't the right place to post this)
Before I start, I would like to say that the VisuStella plugin suite is working quite well so far. It's great for a lot of things that the base engine is missing.
Anyway, I decided to try something different. Instead of raising the stats using the classes tab in the database, I tried using a level-based formula for each parameter using the VisuStella Core Engine. (Parameter Settings > Basic Parameters > JS: Formula) According the help text for the plugin, it gives enemies a placeholder level parameter and a notetag to set it (defaulting to 1 if no tag is set), so I figured this might be a novel way to stat out enemies.
It didn't work like I hoped.
I have yet to test this in the basic Turn-Based battle system as of this post, but from what I've seen in TPB mode, this code seems to bug out for at least AGI, and just causes the enemies to not act ever.
Before I start, I would like to say that the VisuStella plugin suite is working quite well so far. It's great for a lot of things that the base engine is missing.
Anyway, I decided to try something different. Instead of raising the stats using the classes tab in the database, I tried using a level-based formula for each parameter using the VisuStella Core Engine. (Parameter Settings > Basic Parameters > JS: Formula) According the help text for the plugin, it gives enemies a placeholder level parameter and a notetag to set it (defaulting to 1 if no tag is set), so I figured this might be a novel way to stat out enemies.
It didn't work like I hoped.
I have yet to test this in the basic Turn-Based battle system as of this post, but from what I've seen in TPB mode, this code seems to bug out for at least AGI, and just causes the enemies to not act ever.
JavaScript:
// 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);
let level = this.level;
// Formula to determine total parameter value.
//let value = (base + plus) * paramRate * buffRate + flatBonus;
let value = base;
if (paramId === 1) { // MMP
value *= 1.0 + (level - 1) / 98;
} else if (paramId !== 3 && paramId !== 5) {
value *= 1.0 + 2 * (level - 1) / 98;
value *= 1.0 + 14 * (level - 1) / 98;
}
value += plus;
value *= paramRate;
value *= buffRate;
value += flatBonus;
// Determine the limits
const maxValue = this.paramMax(paramId);
const minValue = this.paramMin(paramId);
// Final value
return Math.round(value.clamp(minValue, maxValue));




