-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Implement bag_sort branch #3938
Conversation
…into nowhiteout
Agree with adding a new item struct field |
I agree too. I also think there should be an opt-in config to remember the sorting, because if I'm not misremembering, the bag is reordered when you reload the savefile. Opt-in because it would likely use at least 1 bit of space in one of the SaveBlocks to remember the current sorting mode. |
@Bassoonian, what exactly is the missing vanilla data? and/or should we make a discord thread for this? |
When using bag sorting in vanilla games, the items are ordered in a specific way (per pocket, of course) that does not match item ids. I've been unable to find a complete list (or any list at all, really), so this probably requires a SV save with maxed out items to depart from and then maxed out items saves for other games to fill in the gaps of items unavailable in SV |
I think I can easily get a SV save with all items to test this, but you're going to run into the issue where sort IDs conflict because items have moved pockets between Emerald and SV. For example, X Attack is sort ID 1 for the Battle Items pocket, but that pocket doesn't exist in Emerald. How would you fix that? |
What actually happens when ppl have the better bag branch? |
https://www.pokecommunity.com/threads/more-bag-pockets.424360/ I don't think BetterBag supports sorting out of the box. |
Oh you're asking, what if we implement this sorting and then people merge betterBag? I assume, without looking at any code, that it will sort within the bag pocket using the ID we give it, so it should be fine...? |
yeah, that this is what I meant. It would make sense that they are sorted within the bag. |
I think the end point should be the priority of items compared to each other, which I assume is mostly consistent across generations. They can then be sorted within a pocket according to which pocket the user assigned items to, so this shouldn't be an issue. Submission of vanilla data would be very welcome. |
Start trying to work on this, and then realized that this task won't be as simple as I thought. Then Bulbapedia saved the day. Each page notes how "sort" or "index" works for that game. The page isn't done for SV yet. I spent the better part of the evening getting SV working on my PC, and I'm certain somebody around here has already emulated SV on their machines... |
Oh, I never found these. They're perfect. I'll start working on implementing the order from SwSh and then we can adjust as necessary. Thanks! |
I won't be working on this anytime soon, so closing it for now. Others are free to take over if they feel like it |
Implements @ghoulslash's bag_sort branch. As such, do NOT squash when merging.
This is still a draft as not all items have received updated categories. I personally believe we should deprecate
sItemsByType
in favour of an extra field ingItems
, but wanted some thoughts on that before I start porting everything over.Issue(s) that this PR fixes
Fixes #3917
Discord contact info
bassoonian