Eli Dynamic Parameters - Change parameter values dynamically with states and equipment note tags!

Hi there!

Yeah, I tested it here, and it will cause an error indeed. If you try to add a value for a parameter, and use the function to get this same parameter value, it will trigger this error. It's like, you can't use the atk value to raise the atk value parameter. On the example below "this.param(2)" is getting the .atk value parameter. And it is used on the Attack Dynamic Parameter field. So an error will trigger.
View attachment 229336
The same is valid for custom parameters.

You could raise the Attack value relative to other parameter, like Defense:
this.param(3) * 1.25

The right thing to do, to achieve what you want, is that the plugin can add a Trait that raises that parameter value, just like the default engine do for other params:

View attachment 229331

Like this trait will increase the Max HP value by 25%.
But we need something like that for Custom Parameters!
So, hold on a bit, that I will add this feature into the plugin(Custom Parameters, not the Dynamic Parameters)
Honestly I don't know why I didn't made it before ^^''!
Oh thank you so much! Yeah I figured it had something to do with the fact that it was basically going on an infinite loop with itself but I barely know how to code xD, so I'm glad to hear this is being added in!
So this can increase stats additivly rather than multiplicitivly?
So this can increase stats additivly rather than multiplicitivly?
It can increase any way you want since it can use formulas.
But if you just insert a number, it will raise or decrease the parameter.
It can increase any way you want since it can use formulas.
But if you just insert a number, it will raise or decrease the parameter.
Oh it can increase it based on variables and/or switches then?
Oh it can increase it based on variables and/or switches then?
Yes, for sure! 🙂
Hey there, sorry to rustle through old posts, but I just need a few questions answered about this plugin since it may hold the answers I seek.

When applying positive and negative values to Base and Special Parameters with your plugin, an actor acquires a skill (using Passive States) that gives him a +20% bonus to Agility when using this type of weapon, thus his agility is now 120%. However a piece of equipment slaps on a -10% Agility (if possible), is the result now 110% Agility, meaning that your plugin applies these changes to the parameters additively?

One of my major gripes about RMMV's Parameters is that it handles every Parameter but Extra Multiplicatively when I much prefer Ex-Param's method of Additively stacking traits, allowing you to tack on multiple buffs without a snowball effect of say 20% buff with another 20% buff magically turning into 44% rather than 40%, despite running the risk of hitting negatives and potentially causing some catastrophic issue, but I'll get there when I get there.
Hey there, sorry to rustle through old posts, but I just need a few questions answered about this plugin since it may hold the answers I seek.

When applying positive and negative values to Base and Special Parameters with your plugin, an actor acquires a skill (using Passive States) that gives him a +20% bonus to Agility when using this type of weapon, thus his agility is now 120%. However a piece of equipment slaps on a -10% Agility (if possible), is the result now 110% Agility, meaning that your plugin applies these changes to the parameters additively?

One of my major gripes about RMMV's Parameters is that it handles every Parameter but Extra Multiplicatively when I much prefer Ex-Param's method of Additively stacking traits, allowing you to tack on multiple buffs without a snowball effect of say 20% buff with another 20% buff magically turning into 44% rather than 40%, despite running the risk of hitting negatives and potentially causing some catastrophic issue, but I'll get there when I get there.
Hi there!

The behavior should be sum all of the bonus. What my plugin will do is, get all values added through the notegas/plugin parameters and apply them to the actor.
So, if you have any other thing that increases or decreases, it will be all sum up.

Let's say you have a sword that gives you + 10 ATK using dynamic parameters.
And let's say you have a default trait that increases the ATK + 10%

The actor ATK will be the sum of these two values.
Let's say you have a sword that gives you + 10 ATK using dynamic parameters.
And let's say you have a default trait that increases the ATK + 10%

The actor ATK will be the sum of these two values.
So the plugin will first evaluate all formulae using the base values?

e.g. I have an ATK of 50.
I have a sword with +10 from a dynamic parameter;
a helmet with +10%;
and a shield with +15%.

It will be 50 + 10 + (50*.1) + (50*.15)?

I think that's what the goal of the above question was.
So the plugin will first evaluate all formulae using the base values?

e.g. I have an ATK of 50.
I have a sword with +10 from a dynamic parameter;
a helmet with +10%;
and a shield with +15%.

