I enjoy creating scenarios, and I've got the hang of some useful basics of LUA scripting. I do have a couple of questions though. Firstly, is there any performance gain or other advantage from using a compiled script (.luac) over a raw script (text file with .lua extension)? Secondly, if both .lua and .luac files are present in a scenario folder, which one does the game load by default? The reason for asking is that I like to leave the raw script in with my scenarios in case it is useful to others, but wanted to check that this is not at the expense of performance.
The reason is more to hide your scripting magic from manipulation. You can compile them and then remove the original .lua file, as .luac has higher priority. I don't think it has any effect on performance, as it should be preprocessed anyway on playing the scenario.
Cheers! I don't do anything that would ever be worth protecting like that, but still useful information - been really enjoying the insights from you and others into TSC's innards just recently.