Page 1 of 1

app to read lua file question

Unread postPosted: Wed Jun 18, 2014 6:24 pm
by raptorengineer
i saw page on how to make your own weather lua script in blue print editor on railsimulator. but now were using blueprint editor 2 to make lua scripts and when opening lua file i need to download a app to read lua. what programs do you use to read lua script?

Re: app to read lua file question

Unread postPosted: Wed Jun 18, 2014 6:39 pm
by robbit
notepad ++ is what I use to read them and edit them

Re: app to read lua file question

Unread postPosted: Wed Jun 18, 2014 6:41 pm
by mrennie
raptorengineer wrote:i saw page on how to make your own weather lua script in blue print editor on railsimulator. but now were using blueprint editor 2 to make lua scripts and when opening lua file i need to download a app to read lua. what programs do you use to read lua script?


If it's a .lua file, then it's just ordinary human-readable text (you can read it with Notepad). On the other hand, if you're trying to open a .out file, that's a lua file that has been encrypted so that you can't easily read it.

Re: app to read lua file question

Unread postPosted: Wed Jun 18, 2014 10:03 pm
by ricksan
The "encryption" is done by luac.exe, a Lua compiler which is furnished with the Lua distributable. Language keywords used in a plaintext Lua script are converted by luac to binary "tokens" which are readable by a C-language API which in turn is embedded within the game code. If you open an .out file in a text editor you will see that the plaintext variable and function names assigned by the script's author are retained, i.e. not tokenized. A third-party de-compiler was written for earlier versions of Lua, but to my knowledge none exist for the more recent versions. Read more about luac here: http://www.lua.org/manual/4.0/luac.html

Re: app to read lua file question

Unread postPosted: Thu Jun 19, 2014 12:44 am
by PapaXpress
FYI they are now using v5.0.2. They are still behind as 5.2 appears to be the most current, but 5.0 has some API additions since 4.0.