Eli Custom Parameter Curve - Build the status of your classes independent of the editor!

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,094
First Language
Portuguese - Br
Primarily Uses
RMMZ

Author: Hakuen Studio

Introduction

Balancing your game battles can be a difficult challenge! it is a fact that RPG Maker MV already makes some resources available in the class database. Although you have some ways to change the way your status increases when you level up, you still don't have full control.
Well, with this plugin, you will be able to choose how you want each of your normal parameters to increase at each level, in each class!

Features

• Add a status curve for each standard parameter, fully customizable and independent of the editor.
• You can use fixed values.
• You can use random values.
• You can use values within a minimum and maximum range.
• You can use formulas.

How to use
• First set up the Minimum Stats parameter. This is the minimum value for all classes at level zero. You can leave it the way it is, but you can also change.

• Now build your custom parameter curves in the Preset Curve parameters. You notice 5 other parameters in there:

• Name - The name of the curve to be referenced in the Data note field.
• Initial - The initial value of level 1 for this class.
• Min - The minimum amount the actor can earn when leveling up.
• Max - The maximum amount an actor can earn when leveling up.
• Cap - The maximum value that a parameter can reach in this class.
(If you want to have more control over your cap value for parameters, take a look at the extension "Cap Parameter Control" in the download link.)

• You can use formulas in all tags.
• You can use the "this" keyword to refer to the actor.
• You can use '\v[id]' to get the value of a variable.
• If you want a fixed value, use the same value for MIN and MAX.

You can build as many as you want.

• Now you only need to use the class notes field.
<CustomCurve:Name>

If you do not set a custom curve to a class note field, it will take the first one in the plugin parameters as default.

***ATTENTION! All notes are case sensitive!***

Script calls:

• $gameActors.actor(ID).paramsHistory() - Returns an array with the value of each parameter at each actor's level.
• $gameActors.actor(ID).paramsCurve() - Returns an array with the base value of the curve for all parameters.
• $gameActors.actor(ID).lastParamsGain() - Returns an array with the last values received by the actor when leveling up.
• $gameActors.actor(ID).paramCurve(paramId) - Returns the base values for each curve of the parameter.
• $gameActors.actor(ID).initialParamCurve(paramId) - Returns the initial value of the given parameter.
• $gameActors.actor(ID).minParamCurve(paramId) - Returns the minimum value of the given parameter curve.
• $gameActors.actor(ID).maxParamCurve(paramId) - Returns the maximum value of the given parameter curve.
• $gameActors.actor(ID).capParamCurve(paramId) - Returns the maximum value that a class parameter can have.
• $gameActors.actor(ID).paramBase(paramId) - Returns the current value of the informed parameter.

Screenshot






Update Log
Version 2.1.1 - 11/03/2020
- Removed the plugin parameters that control how the actor can exceed the cap value. This was moved to an extension plugin: "CapControl".
- Hopefully fixed the error of the initial curve being higher than the cap curve.
- Fixed a bug in the last params gains result where it keep register curve values even when the param has already exceeded.
Version 2.1.0 - 28/10/2020
- Fixed an issue that was messing with the parameters of the actors, when changing class.
- Add the plugin parameter "Exceed Cap", that lets you decide if items, buff rates, and param rates can let the actor parameters exceed the cap value.
Version 2.0.0 - 10/14/2020
- Now you can edit your classes curves through plugin parameters.
- Added initial values for all classes.
- Added preset classes.
- Adapted to Eli Book 2.0.0
Version 1.1.0 - 10/08/2020
- Modified the way the notes are built.
- Add a ParamCap value that defines the max value that a class param can have.
Version 1.0.0 - 09/17/2020
- Plugin release!
 
Last edited:

Silenity

Veteran
Veteran
Joined
Dec 17, 2013
Messages
676
Reaction score
267
First Language
English
Primarily Uses
RMMV
Sweet. I bought this plugin but I'm glad it's released to the public!

