fellup
Newbie
- Feb 6, 2018
- 33
- 194
- 209
(it sounds like you know some parts of this already, but I'll explain from the top for anyone else reading)what do you even do to mod this game, I've looked into the files and found where you keep the models in pieces but thats about it in terms of changing anything if thats even used for modding
The game is an electron app (like discord and many other desktops apps nowadays), meaning it's a bundled version of Chromium. Get 7-zip if you don't have it, and the
You must be registered to see the links
to allow it to manage asar files.These general instructions work for many electron apps:
- Open the
./sf_vXX.exeexecutable with 7z to see a folder with anapp-64.7zinside it; extract the contents of that 7z to a new folder./extracted_SHF/ - Open the
./extracted_SHF/resources/folder in the extracted files, and you'll see anapp.asar; extract the contents of that toextracted_SHF/resources/app/so that anindex.htmlfile is in the app folder, then delete theapp.asarfile. - You can now run
./extracted_SHF/SHF.exeto run the game, and it will load the game files from the app folder instead of asar. Everything you'll want to edit from this point on is in the./extracted_SHF/resources/app/folder.
From there, you can also make some changes to
main.js enabling chromium dev tools to make it easier to debug (I forget what to change exactly in there, but that's a common thing so google it if you have problems and can't wait for me to post my copy).Most of the game's asset formats are pretty straightforward. cbd's are json and store size info/tool rules/lots of shit, and the game logic is all in
main.dart.js, but that's where you'll start pulling your hair out and wishing you could trade your firstborn for a sourcemap. That's also where I start kicking myself because the me from a year ago barely commented any explanations for some of the changes I made, because I initially went in just wanting to change one or two things. Like I see I changed l.x1=r+q*(p-k)}k=b==null?l.bb:b to l.x1=(r+q*(p-k))/3}k=b==null?l.bb:b but fuck if I remember why or what that line does anymore lol. You can reverse engineer the obfuscated code if you're familiar with javascript and understand the flow of data (and/or doing trial and error shit by inserting console.log lines to then use devtools and see how certain variables look while the game is running), but it's obviously a pain in he ass.
Last edited: