TrainStation Nederland Wikia
Advertisement
TrainStation Nederland Wikia

This template accepts cost data for an item in the TrainStation game (usually in the Shop) in text form.
It then returns the item's cost in a consistent order, using formatted numbers and the appropriate graphic for each resource.

Syntax[]

  • {{cost|<resource1=amount1>}}
  • {{cost|<resource1=amount1>|<resource2=amount2>}}
  • {{cost|<resource1=amount1>|<resource2=amount2>|<resource3=amount3>}}
  • {{cost|<resource1=amount1>|<resource2=amount2>|<line=y>}}
  • {{cost|<resource1=amount1>|<resource2=amount2>|<cont=y>}}
  • {{cost|<resource1=amount1>|<resource2=amount2>|<cont=y>|<qty=#>}}
    • resource1, resource2, resource3 = the names of the 18 different resources in the TrainStation game: gems, gold, and the 16 materials. (minimum: 4 characters)
    • amount1, amount2, amount3 = the amounts required of resource1, resource2, and resource3, respectively, to purchase an item. Always use plain numbers with no formatting, e.g. 1000000 (NOT 1,000,000 or 1.000.000 or 1 000 000).
    • The 2nd and 3rd parameters are optional. If the item requires only one or two resources, simply close the {{braces}}. DO NOT add extra pipes (|) for the unnecessary parameters.
    • Gems (Resource Gems) always appear alone in an item's cost. No item in the game has a cost that includes gems plus another resource.
    • Optional parameter line, if present, will cause the output to display on one line, horizontally.
    • The parameters below should be used only within a contract list on a contractor's page.
      • Optional parameter cont, if present, will format the output for display in a contract list on a contractor's page: horizontally as with line, preceded by a bullet and the word "Cost", all in italics.
      • Optional parameter qty, if present, will multiply each resource amount by the quantity specified. This allows for easy input when contractors require two or more identical buildings or decorations in a contract objective, while producing accurate and consistent cost totals.
        To use this parameter, enter resource amounts for one of the item, then add |qty=# to the template call, where #= the quantity of the item required by the contract objective.

Sample output[]

  • {{cost|gold=100000000}}
    • 100.000.000 Resource Gold
  • {{cost|gold=100000000|wood=46581}}
    • 100.000.000 Resource Gold
      46.581 Resource Wood
  • {{cost|gold=100000000|stee=485452|wood=46581}}
    • 100.000.000 Resource Gold
      46.581 Resource Wood
      485.452 Resource Steel
  • {{cost}}
    • Gratis
  • {{cost|}}
    • Gratis

  • Example inside a shop table:
    • {{ShopTable}}
      {{ShopItem|Test||{{cost|sili=4|gold=12345}}|99|1|1}}
      {{EndTable}}
Naam Contract Kosten Koop Train Ride XP Resource Passenger/u Misc Space Resource Passenger/Misc Space
Test 12.345 Resource Gold
4 Resource Silicon
99 1 1 1,00

  • Example inside a contract list:
    • {|
      |-
      | Build 1 [[Pony Express Kantoor]] <br> {{cost|wood=100|nail=100|cont=y}}
      |}
Build 1 Pony Express Kantoor
Kosten: 100 Resource Wood, 100 Resource Nails


  • Example inside a contract list, with multiple quantity:
    • {|
      |-
      | Build 3 [[Eiffeltoren monument]] <br> {{cost|gold=30000|stee=45000|grav=30000|cont=y|qty=3}}
      |}
Build 3 Eiffeltoren monument
Kosten: 90.000 Resource Gold, 135.000 Resource Steel, 90.000 Resource Gravel

See also[]

Credits[]

This template was created by Koppa Dasao.
Although the TrainStation Wiki community have improved the original template, it still uses Koppa Dasao's logic and structure.

Advertisement