Perhaps a future add-on for percentage chance to increase parameter. Fire Emblem style.
Like <AtkCurve: 1~3 80%> So there's an 80% chance you get 1-3 ATK+ otherwise no increase.
 

RK DracoRoy

Fire Emblem RPG Gamer
Veteran
Joined
Jun 29, 2017
Messages
257
Reaction score
73
First Language
English
Primarily Uses
RMMV
Sweet. I bought this plugin but I'm glad it's released to the public!

Perhaps a future add-on for percentage chance to increase parameter. Fire Emblem style.
Like <AtkCurve: 1~3 80%> So there's an 80% chance you get 1-3 ATK+ otherwise no increase.
I was actually thinking this right here. There should be a percentage chance for stat increases upon level up, and yes, I've been playing Fire Emblem.

@Eliaquim I'm on board with this plugin here and I also have a suggestion to add on to above, there should be a notetag to set a paramBase(x) stat cap on the class.

So say I have a Defense stat of 30 and level up, the defense stat won't go up any further. However, this won't include any defense boosts from equipment hence the paramBase(x) mentioned. I can cap at 30 Defense and equip something with +5 more Defense for 35 in total.

Example:
<DefCurve cap: 30> // X being either HP, MP, ATK, DEF, MAT, MDF, AGI, LUK. Will prevent any further stat increases if the stat (paramBase(x)) reaches this number.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,094
First Language
Portuguese - Br
Primarily Uses
RMMZ
Version 1.1 - 10/08/2020
- Modified the way the notes are built.
- Add a ParamCap value that defines the max value that a class param can have.
Please see the modifications of the help file or the updated how to use on the first post.

@Silenity
You can achieve what you desire putting the minimum value of a parameter to zero. And the max parameter with this formula:
JavaScript:
if(Math.randomInt(100 + 1) >= 80){Math.randomInt(3) + 1}else{0};
Math.randomInt(100 + 1) - Will generate a random value between 0 and 100.
>= 80 - If this value is greater or equal than 80, (80%).
Math.randomInt(3) + 1 - Will generate a random value between(and including) 1 and 3
else{0} - If the value is not grater or equal than 80, it will be 0.

So, with the new note tags of the 1.1 version, you can put it that way:
#AtkMin: 0# #AtkMax: if(Math.randomInt(100 + 1) >= 80){Math.randomInt(3) + 1}else{0};# #AtkCap: anyvalue#

By the way, thanks for your support!!! :kaoluv:

@RK DracoRoy I added the cap tag as you suggested.
 
Last edited:

RK DracoRoy

Fire Emblem RPG Gamer
Veteran
Joined
Jun 29, 2017
Messages
257
Reaction score
73
First Language
English
Primarily Uses
RMMV
@Eliaquim One problem with the updated version upon using it, just starting the game will lead to a "this.isDataClass is not a function" error. I also tried this with no configurations (the updated class notetag), no other plugins on besides the EliMZ_Book plugin which is required.

I was going to try this out and give you feedback but this error came up unfortunately.
 

Attachments

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,094
First Language
Portuguese - Br
Primarily Uses
RMMZ
Oh, I'm sorry, It's because I put this function on Eli's Book.js, but didn't upload it yet.

So, try to download the CustomParameterCurve again(don't need to update Eli's Book for now).
Thank you for the report :)
 

RK DracoRoy

Fire Emblem RPG Gamer
Veteran
Joined
Jun 29, 2017
Messages
257
Reaction score
73
First Language
English
Primarily Uses
RMMV
@Eliaquim It's going great thanks to this and the stat cap works even with equipment that provide an extra stat.

