MV [YEP_X_AttachAugments] How to destroy removed augments?

Hey all,

I've come to the conclusion that I want augments to be destroyed when removed. This is because my augments are one of the main crafted items and I'm doing this to make a sink for their materials. For some reason Yanfly didn't think to include this as a feature? I can make them unable to be removed, but not "consumable."

I tried this using the lunatic mode (and filled out the variables):
JavaScript:
<Augment Detach Eval: Attachment>
$gameParty.loseItem(9, 1);
</Augment Detach Eval: Attachment>

It seems that while the item is attached it enters some kind of limbo where it can't be destroyed. I say this because if I have another of the same augment in my inventory it will get destroyed, but the one actually in the item never is.
Try commenting out (put // at the beginning of the line) lines 765 and 776.

At a cursory look, it looks like the rest of the code that calls those functions has error handling for there to be no augment coming back, so I think that should do it. Let me know if you get any errors.
isn't it the same (if you add stats to remove stats?

like:
* Add Attack Element: x
* Remove Attack Element: x

or if its done differently, what is added when you equip it?
isn't it the same (if you add stats to remove stats?
What? The OP wants to detach an augment to empty the slot on the item but not receive the augment back in inventory.
I though detroying but also removing the stats they get on the player if it stays
there if the item is destroyed/removed (but I could be wrong on that part).

if it doesn't returned to augment, than not sure.
Try commenting out (put // at the beginning of the line) lines 765 and 776.

At a cursory look, it looks like the rest of the code that calls those functions has error handling for there to be no augment coming back, so I think that should do it. Let me know if you get any errors.
So far this seems like it works like a charm! I can't seem to find any bugs doing it this way but I'll check back if I do. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/yep_x_attachaugments-how-to-destroy-removed-augments.163012/