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

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,984
Reaction score
1,446
First Language
Portuguese - Br
Primarily Uses
RMMZ
Z6zpVlu.png

Author: Hakuen Studio

Introduction

If the actor has state id X he gains a +10 attack boost!
Easy?

But if the actor has class id X and is equipped with weapon Id X and also has state id X, then he will have a +50 ATK boost!
Not too complicated?

If an actor has a state id X, and his level is below 4, equipping a sword, using a class id X, and his name is Harold, then he will have an HP boost of 1000!!!
Got it?!

This plugin lets you implement dynamic parameter values to battlers(actor or enemies) through the weapons, armors, or state note tags!
You can use fixed values or check for a condition to apply the bonus!

*For the equipment feature, only work on enemies if you have the Eli_EnemyClass.js

Features

● Dynamically add values to battler parameters through note tags!
● Support States, Weapons, Armor!
● Support all types of parameters!

How to use

● Inside the plugin parameter, you can create note tag templates to be used on the weapons/armor/state note fields.
So instead of putting everything messy on the note tags, you now can use the plugin parameter to better organize your game.

● First, choose a template name to be used later.
There, you can choose what type and the id of the parameter you want to insert a value.
Normal parameters
X Parameters
S Parameters
Custom parameters(If using Eli Custom Parameters)

The value can be a number or a valid Javascript formula.

● So, when you did, use the following note tags in the note field of Weapons, Armors, or
States:

<DynParams: TemplateName>

The template name must be the exactly same(case sensitive) set on the plugin parameter.

♦ NOTE¹: You can use the "this" keyword to reference the battlers(actors
and enemies).

♦ NOTE²: Param names and note tags are case sensitive!

Update Log
Version 2.0.0 - 05/20/2021
- Revamped the way you set dynamic values to note tag. Now you set them via plugin parameters and just reference them in the note tags via the "Name" parameter.
Version 1.0.6 - 05/16/2021
- Fixed compatibility with VisuMZ_1_ElementStatusCore when using trait sets: Blessing, Gender, Variant, etc. Now, these traits will also trigger the Dynamic Parameters note tag when an actor is using them.
Version 1.0.5 - 05/15/2021
- Fixed compatibility with Visustela Skill States Core, regarding passive states.
Version 1.0.4 - 05/05/2021
- Fixed an issue that the dynamic parameters not working to set Custom Parameter values with the El Custom Curves 1.1.1
Version 1.0.3 - 03/18/2021
- Fixed an issue that the dynamic parameters were not working on enemies with
Eli_EnemyClass.
Version 1.0.2 - 02/19/2021
- Fixed a bug that throws an error when trying to use this plugin without
Eli Enemy Class
Version 1.0.1 - 02/02/2021
- Changed the note tag from <DynParams: **code here** > to
[DynParams: **code here** DynParams]. This was necessary to fix some tricky
bugs when using formulas.
Version 1.0.0 - 01/31/2021
- Plugin release!
 
Last edited:

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,984
Reaction score
1,446
First Language
Portuguese - Br
Primarily Uses
RMMZ
Version 1.0.4 - 05/05/2021
- Fixed an issue that the dynamic parameters not working to set Custom Parameter values with the El Custom Curves 1.1.1
 

XVoid

Conceptual Severance Mage
Veteran
Joined
Apr 22, 2016
Messages
49
Reaction score
25
First Language
English
Primarily Uses
RMMZ
Does this plugin allow one to reduce parameters dynamically as well, as opposed to just increasing them?
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,984
Reaction score
1,446
First Language
Portuguese - Br
Primarily Uses
RMMZ
Does this plugin allow one to reduce parameters dynamically as well, as opposed to just increasing them?
Hi there!
Yes, it does!
Example:

Harold has an attack and defense of 10.

Then, he equips a sword with this note tags:

[DynParams:
atk = 5;
def = -3;
DynParams]

Now Harold stats will look like this:
ATK 10 + 5(From the sword) = 15
DEF 10 - 3(From the sword) = 7
 

XVoid

Conceptual Severance Mage
Veteran
Joined
Apr 22, 2016
Messages
49
Reaction score
25
First Language
English
Primarily Uses
RMMZ
Hi there!
Yes, it does!
Example:

Harold has an attack and defense of 10.

Then, he equips a sword with this note tags:

[DynParams:
atk = 5;
def = -3;
DynParams]

Now Harold stats will look like this:
ATK 10 + 5(From the sword) = 15
DEF 10 - 3(From the sword) = 7
Is there a way to change them multiplicatively instead of additively? Like say, a 30% decrease, as an example.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,984
Reaction score
1,446
First Language
Portuguese - Br
Primarily Uses
RMMZ
Is there a way to change them multiplicatively instead of additively? Like say, a 30% decrease, as an example.
Yes, you can. It is just a matter of use the correctly javascript formula.
Example increasing atk by 30% and decreasing defense by 30%:

[DynParams:
atk = this.paramBase(2) * 0.30;
def = -(this.paramBase(3) * 0.30);
DynParams]
 

XVoid

Conceptual Severance Mage
Veteran
Joined
Apr 22, 2016
Messages
49
Reaction score
25
First Language
English
Primarily Uses
RMMZ
Yes, you can. It is just a matter of use the correctly javascript formula.
Example increasing atk by 30% and decreasing defense by 30%:

[DynParams:
atk = this.paramBase(2) * 0.30;
def = -(this.paramBase(3) * 0.30);
DynParams]

How do I change the value of custom parameters? Using the parameter's short name in place of where atk or def would go in the example you provided (and using a simple = 50 for testing's sake) doesn't seem to actually change the value. I did a conditional branch script call to check if it was actually being changed or if the change just wasn't displaying in the VisuStella elements and status menu core, and it's not a display error, the value actually doesn't change.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,984
Reaction score
1,446
First Language
Portuguese - Br
Primarily Uses
RMMZ
How do I change the value of custom parameters? Using the parameter's short name in place of where atk or def would go in the example you provided (and using a simple = 50 for testing's sake) doesn't seem to actually change the value. I did a conditional branch script call to check if it was actually being changed or if the change just wasn't displaying in the VisuStella elements and status menu core, and it's not a display error, the value actually doesn't change.
Hi!
To change a custom parameter value you can do the same thing as you do for the normal parameters.
You must insert the short name of the custom parameter:

"per" is a custom parameter.
1621057596117.png

[DynParams:
atk = this.paramBase(2) * 0.30;
def = -(this.paramBase(3) * 0.30);
per = 50;
DynParams]

You also need to use the right script call to check. The .cparamBase(cparamId) will only show the base value(not including weapons, states, items etc.).
You need to use .cparam(cparamId)

Where are you setting this note tag?
They are made to work on equipments and states.

You also have to put the semi-colon (;) at the end of each line.
Can you show me your note tag?
 

XVoid

Conceptual Severance Mage
Veteran
Joined
Apr 22, 2016
Messages
49
Reaction score
25
First Language
English
Primarily Uses
RMMZ
Hi!
To change a custom parameter value you can do the same thing as you do for the normal parameters.
You must insert the short name of the custom parameter:

"per" is a custom parameter.
View attachment 189347

[DynParams:
atk = this.paramBase(2) * 0.30;
def = -(this.paramBase(3) * 0.30);
per = 50;
DynParams]

You also need to use the right script call to check. The .cparamBase(cparamId) will only show the base value(not including weapons, states, items etc.).
You need to use .cparam(cparamId)

Where are you setting this note tag?
They are made to work on equipments and states.

You also have to put the semi-colon (;) at the end of each line.
Can you show me your note tag?
I've attached screenshots of the notebox and the script call. For reference, the notebox is for a state added as a passive through the VisuStella element status core's traitset system, and the script call was designed to check if the value changed at all from base (base being 10) rather than whether it was above a specific value. When I used the event to test, it indicated that it hadn't changed. The greater than or equal to sign in the script call is something I had to look up; the order the help file seemed to imply was correct just gave me errors which showed up in the console but didn't cause a crash.

Screenshot 2021-05-15 01.20.29.png
Screenshot 2021-05-15 01.21.26.png
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,984
Reaction score
1,446
First Language
Portuguese - Br
Primarily Uses
RMMZ
@XVoid can you confirm if trying with a normal state(not passive) or normal equipment (weapon or armor), works?

Never mind, it was a compatibility issue. I fixed it on my side, it should work now!