One problem I encountered here is that I have VisuMZ_2_PartySystem (http://www.yanfly.moe/wiki/Party_System_VisuStella_MZ) enabled. Once it goes into victory, this crash happens. I tested it with only EliMZ_Book and CustomParameterCurve and VisuMZ_PartySystem and it happens.

I can confirm that even with VisuMZ_2_PartySystem enabled, this crash did not happen in the original 1.0 version of the Custom Parameter Curve plugin which is thankfully still on the download page on your itch.io.

-----------
Edit: I see that the text.replace is from the EliMZ_Book.

 

Attachments

Last edited:

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,094
First Language
Portuguese - Br
Primarily Uses
RMMZ
@RK DracoRoy can you press the F12 or F8 button and send a screenshot of the console tab(that will show the error)?
Also, a screenshot or copy & paste how you set up your note tag.
 

RK DracoRoy

Fire Emblem RPG Gamer
Veteran
Joined
Jun 29, 2017
Messages
257
Reaction score
73
First Language
English
Primarily Uses
RMMV
@Eliaquim

Here's the code for the class notetag. This perfectly works.
Code:
{CustomCurve:
#MhpMin: 0# #MhpMax: if(Math.randomInt(100 + 1) <= 80){Math.randomInt(2) + 1}else{0};# #MhpCap: 200#
#MmpMin: 0# #MmpMax: if(Math.randomInt(100 + 1) <= 80){Math.randomInt(2) + 1}else{0};# #MmpCap: 200#
#AtkMin: 0# #AtkMax: if(Math.randomInt(100 + 1) <= 45){Math.randomInt(2) + 1}else{0};# #AtkCap: 20#
#DefMin: 0# #DefMax: if(Math.randomInt(100 + 1) <= 35){Math.randomInt(2) + 1}else{0};# #DefCap: 20#
#MatMin: 0# #MatMax: if(Math.randomInt(100 + 1) <= 30){Math.randomInt(2) + 1}else{0};# #MatCap: 20#
#MdfMin: 0# #MdfMax: if(Math.randomInt(100 + 1) <= 30){Math.randomInt(2) + 1}else{0};# #MdfCap: 20#
#AgiMin: 0# #AgiMax: if(Math.randomInt(100 + 1) <= 50){Math.randomInt(2) + 1}else{0};# #AgiCap: 20#
#LukMin: 0# #LukMax: if(Math.randomInt(100 + 1) <= 60){Math.randomInt(2) + 1}else{0};# #LukCap: 20#
CustomCurve}
----------
EDIT
----------
I finally found the problem why it crashes, it's not a plugin conflict thankfully.

So the Custom Parameter Curve is really requiring that every actor class in the game to have a custom curve notetag, even if they're not in battle. It's no problem though, I now gave every class that notetag and the problem is no more.

ConsoleLog.PNG

And I encountered another problem on the playtest (not the Battle Test).

Example:
1a) Actor starts the game at Level 2 and upon leveling up, the stats are capped instead of randomized by the value.
1b) 1a does not happen if the Actor starts at Level 1 and levels up.

Statcaps.PNG

The other problem
--------------------
2a) Actor's initial level from the database is Level 2 but I set his / her level to Level 1 for the Battle Test.
2b) Legitimate Level 1 actor in Battle Test has the stats as if he / she was Level 2 instead of Level 1 stats if starting the battle test.

===================
@Eliaquim I do apologize if I had worded it wrong earlier making it seem as if I had the other example problems mentioned solved but they're still present. Is it alright if I make up a test demo and send it here highlighting how these happen step by step? That way, these can be more clear. Again, I apologize for the wording.
 
Last edited:

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,094
First Language
Portuguese - Br
Primarily Uses
RMMZ
Updated first post.
Version 2.0.0 - 10/14/2020

- Now you can edit your classes curves through plugin parameters.
- Added initial values for all classes.
- Added preset classes.
- Adapted to Eli Book 2.0.0

@RK DracoRoy sorry for the late answer. The plugin got a lot of changes. Instead of using the note field, you now will be able to set everything on the plugin parameters. And also, you don't need to set it for every class. If you leave a class without a custom parameter curve, it will take a default one(the first on the plugin parameter) please see the help file to know how to use it.
Hope everything works now! ^^
 

RK DracoRoy

Fire Emblem RPG Gamer
Veteran
Joined
Jun 29, 2017
Messages
257
Reaction score
73
First Language
English
Primarily Uses
RMMV
@Eliaquim Thanks for the update!

