Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

AC:NH > Save Data

This page is based on Animal Crossing: New Horizons version 3.0.0.

AC:NH uses a system wide save data archive, instead of one save data archive per user. The following files can be found in the save data archive:

In addition, up to 8 folders named Villager0 up to Villager7 may be present. These contain the following files:

Everything is stored in little-endian byte order.

Header Files

All files, except for landname.dat, are encrypted with AES-CTR. The header file, that is stored along with each file, contains information that is used to generate the key and IV:

OffsetSizeDescription
0x0256Unknown
0x1004 * 128Encryption key table (128 random integers)

The key and IV are generated using the SEAD RNG, as follows:

def generate_data(seed: int, skips: int) -> bytes:
    rng = Random(seed)
    for i in range(skips):
        rng.u64()
    
    data = []
    for i in range(16):
        data.append(rng.u32() >> 24)
    return bytes(data)

def generate_key(table: list[int]) -> bytes:
    seed = table[table[0] & 0x7F]
    skips = (table[table[1] & 0x7F] & 0xF) + 1
    return generate_data(seed, skips)

def generate_iv(table: list[int]) -> bytes:
    seed = table[table[2] & 0x7F]
    skips = (table[table[3] & 0x7F] & 0xF) + 1
    return generate_data(seed, skips)

The rest of this page describes the format of decrypted save data files.

landname.dat

OffsetSizeDescription
0x020Island name (UTF-16)
0x142Unknown

main.dat

OffsetSizeDescription
0x010161808Unknown
0x9B0E90

Sources

Besides reverse engineering, the following sources were used for this page: