Game wont Start

Hello guys i need some help, please.

Since for now i just want to play Stonehearth like Sim City i tried to take out the Goblins by reading this post: Peaceful mode request

I got the lua files by using the unwrp and after deleting the line i used winrar to get the .smod file again… but now the game wont start. =/ If i place the folder in Stonehearth\mods instead of the .smod the game start but i get tons of erros.

Any solution? Thanks!

Ps.: I tried to use Google and Search but i could not find any solution to my problem, even if i put the line back on the stonehearth_server.lua the game dont start.

Quick question - did you recompile the .lua into a .luac?

No because i saw in a post (dont remember where) that you didnt had to recompile because the game would recompile the files automatically =s And i didnt find any information on how to recompile luas files.

[Edit]

And in the FAQ dont say anything about the need to recompile into luac again

Q. How can I create .smod files?
A. Simply zip them using any zip program and change their extension to “.smod”.

Q. What are luac files? How can I open them?
A. luac are compiled lua files. To convert them into readable lua again, you need something like unluac4. This is fairly complex however, and there are tools to help this process [TODO: link to @Xavion’s tool, perhaps?]

Just that i need to zip and change the extension to “.smod” (Although im using winrar i dont think that this is the problem)

If you 7zip the file instead of zip the file, It doesn’t run… If you are using 7 zip to open your smod files it is an easy mistake.

1 Like

Well im creating a .zip file using Winrar and then changing the extension to .smod but still dont run. :confused:

@voxel_pirate @Avairian @RepeatPan you’re my go to guys for this - what is @Amiths not doing correctly?

1 Like

You do not need to translate back into .smod after the changes. In the past there have been troubles with some lua-files… don’t remember exactly what it was. However, just unzip, make your changes and leave it as it is… don’t zip it back to .smod. Does the issue still exist in this case?

Well, not giving us any logs, error messages or whatsoever except “It won’t start” would be something. If I had to guess (which I do have to in this case), I would say that unluac probably still has some issues with certain files in Stonehearth. Two solutions for this:

  • If he really just changed one file, only replace the .luac with the modified .lua, keep the other .luc (luc? luac? It’s been so long) untouched
  • Find out which files still don’t properly decompile (they should be the ones causing the errors) and keep the .luac for those

But unless we see the stonehearth.log, this is all just guessing. What we need is a proper description of what he has changed (which file, which line) and the log.

Sorry guys i forgot the log part. :confused:

You do not need to translate back into .smod after the changes. In the past there have been troubles with some lua-files… don’t remember exactly what it was. However, just unzip, make your changes and leave it as it is… don’t zip it back to .smod. Does the issue still exist in this case?

If i use the folder instead of the .smod the game start without a problem but after sometime i get error (while trying to build a house for example)

Here is the log: Oct 02, 2017 - Codeshare

But now for a strange reason the game is starting after i turn the stonehearth folder to .smod again. But again i get the same errors as using the folder

Here is the log: Nov 18, 2016 - Codeshare

To decompile the luac im using this tool: http://www.stonehearthguru.com/forums/alpha-beta-testing-nexus/modding/50854-tool-unwrp-a-tool-to-easy-extract-smod-files-and

And for what i saw decompile every luac into lua.

The only file that im chancing is the stonehearth_server.lua where im deleting the “linear_combat” to remove the goblins.

Ps.: Thanks for all the help, guys. :slight_smile:

1 Like

I would advise to do it the proper way and create a separate mod file. It has the benefit of easily enable/disable the mod and it will likely not break with every update.
You need to create:
A folder with a manifest.json.
Create a override in there which replaces the file
something like this:

"overrides" : {   
      "stonehearth/.../.../.../stonehearth_server.luac" : "file(yourownstoneheart_server.lua)"

Note the luaC in the first one and lua in the second one.
In the case where not are not compiling the file again, which you dont need to do.

2 Likes