Dear all,
Since I'm not as good as I should with JavaScript, I don't know which of the two following "code" is the best.
What I want to do is to bind a variable to an item. This variable is then use to increase a specific stat with attachable augments.
Here the plugins I'm using :
To do so, I don't know which one of the two following procedure is the best :
for sure, I've tested both methods and both work. I'm just wondering if one of those two methods is better, considering that many items can be created along the game.
Thanks,
Lay.
Since I'm not as good as I should with JavaScript, I don't know which of the two following "code" is the best.
What I want to do is to bind a variable to an item. This variable is then use to increase a specific stat with attachable augments.
Here the plugins I'm using :
- YEP_X_AttachAugments
- YEP_ItemCore
Consider the following items :
- an augment that increase ATK.
- a sword weapon
- a cane weapon
To do so, I don't know which one of the two following procedure is the best :
- creating a variable when the item is created using the <On Creation Eval> notetag and using item._augmentIncrease = x
- storing the variable in gameVariable using the <Info Eval> notetag and using $gameVariables.setValue(i, x)
weapon notetags :
<On Creation Eval>
item._atkIncrease = 10
</On Creation Eval>
augment notetags :
<Augment Attach Eval: Glyph>
item.params[2] += item._atkIncrease
<Augment Attach Eval: Glyph>
<On Creation Eval>
item._atkIncrease = 10
</On Creation Eval>
augment notetags :
<Augment Attach Eval: Glyph>
item.params[2] += item._atkIncrease
<Augment Attach Eval: Glyph>
weapon notetags:
<Info Eval>
$gameVariables.setValue(1, 10) // atk
<Info Eval>
augment notetags :
<Augment Attach Eval: Glyph>
item.params[2] += $gameVariables.value(1)
<Augment Attach Eval: Glyph>
<Info Eval>
$gameVariables.setValue(1, 10) // atk
<Info Eval>
augment notetags :
<Augment Attach Eval: Glyph>
item.params[2] += $gameVariables.value(1)
<Augment Attach Eval: Glyph>
for sure, I've tested both methods and both work. I'm just wondering if one of those two methods is better, considering that many items can be created along the game.
Thanks,
Lay.