TrainStation Nederland Wikia
TrainStation Nederland Wikia

Gratis

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 (Gems.png) 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 Gold.png
  • {{Cost|gold=100000000|wood=46581}}
    • 100.000.000 Gold.png
      46.581 Wood.png
  • {{Cost|gold=100000000|steel=485452|wood=46581}}
    • 100.000.000 Gold.png
      46.581 Wood.png
      485.452 Steel.png
  • {{Cost}}
    • Gratis
  • {{Cost|}}
    • Gratis

  • Example inside a shop table:
    • {{ShopTable}}
      {{ShopItem|Test||{{Cost|silicon=4|gold=12345}}|99|1|1}}
      {{EndTable}}
Naam Contract Kosten Koop XP.png Passenger.png/u Space.png Passenger.png/Space.png
Test 12.345 Gold.png
4 Silicon.png
99 1 1 1,00

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

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

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.