The International Simutrans Forum

Community => Social & Contests => Scenarios and Challenges => Topic started by: Dwachs on December 04, 2013, 12:24:44 PM

Title: Scenarios in Simutrans
Post by: Dwachs on December 04, 2013, 12:24:44 PM
Simutrans offers the possibility to create scenarios: These are maps with preset goals and rules.

How to create a scenario

The most difficult thing is to come up with an idea about a scenario - a vision what a scenario may look like. Then you have to cast this idea into a savegame. That is, create the world in which your scenario will live. Shape the landscape and build cities and factories. Now you are the ruler of this toy universe, you are in charge of the rules. These go into the script.

Scripting language

The scripts have to be written in squirrel. The manual can be found at Squirrel main page (http://squirrel-lang.org/).

Example scripts

There are two commented example scenario scripts at the documentation page (http://dwachs.github.io/simutrans-sqapi-doc/examples.html). Current versions of pak64 and pak128 come with a set of ready to use scenarios.

Translations

Scenario texts can be translated into any language. Any help is much appreciated!

Resources

http://scenarios.simutrans.com - download some scenarios there

http://dwachs.github.io/simutrans-sqapi-doc - the documentation of the interface to the scripting language

Help

in case you need some help do not hesitate to ask here in this forum.
Title: Re: Scenarios in Simutrans
Post by: Spacethingy on December 04, 2013, 01:54:46 PM
Ooo, very useful, thanks! Must try work through the examples sometime. You may want to change "Your grandparents did not have a glue..." fairly soon... :D

Out of interest, why did you guys go for Squirrel, rather than the more common Lua as a scripting language?
Title: Re: Scenarios in Simutrans
Post by: Dwachs on December 04, 2013, 07:07:39 PM
Quote from: Spacethingy on December 04, 2013, 01:54:46 PM
Out of interest, why did you guys go for Squirrel, rather than the more common Lua as a scripting language?
It was a mix of: squirrel syntax is more like c/c++ syntax, squirrel has native support for classes, the guys at OpenTTD use it ;)
Title: Re: Scenarios in Simutrans
Post by: isidoro on December 04, 2013, 11:55:36 PM
I think that scenarios in ST have a lot of potential.  Even people with little or no knowledge of programming can easily mimic some constructions and get impressive results in customizing the game...  A very nice improvement to the game!

Title: Re: Scenarios in Simutrans
Post by: doddoshow on September 21, 2020, 03:51:27 PM
Quote from: Dwachs on December 04, 2013, 12:24:44 PM
Simutrans offers the possibility to create scenarios: These are maps with preset goals and rules.

How to create a scenario

The most difficult thing is to come up with an idea about a scenario - a vision what a scenario may look like. Then you have to cast this idea into a savegame. That is, create the world in which your scenario will live. Shape the landscape and build cities and factories. Now you are the ruler of this toy universe, you are in charge of the rules. These go into the script.

Scripting language

The scripts have to be written in squirrel. The manual can be found at Squirrel main page (http://squirrel-lang.org/).

Example scripts

There are two commented example scenario scripts at the documentation page (http://dwachs.github.io/simutrans-sqapi-doc/examples.html). Current versions of pak64 and pak128 come with a set of ready to use scenarios.

Translations

Scenario texts can be translated into any language. Any help is much appreciated!

Resources

http://scenarios.simutrans.com - download some scenarios there

http://dwachs.github.io/simutrans-sqapi-doc - the documentation of the interface to the scripting language

Help

in case you need some help do not hesitate to ask here in this forum.
any other link for downloading the scenarios? on the posted link i get error 500 ,page doesn't function.thanks
Title: Re: Scenarios in Simutrans
Post by: Andarix on September 21, 2020, 11:46:52 PM
Very few scenarios are adapted for the current versions of Simutrans.

I think the sub-domain was not forwarded correctly.