Percentages in Yanfly's Attachable Augments Script

Hi there,


I'm having trouble getting Yanfly's Attachable Augments script to work properly.
When adding the notetags below, the adding and removing of the prefix works fine.
Adding the 1% hit chance also works as intended but when I detach the augment ingame the hit rate stays at the increased level.
I'm not familiar with JavaScript and couldn't find the problem within the script itself.
I´ve experienced the same problem with the base parameters when using percentages. There I could revert to simple values instead of percentages.
But with the special and extra parameters this doesn't work.


Is there anyone who knows a fix for this? In the forums and google I couldn't find my particular problem.


So long,


Gonor

Code:
<Augment Attach: Glyph>

HIT: +1%

Change Prefix: Accurate

</Augment Attach: Glyph>

<Augment Detach: Glyph>

HIT: -1%

Cancel Prefix: Accurate

</Augment Detach: Glyph>
Your simplest solution is likely to use the Add/Remove Passive State function of the plugin. Create a State that increases HIT by 5%, and set the glyph up along the lines of:



<Augment Attach: Glyph>
Add Passive State: x
Change Prefix: Accurate
</Augment Attach: Glyph>

<Augment Detach: Glyph>


Remove Passive State: x
Cancel Prefix: Accurate
</Augment Detach: Glyph>

In the above example, x is the state id that increases hit by 5%.
<Augment: Glyph>


HIT: +1%


Change Prefix: Accurate


</Augment: Glyph>


Should work, no need to have the attach and detach tags in this case. When using just the <augment: x> notetag it'll add the params when equipping, and remove them when unequipping.
Thank you, you two.
Both suggestions worked like a charm.
I'll probably stick to Halrawk's, though as I won't have to create so many passive states.


I guess this can be closed now.

Original thread: https://forums.rpgmakerweb.com/threads/percentages-in-yanflys-attachable-augments-script.69426/