Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inventory is not sorted #1799

fmatthew5876 opened this issue Jun 6, 2019 · 0 comments


Copy link

commented Jun 6, 2019

  • Ensure inventory items are added and removed in sorted order
  • Ensure battle items are sorted, including equipment added to the list due to being equipped but not in inventory
  • Handle broken Player saves that aren't sorted (in RPG_RT compatible way??)

Create this event

Add Item: LongSword x1
Add Item: Potion x1

In RPG_RT, the inventory will be Potion, Long Sword
In Player, the inventory will be Long Sword, Potion

The lsd chunks for item_ids etc.. will also reflect this ordering.

A good example of this is in #1722

The save game was created in player, and so the inventory in the LSD chunks is not sorted.

If you load this save in Player, the menu inventory won't be sorted. When you start a battle, the weapon described in the bug will be the last item.

If you load this save in RPG_RT, the menu inventory also won't be sorted! That's probably because RPG_RT just loads the LSD directly. It remains to be seen what happens when you add items to an unsorted inventory. Where do they get added? Will RPG_RT do a broken binary search or something else? ❗️

When you start a battle in RPG_RT, all of the sudden the items in battle are now sorted. This includes the weapon in question, which appears in it's proper sorted location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.