This is an updated version of the mod I made over a year ago. This update supports levels from 0 to 9100. It's a lot less laggier and more stable than the previous versions.
It also works differently, it doesn't use any blacksmith space to load the item data (previous version added the items to blacksmith and then used them to load it) and it saves the location of the item properly at barracks. I also implemented adaptive speed so level increases faster the longer the button is pressed.
Sadly the item range can't be increased, since there are only 9199 (9999 - 800) available slots to use the item ID as a base to calculate the level. I limited it to 9100 to have some room for savedata expansion, if I ever want to do that in the future.
I also decided to share the old version of this code: https://pastebin.com/FEnWz32F