app to read lua file question

Discuss almost anything about RailWorks.

app to read lua file question

Unread postby raptorengineer » Wed Jun 18, 2014 6:24 pm

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?
raptorengineer
 
Posts: 374
Joined: Mon Nov 14, 2011 1:35 am

Re: app to read lua file question

Unread postby robbit » Wed Jun 18, 2014 6:39 pm

notepad ++ is what I use to read them and edit them
robbit
 
Posts: 838
Joined: Fri Jul 15, 2011 11:29 am
Location: Maine

Re: app to read lua file question

Unread postby mrennie » Wed Jun 18, 2014 6:41 pm

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.
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: app to read lua file question

Unread postby ricksan » Wed Jun 18, 2014 10:03 pm

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
ricksan
Forum Mod
 
Posts: 311
Joined: Fri Feb 13, 2009 10:55 am
Location: Bandon, OR USA

Re: app to read lua file question

Unread postby PapaXpress » Thu Jun 19, 2014 12:44 am

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.
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 12 guests