This is a tool for the decompression and decompiling of .smod files. There is an alternative on Stonehearth Guru called unwrp. It’s an alternative and not necessarily better or worse, developed simultaneously and just different.
- The first you need is the java sdk, instructions on how to install it and found on the first section here. You only need to go as far as setting the PATH variable.
- The other thing you need is unluac for the decompiling, you can find it here make sure to get unluac and not unluac-source. It should contain a file called unluac.jar, you’ll need that in a minute.
- Save the linked script to a .bat file.
- At the very start of the code is a filepath to unluac.jar, change it to wherever you put unluac.jar. Alternatively, you can put it in the same folder as unluac.jar and it will find it itself.
4A. If you have Stonehearth installed in a custom location perform this part. Either place the .bat file in the same folder as Stonehearth.exe or add the following line to the start of the file and place the correct path to the Stonehearth folder, the folder Stonehearth.exe is in to be precise.SET stonehearth=“C:\PATH\TO\STONEHEARTH”
- Double click on the file to run it. It will turn all .smod’s into folders of decompiled lua that the game can run off along with deleting old versions. If it seems to stop while running give it a little bit, it can be a bit slow decompressing the .smod’s.
WARNING: It currently sometimes throws an error halfway through, it doesn’t matter and it will keep going after a few seconds. I haven’t figured to how to get rid of it yet though.
WARNING: If it throws an error and crashes without creating the folders try running it in administrator mode, sometimes there is a permissions issue with creating folders in Program Files if you haven’t already done it.
CHANGES
V5: Fix administrator mode bug.
V4: Checks for non-steam standard install and current dir when looking for install location.
V3: Swapped to pastebin. Discourse code blocks are irritating to use.
V2: Added support for non-steam installs.
PLANS
Ability to ask for location of unluac.jar and if you have a non standard install on first run and remember them.