v1.1.1: Fixed a bug while using Yanfly's Equip Core that will clear equipment even the unremovable ones and optimized them even when set to not be optimized (special thanks to snorlord for the help).
v1.1.0: Now added "Unchangeable Types" parameter to exclude some slots to enable equip changes in battle.
v1.0.2: Fixed a bug that won't refresh the equip item list when the quantity of any equipment (from weapons to armors) altered outside of the equip command in battle.
v1.0.1: Now compatible with Yanfly's Equip Core.
Author's Notes
This script is free to use commercially or not. If commercially, you must credit me. If not, just don't claim this as your own but not crediting me is okay if you don't want to.