The International Simutrans Forum

 

Author Topic: Scenarios  (Read 3295 times)

0 Members and 1 Guest are viewing this topic.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4607
  • Languages: EN, DE, AT
Scenarios
« on: July 30, 2009, 08:17:06 AM »
I really like the effort that is put into the presented scenarios and savegames on the forum. However, simtrans lacks the capability to handle scenarios flexibly.

I thought of adding support of scenarios configurable in xml.

So here is an invitation to do a brainstorming. What would you like to see included?

Winning conditions, losing conditions, extra restrictions (no terraforming, no deletion of houses), special vehicles (only a subset of pak vehicles allowed, vehicles provided by scenario), events etc.



Disclaimer: Nothing will be done overnight. No promises.

No ingame editor (maybe at later stage): editing the xml-file with a text editor and reloading in simutrans should be enough for the moment.

No scripting (lua etc - maybe later): simply due to the sheer amount of work connected with that.

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: Scenarios
« Reply #1 on: July 30, 2009, 09:52:01 AM »
My two cents:
  • Triggers: If player income reaches to 2k million increase the cost by 2.
  • Time limit: Years or hours of gameplay, then lock the scenario.
  • The possibility of setting up winning zones. You can define an area and the goals to meet there. i.e. Increase the populations from southern cities and build a hub that attracts 20% of the transported goods.

I guess triggers implementation would need some kind of scripting, but perhaps we may find another way to carry out this, defining most common triggers.

Offline Severous

  • *
  • Posts: 377
Re: Scenarios
« Reply #2 on: July 30, 2009, 12:12:03 PM »
Hi.

I think of scenarios as :

- a predefined map having objective(s) to be meet before a certain date. 

- Scenario can be replayed and sent to other players as a file.  Players can compare how they did knowing they had the same map and conditions as each other. Can swap posts in forum comparing tactics and pictures.

- Scenario win/loose message and means of tracking scenarios played and results achieved. Big 'in your face' window popping up to say 'well done'.

- objectives can be any or combination of: volume of specific cargo transported, net wealth, profit. (whatever simutrans can track easily)

- Small amount of scenario text to tell player of scenario conditions and objectives.

Whilst not essential I like restrictions on vehicles available. To force a certain type of scenario play.
- restricting vehicles to be used. By type (e.g road vehicles only) or individual vehicles (only 2 types of bus available from normal 6)

Whats on the map?  Would there be any control over the placement and composition of industry on the map?  Somehow do we use the public player to edit the map/industry then save/start the scenario?

I hadn't thought of triggers. But they could be very useful.  Like in a Rhur scenario we might have triggers that caused change to coal/iron/steel industry. Alternatively the scenario had altered weighting for spawning of such industry making change more likely/frequent.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4607
  • Languages: EN, DE, AT
Re: Scenarios
« Reply #3 on: July 30, 2009, 12:43:32 PM »
Thank you for you input!
- Scenario can be replayed and sent to other players as a file.  Players can compare how they did knowing they had the same map and conditions as each other. Can swap posts in forum comparing tactics and pictures.
I do not understand. Is this a definition of scenario or a special request? At least it matches my own understanding of a scenario (fixed map, fixed conditions).

Quote
Whats on the map?  Would there be any control over the placement and composition of industry on the map?  Somehow do we use the public player to edit the map/industry then save/start the scenario?
I think, a scenario consists of (a) savegame and (b) additional file(s) describing the scenario. As of (a), one has to use public service beforehand to establish all the wished infrastructure like in the Arena board here on the forum. I also imagine the possibility to provide a height map and additional information, where to place cities, rivers etc, to make pak-independent scenarios.

In simutrans there is already a button 'load scenario' that looks in pakxx/scenario to load one. My idea is to use this option and develop it further.

Offline Michael 'Cruzer'

  • Devotee
  • *
  • Posts: 196
  • Founder of pak192.comic
    • Marktplatz für Parkplätze
  • Languages: DE, EN
Re: Scenarios
« Reply #4 on: July 30, 2009, 01:20:21 PM »
XML? I think this is a great idea!

_____________________________________