I have things to report:

- This TypeError crash happens once you level up, even without any notetags set and plugin parameters were default. This was the only problem I found on this update.

- Regarding actor stats, I know games that have units with developer-intended stats at levels higher than 1 (e.g. Level 10, 15, 20, etc). I was wondering if that idea could work similar to Initial Level but you start with user intended stats if you were Level 5.

This example I had in mind:
-----------------------------
If I wanted Level 5 actor with 10 Atk, he would always start with 10 Atk at Level 5 and the random stat gains would still work as usual.

Same actor if he started at Level 4, 7 Atk if you wanted but upon level up, random stat gain meaning the actor (Level 4 -> Level 5) may not be the same as that same actor starting the game at Level 5 with 10 Atk.

This link for example with set stats at Level 5 in Fire Emblem (under Base Stats): https://fireemblem.fandom.com/wiki/Dieck#Base_Stats

-------
Edit
-------
No longer a crash when leveling up, placing your Custom Parameter Curve plugin above VisuStella's VisuMZ_1_SkillStatesCore solved the problem. Thank goodness.
 

Attachments

Last edited:

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,094
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi @RK DracoRoy!
Nice to see that the plugin works well! That was a strange error to see. But anyway!
I believe you can already achieve what you want using the following formula:
JavaScript:
// The this context is referring to $gameActors.actor
// Which means, that this._level is the same as type $gameActors.actor(id)._level
if(this._level <= 5){
0
}else{
2
};
That means, if the actor's level is less or equal to 5, it will not raise any stats. So, if he joins the party at a level or less, the status will be equal to the initial status. But after that(level 6 or higher) it will raise it's status normally.
Maybe you have to put that formula on both min stats and max stats.
 

RK DracoRoy

Fire Emblem RPG Gamer
Veteran
Joined
Jun 29, 2017
Messages
257
Reaction score
73
First Language
English
Primarily Uses
RMMV
I got it now! Thanks! That's going to help for anyone starting at higher levels with what stats you want them to start with.

Min Value
----------
Code:
if (this._level <= 5) { // Check if unit is Level 5 or below.
0 // If unit is Level 5 or below, no stat gains added to initial value.
} else if (Math.randomInt(100 + 1) <= 45) { //45% chance for stat gain.
1 // Minimum stat gain if passed.
} else {
0 // None if otherwise.
}
Max Value
-----------
Code:
if (this._level <= 5) { // Check if unit is Level 5 or below.
0 // If unit is Level 5 or below, no stat gains added to initial value.
} else if (Math.randomInt(100 + 1) <= 45) { // 45% chance for stat gain.
1 // +1 Stat gain to current stat if passed.
} else {
0 // None if otherwise.
}
 

RK DracoRoy

Fire Emblem RPG Gamer
Veteran
Joined
Jun 29, 2017
Messages
257
Reaction score
73
First Language
English
Primarily Uses
RMMV
@Eliaquim

I have things I wanted to bring up, one idea and this current situation:

- There are items that permanently add / subtract params (Item -> Effects -> Other -> Grow). With this, they would be intended to not exceed the cap you set for each class, no matter how much value it'll add. https://fireemblem.fandom.com/wiki/Stat_booster

I've later learned from a thread that "_paramPlus[x]" (not the "paramPlus(x)" method for equips) is an array of numbers altered by the Change Parameter event command.

e.g. So if the actor used a lot of stat boosters to the point where he is at 20 ATK which is his current class cap and then leveled up in battle, he would no longer receive anymore points on ATK as he had already capped through items.

Right now, I can exceed the cap in two ways:

- Stat boosting items (Item -> Effects -> Other -> Grow) which would require the _paramPlus array to be checked alongside the paramBase for caps to solve this.

- Setting the initial Level 1 stat to be higher than the cap in the plugin parameter will come true when starting the game. Upon level up, they will drop down to the capped value. But if I was starting at max level, one's initial stat will stay above the cap for the remainder of the game.

