MV Need help with Yanfly equip core.

So I'm attempting to make it so that armor you have equipped changed depending on your skill level. For this example the variable would be stored as variable 1. In the armor notetag using Yanfly's equip core plugin I've used:


<Custom Parameters>
def = def / $gameVariables.value(1) ;
</Custom Parameters>

The goal here would be to have say a piece of armor that gives 100 def, when game variable1 = 4 it would divide by 4, thus giving the player only 25 defense from that piece of armor. Unfortunately I must have the syntax wrong or something, because as is, this doesn't do anything.

Anyone have any clue as to what might be going on?
"Def = Def / x" is not a possible formula. Something can not be equal to a fraction of itself.

How about you give the armor 0 def and try "def = 100 / $gameVariables.value(1) ;" in de parameter? Does that work?
Note the portion of the instructions for that notetag:
Changes made here do not alter the base parameters, but instead, are added onto the base parameters.

You're treating "def" like it starts at the value of that armor's defense, but it doesn't - it's an extra number that starts at 0. And thus, 0 divided by anything isn't a valid value.

Try:
Code:
def = item.params[3]/$gameVariables.value(1);
Try:
Code:
def = item.params[3]/$gameVariables.value(1);
This would still be added to the original value, though.

I see what OP tries to do, but because you need to start with a base value, it would be much more officient if instead of starting with a high value and devide it, you could start with a low value, and make the variable raise it.

Or... And I don't know if this is possible, but it is worth to try, you can give the tag a negative value, and substract from the original. In this case the higher the variable, the better the armor (while in the original idea it was the other way around). (Edit: I changed it, so now it should be how you intended.)

Edit: I think the tag should then be like this:
Code:
def = 0-item.params[3]+item.params[3]/$gameVariables.value(1);
Edit: I think the tag should then be like this:
Code:
def = 0-item.params[3]+item.params[3]/$gameVariables.value(1);
This worked perfectly! Thanks for the help~
This worked perfectly! Thanks for the help~
Happy to help.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-yanfly-equip-core.157673/