marcrobledo / acnl-editor

An Animal Crossing: New Leaf savegame editor made in HTML5
https://www.marcrobledo.com/acnl-editor/
MIT License
154 stars 32 forks source link

[Info/Fix?] Grass deterioration preview #3

Closed jexom closed 7 years ago

jexom commented 7 years ago

Haven't used the editor for a while and noticed the grass map preview. I did some research on how the grass addresses work and made an explanation here: http://imgur.com/a/1DCgq Tinkering just a bit with the code I managed to get it working correctly for my save file using the MAP_GRASS_PREVIOUS offset and changing width and length from (5,4) to (8,6). I also made the canvas a bit bigger. Here's what my grass map looks like after the changes: http://i.imgur.com/qCE82Mk.png

marcrobledo commented 7 years ago

Very nice, thanks a lot! Gonna merge it since looks it won't break anything. I'll take a look at the changes as soon as possible and add a grass editor at last.

jexom commented 7 years ago

The only thing I don't really get is the MAP_GRASS_CURRENT offset. Seems to be all 00 for my saves up until MAP_GRASS_PREVIOUS, and taking (5x4)x(16x16) bytes starting from offset MAP_GRASS_CURRENT intersects with MAP_GRASS_PREVIOUS

marcrobledo commented 7 years ago

MAP_GRASS_CURRENT has grass deterioration for the current game session. The next day at 6:00AM, the game willl substract these values from MAP_GRASS_PREVIOUS next day and grass will deteriorate.

I'm going to close this, since it's not an issue. I'm willing to discuss and help anywhere else :-) Find me at Twitter!