- Joined
- Feb 22, 2016
- Messages
- 1,846
- Reaction score
- 1,599
- First Language
- English
- Primarily Uses
- RMMV
So I'm using Yanfly's EquipRequirements plugin and wanted to give weapons a "soft" Strength (STR aka ATK) requirement, which isn't too hard. However, I was wondering if it was possible to have it so that if the user's STR stat is lower than the required value, the difference would be deducted from the user's Speed (SPD aka LUK) stat. So if a Greatsword had a STR req of 25 but the wielder only has a STR of 20, the wielder would suffer a -5 SPD penalty. How would I implement such a mechanic?
Edit: I just realized that maybe using <Custom Parameters> would be more appropriate. Thoughts?
I'm not sure the correct way to implement this though. How would I reference the weapon's STR requirement? Or can I use a conditional within <Custom Parameters>?
Edit2: Ok, I just tried the following, but it doesn't seem to be working. What am I doing wrong?...
Edit3: Nvm, I got it working by removing the var and hard coding a value.
JavaScript:
<Custom Equip Requirement Condition>
if (user.paramBase(2) >= 10) {
condition = true;
} else {
???; //I need something here for the penalty mechanic
}
</Custom Equip Requirement Condition>
JavaScript:
<Custom Parameters>
luk = user.paramBase(2) - "requirement"
</Custom Parameters>
Edit2: Ok, I just tried the following, but it doesn't seem to be working. What am I doing wrong?...
JavaScript:
<Custom Parameters>
var weaponWeight = 10;
luk = user.paramBase(2) - weaponWeight;
</Custom Parameters>
Last edited: