MBINCompiler
MBINCompiler copied to clipboard
solve hash collision in the mapping.json
PR for issue https://github.com/monkeyman192/MBINCompiler/issues/588. The goal is to have complete, easily accessible mappings for both, account data and saves.
To achieve this, two sets are created instead of one.
There are two possibilities for how to add them to the mapping.json:
- Currently implemented: Keeping the existing
Mappingand concat the two created sets as lists. You can then split them beforeUserSettingsDatabut the list will have a handful duplicated entries (old 1164, this 1168). - Replace the current
Mappingwith two separated lists (e.g.Mapping_saveandMapping_account)
I think I prefer option 1 as you have it. I agree that it is a little strange having duplicates, however, a naive approach to implementing the usage of this file may read it in and convert it to a mapping of some type (eg. a dict), so these duplicates should disappear in this process.
Then, anyone who wants to make a better implementation can utilise the fact that the data actually has some structure (ie. the UserSettingsData marks the start of keys for that chunk of data.
Option 2 is not backward compatible so I think this is probably not a feasible solution.
It would be good to get @zencq 's input on this also to maybe get some insight into their implementation and whether this solution would fix https://github.com/zencq/NomNom/issues/165
It's both me actually. Just some unusual account usage that tricked you I guess 😉
I extended my testing a bit and found that Version needs to be added for account too (therefore the new commit). With the new mapping.json I already have locally, everything gets mapped properly now and solves the issue 👍
I'm doing it as mentioned in #588 and by you: Looking for UserSettingsData and using everything before for save and including+after for account.
a naive approach to implementing the usage of this file may read it in and convert it to a mapping of some type (eg. a dict), so these duplicates should disappear in this process.
Exactly me thought!
Any plans to merge this any time soon? :)
Any plans to merge this any time soon? :)
Sorry I have been on holiday... I am happy to merge. When I get some time and I'm on my laptop I can check everything is fine and I'll merge it. Sorry for the delay!
call_log.exml
Sorry, I forgot about this... I'll merge now...
All good. It's not critical and I had also temporarily forgot about it 😅 Just remembered it when I had to update it in some of my tests