Page 1 of 1

Scenario Scripts

Unread postPosted: Fri Sep 30, 2011 1:48 pm
by Rich_S
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.

Re: Scenario Scripts

Unread postPosted: Fri Sep 30, 2011 2:20 pm
by Bananarama
Where did you see these *.lua scripts? The only HSC ones I have are for the locomotives and signals.

Re: Scenario Scripts

Unread postPosted: Fri Sep 30, 2011 4:12 pm
by Machinist
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.

Re: Scenario Scripts

Unread postPosted: Fri Sep 30, 2011 5:19 pm
by Bananarama
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.

Re: Scenario Scripts

Unread postPosted: Fri Sep 30, 2011 5:44 pm
by Rich_S
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.

Re: Scenario Scripts

Unread postPosted: Fri Sep 30, 2011 8:46 pm
by Bananarama
Awesome find, Rich. Thanks for the info. :D

Re: Scenario Scripts

Unread postPosted: Fri Sep 30, 2011 11:19 pm
by Machinist
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.

Re: Scenario Scripts

Unread postPosted: Sat Oct 01, 2011 2:40 pm
by Chacal
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].

Re: Scenario Scripts

Unread postPosted: Sat Oct 01, 2011 3:02 pm
by Rich_S
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.

Re: Scenario Scripts

Unread postPosted: Sat Oct 01, 2011 10:17 pm
by Chacal
Yes, sorry Rich, I was answering to Machinist's last post.

Re: Scenario Scripts

Unread postPosted: Sat Oct 01, 2011 11:27 pm
by Kali
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.