It will be 50 + 10 + (50*.1) + (50*.15)?

I think that's what the goal of the above question was.
Ohh!
Now I get it.

For X and S params, the plugin will get all the default ones from the engine first: States, Traits etc. Then add the dynamic parameters on top of it. Reference below:

JavaScript:
Alias.Game_Actor_xparam = Game_Actor.prototype.xparam
Game_Actor.prototype.xparam = function(xparamId) {
    const value = Alias.Game_Actor_xparam.call(this, xparamId)
    const dynamicValue = this.getAllDynamicValues("xparam", xparamId)

    return value + dynamicValue
}

Alias.Game_Actor_sparam = Game_Actor.prototype.sparam
Game_Actor.prototype.sparam = function(sparamId) {
    const value = Alias.Game_Actor_sparam.call(this, sparamId)
    const dynamicValue = this.getAllDynamicValues("sparam", sparamId)

    return value + dynamicValue
}

For the regular parameters, it will add the Dynamic values on top of the param plus values. Meaning when the engine checks for the ATK of the battler, these dynamic values will be affected by the paramRate and Buff Rates. I guess on another words, for regular parameters, the dynamic values came before the rates.

JavaScript:
// On my plugin
Alias.Game_Actor_paramPlus = Game_Actor.prototype.paramPlus
Game_Actor.prototype.paramPlus = function(paramId) {
    const value = Alias.Game_Actor_paramPlus.call(this, paramId)
    const dynamicValue = this.getAllDynamicValues("param", paramId)

    return value + dynamicValue
}

// On the default code
Game_BattlerBase.prototype.param = function(paramId) {
    const value =
        this.paramBasePlus(paramId) * // DYNAMIC value is inside this value
        this.paramRate(paramId) *
        this.paramBuffRate(paramId);
    const maxValue = this.paramMax(paramId);
    const minValue = this.paramMin(paramId);
    return Math.round(value.clamp(minValue, maxValue));
};

Guess that is a kind of information that should b e on the help file! Will put that on later!
e.g. I have an ATK of 50.
I have a sword with +10 from a dynamic parameter;
a helmet with +10%;
and a shield with +15%.

It will be 50 + 10 + (50*.1) + (50*.15)?

I think that's what the goal of the above question was.
That would indeed be it, it just looks a bit wonky since my perspective was built as

"Base (big flat number) * Equipment (1.xx, prone to up and down) * De/Buffs (1.xx prone to up and down)"

Though an important aspect as while yes, those parameters now additively stack in the equation to 72.5 if punched through a calculator, can I apply a negative modifier to a parameter.

So applying the same equation from before, but instead the helmet reduces my atk by 10%, is the outcome going to be 62.5 as the total end modifier of my equipment is now "1.05" for atk, and if both are negative, meaning now my modifier is below 1, does that reflect and mean my ATK is below 60 due to the modifiers (should be 47.5 if I did the calcs right using "60 + (50*-.25)" as I have no positive buffs).

Most of my ideas in equipment, skills/passive states will revolve around this if I can apply negatives.
That would indeed be it, it just looks a bit wonky since my perspective was built as

"Base (big flat number) * Equipment (1.xx, prone to up and down) * De/Buffs (1.xx prone to up and down)"

Though an important aspect as while yes, those parameters now additively stack in the equation to 72.5 if punched through a calculator, can I apply a negative modifier to a parameter.

So applying the same equation from before, but instead the helmet reduces my atk by 10%, is the outcome going to be 62.5 as the total end modifier of my equipment is now "1.05" for atk, and if both are negative, meaning now my modifier is below 1, does that reflect and mean my ATK is below 60 due to the modifiers (should be 47.5 if I did the calcs right using "60 + (50*-.25)" as I have no positive buffs).

Most of my ideas in equipment, skills/passive states will revolve around this if I can apply negatives.
Did you see that answer?

The dynamic values for regular parameters will work the same as the regular parameter values a piece of equipment have on the database.
They are also the same as the ones when you use an item with a growth effect.

If you are having trouble figuring this out, why don't you make a test on the engine?
Like this trait will increase the Max HP value by 25%.
But we need something like that for Custom Parameters!
So, hold on a bit, that I will add this feature into the plugin(Custom Parameters, not the Dynamic Parameters)
Honestly I don't know why I didn't made it before ^^''!

