LUA Scripting?

Discussion of rolling-stock creation & re-painting.

LUA Scripting?

Unread postby tplowman91 » Wed Mar 25, 2015 10:05 am

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.
Win 7 x64 - Intel i7-4790k 4.0GHz - 8GB DDR3 RAM - 1TB WDC HDD - nVidia GeForce GTX 960 GDDR4 2GB - PSu CX600 - ASRock Z97 Extreme 3 Motherboard - Corsair H55 CPU Water cooling
User avatar
tplowman91
 
Posts: 69
Joined: Tue Mar 10, 2015 8:47 pm

Re: LUA Scripting?

Unread postby mrennie » Wed Mar 25, 2015 12:17 pm

Matt Peddlesden's TwitchTV channel has some detailed tutorials on advanced LUA scripting for scenarios (scripted weather, camera movement, in-game videos, etc.).
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: LUA Scripting?

Unread postby _o_OOOO_oo-Kanawha » Wed Mar 25, 2015 12:50 pm

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.
Edwin "Kanawha"
Image
The Chessie, the train that never was ... (6000 hp Baldwin-Westinghouse steam turbine electric)
User avatar
_o_OOOO_oo-Kanawha
 
Posts: 3231
Joined: Mon Nov 14, 2011 2:12 pm

Re: LUA Scripting?

Unread postby Chacal » Wed Mar 25, 2015 2:35 pm

The Centipede's script is also a great example.
Thanks to Reppo for not compiling his scripts.
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6508
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: LUA Scripting?

Unread postby tplowman91 » Wed Mar 25, 2015 7:47 pm

_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.
Win 7 x64 - Intel i7-4790k 4.0GHz - 8GB DDR3 RAM - 1TB WDC HDD - nVidia GeForce GTX 960 GDDR4 2GB - PSu CX600 - ASRock Z97 Extreme 3 Motherboard - Corsair H55 CPU Water cooling
User avatar
tplowman91
 
Posts: 69
Joined: Tue Mar 10, 2015 8:47 pm

Re: LUA Scripting?

Unread postby crocs4022 » Thu Mar 26, 2015 11:39 am

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.
crocs4022
 
Posts: 66
Joined: Thu Jan 10, 2013 6:18 pm
Location: Asheville, NC


Return to Rolling-Stock Design

Who is online

Users browsing this forum: No registered users and 1 guest