Version 1.0.5 - 05/15/2021
- Fixed compatibility with Visustela Skill States Core, regarding passive states.
 
Last edited:

XVoid

Conceptual Severance Mage
Veteran
Joined
Apr 22, 2016
Messages
49
Reaction score
25
First Language
English
Primarily Uses
RMMZ
@XVoid can you confirm if trying with a normal state(not passive) or normal equipment (weapon or armor), works?

Never mind, it was a compatibility issue. I fixed it on my side, it should work now!

Version 1.0.5 - 05/15/2021
- Fixed compatibility with Visustela Skill States Core, regarding passive states.
Tried the update, it didn't work. I think there might also be a compatibility issue with VisuStella's elements and status menu core, since that's the plugin I added the passive through. I tried both with the passive version of the state and with an active test state and it didn't work. I then tried it with an equip, that also didn't work.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,984
Reaction score
1,446
First Language
Portuguese - Br
Primarily Uses
RMMZ
Tried the update, it didn't work. I think there might also be a compatibility issue with VisuStella's elements and status menu core, since that's the plugin I added the passive through. I tried both with the passive version of the state and with an active test state and it didn't work. I then tried it with an equip, that also didn't work.
Ok, so I will ask you to provide a clean, sample project to me with these plugins together and the note tags already set.
So I can take a look and try to replicate the issue and find the problem.
Can you do that for me? You can upload and send it to me here or through PM.
 

XVoid

Conceptual Severance Mage
Veteran
Joined
Apr 22, 2016
Messages
49
Reaction score
25
First Language
English
Primarily Uses
RMMZ
Ok, so I will ask you to provide a clean, sample project to me with these plugins together and the note tags already set.
So I can take a look and try to replicate the issue and find the problem.
Can you do that for me? You can upload and send it to me here or through PM.
Replicated the issue in a sample project linked below with only the plugins of yours I'm using, VisuStella element status core, and VisuStella core engine, which is necessary for their other plugins to run. Thanks in advance.

 

Elmo_Cosquillas

Villager
Member
Joined
Nov 17, 2020
Messages
23
Reaction score
8
First Language
Spanish
Primarily Uses
RMMZ
good luck if you find the way working with visutella's code. i opened a core plugin once and suffered a stroke. the entire plugin is writen in a single line, a loong long single line.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,984
Reaction score
1,446
First Language
Portuguese - Br
Primarily Uses
RMMZ
Replicated the issue in a sample project linked below with only the plugins of yours I'm using, VisuStella element status core, and VisuStella core engine, which is necessary for their other plugins to run. Thanks in advance.

Hi @XVoid !
I think I made it!

Version 1.0.6 - 05/16/2021
- Fixed compatibility with VisuMZ_1_ElementStatusCore when using trait sets: Blessing, Gender, Variant, etc. Now, these traits will also trigger the Dynamic Parameters note tag when an actor is using them.

@Elmo_Cosquillas Yeah, that's because they obfuscate their plugins.
But I manage to discover how to add the compatibility through the console.log. Kinda tricky, but manage to do it ^^
 

XVoid

Conceptual Severance Mage
Veteran
Joined
Apr 22, 2016
Messages
49
Reaction score
25
First Language
English
Primarily Uses
RMMZ
Okay so I encountered another issue, and after bugtesting it for two days straight I think I figured it out. For whatever reason, custom parameters you add manually can't be changed with dynamic parameters. I can get the plugin to work with the stock parameters the custom params plugin has in its default settings, but I can't get it to work with anything I add myself. Even if I delete and readd the same exact parameters, the newly added one won't be affected by dynamic parameters notetags. I wasn't really sure which thread to put this, but I went with this one. I've attached a link to a sample project where I've replicated the issue below.

 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,984
Reaction score
1,446
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi @XVoid
I get your sample project, but I don't get it.
You are saying:
For whatever reason, custom parameters you add manually can't be changed with dynamic parameters.
But as I see in your plugin parameters, your custom parameter "rep" initial value is 10(defined on the class curves)
Your actor is with the note tags:
1621319397241.png
And the state Famous has a dynamic parameter note tag to increase the "rep" by 50.
I hit playtest, and your rep value is 60 (10 + 50).

