Eli Class Curves - Build the status of your classes independent of the editor!

Hi there!
Let's figure this out.

First, do not download the plugins from the comment section ^^'' I was probably testing a fix with someone before releasing the official version. Always download the ones from the Itch Io regular download.

That error means that the plugin is not finding the curve object for a specific parameter id.
Usually, this error happens when using my Custom Parameter plugin together with the Class Curves.

So the problem, may rely on a bad configuration of both plugins. You need to fill the class curves with the same amount of Custom Parameters.
So let's say we created 4 new Custom parameters:
View attachment 228858

On the Class curves, you need to follow that same amount of custom parameters on the "Minimum custom stats":
View attachment 228859

And also on the Preset Class Curves for each class:
View attachment 228860

The Custom Parameter plugin need to be above the Class Curve plugin.
I don't know about the Visustella problem, so I can't say for it. But between my two plugins, that problem is usually the one that causes the error.

If you didn't manage to fix it in your actual project, try using only my plugins on another project, just for we to check if it is indeed a compatibility problem.

Let me know the results!

This worked instantly! The error is no longer occurring. Thank you!

The problem was caused by me experimenting with adding a new parameter using your Custom Parameter plugin, and then getting the VisuStella core plugin to recognize it and display it in the status menu. I didn't put this new parameter into the Class Curves plugin, hence the error.

I'll keep this in mind for the future, when I add in the actual parameters I want to use.

I also, just in case, swapped out the patched EliBook plugin for the official one. I'll wait for the official update as you suggested.

Thank you again for the assistance (and the quick reply)!
EDIT: Nevermind -- ignore this post!

About 5 minutes after posting this wall of text I realized that I was being an idiot. Since the class's starting atk and CON are fixed, basing Max HP on those parameters is stupid because it will always have the same result for said class -- I should just put in a fixed value for the Max HP and save me the trouble. >.<

I guess I was thinking more about Max HP being altered by changes in other parameters, or a character with custom starting parameters calculating a different Max HP. But I can accomplish some of that using formulas for the min/max values in the class curves, and by having stuff that boosts the relevant parameters (such as atk or CON) also awarding a boost to Max HP (i.e. a purchasable or learnable upgrade that increases CON by +5 also boosts Max HP by +5).

I'll leave the wall of text below intact for the sake of curiosity.

(Or if my logic above is flawed and the below wall of text still illustrates an actual problem.)


Original post below:

Hello,

I have run into a strange (though very niche) problem with an interaction between Class Curves and Custom Parameters.

I am attempting to set the initial value of Max HP and Max MP (renamed Stamina) based on other initial parameters (Attack, renamed as Strength, and a new parameter called Constitution (CON)).

The test formula for Max HP is:

(50 + this.atk + this.CON)

The initial values for Strength (atk) and Constitution (CON) are 1 and 10 respectively. This should produce a result of 61.
Instead, this produces a result of 52.
After some testing of various options in the plugins, I discovered that the extra 2 is from the minimum values for Strength (atk) and Constitution (CON) set in the Class Curves plugin (both minimum values being 1).
(I discovered this by setting the initial values of atk and CON to 0, which produced a Max HP of 50.)

I have another custom parameter, Focus, which is set to be like HP/MP/TP and serve as an additional resource point for skills alongside Stamina (MP). This parameter also uses a formula referring to other parameters, specifically

(20 + this.mdf + this.POW)

...using Magic Defense (renamed Willpower) and another custom parameter, Power (POW).
This formula consistently produces expected results, giving 26 (initial mdf = 5 and initial POW = 1).

My current theory is that the custom class curve's formulas for initial parameter values are being applied in the order the parameters are listed in the plugin, starting with Max HP and the rest of the normal MV parameters (Max HP, Max MP, Attack, Defense, Magic Attack, Magic Defense, Agility, Luck -- in that order), then going through the custom parameters in the listed order.
Because atk and CON are listed below Max HP, they are not defined when initial Max HP is calculated and thus the formula for Max HP grabs the minimum values for atk and CON.
Meanwhile, Focus is listed beneath mdf and POW, so both of the parameters in its formula are already defined when the formula for Focus is ran.

I tried to get around this problem by defining atk and CON before the class curve could be run, using the <param Plus: +x> notetag from VisuStella's plugins for atk and the <cparams: shortName/ParamID:x> notetag from your Custom Parameters plugin (both applied in the class notes above the <CustomCurve:Name> notetag). The specific notetags used were <atk Plus: +1> and <cparams: CON:10>

