Author Topic: Scenarios in Simutrans  (Read 3602 times)

0 Members and 1 Guest are viewing this topic.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4251
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Scenarios in Simutrans
« 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.

Example scripts

There are two commented example scenario scripts at the documentation page. 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.
Parsley, sage, rosemary, and maggikraut.

Offline Spacethingy

Re: Scenarios in Simutrans
« Reply #1 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?
Life is like a new Simutrans transformer:

You only get one of them, and you can't have it on a slope.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4251
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Scenarios in Simutrans
« Reply #2 on: December 04, 2013, 07:07:39 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 ;)
Parsley, sage, rosemary, and maggikraut.

Offline isidoro

Re: Scenarios in Simutrans
« Reply #3 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!