The Zodiac note tag, is suppose to mean something? I didn't find any actor, enemie or state with the name of "Leo"

And what about that:
I can get the plugin to work with the stock parameters the custom params plugin has in its default settings, but I can't get it to work with anything I add myself.
What do you mean by "anything I add myself" ? Is new parameters besides the default ones?
You create the custom parameters inside the plugin parameters. Then you use them on the note tags, script call, etc. I'm testing here, and I can change every custom parameter just fine.
Like I create a new one "jmp":
1621319917165.png

Now I'm using it on the DynParams note tag(Famous state):
1621319843777.png

And there is the result(all of them start with 10):
1621319893648.png

Even if I delete and readd the same exact parameters, the newly added one won't be affected by dynamic parameters notetags.
- You mean deleting from the plugin parameters and create them again? Do you are testing them within a game already saved? Like continue from a save file? Because if you add a new parameter then hit continue(and that save file does not have this parameter in the time you saved), it may not work.

Another problem is that your sample project was not clear enough for me to replicate the issue. I need you to replicate this issue, inside this sample project. So I can just open and see the problem happening.

This one you sent to me, has a lot of database items/weapons/armors/states/actors already set.
So I have to search all of them and see what object has a dynamic notetag, what actor is on the test, etc...

So please, try to send me a sample project with the problem happening, and without a lot of stuff already set on the database. Just the ones I need to test the problem.
 

Attachments

  • 1621319822802.png
    1621319822802.png
    10.8 KB · Views: 0

XVoid

Conceptual Severance Mage
Veteran
Joined
Apr 22, 2016
Messages
49
Reaction score
25
First Language
English
Primarily Uses
RMMZ
Hi @XVoid
I get your sample project, but I don't get it.
You are saying:

But as I see in your plugin parameters, your custom parameter "rep" initial value is 10(defined on the class curves)
Your actor is with the note tags:
View attachment 189616
And the state Famous has a dynamic parameter note tag to increase the "rep" by 50.
I hit playtest, and your rep value is 60 (10 + 50).

The Zodiac note tag, is suppose to mean something? I didn't find any actor, enemie or state with the name of "Leo"

And what about that:

What do you mean by "anything I add myself" ? Is new parameters besides the default ones?
You create the custom parameters inside the plugin parameters. Then you use them on the note tags, script call, etc. I'm testing here, and I can change every custom parameter just fine.
Like I create a new one "jmp":
View attachment 189620

Now I'm using it on the DynParams note tag(Famous state):
View attachment 189618

And there is the result(all of them start with 10):
View attachment 189619


- You mean deleting from the plugin parameters and create them again? Do you are testing them within a game already saved? Like continue from a save file? Because if you add a new parameter then hit continue(and that save file does not have this parameter in the time you saved), it may not work.

Another problem is that your sample project was not clear enough for me to replicate the issue. I need you to replicate this issue, inside this sample project. So I can just open and see the problem happening.

This one you sent to me, has a lot of database items/weapons/armors/states/actors already set.
So I have to search all of them and see what object has a dynamic notetag, what actor is on the test, etc...

So please, try to send me a sample project with the problem happening, and without a lot of stuff already set on the database. Just the ones I need to test the problem.
To clarify on the sample project, I deleted Charm from the plugin parameters of all the relevant plugins, then readded it again, and the value didn't change with the dynamic param notetag on state 37, which I added to actor 1 via the Leo trait from element status core. And I started a new save every time I tested.

As for having a lot of database items "already set," those are just the stock things that are created every time you start a new project, the only things I even touched were the plugin parameters of the relevant plugins (VisuStella core engine, element status core, and your custom parameters, cap control, and class curves), the notetags on actor 1 and the two states (Famous and state 37) I was using to test the issue. The problem IS happening on the sample project I sent, I verified that multiple times before sending it and I verified it again just now. I can resend the sample project with everything else in the database deleted if need be, but I'm not sure how it would affect things once you know where to look.

Unless I'm somehow configuring them wrong, I really don't know what else it could be. But I spent an entire day trying to look for differences between the working param (reputation) and and the deleted and readded charm and found nothing.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,984
Reaction score
1,446
First Language
Portuguese - Br
Primarily Uses
RMMZ
To clarify on the sample project, I deleted Charm from the plugin parameters of all the relevant plugins, then readded it again, and the value didn't change with the dynamic param notetag on state 37, which I added to actor 1 via the Leo trait from element status core. And I started a new save every time I tested.

