- Pokémon Essentials Version
- v20.1 ➖
This is a super simple resource that sorts your bag items alphabetically, rather than by index number or by when the player received them. I formatted it as a plugin for ease of use, but really only one line of code is functionally changed. If you'd rather just change the line directly (and know what you're doing), I'll include that change below.
Installation: Take the "Alphabetized Bag" folder out of the Zip and put it in your Plugins folder.
A few notes:
1. You must enable the setting BAG_POCKET_AUTO_SORT in your Settings script for any pocket that you want sorted.
2. Bag pockets only re-sort when you receive a new item. That means new saves will automatically be sorted, but for old saves, pockets won't be sorted until the player receives a new item in a given pocket.
3. The "Fill Bag" debug option in Essentials does not add new items in the usual way. If you use this command, you have to add 1 of an individual item to a pocket afterwards to get it to sort.
It's my first time making a plugin so please let me know if you have any issues! Tested in my game and vanilla 20.1 Essentials and it worked fine.
Please only do this if you know what you're doing. Otherwise use the plugin option detailed above.
In the PokemonBag script section find this code:
And replace it with the following:
In the PokemonBag script section find this code:
Ruby:
@pockets[pocket].sort! { |a, b| GameData::Item.keys.index(a[0]) <=> GameData::Item.keys.index(b[0]) }
Ruby:
@pockets[pocket].sort! { |a, b| GameData::Item.get(a[0]).name <=> GameData::Item.get(b[0]).name }
- Credits
- No credit needed