--------

About this idea, I was thinking of referencing class promotion gains, and figured the Initial Level parameter would be a good start to try. However, I can't seem to check anything that isn't "_level" without it crashing on me. I was also curious if the idea could work with the plugin, looking at the scriptcalls.

Upon changing to a stronger class, you start at Level 1 again with the same stats you had from the previous class but with additional values added, those additional values being a one time thing for that actor changing to that stronger class the first time.

Each parameter 0 - 7 having a gain / subtract value you could set where they'll have them applied only the first time they change class.

If the actor started at Class 1 and then changed to Class 2 the first time, they keep their current stats but the bonus values would be applied to them.

But if the actor started the game at Class 2, user-intended initial stat values still remain by default, meaning the bonus values won't apply to them.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,094
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi there!
So let's see if I understand everything you requested:
- Setting the initial Level 1 stat to be higher than the cap in the plugin parameter will come true when starting the game. Upon level up, they will drop down to the capped value. But if I was starting at the max level, one's initial stat will stay above the cap for the remainder of the game.
- This seems to me like an issue, I will fix that inside the plugin.

e.g. So if the actor used a lot of stat boosters to the point where he is at 20 ATK which is his current class cap and then leveled up in battle, he would no longer receive any more points on ATK as he had already capped through items.
- So you want the cap parameter to not consider extra parameters provided by items/equips/etc?

Upon changing to a stronger class, you start at Level 1 again with the same stats you had from the previous class but with additional values added, those additional values being a one time thing for that actor changing to that stronger class the first time.
- Let's take an example:
Level 10 - Class Swordsman
ATK 15
DEF 15

Level 1 - Class Hero(Stronger class)
ATK 20
DEF 20

Harold is a swordsman. But he gets promoted to a hero!
So now his status should be:
ATK 15+ 20 = 30
DEF 15 + 20 = 30

Is it like, I will use the initial level parameters of the stronger class like a bonus? Or do you mean like add a bonus value in another way?

Also, I was already making some tests when changing classes, and the plugin still needs some adjustments about that.

I let you know when I finish ^^
 

RK DracoRoy

Fire Emblem RPG Gamer
Veteran
Joined
Jun 29, 2017
Messages
257
Reaction score
73
First Language
English
Primarily Uses
RMMV
@Eliaquim

For caps, it already does what it's supposed to do, not including anything added from weapons and armor.

But items are a different case (Item -> Effect -> Other -> Grow). That is why I bring up the "_paramPlus" array:

- "user._paramPlus[x]" checks the item growth effect / change parameter command. This does not check equipment.

- "user.paramPlus(x)" checks that with any weapon and armor that's equipped.

It should check both the "user.paramBase(x)" with the "user._paramPlus[x]" when it comes to the cap. (Current base value with the permanent stat (+ / -) from an item.)

Post.PNG
------------
- Let's take an example:
Level 10 - Class Swordsman
ATK 15
DEF 15

Level 1 - Class Hero(Stronger class)
ATK 20
DEF 20

Harold is a swordsman. But he gets promoted to a hero!
So now his status should be:
ATK 15+ 20 = 30
DEF 15 + 20 = 30

Is it like, I will use the initial level parameters of the stronger class like a bonus? Or do you mean like add a bonus value in another way?
About that one, not really. But the latter question is what I mean by this video:
Level 1 Class 1 (Unpromoted)
------------------------------
Initial Level Str: 6 // Initial Str stat at Level 1.
Initial Level Spd: 8 // Initial Spd stat at Level 1.

-> Level 1 to Level 20 Progression <-

Level 20 Class 1 (Unpromoted)
--------------------------------
Current Str: 31 // Current Str stat through random level up gains.
Current Spd: 18 // Current Spd stat through random level up gains.

-> Class Change <-

Level 1 Class 2 (Promoted)
----------------------------
Str: 31 // Same Str stat is taken from previous class.
Str gain: +4 // Added value upon class change only 1st time. 35 Str as a result.

