Eli Dynamic Parameters - Change parameter values dynamically with states and equipment note tags!
JS Plugin Releases (RMMZ)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.
Please, backup your older plugin first. This version will break the previous one since now the note tag is set through plugin parameters, and not on the note field.
- 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.
Please, backup your older plugin first. This version will break the previous one since now the note tag is set through plugin parameters, and not on the note field.
Version 2.0.1 - 07/03/2021
- Fixed a problem of, sometimes, not finding the parameters and custom parameters id
- Fixed a problem of, sometimes, not finding the parameters and custom parameters id
Version 2.0.2 - 07/05/2021
- Add a proper function to check the existence of dynamic parameters on a data object.
- Add a proper function to check the existence of dynamic parameters on a data object.
Version 3.0.0 - 08/19/2021
- Need Eli Book 4.0.0 now.
- Need Eli Book 4.0.0 now.
Version 3.0.1 - 08/29/2021
- Fixed the default value of the plugin parameters.
- Fixed the default value of the plugin parameters.
(MV and MZ versions)
Version 3.0.2 - 10/04/2021
- Fixed a behavior that sometimes can cause a bug if different Dynamic Template names contain the same words, like sword_blue, sword_green.
Version 3.0.3 - 10/08/2021
- Fixed a typo that was causing a crash in rare situations.
Version 3.0.2 - 10/04/2021
- Fixed a behavior that sometimes can cause a bug if different Dynamic Template names contain the same words, like sword_blue, sword_green.
Version 3.0.3 - 10/08/2021
- Fixed a typo that was causing a crash in rare situations.
Excuse me how to realize to equip the weapon, the effect can be effective?
I tried to enter the code on the weapon (I had already customized the parameters) , but when I opened the game, it had no effect.
↑my parameters
↑code not work
And if I make a template, it works.
↑it work
This strange phenomenon bothered me all day, so I signed up for the website.
I tried to enter the code on the weapon (I had already customized the parameters) , but when I opened the game, it had no effect.
↑my parameters
↑code not work
And if I make a template, it works.
↑it work
This strange phenomenon bothered me all day, so I signed up for the website.
Are you using an older version? That code you're typing into the weapon note field doesn't exist in the plugin's instructions. Defining a template is the only way to use it.
Hi there!
The first option, using the note tag directly does not work anymore. Only for older versions.
The right way to use it is the template way.
thanks!
question on the dynamaic custom params.
are those passive params once they met?
because I want to increase element value, attack or def or whatever,
depending on 2 equiped items (on 3 and 4) which is a specific order.
if item 1 in in slot 3 , and item 2 in slot 4, it does nothing, but if it's
item 1 in slot 4 and item 2 in slot 3 it gives an effect.
what is the best approach to make this work in a custom param?
which is an armor item I believe if using artifacts (equipement type),
because I can save it for later 🙂 because I need more combinations of
weapon check and arifiact check for this approach that can boost
the param/xparam or sparam in a nice way.
are those passive params once they met?
because I want to increase element value, attack or def or whatever,
depending on 2 equiped items (on 3 and 4) which is a specific order.
if item 1 in in slot 3 , and item 2 in slot 4, it does nothing, but if it's
item 1 in slot 4 and item 2 in slot 3 it gives an effect.
what is the best approach to make this work in a custom param?
which is an armor item I believe if using artifacts (equipement type),
because I can save it for later 🙂 because I need more combinations of
weapon check and arifiact check for this approach that can boost
the param/xparam or sparam in a nice way.
Hi there!
Well, you will have to play a little bit with javascript.
Because you will need to check what weapon/armor is on what slot.
I believe you could do this:
- replace "$data" with $dataWeapons or $dataArmors
- SLOT_ID always starts at 0.
JavaScript:
this.equips()[SLOT_ID] === $data[ID] ? ValueY : ValueX
if you have a lot of combinations to check, I would go using switch statements, it is like another way of doing IF ELSE:
JavaScript:
const equipId = this.equips()[SLOT_ID]?.id
switch(equipId){
case 1: return ValueX // If the equip id is equal to 1, give value x
case 2: return ValueY // If the equip id is equal to 2, give value y
... ETC.
}
To use it with custom parameters is the same approach. You just need to have my custom parameter plugin installed.
I think I need an && because it needs 2 items for 1 effect, or in rare
cases, 3 items (1 armor or weapon + 2 artifacts, because artifact
are going to be a role to gain stats, so I need to do around
$gameActors.actor(1).equips()[3].id === 42 || $gameActors.actor(1).equips()[4].id === 42
but need instead of || using && so it matches.
so return to case 1 and 2 would be harder if it needs 2 equips ID.
bad combination result in bad side effect, because it can make intresting
game play, specially the combination required for some enemies, and especially
bosses to make them easy or hard, but still do able 🙂
so how to input 2 or more to gain effect and how to activate them if it's
not a passive state but on the item itself?
or is it more that dynamic into the artifact that checks if the other is equiped?
I still learn JS on my own to get better.
cases, 3 items (1 armor or weapon + 2 artifacts, because artifact
are going to be a role to gain stats, so I need to do around
$gameActors.actor(1).equips()[3].id === 42 || $gameActors.actor(1).equips()[4].id === 42
but need instead of || using && so it matches.
so return to case 1 and 2 would be harder if it needs 2 equips ID.
bad combination result in bad side effect, because it can make intresting
game play, specially the combination required for some enemies, and especially
bosses to make them easy or hard, but still do able 🙂
so how to input 2 or more to gain effect and how to activate them if it's
not a passive state but on the item itself?
or is it more that dynamic into the artifact that checks if the other is equiped?
I still learn JS on my own to get better.
Get it. So maybe you can do something like that:
It will iterate through all the equipment the actor have and see if it contains the following equip ids(id1, id2, id3).
If the actor has all the 3 equips id you specify, it applies valueX else applies valueY
JavaScript:
const equipList = this.equips()
const bonusEquips = equipList.filter(equip => equip && [id1, id2, id3].includes(equip.id))
const hasBonus = bonusEquips.length >= 3
if(hasBonus){
valueX
}else{
valueY
}
so equips checks the IDs of all equips? or just armor (EquipmentType).
if equipList = this.equips()
how exactly is equip array to work in which slots?
the has bonus can be 2 or 3, as for the array.
if I can understand the array of equipID's in the slots, than I can copy
the code to modify the value X and Y for valueY = null or left empty,
and valueX for param.att = 3 (but need the correct one there),
which I can find it later. or DM me with some possibilities, because js
can be a pain for me, and I try to learn alot to understand (if its oke for you).
if equipList = this.equips()
how exactly is equip array to work in which slots?
the has bonus can be 2 or 3, as for the array.
if I can understand the array of equipID's in the slots, than I can copy
the code to modify the value X and Y for valueY = null or left empty,
and valueX for param.att = 3 (but need the correct one there),
which I can find it later. or DM me with some possibilities, because js
can be a pain for me, and I try to learn alot to understand (if its oke for you).
The function "this.equips()" will return an array(a list) of all equipment the actor has.
So:
this.equips()[0] = Slot 1
this.equips()[1] = Slot 2
Etc...
And, you can change the list of ids you want to check inside the [] just separate each number with a comma.
Don't let value or X empty or null. If you don't want to use you can replace them with 0.
There is no way you could use the "param.att = 3".
If you want to apply 3 to the atk, you just need to set this formula on the atk field of the plugin parameter.
So, in that case, the valueX will be 3. And the valueY will be 0.
Because this formula is already setting a value for a specific parameter, depending on what parameter field you are writing in the plugin parameter.
Version 5.0.0 is not compatible with my plugins that are below the 5.0.0 versions.
Version 5.0.0 - 02/05/2022
Version 5.0.0 - 02/05/2022
- Updated terms of use.
Hello there, love your plugin! I do have an issue though and I've been trying to solve it for a while now, so I hope you can help me with it.
So my issue is that I have a custom parameter called "Weapon Damage" that is increased with Weapons. I'm trying to create a state that increases Weapon Damage by 25%, but it seems that I get a "Maximum call stack size exceeded" error.
So my issue is that I have a custom parameter called "Weapon Damage" that is increased with Weapons. I'm trying to create a state that increases Weapon Damage by 25%, but it seems that I get a "Maximum call stack size exceeded" error.
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.
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:
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 ^^''!
Original thread: https://forums.rpgmakerweb.com/threads/eli-dynamic-parameters-change-parameter-values-dynamically-with-states-and-equipment-note-tags.135624/