roccodev / recordkeeper

Xenoblade 3/Future Redeemed save editor
http://rocco.dev/recordkeeper/
GNU General Public License v3.0
8 stars 2 forks source link

Enhancement request: Chronology data for various menu items #3

Open NamelessMofo opened 9 months ago

NamelessMofo commented 9 months ago

One thing I have noticed with XC3 is that depending on the order you do things, the menus can get very jumbled up. The item list, quest log, collectopaedia npc list, soul hacker art/skill lists, and master art/skill lists are the big ones that come to mind.

In some cases alphabetical sorting is an option, or quest rec. level, but some very useful sorting modes are not available. For example, sorting master arts by damage ratio, or level of the UM the art/skill came from in the case of soul hacker stuff.

In the case of item list, I can provide the relevant info: every item of every type (gem, collectible, accessory, info item, key item) has a globally unique serial number at offset 0x8 that the game uses to sort the inventory by. Example: gem inventory starts at 0x53da0, so the serial number for the first gem in inventory would be at 0x53da8, serial for second gem is at 0x53db8, etc.

For the other menus, I have been unable to determine where/how the chronology data is stored. But since this tool is already so good at editing quest progress / completion, soul hacker art/skill unlocks, etc. I am hopeful that at least some info about this chronology data is already known.

Not a high priority, but if the user could order menu items how they wish by editing the chronology data and then sorting chronologically, I believe that would be the last feature this tool is missing. I would also be willing to help with data mining, beta testing, etc. to help make this feature (or any other for that matter) a reality.

roccodev commented 9 months ago

I've looked into it a little in d2e0564. I've only added a reference structure, though it should be complete.

Most of those fields store highest ID and the ID map next to each other, though for some reason character art/skill data uses only two highest IDs across multiple fields.

NamelessMofo commented 9 months ago

Great stuff. One thing I noticed, the soul hacker arts start not at 190740, but rather at 19074e.

EDIT: actually, scratch that. The soul hacker arts do start at 190740, never mind.

NamelessMofo commented 8 months ago

Hmm, ok either I'm not seeing it or the collectopaedia data is somewhere else. Looking at the code, it seems the collectopaedia data should be at 0x190952, but for me the data there seems random.

Here is a snapshot of the data at that location in my save, which is New Game, chapter 7, just before the final boss. All collectopaedia entries are completed except for the 7 post-game-only entries and the 1 bugged entry (Roald).

image_720

roccodev commented 8 months ago

That data seems correct to me. The first 16 bits are the current maximum value (0x1839 = 6201), then each 16-bit entry corresponds to a row in FLD_KizunaNpc. There are 298 entries in that table, though not every one has collectopedia data, this history table seems to track any NPC interaction (which also explains why the maximum value is so high)

By the way, with enough interactions it is possible to break the chronological order (i.e. newer items are ordered last) by overflowing the max. This requires 65,536 interactions for most tables, and 2^32 interactions for items (pick up or receive any item)