The <atk Plus: +1> notetag worked properly, and was factored correctly into the Max HP initial value formula (given that the default atk of the class was already 1, I confirmed this by altering the amount to <atk Plus: +10> and it adjusted both the atk value and the resulting Max HP appropriately).
However, the <cparams: CON:10> notetag did not affect the actor's initial CON; the game seemed to only use the values given by the custom class curve (I set the initial value of CON for the class curve to 0 for this experiment, and it resulted in a CON of 0, despite the <cparams: CON:10> notetag). I am pretty sure I formatted the notetag correctly, so I think your Custom Class Curve plugin might be overriding it?



My questions regarding the above are:

Is my theory correct in why this behavior is occurring?

If yes, then:

Did I use the CParam notetag correctly? If yes, why didn't it work? Does your Custom Class Curve plugin override the CParam notetags of your Custom Parameters plugin?

Is there a way to get Max HP and Max MP to use the class curve's initial parameter values for atk, CON, etc.? Or a method for setting custom parameters like CON before the class curve calculates the initial value of Max HP and Max MP? (such as changing the order that the class curve processes MZ's parameters)

Thanks in advance!
Hello, I'm really sorry for bothering you (that is probably either dumb issue with a easy fix, or a completely impossible task...haha.. <pain>)

Anyway, I got in a bit of a weird issue with your script.

As you stated before helping someone else, I could put cparams values on the curve formulas and I did in a similar fashion of what you exemplified on page 2 with the exception of being in the initial value rather than the growth values, but it doesnt seem to be working for me.

1664656887113.png


Thats the atk formula for example with is aways returning 1 ingame when it was supposed to return 5, since its the initial value for that param, and the same thing happens for the other stats.

Debug screen confirming it:
1664657207644.png


1664656779921.png

(The plugin setup, they are the only ones that are on atm)


My idea (for context) is making all of the rpg maker standard stats as completely derivated ones from stuff like Strength/Constitution/Mind etc, and then I would manage their growth with your (very impressive by the way) script.

(I did make it work on MV by the way with other set of scripts ofcourse, but for MZ the options for what I'm trying to do are quite limited, your script seemed like the best approach for what i'm trying to do in the long run)

Thanks in advance, have a nice weekend.
Hello, I'm really sorry for bothering you (that is probably either dumb issue with a easy fix, or a completely impossible task...haha.. <pain>)

Anyway, I got in a bit of a weird issue with your script.

As you stated before helping someone else, I could put cparams values on the curve formulas and I did in a similar fashion of what you exemplified on page 2 with the exception of being in the initial value rather than the growth values, but it doesnt seem to be working for me.

View attachment 241752

Thats the atk formula for example with is aways returning 1 ingame when it was supposed to return 5, since its the initial value for that param, and the same thing happens for the other stats.

Debug screen confirming it:
View attachment 241755

View attachment 241751
(The plugin setup, they are the only ones that are on atm)


My idea (for context) is making all of the rpg maker standard stats as completely derivated ones from stuff like Strength/Constitution/Mind etc, and then I would manage their growth with your (very impressive by the way) script.

(I did make it work on MV by the way with other set of scripts ofcourse, but for MZ the options for what I'm trying to do are quite limited, your script seemed like the best approach for what i'm trying to do in the long run)

Thanks in advance, have a nice weekend.
Hi there!

So I believe this is a little hard to explain. But I will try my best.

In fact, what you are doing is working.
But when the code is setting the Initial Value for the Atk parameter, the Custom parameter value is not 5, yet.

By default, inside code, all actors start at Level 0.

On the plugin parameters, you can see that there are two parameters that define the Minimum Value for all parameters, both default, and custom. These are the values for all actors, on all parameters, at Level 0.
1664661794224.png


When an actor raises a level, it will have its parameter values changed in the following order:
  1. HP
  2. MP
  3. ATK
  4. DEF
  5. MAT
  6. MDF
  7. AGI
  8. LUK
  9. CUSTOM PARAMETERS
So, when the code is filling the HP value from Level 0 to Level 1, your Custom Parameter value is still using the value of the previous level, which is Level 0.
And so, it is taking the value set on the minimum custom stats plugin parameter.

You can confirm that by changing the minimum stats value to another number, like 3. And you will see the results.

This is the intended behavior.
But, besides that, there is no point for you to try putting the Initial value based on the custom parameter value by using a function/formula(I guess).

