kwsch / NHSE

Animal Crossing: New Horizons save editor
https://berichan.github.io/GetNHSE/
GNU General Public License v3.0
1.03k stars 260 forks source link

Hitting "Write" in the item injector causes inventory to fill with random junk #32

Closed Aria-NL closed 4 years ago

Aria-NL commented 4 years ago

I'm not sure if this has to do with the Offset text box, but when I made changes to my inventory, connected via sysbot, and hit inject, the top 2 rows of my inventory filled up with random glitched furniture and presents containing other random furniture.

kwsch commented 4 years ago

I'm not sure if this has to do with the Offset text box

it has everything to do with the offset box ;)

Your RAM is displaced.

Ensure that you have disabled all Atmosphere cheats (holding L while booting up the game works temporarily) and you have not opened any apps such as CaptureSight/Edizon. Reboot your Switch and try again.

It's recommended to Read the inventory to double check that the offset is correct.

The offset is also patch-specific (so v1.1 offsets aren't the same as v1.0). I think it's defaulted to v1.1.

kwsch commented 4 years ago

If you refer to the various cheat codes:

Any infinite item in slot 1 (1.1.2a)
04100000 AC3B90C0 0000xxxx
04100000 AC3B90C4 00000000
20000000

You'll see that the offset in SysBotUI matches the cheat code's offset (for the first pocket slot). image

It's up to the user to double check the offset they r/w :)

Aria-NL commented 4 years ago

I've gone through and experimented a bit. I've found 2 things:

kwsch commented 4 years ago

Injecting only modifies the top 2 rows of items, because the items are stored in sets of 20 (items 21-40 are stored above items 1-20 in RAM).

Edizon being active interferes with sys-botbase's ability to r/w the RAM.

You can always peek at the RAM layout with the main editor window's hex edit stuff, which uses sysbot to let you edit RAM directly. Double check that the RAM that it returns matches what you are expecting to be there (array of items).

Aria-NL commented 4 years ago

Thanks - disabled the Edizon overlay and the editor works perfectly.

piapple1 commented 4 years ago

Hi, I do not have any cheats or overlays enabled and I am holding L when the game launches to be sure on atmosphere 10.4. It can read my inventory fine but when I go to write to it it FailValidates and fills inventory with "empty" items. This also happens when I read my inventory, clear, and simply try to read again.

kwsch commented 4 years ago

@piapple1 use sys-botbase v1.3 as per the wiki.

The offset is for ACNH ver 1.1+, not v1.0

piapple1 commented 4 years ago

@kwsch thank you, I must have missed that paragraph the first time.