Open dshepsis opened 3 years ago
I'm assuming NE in leafletNEOffset
means "north east"?
Yes. It's the position of the center of the map image layer. Perhaps a better name would be leafletCenter
or something.
Tried doing the manual way with just Ponc'tan. It's... not a good solution for sure. It's basically impossible to be accurate.
I have some ideas for more robust solutions. We can teleport Ammy around and see how that affects her map icon coordinates, and I have found a value which seems to represent overall map scale, but to be truly accurate will probably require decomping the code for rendering the maps.
TP Ammy around Sounds like a much better solution than just brute forcing ha
As of https://github.com/dshepsis/OkamiMap/commit/84c2d4d3e5cbfcc2dd8a82b5d8701436f6acbbdf, this has been solved for everything except dungeons. I never ended up manually calculating the scale/position for each map, only for Shinshu, but was able to discover the relevant values in the game's memory via reverse engineering. Dungeon maps are much more complicated, being composed of many separate images for each room, so they will take more time.
Every map requires its own scale and position adjustments to match up with in-game coordinates. These are probably somehow available through reverse engineering, but until we understand the game better, they'll have to be calculated by simply adjusting the map so that things like treasure icons line up with their expected locations on the map. This won't be easily possible on all maps, but most of them should be calculable with some work.
The scale data is stored in the
mapInfo.json
file under theleafletScale
andleafletNEOffset
properties for each info object. These values have all been filled in with the same default in order to get things working, but will be adjusted individually as I work through them.