Cr4xy / noita-seed-tool

https://cr4xy.dev/noita/index.html
MIT License
28 stars 5 forks source link

Question about reverse-engineering #2

Closed TwoAbove closed 3 years ago

TwoAbove commented 3 years ago

Hey! Very awesome project!

I have a question about how you got all of this information out of the game. What did you look at to get the algos for perks, biomes, etc? Did you decompile the executable, or is there a simpler way of doind it?

Thanks!

Cr4xy commented 3 years ago

Thank you!

The main part is the random algorithm; I used ghidra and x64dbg to reconstruct the random algorithm in C++. Later I randomly found a way better version of the noita algorithm by kaliuresis and used that, because my version still had some bugs and also required simd.

Other than that it is basically taking the existing Lua scripts of the game and converting them to JavaScript.

TwoAbove commented 3 years ago

Thanks for the answer! I didn't even think about looking at the Lua of the game :smh:

Cr4xy commented 3 years ago

Feel free to ask further questions in Discord if you want!

GhostDog98 commented 2 years ago

@Cr4xy Could you please provide a link to Kaliuresis's algo? I can't find such a thing on their github page, the closest I can find is their 11 orb program, did you simply take the code from that?

Cr4xy commented 2 years ago

@GhostDog98 Yeah, basically. I removed the search code for the orbs and added a few more functions (ProceduralRandomf, ProceduralRandomi) that are just small helpers to make to lua code easier to port. Links: https://github.com/kaliuresis/noa/blob/main/src/noita_random.cpp https://github.com/Cr4xy/noita-seed-tool/blob/master/lib/src/noita_random.cpp