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

Creates .nhi files from an input file #394

Closed Pigii closed 4 years ago

Pigii commented 4 years ago

I would love to get a tool that you can use to take a file like this Nook Miles Ticket 9.0.0;99,000 Bells 0.0.0 ...

and make it a .nhi file.

really thanks if you will add this into the program <3

I love your works and I hope you will get some more money for your work :D

kwsch commented 4 years ago

You can already make nhi files with the inventory editor. No need to load a save file; just press ctrl-I on the initial pop-up window.

I'm not sure what the use case is for having a text-based representation of items, as there are numerous editors that are fine with the raw nhi format.

Pigii commented 4 years ago

I was asking for that text-based version to make a bot that takes texts and makes an inventory based on that. I know that you can make the .nhi files in the program, but I need a text-based version if possible. If you can give me an idea of how to make something that makes txt files into nhi files I will make it myself. but as I don't know how values are stored in the nhi file I can't. please, if you can give me at least an idea on how to make it.

kwsch commented 4 years ago

nhi files are just consecutive items. Each item is 8 bytes.

This is how items are stored in binary form; open in a hex editor to see: https://github.com/kwsch/NHSE/blob/70a7bd7775f828ae4031bbe56ca4de5613b72ba2/NHSE.Core/Structures/Item/Item.cs#L21-L24

Keep in mind that the SysBot.AnimalCrossing project (Discord item-dropper) has logic for converting textual-item strings into items, and automatically drops them in-game for player visitor pickup.