Although this could be used in other contexts as well.
I am currently using the yanfly actor variables plugin to give each character a set of six core stats (strength, constitution, dexterity, intelligence, wisdom and charisma) in addition to the ones the game gives you by default (so I'm not renaming the currently existing stats).
I want to make it that a weapon does damage based on the weapons own attack stat plus the characters strength stat. I would use the note area in the weapon section to alter it's attack.
<Custom Parameters>
atk = $gameVariables.value(41);
</Custom Parameters>
In this case I'm referring to a specific characters strength stat. I know in theory how I could make it use the strength stat of whoever is equiping the weapon, but not how to actually do it.
It would look something like this:
<Custom Parameters>
atk = $gameVariables.value(<equipingCharacter>*20 + 21);
</Custom Parameters>
Where <equipingCharacter> is the index integer of the character equiping the weapon.
The first two arrays are used for game variables and each character gets their own array of twenty variables.
This code would assume that each characters extra stats appear in the same order in the variables.
I am currently using the yanfly actor variables plugin to give each character a set of six core stats (strength, constitution, dexterity, intelligence, wisdom and charisma) in addition to the ones the game gives you by default (so I'm not renaming the currently existing stats).
I want to make it that a weapon does damage based on the weapons own attack stat plus the characters strength stat. I would use the note area in the weapon section to alter it's attack.
<Custom Parameters>
atk = $gameVariables.value(41);
</Custom Parameters>
In this case I'm referring to a specific characters strength stat. I know in theory how I could make it use the strength stat of whoever is equiping the weapon, but not how to actually do it.
It would look something like this:
<Custom Parameters>
atk = $gameVariables.value(<equipingCharacter>*20 + 21);
</Custom Parameters>
Where <equipingCharacter> is the index integer of the character equiping the weapon.
The first two arrays are used for game variables and each character gets their own array of twenty variables.
This code would assume that each characters extra stats appear in the same order in the variables.