Scenario Scripts

Discussion about RailWorks scenario creation.

Scenario Scripts

Unread postby Rich_S » Fri Sep 30, 2011 1:48 pm

Hello Group,
I tried the search function without any success *!sad!* Is there any in depth documentation on how to write and / or edit Scenario Scripts? At first glance they appear to be the same LUA scripts used for locomotives and rolling stock. What I'm looking for is a list of available functions, verbs, symbols, etc... It appears in the new scenario scripts for the Horseshoe curve route you can do a number of things that were not possible with RW2 *!lol!*

Regards,
Rich S.
Cheers,
Rich S.
User avatar
Rich_S
 
Posts: 708
Joined: Tue Aug 24, 2010 11:19 pm
Location: Baden, PA, USA

Re: Scenario Scripts

Unread postby Bananarama » Fri Sep 30, 2011 2:20 pm

Where did you see these *.lua scripts? The only HSC ones I have are for the locomotives and signals.
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Scenario Scripts

Unread postby Machinist » Fri Sep 30, 2011 4:12 pm

Rich, I'm also looking for detailed new documents about TS2012 Scenario Editor.

Hack, for general (and old) information, look at http://railsimulator.com/support.php, especially:
a) RSDev Tools (was written for RailSimulator, but still is a good guideline to start), at the bottom of page.
b) Developer Wiki, at the upper right side of page.
Who doesn't have dog, hunts with cat.
User avatar
Machinist
 
Posts: 1105
Joined: Fri Apr 02, 2010 1:02 am
Location: São Paulo, Brazil

Re: Scenario Scripts

Unread postby Bananarama » Fri Sep 30, 2011 5:19 pm

Machinist wrote:Hack, for general (and old) information, look at http://railsimulator.com/support.php, especially:
a) RSDev Tools (was written for RailSimulator, but still is a good guideline to start), at the bottom of page.
b) Developer Wiki, at the upper right side of page.

Thanks, but I was curious on where Rich saw these scripts, not on how to edit them.
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Scenario Scripts

Unread postby Rich_S » Fri Sep 30, 2011 5:44 pm

Hack wrote:Thanks, but I was curious on where Rich saw these scripts, not on how to edit them.


Hi Marc,
If you have the new Horseshoe Curve route, look under:

\Steam\SteamApps\common\railworks\Content\Routes\00000025-0000-0000-0000-000000000000\Scenarios\ea641d09-c88c-42e8-981d-01a399cd57b2

You will find a script named "ScenarioScript.lua" This is the script for the One Hundred Standard Scenario. Not only does this script cause a locomotive failure, it also displays fireworks (very dimly lit, but none the less displayed) as you round Horseshoe curve. It appears that each standard scenario for the Horseshoe curve route has it's own ScenarioScript.lua file.

Regards,
Rich S.
Cheers,
Rich S.
User avatar
Rich_S
 
Posts: 708
Joined: Tue Aug 24, 2010 11:19 pm
Location: Baden, PA, USA

Re: Scenario Scripts

Unread postby Bananarama » Fri Sep 30, 2011 8:46 pm

Awesome find, Rich. Thanks for the info. :D
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Scenario Scripts

Unread postby Machinist » Fri Sep 30, 2011 11:19 pm

Great Rich!

And now... how to read *.lua, in order to try to reproduce some of those effects? or to learn programming with lua? Sorry, I'm quite new concerning to RW's script language...

Thanks,
Lisboa.
Who doesn't have dog, hunts with cat.
User avatar
Machinist
 
Posts: 1105
Joined: Fri Apr 02, 2010 1:02 am
Location: São Paulo, Brazil

Re: Scenario Scripts

Unread postby Chacal » Sat Oct 01, 2011 2:40 pm

The lua scripting language is not exclusive to RW. It is used in numerous games (for example "Farming simulator" and the very fun "Demolition company") and you will find tons of documentation[/url].
Last edited by Chacal on Sat Oct 01, 2011 10:17 pm, edited 1 time in total.
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6498
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: Scenario Scripts

Unread postby Rich_S » Sat Oct 01, 2011 3:02 pm

Hi Charcal,
Thanks for the links, I'm aware of the LUA scripting language and the info available on the net. What I'm looking for is information on what functions, global variables, etc.. that are part of the Rail Works 3 executable and can be used in the Scenario Scripts :D

Regards,
Rich S.
Cheers,
Rich S.
User avatar
Rich_S
 
Posts: 708
Joined: Tue Aug 24, 2010 11:19 pm
Location: Baden, PA, USA

Re: Scenario Scripts

Unread postby Chacal » Sat Oct 01, 2011 10:17 pm

Yes, sorry Rich, I was answering to Machinist's last post.
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6498
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: Scenario Scripts

Unread postby Kali » Sat Oct 01, 2011 11:27 pm

Having gone through looking for new lua toys, I've not actually seen an awful lot that wasn't in RW2 so far. I knew scenario scripts were on the way but I forgot to check if there were actually any supplied yet :p. Interesting, I will be taking a look soon. With any luck this can be used for some randomisation.
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea


Return to Scenario Creation

Who is online

Users browsing this forum: No registered users and 1 guest