In March 2020, Animal Crossing: New Horizons was released. I bought it a couple days later and started playing it. Someone asked me on Twitter if I could investigate how the game assigned turnip prices, and that sent me down a ridiculous rabbit hole.

I was in the middle of finishing my dissertation, so of course I needed something to distract me...

I spent the next few months putting absurd amounts of time into reverse-engineering ACNH using Ghidra, because there was so much to discover - hints about unfinished/unreleased features that Nintendo hadn't properly scrubbed out of release versions, bugs, and just the logic behind mundane game features that I found fascinating.


What killed it for me was the rapid pace of game updates in 2020. I had documented massive amounts of versions 1.3 and 1.4, but Ghidra's version tracking just wasn't good enough to port all my notes over without a lot of manual work.

Furthermore, I knew it was only going to get worse. Moving to new versions manually was manageable when I was only looking at small self-contained parts of the game engine... but as I documented more of the game, I increased the amount of work I'd need to do in order to reverse a newer build.

This led me to burn out massively and I still haven't gone back to it. I've thrown the latest version of the game into Ghidra a few times in an attempt to gather enough information to update MeteoNook - but without fail, every time I do this, Nintendo releases another patch the following day. It's like they know.

Research

The bulk of my notes and scripts about ACNH's internals are in the GitHub repo Treeki/CylindricalEarth - named for the unique cylindrical view from the camera in the Animal Crossing games.

 Files

MeteoNook

My biggest Animal Crossing project was an app to predict weather, which is fully deterministic as it turns out.

You can find it here: https://wuffs.org/acnh/weather/

It hasn't yet been updated to take changes in 2.0 into account. The game determines special cloud patterns differently now, and there may be other differences that I'm not aware of at the moment.

"Tom Nook's Wild PRNG-Driven Ride"

I gave a talk about my adventures reverse-engineering Animal Crossing at the Defcon Furs online event in 2020.

You can watch it on YouTube (47 minutes long): https://www.youtube.com/watch?v=Vu3R60Y2BsY

Trivia

Here's some fun things you probably didn't know about ACNH...

Garbage In, Shit Garbage Out

If you call the function that assesses a fossil and supply an item that is not a fossil, then it returns coprolite (in other words, a turd).

In practice, this will never happen because the game will never let you assess a non-fossil item - it's just a failsafe.

I just find this utterly hilarious because it's obvious that whoever wrote the code was having fun - and this is a joke that survived compilation. We don't have comments, we don't have function or variable names, we don't have any internal documentation... but we do have this shit joke.

Bell Bag Bug

When you dig up a glowing spot in the ground, you receive a bag of bells. The intended distribution is as follows:

Chance Amount
97% 1,000 Bells
2% 10,000 Bells
1% 30,000 Bells

This is confirmed by the official ACNH strategy guide. Unfortunately, you'll never get anything other than 1,000 Bells.

The game will only pick 10,000 or 30,000 if your player's save has the flag HouseOrder1 activated.

I think the developers intended to lock these options so that you can only get the higher amounts if you've completed the game's "prologue" and upgraded from a tent to a house - there are other aspects of the game that do this.

Unfortunately, in this instance, they picked the wrong flag. HouseOrder1 is activated after you request the upgrade from Tom Nook. Once the house has been completed, the flag is deactivated.

The Drum

You know how Animal Crossing's world looks like a cylinder? Nintendo actually calls that the drum.

And it's not actually shaped like a cylinder... they do some funky stuff with shaders to 'bend' the world. This means that the curvature is dynamic, and actually changes subtly in certain scenarios.

Check out this Twitter thread for some cool videos I made, wherein I shatter the illusion: https://twitter.com/_ninji/status/1252071137930067968