[beginner question]Confused with Lua files

Hi, brain has melted in first time mod learning journey
The tutorials said to use UnLuac, I tried for hours with no sucess. .bat resulting in empty txt files
Then I read it had changed and we were supposed to be using luamin/luaminify, and with these I didn’t understand how to use at all.
And in new version the files extension still luac.
So what should I use to have acess to the lua portion?
and I couldn’t understand where in the chair/bed files said how you could interact with it.

you can open the stonehearth.smod for reading of the .luac files with luiaminify.
as far as i can tell that simply makes it possible to read them easier as they get formated and get some colour code to it.

1 Like

It’s a bit rough but you can open any .luac files in sublime and just reformat by adding spaces after functions etc, if you understand how to read the code. .lua file can be read just fine in sublime.

Hope that helps.

Rename .luac to .lua or change the settings and sublime gives you the wonderfully useful colour formatting :smiley:

1 Like

Yep, you can just open those luac files with any text editor. The problem is that they are minified, and the code is hard to read that way, it’s not properly indented, lines are stuck together, there’s no syntax coloring.

That’s why there were things like Lua unminify ( Lua Unminifier/Formatter - Improved ) or unwrp ( Unwrp r22 - A tool to easily extract smod files and decompile luac (now with pretty formatting!) ).

Sublime and Notepad++ offer better syntax coloring, once you told them that the file they opened has Lua syntax.

You could always unminify them, save them as .lua files and then open them with your preferred editor. I usually don’t bother with unminifying because I go directly to the few files / code that I want to check / copy, and then add the new lines or spaces myself.

There are too many lua files in the game to bother unminifying all of them, and knowing that they might change between alphas.

2 Likes

Thanks everyone, I managed to do it with the lua unmnifier by Honestabelink.
And I’ll be using Sublime I was using monodevelop but this one is better.

2 Likes