Page 1 of 2

LUA Scripting in Scenarios

Unread postPosted: Sat Feb 07, 2015 11:57 am
by RSMattP
Hi all,

(posting this as me, not as a Dovetail employee - just to be clear, this isn't a Dovetail effort but something i'm doing personaly in my spare time :) )

Just wanted to pop in and let everyone know that i've started a new blog that will be covering various more technical topics about content creation in TS2015 - starting with using LUA scripts in Scenarios to get things like Cinematic Cameras, HTML pop-ups, audio, video, weather and so forth working.

5 articles are up so far and the intention is to add to it every day.

I also did a full segment on my Twitch show on this subject that goes through a lot of it relatively quickly (the blog is taking a much more in depth look at each topic) - but there's plenty in the video to get the grasp of how it all hangs together and what is possible.

The blog is at: http://trainsimlive.blogspot.co.uk

The YouTube recording of the segment is here: https://www.youtube.com/watch?v=1RcO_og8q7M

Lastly, if you want to check in on my Twitch show - Train Sim Live - which usually runs 21:30GMT every weekday night you can find it at : http://twitch.tv/mattpeddlesden - usually it's just running a variety of scenarios and stock but I'm aiming to get tutorials covered too, there are already a number of them (all recordings are stored on YouTube so it's all there if you want to check it out later).

Feedback welcome!

Apologies for the intrusion!

Matt.

Re: LUA Scripting in Scenarios

Unread postPosted: Sat Feb 07, 2015 12:15 pm
by wacampbell
No intrusion Matt!

Info from the insiders is gold. I'll be following your posts with great interest - much appreciated!

Re: LUA Scripting in Scenarios

Unread postPosted: Sat Feb 07, 2015 12:45 pm
by mrennie
Very well done Matt!

Re: LUA Scripting in Scenarios

Unread postPosted: Sat Feb 07, 2015 3:37 pm
by BillS
As far as I'm concerned, Matt, you certainly are not intruding. I certainly appreciate your efforts. I've been interested in using Lua Scripting and Cinematic Cameras. I have read tutorials, from others, and appreciate their efforts, but hearing another viewpoint never hurt and will help me get "confident" to use these great tools. Thanks!

BillS

Re: LUA Scripting in Scenarios

Unread postPosted: Sat Feb 07, 2015 8:52 pm
by harryadkins
Thanks for sharing Matt. I just read through and it's very informative. Hope to try it out soon.

Harry

Re: LUA Scripting in Scenarios

Unread postPosted: Sat Feb 07, 2015 10:08 pm
by OldProf
Many, many thanks, Matt!

Re: LUA Scripting in Scenarios

Unread postPosted: Sun Feb 08, 2015 1:04 am
by BNSFdude
Wish there was more of you at the towers, Matt. You get it.

Re: LUA Scripting in Scenarios

Unread postPosted: Sun Feb 08, 2015 7:03 am
by RSMattP
Thanks for the great feedback, much appreciated!

I've just posted article 6 - how to get the player speed and possible uses for that.

Cheers!
Matt.

Re: LUA Scripting in Scenarios

Unread postPosted: Sun Feb 08, 2015 7:10 am
by GreatNortherner
Hi Matt,

Thank you so much for sharing this information with the community. This blog will be very helpful for scenario builders, I hope many will make use of the great possibilities that LUA seems to open up in the scenario editor.

Cheers!
Michael

Re: LUA Scripting in Scenarios

Unread postPosted: Sun Feb 08, 2015 8:32 am
by jwtheiv
More information - especially written clearly and plainly - is always useful for scenario writing. Thanks for the write-up Matt - this looks to be a solid resource.

Josh

Re: LUA Scripting in Scenarios

Unread postPosted: Sun Feb 08, 2015 1:28 pm
by PapaXpress
I will be using the _G[] syntax to simplify parts of my LUA for the GP40.

Fewer lines of code == better maintainability. !!*ok*!!

Thanks Matt!

Re: LUA Scripting in Scenarios

Unread postPosted: Mon Feb 09, 2015 11:17 am
by RSMattP
Just added a new article about getting and setting loco controllers - with a few gameplay examples that combine some of the previous topics as well.

Thanks for all the feedback, very useful!

Mat.

Re: LUA Scripting in Scenarios

Unread postPosted: Mon Feb 09, 2015 11:54 am
by wacampbell
That 'Control List' dialog will sure be helpful. I am learning a lot - thanks.

Re: LUA Scripting in Scenarios

Unread postPosted: Wed Feb 11, 2015 4:49 am
by RSMattP
New articles posted:

7 - Interfacing with loco controls
8 - Locking and unlocking the player controls
9 - Ending the scenario early

Coming up:

10 - Weather
11 - Audio
12 - Video
13 - Is the loco at a location

If anyone has any thoughts on other topics to cover then please let me know and i'll see what i can sort out!

Matt.

Re: LUA Scripting in Scenarios

Unread postPosted: Wed Feb 11, 2015 12:43 pm
by Chacal
This is just awesome. Next rainy day is all planned.