# Gain Stats on Level Up

#### Mr. Trivel

##### Glasses
Author: Mr. Trivel

Name: Gain Stats on Level Up

Created: 2016-03-15

Version: 1.1

What does it do?

Actors gain stats on level up depending on their class.

Screenshots:

It's just numbers.

How to use?

All stats go into class note field:

<STAT>

formula

</STAT>

Stats:

MHP, MMP, ATK, DEF, MAT, MDF, AGI, LUK

v = variables

a = actor

Examples:

<ATK>

v[10];

</ATK>

<DEF>

Math.randomInt(5);

</DEF>

<LUK>

-1

</LUK>

How to download the Plugin: Click the link above, there will be a button named Raw, press Right Click -> Save As.

Don't remove the header or claim that you wrote this plugin.

Credit Mr. Trivel if using this plugin in your project.

Free for commercial and non-commercial projects.

Last edited by a moderator:

#### Maliki79

##### Veteran
Cool.  If you could have this usable with equips as well, this would be awesome!

#### Mr. Trivel

##### Glasses
@Maliki79,

As in, when actor has some equipment equipped - he gains more stats at level up?

#### Maliki79

##### Veteran
@Maliki79,

As in, when actor has some equipment equipped - he gains more stats at level up?
Yes.  Like bonus permanent stats for having the equip on at level up.

#### Henryetha

##### Veteran
Would be cool, if the player could choose which stat to lvl up ^^

#### lokirafael

##### Veteran
Can I use any valid condition? I was thinking in make a param system based on Fire Emblem. I will need to look up, but the logic would be.

<STAT>

if STAT < X then

Math.randomInt(y);

else

0

</STAT>

Last edited by a moderator:

#### Mr. Trivel

##### Glasses
@lokirafael,

Yes, multi line conditions work just fine. Example to yours:

<LUK>
if (this.luk < 20)
Math.randomInt(3)+1;
else
0
</LUK>

@Henryetha,

That'd be a different plugin for that.

@Maliki79,

You could just extend condition to accommodate that, even though it'd probably be kind of a mess.

Version 1.1

- Fixed crash with some multi-line stat evaluations.

#### Forthright

##### Veteran
Is there anyway to modify the code to pull information from Bobstah's CustomStat Plugin as well.  I'm using it to define stats like Str, Dex, Vit and such.  I'm using those to calculate my base parameters like mhp, mmp. and so on.   So far, no script I tried seems to pull these parameters.  I'm not sure if I am unsure how they are injected or if I am making a mistake, but I lack the skills to make the changes to implement it myself.  Any help would be greatly appreciated.  I have pasted a link to Bobstah's CustomStats plugin.

https://www.dropbox.com/s/9ec4iwp2qvezibu/BOB_CustomStats.js?dl=0

#### Mr. Trivel

##### Glasses
@Forthright,

You can cheat the system since my stat gains are being eval'd on level up.

Example:

<ATK>
this.customStats.spower.modifier += 10;
0
</ATK>

Gives 10 spower stat from BOB's Custom Stats, but gives 0 extra ATK, since 0 is the last number.

Last edited by a moderator:

#### Mega Man Volnutt

##### Mega Man Volnutt
Would be cool, if the player could choose which stat to lvl up ^^
I remember seeing this as a plugin in RPG VXACE somewhere. A couple games used it.

Last edited by a moderator:

#### BloodletterQ

##### Chaotic Neutral Assassin
Do you think it can be done Fire Emblem style where a stat can go up depending on how much higher it is than an interger?

#### Mr. Trivel

##### Glasses
@BloodletterQ,

Since what's written is getting evaluated on level up, as long as you write the logic in the level up note tag, it'll evaluate it. So, yes.

#### Forthright

##### Veteran
Thank you for your idea.  It worked like a charm.  Now, is there anything in particular that I would need to do if I wanted this to re-evaluate on multiple level up events.  So it picks a random interger for each level gained.  I found out that my math was wrong.  I needed to round as well as use random so it rounded up or down based on where it landed.

Last edited by a moderator:

#### Mr. Trivel

##### Glasses
@Forthright,

It evaluates a code on every single changed level. So if you jumped from level 3 to level 5 (2 levels), it'll be evaluated twice.

#### dombo813

##### Veteran
A little late to the party, but would it be possible to have stat gains that can be placed in the Actor box too (so say, Harold always gains +1 ATK on leveling, regardless of his class)?

#### Sissel Cabanela

##### Veteran
I would like to bump the topic to bring attention again to Dombo's question of being able to put notetags in the Actor box to further increase unique stat gains.

#### Tedrainbow

##### Villager
Hello Mr. Trivel
Is this formula correct?

<MHP>
if (this.level < 25)
Math.randomInt(5)+5;
</MHP>

<MHP>
if (this.level < 55)
Math.randomInt(10)+10;
</MHP>

<MHP>
if (this.level < 90)
Math.randomInt(15)+15;
</MHP>

<MHP>
if (this.level < 130)
Math.randomInt(20)+20;
</MHP>

<MHP>
if (this.level < 175)
Math.randomInt(25)+25;
</MHP>

<MHP>
if (this.level < 225)
Math.randomInt(30)+30;
</MHP>

<MHP>
if (this.level < 255)
Math.randomInt(35)+35;
</MHP>

To create pokemon game with a system of dragon quest monster joker.

### Latest Profile Posts

I've been debating on this as the title screen for a while now...
--- Dialog Filter ---

Gunner: Yo! my ****** friend?
Hero: Uhh,what happen with your mouth?
Gunner: Huh? what ****** happen with my mouth? i just speech as usual.
Hero: But,your mouth are like the garbage!
Gunner: Hey,what the **** are you say? you want the piece of **** with my ****** Gun!
(Meanwhile,The Dialog Filter In The Option Is Off)
Demo for Maze of the Lost MZ released. I would appreciate any and all feedback and constructive criticism. If you like Dungeon Crawlers and JRPG's with a hint of Metroidvania and Shadowgate/Uninvited you might like it. https://forums.rpgmakerweb.com/index.php?threads/maze-of-the-lost-mz-demo-port-from-mv.127971/
Well, here it is, colored.

103,389
Messages
998,961
Members
134,907
Latest member
zelda3469