Gain Stats on Level Up

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>







 


Plugin: <Link: Github>


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


 


Terms of Use:


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.
Cool.  If you could have this usable with equips as well, this would be awesome!
@Maliki79,


As in, when actor has some equipment equipped - he gains more stats at level up?
@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.
Would be cool, if the player could choose which stat to lvl up ^^
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>
@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.
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
@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.
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.
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?
@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.
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.
@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.
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)?
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.
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.

Original thread: https://forums.rpgmakerweb.com/threads/gain-stats-on-level-up.58779/