You can just put there the same number that you set for the custom parameter curve data.

What will make a difference when the actor levels up, will be the Min and Max value. There makes sense for you to use the formula: this.cparam(0)
So the actor will change his stats value from level 2 and forward, based on the Custom parameter.

Got it?
@Eliaquim
Oh, I see... I think I got it.
Yea, I can probably work something out based on that info, thank you so much ^.^
So I just thought I'd let you know and others know. That it seems this plugin is not compatible with Frogboy's Talent core... Not sure why, just wanted to point it out since it was driving me up the wall. Kept getting errors until i removed all my plugins till i found which one conflicted.
So I just thought I'd let you know and others know. That it seems this plugin is not compatible with Frogboy's Talent core... Not sure why, just wanted to point it out since it was driving me up the wall. Kept getting errors until i removed all my plugins till i found which one conflicted.
Hi there!
Thanks for reporting!
if you could tell me more about the error, maybe I can find a fix:
- Screenshots of the console error trace
- Plugin order/list
- What happens that causes the error.
- RPG Maker version.

If it is too complex to explain, a sample project will also be nice.
I have a question about this plugin.

If I wanted my attack to increase by 1 or 2 each level but not give more than 99 points total for that stat via leveling. But still allow stats on items to increase it. is this possible?
I have a question about this plugin.

If I wanted my attack to increase by 1 or 2 each level but not give more than 99 points total for that stat via leveling. But still allow stats on items to increase it. is this possible?
Hi there!

Yes, it is. The first part you can do just using this plugin alone.

But for the second one, for the item part, you need the extension:
Ok sounds good. Can I also not have this plugin effect a param? Like hp,mp, luck, and agility done with the engine but def mdef atk and matk effected by the plugin?
Ok sounds good. Can I also not have this plugin effect a param? Like hp,mp, luck, and agility done with the engine but def mdef atk and matk effected by the plugin?
Not sure if I understood.
Do you want to use the Class Curves plugin, just for some parameters and others not?

or do you are talking about using the Cap Parameter plugin for just some parameters and others not?

Be one, or another, no, you can't. The plugin applies to all parameters.
Ok sounds good. Can I also not have this plugin effect a param? Like hp,mp, luck, and agility done with the engine but def mdef atk and matk effected by the plugin?
Just set it up as a +0?
5bvgRs2.png

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.
• Works for enemies, if you are using EliMZ_EnemyClass.js
• Works with custom parameters, if you are using EliMZ_CustomParameters.js
• Growth chance value, which allows you to control when a parameter will increase or not on level up. Similar to the Fire Emblem series.
• Change growth chance rate based on items, equipment, skills, or state!
• Decide if an actor will always join in the party with initial stats, regarding its level.

How to use
Spoiler
♦ Plugin Parameters ♦

● 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.

● Preset Class Curves

Here is where you will build your Custom Curves. You notice 5 other parameters in there:

• Name → The name of the curve to be referenced in the Data note field.
• Growth Chance → The chance rate for the parameter increase when leveling up.
• 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.
• Bonus → Used on the Class Promotion Plugin.

■ Observations:

• 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.

NOTE¹: By default, the growth chance will always be 100%. This means that every time an actor levels up, the parameter will take the value set on the min and max. If you set another value than 100, the actor can raise a level but not always get a chance to increase the stats.

You can build as many as you want.

♦ Data Note Fields ♦

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

Optionally, you can change the Growth Chance rate in-game through the use of items, skills, states, and equipment.
You just need to use the following note tags:

<GrowthChanceParam: param:value, param:value>

Replace "param" with one of the following: mhp, mmp, atk, def, mat, mdf, agi, luk

Or if using Eli Custom Parameter:

<GrowthChanceCParam: Cparam:value, Cparam:value>

Replace "Cparam" with the short name of the custom parameter.

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

■ Observations:

• By default, if an actor joins the party at a level higher than 1, the plugin will calculate the level-ups automatically.
But you can also prevent this from happening, and let the actor join in the party always with initial stats, independent of the level.
Just use the note tag on the Actor note field:
<HoldCurve: Level>

It will hold the initial stats until the specified level.
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.

♦ Script calls ♦

• $gameActors.actor(ID).paramsHistory(classId) - Returns an array with the value of each parameter at each actor's level.

• $gameActors.actor(ID).cparamsHistory(classId) - Returns an array with the value of each parameter at each actor's level.

