MV Using Yanfly Equip Core to change other stats/parameters

Hello!

I have a question regarding the use of Yanfly's Equip Core plugin.

This plugin has notetags which can be used to alter an actor's parameters when equipped or unequipped. This functionality already exists in the default editor but I was wondering if it was possible change something other than the eight base parameters.

Specifically, I am interested in using equipment to alter current MP. I noticed that the notetags in the plugin only allow for altering the base parameters (ATK, DEF, etc) but not xparams or sparams (like critical chance, exp rate, etc). Looking at the code for the plugin, I noticed the cases where stats are altered by adding the notetags to each piece of equipment. Would there be a way to add a new case to essentially make a notetag that can alter current MP?

Current MP is defined in rpg_objects under Game_BattlerBase but it is not considered a default parameter, so I'm not sure if this is possible. Running an eval like user.gainMp seems easy enough but difficult to tie it to equipping or unequipping items.

I originally used a plugin by Waynee to run evals on equip to achieve this effect but that plugin is unfortunately not compatible with Yanfly's Equip Core.
Bump
Hi, you'll need these to alter base, extra, and special parameters within Yanfly's plugins.


Spoiler: code
Code:
You can use the following notetags to alter the various aspects that modify
the base parameter values:

Actor, Class, Enemy, Weapon, Armor, and State Notetags:

  <stat Plus: +x>
  <stat Plus: -x>
  Replace 'stat' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi',
  or 'luk'. This is the value added to the base parameter before the rate
  and flat values contribute to the total parameter value assuming the
  plugin's default formula is utilized.

  <stat Rate: x%>
  <stat Rate: x.y>
  Replace 'stat' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi',
  or 'luk'. This is the value multiplied to the sum of the base and plus of
  the parameter before affected by the buffRate and flat value assuming the
  plugin's default formula is utilized.

  <stat Flat: +x>
  <stat Flat: -x>
  Replace 'stat' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi',
  or 'luk'. This is the value added at the end after the sum of the base and
  plus parameters have been added and multiplied by the rate values assuming
  the plugin's default formula is utilized.

  <stat Max: x>
  <stat Min: x>
  Replace 'stat' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi',
  or 'luk'. This sets the maximum or minimum cap of the the stat parameter
  to x. If a battler is affected by multiple of these notetags, then the
  value used will be the largest value of the notetag used.


Spoiler: code
Code:
You can use the following notetags to alter the various aspects that modify
the extra parameter values:

Actor, Class, Enemy, Weapon, Armor, and State Notetags:

  <stat Plus: +x%>
  <stat Plus: -x%>
  <stat Plus: +x.y>
  <stat Plus: -x.y>
  Replace 'stat' with 'hit', 'eva', 'cri', 'cev', 'mev', 'mrf', 'cnt',
  'hrg', 'mrg', or 'trg'. This is the value added to the base parameter
  before the rate and flat values contribute to the total parameter value
  assuming the plugin's default formula is utilized.

  <stat Rate: x%>
  <stat Rate: x.y>
  Replace 'stat' with 'hit', 'eva', 'cri', 'cev', 'mev', 'mrf', 'cnt',
  'hrg', 'mrg', or 'trg'. This is the value multipled to the sum of the base
  and plus values of the parameter before added by the flat value assuming
  the plugin's default formula is utilized.

  <stat Flat: +x%>
  <stat Flat: -x%>
  <stat Flat: +x.y>
  <stat Flat: -x.y>
  Replace 'stat' with 'hit', 'eva', 'cri', 'cev', 'mev', 'mrf', 'cnt',
  'hrg', 'mrg', or 'trg'. This is the value added finally to the sum of the
  base and plus values after being multiplied by the rate value assuming the
  plugin's default formula is utilized.


Spoiler: code
Code:
You can use the following notetags to alter the various aspects that modify
the special parameter values:

Actor, Class, Enemy, Weapon, Armor, and State Notetags:

  <stat Plus: +x%>
  <stat Plus: -x%>
  <stat Plus: +x.y>
  <stat Plus: -x.y>
  Replace 'stat' with 'tgr', 'grd', 'rec', 'pha', 'mcr', 'tcr', 'pdr',
  'mdr', 'fdr', or 'exr'. This is the value added to the base parameter
  before the rate and flat values contribute to the total parameter value
  assuming the plugin's default formula is utilized.

  <stat Rate: x%>
  <stat Rate: x.y>
  Replace 'stat' with 'tgr', 'grd', 'rec', 'pha', 'mcr', 'tcr', 'pdr',
  'mdr', 'fdr', or 'exr'. This is the value multipled to the sum of the base
  and plus values of the parameter before added by the flat value assuming
  the plugin's default formula is utilized.

  <stat Flat: +x%>
  <stat Flat: -x%>
  <stat Flat: +x.y>
  <stat Flat: -x.y>
  Replace 'stat' with 'tgr', 'grd', 'rec', 'pha', 'mcr', 'tcr', 'pdr',
  'mdr', 'fdr', or 'exr'. This is the value added finally to the sum of the
  base and plus values after being multiplied by the rate value assuming the
  plugin's default formula is utilized.
Those plugins aren't quite what I'm looking for. I was hoping to find a way to alter current MP, not max MP or any other parameter through equipment. Current MP is defined in rpg_objects but it's not actually a parameter.

The Equip Core plugin notetags seem to use obj.params[x] to reference the actor's parameters. I was wondering if there was a way to add a new a case that can reference current MP. I know in game an actor's MP can be called with $gameActors.actor().Mp() but it's not actually a parameter in rpg_objects.
EquipCore isn't changing the actor's params at all, it's changing the params granted to an actor from the item that the tags are on. obj in this case is the item. These tags are meant to allow the dev to break the default cap of 500 to a parameter on an item. By setting it to 500, and then adding more via the notetag, the item can have more params on it than would normally be allowed in the editor.

As such, current MP and current HP aren't something you can modify, because those are derived values on an actor, not on an item he is wearing.
EquipCore isn't changing the actor's params at all, it's changing the params granted to an actor from the item that the tags are on. obj in this case is the item. These tags are meant to allow the dev to break the default cap of 500 to a parameter on an item. By setting it to 500, and then adding more via the notetag, the item can have more params on it than would normally be allowed in the editor.

As such, current MP and current HP aren't something you can modify, because those are derived values on an actor, not on an item he is wearing.

Thanks for the clarification, ramza!

I was trying to get a weight system working where the player cannot equip something that exceeds the weight they can carry. My first thought was to use current/max MP so that the gauge can be used to easily visualize weight vs max weight, but I can make do with just using parameters.
Why do you believe the Eval on Equip is incompatible with Equip Core? He says in his thread they're designed to work together.
Why do you believe the Eval on Equip is incompatible with Equip Core? He says in his thread they're designed to work together.
I had a discussion through DM with Wayne a while back and he told me there was a pretty big incompatibility issue between the two plugins.

I made a project with both his OnEquipEval plugin and Yanfly's Equip Core and used the note tags to run eval when items were equipped. The note tags worked fine only when Yanfly's Equip Core was off. Wayne looked it over and confirmed it was a compatibility problem.
Huh! That's weird that it wouldn't be updated in the thread. The last post about it a few pages back he claims it works if his plugin is lower.

That's good to know, I've recommended it a number of times.

Original thread: https://forums.rpgmakerweb.com/threads/using-yanfly-equip-core-to-change-other-stats-parameters.147209/