mods["StatsThroughSkills"] = MOD does what exactly? [LUA] [OSX bug?]

I installed the game last week through homebrew on my Mac.

I had one error while starting:

Removing the offending line in main.lua makes the error go away. ( mods[“StatsThroughSkills”] = MOD )

I think it means that the cpp code should set something for the lua code that is not there (the global “mods”). Probably my StatsthroughSkills is not functioning when this error occurs, and not when the line is removed, because then a connection to the cpp code is missing?

It might be a problem of the Mac build (The default jenkins dailies do CTD with a segfault because osxcross is not updated, so I can’t compare).

It might be the reason the default homebrew builds without lua support?

I know cpp reasonably well, and a little bit of lua, but I don’t know where to start debugging this and to how to check if STS works at all. If someone has some advice, I might be able to file a bug report or make a patch.


To check if Lua is working, start game without mods, go to debug menu, then select Lua console and type print( _VERSION).

Also do you have lua folder in your Cataclysm folder? It should contain following files:

mods is global variable which is set through autoexec.lua, which is run during game init - it is possible that this file is missing and was not run.

the lua console works and reports version 5.3 but also complains about autoexec.lua and class_definitions.lua missing.

So I think that’s my problem.

See if I can get homebrew to install them.

Yup. the lua directory seems to be missing from the homebrew install line that vircug is working on.
I’ve added a comment to the various threads in github.