• $gameActors.actor(ID).lastParamsGain() - Returns an array with the last values received by the actor when leveling up. Use "CParam" for custom parameters.

• $gameActors.actor(ID).lastCParamsGain() - The same as above, but for custom parameters.

• $gameActors.actor(ID).paramBase(paramId) - Returns the current value of the informed parameter.

• $gameActors.actor(ID).cparamBase(paramId) - Returns the current value of the informed custom parameter.

For the script calls below, the arguments can be understood like that:
• paramId - Replace with a param id.
• isCustom - Set to true, if you want to check for custom parameters. (default is false)
• classId - The class id to check (default is the current class)

• $gameActors.actor(ID).initialParamCurve(paramId, isCustom, classId) - Returns the initial value of the given parameter.

• $gameActors.actor(ID).minParamCurve(paramId, isCustom, classId) - Returns the minimum value of the given parameter curve.

• $gameActors.actor(ID).maxParamCurve(paramId, isCustom, classId) - Returns the maximum value of the given parameter curve.

• $gameActors.actor(ID).capParamCurve(paramId, isCustom, classId) - Returns the maximum value that a class parameter can have.

• $gameActors.actor(ID).paramGrowthChance(paramId, isCustom, classId) - Return the growth chance for this parameter.

Screenshot
Spoiler
Oo0wniW.jpg

T4uXM76.jpg

pxrwGEK.png

tggL5xj.png

dzF2CE8.png

YVbagDz.png

WxYFOl2.jpg

snRHbMY.jpg

Terms of Use
Update Log
[QUOTE="Eliaquim, post: 1126607, m...E=18px]Terms of Use[/SIZE][/B][/SIZE][/QUOTE]
Update Log
does it work for single actors too?
Hi @Allen_ !
When you mean "single actors" you mean:
1 - A party with just one actor?
2 - Some actors will use class curves, and others will use the editor curve?

What of these two?
Hi @Allen_ !
When you mean "single actors" you mean:
1 - A party with just one actor?
2 - Some actors will use class curves, and others will use the editor curve?

What of these two?
Basically, I wanted to use your plugin to create separate curves tied to just one actor, which is what I'm trying to do currently. Making separate stats scaling for each actor. I actually found a way to do it with Yanfly's plugin, but that lets me variate a bit for each actor the class curve, and I cant see the results in the stats when running trial fights. All stats of actors of the same class are still shown as the same. I guess this is because the game doesnt show you the variation implemented by the plugin (I dont really know plugins well), but I'm not that sure, so I'm kinda worried.
Basically, I wanted to use your plugin to create separate curves tied to just one actor, which is what I'm trying to do currently. Making separate stats scaling for each actor. I actually found a way to do it with Yanfly's plugin, but that lets me variate a bit for each actor the class curve, and I cant see the results in the stats when running trial fights. All stats of actors of the same class are still shown as the same. I guess this is because the game doesnt show you the variation implemented by the plugin (I dont really know plugins well), but I'm not that sure, so I'm kinda worried.
I don't think this will work the way you want. The custom status curves are attached to the Classes, not to the actors. So if all actors are on the same class, they all will have the same status curve.

What you can try to do is, create like 6 mage classes, but each one with different curves attached into their note tags. For the player they all will look like the same class, but on the editor you will have 6 classes with the same name, but with different curves.
And then, will be just a matter of the actors only use the classes that has the status curve you want them to have.
I was wondering if there is a way to add variables to a param curve formula? Like the base gain per level is 1 + (variable X) so if the variable is 0 they gain only the 1. if the variable is 1 then they would gain 2 per level.

If it is possible how would i do this. I have tried using various ways but it doesn't seem to add the variable.
I was wondering if there is a way to add variables to a param curve formula? Like the base gain per level is 1 + (variable X) so if the variable is 0 they gain only the 1. if the variable is 1 then they would gain 2 per level.

If it is possible how would i do this. I have tried using various ways but it doesn't seem to add the variable.
It is always nice when you try something, you could show a screenshot or write down exactly what you did so we can move from there and see why it is not working.

But, in theory, to use variables, you just need to write the Min or Max value as a formula, like below(Replace ID with the id of the variable you want):

1713118970375.png
Edit: Nvm I am dumb. I had that stat set to 0 growth chance. your example works perfectly. So sorry.

Original thread: https://forums.rpgmakerweb.com/threads/eli-class-curves-build-the-status-of-your-classes-independent-of-the-editor.128394/