Do you think of something like that?
Code: [Select]
<?xml version="1.0">
<scenario>
<task min_money="10000000">This is the message when you slove this task!</task>
<task min_vehicles="100" />
<!-- The attributs of 'task' means are the requierments for sloving this task.
Like 'min_money="10000000"' means that player must have 10000000 or more. -->

<!-- A more complex taks: -->
<task min_money="10000000" min_vehicle="100" max_time="10000">Here the message?</task>
</scenario>

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4607
  • Languages: EN, DE, AT
Re: Scenarios
« Reply #5 on: July 30, 2009, 01:33:16 PM »
yes, or something like that:
Code: [Select]
<scenario>
<general>
<ends time="1.1.1980"/>
<file name="test.sve"/>
<message>
Welcome! 
</message>
</general>
<win>
<condition>
<cash comp="more than" value="1000000"/>
</condition>
<message>
You won!
</message>
</win>
<lose>
<condition>
<cash comp="less than" value="0"/>
</condition>
<message>
Wadda loser!
</message>
</lose>
</scenario>

Offline Michael 'Cruzer'

  • Devotee
  • *
  • Posts: 196
  • Founder of pak192.comic
    • Marktplatz für Parkplätze
  • Languages: DE, EN
Re: Scenarios
« Reply #6 on: July 30, 2009, 02:04:44 PM »
yes, or something like that:

That sounds great. I hope that you find time to make it.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3662
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Scenarios
« Reply #7 on: July 30, 2009, 03:06:24 PM »
Just a small note as I'm limited on time: I hope you get inspired by Railroad Tycoon II - I realize much of that system would be too complex, but imho, it was a really really great system for scenarios... :)

Offline Severous

  • *
  • Posts: 377
Re: Scenarios
« Reply #8 on: July 30, 2009, 05:17:05 PM »
My most played games of this type were Railroad Tycoon2 and Locomotion.  

Both had excellent scenario building features.  RRT2 had triggers that could take you from one objective to another.  One I most remember unlocked progressively more of the map as you met certain interim objectives.

I will add a few Locomotion screenshots ive got stashed away somewhere....

Edit1:
http://homepage.ntlworld.com/steven.meale/Rails%20and%20Roads.PNG
http://homepage.ntlworld.com/steven.meale/name%20with%20date.PNG
http://homepage.ntlworld.com/steven.meale/Oil%20Oasis%20win.JPG

Sadly I cant find any screens of the actual scenario creation options.


Question..how many have played the scenarios that come with Simutrans..know that they differ between pak64 and pak128 (despite the same names)..and kept the saves?
« Last Edit: July 30, 2009, 05:30:51 PM by Severous »

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Languages: EN
Re: Scenarios
« Reply #9 on: July 30, 2009, 05:43:16 PM »
If player income reaches to 2k million increase the cost by 2.
Or "engage price inflation at n%/yr"

Offline Michael 'Cruzer'

  • Devotee
  • *
  • Posts: 196
  • Founder of pak192.comic
    • Marktplatz für Parkplätze
  • Languages: DE, EN
Re: Scenarios
« Reply #10 on: July 30, 2009, 05:57:09 PM »
I think such complex stuff isn't needed!
The system from Dwachs is big enough.

@Dwachs: If you make your system, please also make a Scenario Name Attribute, because showing the file name doesn't looks very nice in scenario.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4607
  • Languages: EN, DE, AT
Re: Scenarios
« Reply #11 on: July 31, 2009, 05:00:43 AM »
I got inspired by the game Wesnoth www.wesnoth.org, there the scenarios and campaigns are described by some kind of macro language, which is somehow similar to xml, see http://www.wesnoth.org/wiki/ReferenceWML. There you can see, how complex everything can get. But also, what one can achieve without a scripting engine.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Scenarios
« Reply #12 on: July 31, 2009, 08:07:15 AM »
Ohhhhh dear. WML attacks!

Would it be possible to load/activate additional paks just for the scenario?

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4607
  • Languages: EN, DE, AT
Re: Scenarios
« Reply #13 on: July 31, 2009, 08:53:37 AM »
why not, if anyone implements it  ::)