Spd: 18 // Same Spd stat is taken from previous class.
Spd gain: +2 // Added Spd value upon class change only 1st time. 20 Spd as a result.

They'll keep their current value depending on how they progressed in the earlier class and the bonus values will apply to that only the first time they change class.

Inside the initial stat parameter, I imagined something like this:

Initial
------
Code:
if (do something) {
// Checks the previous class's current "user.paramBase" + "user._paramPlus" stat and uses it here. This is for an actor that changes / promotes to a class. Class promotion gains applying afterwards for just one time.
} else {
29 // Initial Str stat for Class 2. This is if you have an actor that starts pre-promoted at the start of the game.
}
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,094
First Language
Portuguese - Br
Primarily Uses
RMMZ
Oh... Right! I get it now!
Thanks for clarifying, I will take a look at both requests and let you know ^^
About the class promotion, I think that deserves another plugin, and I will do it because it also involves what I want for a future game too ^^
EliMZ_ClassPromotion :)
Thanks for your feedback!
 

RK DracoRoy

Fire Emblem RPG Gamer
Veteran
Joined
Jun 29, 2017
Messages
257
Reaction score
73
First Language
English
Primarily Uses
RMMV
I do want to ask, is the MV version going to get this update with cap and plugin parameters along with the _paramPlus array check I just suggested? I didn't think I'd ask about MV and yet MZ's unfortunately giving me some lag issues that I'm not having in MV.

And I think I have an alternative that may work in place of change class gains. I'd just have to set the initial stat to be just a tiny bit higher than the cap of a previous class. In a way, that'd work but it won't be a random class change gain.
 
Last edited:

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,094
First Language
Portuguese - Br
Primarily Uses
RMMZ
Version 2.1.0 - 28/10/2020
- Fixed an issue that was messing with the parameters of the actors, when changing class.
- Add the plugin parameter "Exceed Cap", that lets you decide if items, buff rates, and param rates can let the actor parameters exceed the cap value.

@RK DracoRoy I think the issue with paramPlus has solved now.
And unfortunately, the MV version has not kept the update like the MZ one. But I do plan to make all my plugins working on both engines someday.

And I think I have an alternative that may work in place of change class gains. I'd just have to set the initial stat to be just a tiny bit higher than the cap of a previous class. In a way, that'd work but it won't be a random class change gain.
Yes, I get it. In fact, there are many ways of eventing this. But still, I will do that other plugin when I had some time.
 

RK DracoRoy

Fire Emblem RPG Gamer
Veteran
Joined
Jun 29, 2017
Messages
257
Reaction score
73
First Language
English
Primarily Uses
RMMV
@Eliaquim Reading the description and testing it in-game, it seems to be the other way around with Exceed Cap parameter. If I set it to false, they can bypass it despite the description. But here are these:

- The part about the initial stat being higher than the cap is solved, but this works only if the Exceed Cap parameter is on.

- With Exceed Cap parameter on, the item growth effects follow through but the user's equips are included here as well. The idea was the equips (weapon / armor) are excluded from the cap, just the item growth effect (or change parameter command) would follow through.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Just finished composing a boss battle theme!
Scripted a multi-variable weather system that randomizes wind speed, cloudiness, rain, fogginess, etc, while attempting to realistically account for interactions between them (e.g. wind speed affects fogginess, cloudiness affects rain, etc), the current weather pattern, and the player's biome e.g. swamp, beach, etc. Now I "just" have to tie visuals and sounds to the variables so stuff actually happens...
I'm having a headache balancing the combat using flat defense so I'm gonna use percentual armor, in this pic, Simon has 16 on Defense which means all the incoming damage will be reduced by 16% this will ease my burden a bit.
!Have a nice day everybody¡
SO glad they patched outer worlds for switch! I can finally play it! Weird that other peeps are still having issues. I know it was really chugging on my lite when it first came out.

Forum statistics

Threads
105,555
Messages
1,014,624
Members
137,231
Latest member
anjing_gila
Top