Page 1 of 1

LUA Scripting?

Unread postPosted: Wed Mar 25, 2015 10:05 am
by tplowman91
Does anyone know where I can find LUA scripting tutorials? I'm especially wondering what code Railworks uses with LUA scripting. It's one thing to know how to write these scripts, but what does the sim call for? If anyone knows any thing on where I can find some useful information to write my own scripts, let me know.

Re: LUA Scripting?

Unread postPosted: Wed Mar 25, 2015 12:17 pm
by mrennie
Matt Peddlesden's TwitchTV channel has some detailed tutorials on advanced LUA scripting for scenarios (scripted weather, camera movement, in-game videos, etc.).

Re: LUA Scripting?

Unread postPosted: Wed Mar 25, 2015 12:50 pm
by _o_OOOO_oo-Kanawha
tplowman91 wrote:Does anyone know where I can find LUA scripting tutorials? I'm especially wondering what code Railworks uses with LUA scripting. It's one thing to know how to write these scripts, but what does the sim call for? If anyone knows any thing on where I can find some useful information to write my own scripts, let me know.
/

You might want to check older locomotive simulation scripts that are not obfuscated into .out files.
Search your entire assets directory for .lua files.
The old P42DC came with good scripts for cab displays etc. IIRC

Scripts are intellectual property of their author and should be respected as such. Code snippets etc. are a difficult area in copyright terms.

Re: LUA Scripting?

Unread postPosted: Wed Mar 25, 2015 2:35 pm
by Chacal
The Centipede's script is also a great example.
Thanks to Reppo for not compiling his scripts.

Re: LUA Scripting?

Unread postPosted: Wed Mar 25, 2015 7:47 pm
by tplowman91
_o_OOOO_oo-Kanawha wrote:
tplowman91 wrote:Does anyone know where I can find LUA scripting tutorials? I'm especially wondering what code Railworks uses with LUA scripting. It's one thing to know how to write these scripts, but what does the sim call for? If anyone knows any thing on where I can find some useful information to write my own scripts, let me know.
/

You might want to check older locomotive simulation scripts that are not obfuscated into .out files.
Search your entire assets directory for .lua files.
The old P42DC came with good scripts for cab displays etc. IIRC

Scripts are intellectual property of their author and should be respected as such. Code snippets etc. are a difficult area in copyright terms.



What old P42's? The one's I have are the one that come with the Miami route, and the P42's for Empire Builder.

Re: LUA Scripting?

Unread postPosted: Thu Mar 26, 2015 11:39 am
by crocs4022
tplowman91 wrote:
_o_OOOO_oo-Kanawha wrote:
tplowman91 wrote:Does anyone know where I can find LUA scripting tutorials? I'm especially wondering what code Railworks uses with LUA scripting. It's one thing to know how to write these scripts, but what does the sim call for? If anyone knows any thing on where I can find some useful information to write my own scripts, let me know.
/

You might want to check older locomotive simulation scripts that are not obfuscated into .out files.
Search your entire assets directory for .lua files.
The old P42DC came with good scripts for cab displays etc. IIRC

Scripts are intellectual property of their author and should be respected as such. Code snippets etc. are a difficult area in copyright terms.



What old P42's? The one's I have are the one that come with the Miami route, and the P42's for Empire Builder.


Could be wrong but I believe he's referring to the original Gtrax P42. This was before the DTG update on it.