Was this implemented? I don't see anything on the notes for custom parameters plugin on increasing custom params multiplicatively via states, and haven't managed to figure out how to do so with this plugin now that it does templates instead of note tags.
Was this implemented? I don't see anything on the notes for custom parameters plugin on increasing custom params multiplicatively via states, and haven't managed to figure out how to do so with this plugin now that it does templates instead of note tags.
Hi there!
Not exactly, because is not an issue with the plugin itself, but rather how javascript works on rpg maker code. But there are another ways to achieve what the OP was trying to do. Is best if you try to explain to me what you are trying to do and I see how I can help you.
Hi there!
Not exactly, because is not an issue with the plugin itself, but rather how javascript works on rpg maker code. But there are another ways to achieve what the OP was trying to do. Is best if you try to explain to me what you are trying to do and I see how I can help you.
I would like to increase/decrease a custom parameter by a given percentage. Example scenario, I would like the state “Broken Bone” to reduce Strength by 25%.

Edit: I was able to get it to work with VS's On Add State/On Erase State notetags with the following:
Code:
<JS On Add State>
this._old = this._old || 0;
this._old += this.cparam(0);
this.addCParam(0, Math.round(this.cparam(0) * -0.25));
</JS On Add State>

<JS On Erase State>
this.addCParam(0, Math.round(this.cparam(0) * -1));
this.addCParam(0, this._old);
</JS On Erase State>
I would like to increase/decrease a custom parameter by a given percentage. Example scenario, I would like the state “Broken Bone” to reduce Strength by 25%.

Edit: I was able to get it to work with VS's On Add State/On Erase State notetags with the following:
Code:
<JS On Add State>
this._old = this._old || 0;
this._old += this.cparam(0);
this.addCParam(0, Math.round(this.cparam(0) * -0.25));
</JS On Add State>

<JS On Erase State>
this.addCParam(0, Math.round(this.cparam(0) * -1));
this.addCParam(0, this._old);
</JS On Erase State>
So you manage to make it work? Or still need help?

I guess the right thing to do is that I need to add traits support for the custom parameter plugin on states, just like the default parameters have.
I believe I have added to items and skills, but not for states. So the user will not have the need to go into the dynamic parameters for things like that.

Both plugins need a rewrite to fix those things. I plan to do that, but I want to merge the Custom Parameters with the Class Curves. Don't know when though.
So you manage to make it work? Or still need help?

I guess the right thing to do is that I need to add traits support for the custom parameter plugin on states, just like the default parameters have.
I believe I have added to items and skills, but not for states. So the user will not have the need to go into the dynamic parameters for things like that.

Both plugins need a rewrite to fix those things. I plan to do that, but I want to merge the Custom Parameters with the Class Curves. Don't know when though.
I believe it's working! I'm able to increase custom parameters by percentages, and restore them to normal when the state is removed. But I do think having trait support for states in the custom parameter plugin is the way to go in the future!
Like this trait will increase the Max HP value by 25%.
But we need something like that for Custom Parameters!
So, hold on a bit, that I will add this feature into the plugin(Custom Parameters, not the Dynamic Parameters)
Honestly I don't know why I didn't made it before ^^''!
Hey, was this ever added? Or is there at least an easy way to get around this problem?
I can't do the solution someone else did because I'm using the MV version, not the MZ one.
Thanks for the plugin, and sorry if this is a silly question.
Hey, was this ever added? Or is there at least an easy way to get around this problem?
I can't do the solution someone else did because I'm using the MV version, not the MZ one.
Thanks for the plugin, and sorry if this is a silly question.

Hey friend! I don't have the code exactly like what I did for MZ, but I believe you can achieve the same workaround I did with YEP Buff and States Core for MV. I think the Custom Apply Effect and Custom Remove Effect are what you'd want to use.
Power attack/Defense power, both dictated by weapons or armor, as in Final fantasy 7 or as RPG maker XP?
Power attack/Defense power, both dictated by weapons or armor, as in Final fantasy 7 or as RPG maker XP?
Sorry, I really do not understand as I don't played Final Fantasy 7 and didn't use RPG Maker XP. You need to give me more details about that

Original thread: https://forums.rpgmakerweb.com/threads/eli-dynamic-parameters-change-parameter-values-dynamically-with-states-and-equipment-note-tags.135624/