RMMZ Level-Based Formula for Parameters Not Working [VisuStella] [VisuMZ_0_CoreEngine]

Ultima01

Unhinged
Veteran
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.

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));

2020-09-02.png

Setup.gif

dear lord the the frames I had to remove for this gif to upload to the forums
The Bug.gif
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top