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

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,362
Reaction score
1,854
First Language
Portuguese - Br
Primarily Uses
RMMZ
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.
That's fine ^^
Glad it's working now
:MV1:
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,362
Reaction score
1,854
First Language
Portuguese - Br
Primarily Uses
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.

parameters.PNG

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.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,362
Reaction score
1,854
First Language
Portuguese - Br
Primarily Uses
RMMZ
Version 2.0.1 - 07/03/2021
- Fixed a problem of, sometimes, not finding the parameters and custom parameters id
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,362
Reaction score
1,854
First Language
Portuguese - Br
Primarily Uses
RMMZ
Version 2.0.2 - 07/05/2021
- Add a proper function to check the existence of dynamic parameters on a data object.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,362
Reaction score
1,854
First Language
Portuguese - Br
Primarily Uses
RMMZ
Version 3.0.0 - 08/19/2021
- Need Eli Book 4.0.0 now.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,362
Reaction score
1,854
First Language
Portuguese - Br
Primarily Uses
RMMZ
Version 3.0.1 - 08/29/2021
- Fixed the default value of the plugin parameters.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,362
Reaction score
1,854
First Language
Portuguese - Br
Primarily Uses
RMMZ
(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.
 

sumcat

Warper
Member
Joined
Nov 21, 2021
Messages
2
Reaction score
2
First Language
Chinese
Primarily Uses
RMMZ
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.
QQ截图20211121185937.png
↑my parameters

QQ截图20211121185859.png
↑code not work

And if I make a template, it works.

QQ截图20211121190002.pngQQ截图20211121185916.png
↑it work

This strange phenomenon bothered me all day, so I signed up for the website.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
3,216
Reaction score
1,907
First Language
English
Primarily Uses
RMMV
↑code not work
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.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,362
Reaction score
1,854
First Language
Portuguese - Br
Primarily Uses
RMMZ
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.
View attachment 207286
↑my parameters

View attachment 207285
↑code not work

And if I make a template, it works.

View attachment 207284View attachment 207283
↑it work

This strange phenomenon bothered me all day, so I signed up for the website.
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.
 

sumcat

Warper
Member
Joined
Nov 21, 2021
Messages
2
Reaction score
2
First Language
Chinese
Primarily Uses
RMMZ
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!
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,918
Reaction score
1,888
First Language
Dutch
Primarily Uses
RMMV
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.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,362
Reaction score
1,854
First Language
Portuguese - Br
Primarily Uses
RMMZ
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.
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.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,918
Reaction score
1,888
First Language
Dutch
Primarily Uses
RMMV
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.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,362
Reaction score
1,854
First Language
Portuguese - Br
Primarily Uses
RMMZ
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.
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
}
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,918
Reaction score
1,888
First Language
Dutch
Primarily Uses
RMMV
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).
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,362
Reaction score
1,854
First Language
Portuguese - Br
Primarily Uses
RMMZ
so equips checks the IDs of all equips? or just armor (EquipmentType).

if equipment = 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, then I can copy
the code to modify the value X and Y for value = null or left empty,
and values 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 a lot to understand (if it's okay 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.
 

Latest Threads

Latest Profile Posts

Apparently I'm a grandpa now.

20220128_181216.jpg20220128_181227.jpg
Sales Goal of Learn RPG Maker MV at 64% now! :kaopride:
When I was in the hospital I did actually have a nurse that was funny, did all these extra nice things for me and said she liked me. So you know what that means. That will be the last time I'll hear from her.
Anyone here ever confronted a never-ending loading screen? Took me 3 hours to realize the problem was the font format :yswt:
Ah, the problems a noob runs into...

Forum statistics

Threads
118,803
Messages
1,118,824
Members
155,983
Latest member
DJC
Top