For legacy support only! {{Cost}} now support discounts directly.
For a 10% discount just use {{Cost|XXX|disc=-b}} (Sam) or {{Cost|XXX|disc=-m}} (Alan)

This template is ONLY for players who have already completed all of Sam's (or Alan's) contracts. It reverses the discount seen by these players in the Shop.
Players who have not completed all of Sam's contracts should use {{CostSam}}.
Players who have not completed all of Alan's contracts should use {{CostAlan}}.

This is {{CostNoSam}}. (This documentation also applies to {{CostNoAlan}}.) The template accepts the same input that {{Cost}} accepts, for players who already have completed all of Sam's (Alan's) contracts. (These players see only Sam's (Alan's) discounted cost for buildings (Mystery Depot items) in the Shop. After completing all of Sam's (Alan's) contracts, a player never sees the original, full cost of a building (Mystery Depot item) again.) The template then removes the 10% discount received for completing all of Sam's (Alan's) contracts, then produces output in the same format as {{Cost}}, showing the original, full cost of a building (Mystery Depot item).


Users can input data for items much more quickly and easily than before. This template eliminates the need for users to input an already discounted cost, and it eliminates errors produced when such users forget to enter notes that the cost is discounted. This template also eliminates errors in calculating non-discounted prices, and it eliminates inconsistencies between users when rounding. Just input the discounted cost data seen in the Shop, and that's it!!

{{CostNoSam}} ({{CostNoAlan}}) is almost an exact duplicate of {{CostSam}} ({{CostAlan}}), which in turn is almost an exact duplicate of {{Cost}}, which was designed and created by Koppa Dasao. Koppa Dasao deserves all the credit for this template's logic, structure, and output. The only difference between this template and the original is the tiny amount of code used to reverse the discount.


  • {{CostNoAlan|<resource1=amount1>}}
  • {{CostNoSam|<resource1=amount1>|<resource2=amount2>}}
  • {{CostNoAlan|<resource1=amount1>|<resource2=amount2>|<resource3=amount3>}}
  • {{CostNoSam|<resource1=amount1>|<resource2=amount2>|<line=y>}}
    • 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) 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 horizontal line.


NOTE: This template is designed to be used with {{Cost}}. Use {{CostNoSam}} ({{CostNoAlan}}) alone ONLY when creating or editing infoboxes for buildings (Mystery Depot items).

{{CostNoSam|gold=9000}} gives...
10,000 Gold*

{{CostNoSam|gold=9000|wood=18000|bric=1111111101}} gives...
10,000 Gold
20,000 Wood
1,234,567,890 Bricks

Example buildings table (abbreviated):

{| border="0" class="article-table sortable" style="width:100%; text-align:right;"
!scope="col" style="text-align:left;"| Name
!scope="col" style="text-align:right;"| Level
!scope="col" style="text-align:right;" class="unsortable"| Limit
!scope="col" style="text-align:right;" class="unsortable"| Cost
!scope="col" style="text-align:right;" class="unsortable"| [[Discounts#Buildings|Discounted Cost]]
!scope="col" style="text-align:right;" class="unsortable"| {{XP|Build}}
|style="text-align:left;"| [[Central Station]]
| {{formatnum:50}}
| {{formatnum:1}}
| {{CostNoSam|gems=135}}
| {{Cost|gems=135}}
| {{formatnum:5200}}
|style="text-align:left;"| [[Suburb Station]]
| {{formatnum:50}}
| {{formatnum:1}}
| {{CostNoSam|bricks=18000|glass=13500|steel=9000}}
| {{Cost|bricks=18000|glass=13500|steel=9000}}
| {{formatnum:3200}}


Name Level Limit Cost Discounted Cost Build XP
Central Station 50 1 150 Gems* 135 Gems 5,200
Suburb Station 50 1 20,000 Bricks
15,000 Glass
10,000 Steel
18,000 Bricks
13,500 Glass
9,000 Steel

Example horizontal output

Cost: {{CostNoAlan|wood=5000|bric=5000|sili=5000|line=y}}<br />
Disc.: {{Cost|wood=5000|bric=5000|sili=5000|line=y}}

Cost: 5,555 Wood; 5,555 Bricks; 5,555 Silicon*
Disc.: 5,000 Wood; 5,000 Bricks; 5,000 Silicon

See also

Community content is available under CC-BY-SA unless otherwise noted.