As for having a lot of database items "already set," those are just the stock things that are created every time you start a new project, the only things I even touched were the plugin parameters of the relevant plugins (VisuStella core engine, element status core, and your custom parameters, cap control, and class curves), the notetags on actor 1 and the two states (Famous and state 37) I was using to test the issue. The problem IS happening on the sample project I sent, I verified that multiple times before sending it and I verified it again just now. I can resend the sample project with everything else in the database deleted if need be, but I'm not sure how it would affect things once you know where to look.

Unless I'm somehow configuring them wrong, I really don't know what else it could be. But I spent an entire day trying to look for differences between the working param (reputation) and and the deleted and readded charm and found nothing.
Ok, no need to send me another project then, let's try to figure this out. I believe I have a clue of what is wrong.
You set theses note tags with two states: Famous and state 37.
The thing is, that on the Database, state 37 is named as "Test2" and not "Leo"
1621325717415.png

So the actor note tags are this ones:
1621325770377.png

<Zodiac: Leo> Will do nothing, since doens't exist a state called "Leo".
That's why it is not working.

I don't know exactly how Visustella plugins works. So maybe that is the part that I am missing.
But my plugin works this way:
It needs to have the note tag on a State or Equipment.
Having that, it will check if an actor have any note tags on his equipments or states applied to him(either normal or passive states).

And also, compatiblity with VisuMZ_1_ElementStatusCore, it will search if the actor has any state set on the this._traitSets object which is the one created by Visu that adds the Blessing, Zodiac etc...

So in the console log, I can see in your sample project, the traits that the actor have:
1621326325988.png
My plugin checks every one of them and see if any name matches a state name. If yes, then it execute the note tag feature.
And the "Leo", doens't match any state name.

So far I changed, excluded, add new ones and use them on the Famous state, and everything worked fine.
 

XVoid

Conceptual Severance Mage
Veteran
Joined
Apr 22, 2016
Messages
49
Reaction score
25
First Language
English
Primarily Uses
RMMZ
Ok, no need to send me another project then, let's try to figure this out. I believe I have a clue of what is wrong.
You set theses note tags with two states: Famous and state 37.
The thing is, that on the Database, state 37 is named as "Test2" and not "Leo"
View attachment 189622

So the actor note tags are this ones:
View attachment 189623

<Zodiac: Leo> Will do nothing, since doens't exist a state called "Leo".
That's why it is not working.

I don't know exactly how Visustella plugins works. So maybe that is the part that I am missing.
But my plugin works this way:
It needs to have the note tag on a State or Equipment.
Having that, it will check if an actor have any note tags on his equipments or states applied to him(either normal or passive states).

And also, compatiblity with VisuMZ_1_ElementStatusCore, it will search if the actor has any state set on the this._traitSets object which is the one created by Visu that adds the Blessing, Zodiac etc...

So in the console log, I can see in your sample project, the traits that the actor have:
View attachment 189624
My plugin checks every one of them and see if any name matches a state name. If yes, then it execute the note tag feature.
And the "Leo", doens't match any state name.

So far I changed, excluded, add new ones and use them on the Famous state, and everything worked fine.
Apologies on the response delay, I was asleep when you replied and I haven't had time to test things until just now. The error seems to have been caused by the state name mismatch, which I didn't even know mattered until you said it. I got my custom params to work in the sample project by making the state and trait names match.
 

Latest Threads

Latest Posts

Latest Profile Posts

Took a small break by playing VR. Latest update of these glasses unfortunately caused a little of trouble but it can be fixed with a manual operation.

Until You Fall is freaking awesome.
I am SO HYPED to share this trailer with everyone when its done. I almost want to tear up i had no idea how far i came along with Fallen Feather in these last 3 years.
how it looks from the top
Hike was successful guys! I made it to the top!
Add Film-like Visual Effects During Test-Play, Deploy Games with Electron | RPG Maker News #69

Forum statistics

Threads
112,187
Messages
1,066,450
Members
145,786
Latest member
pswpsw
Top