FANDOM


Free*

For legacy support only! {{Cost}} now support discounts directly.
For a 20% discount just use {{Cost|XXX|disc=-e}} (Extension) {{Cost|XXX|disc=-t}} (Theme)

This template is ONLY for players who have purchased Stock Exchange. It reverses the discount seen by these players in the Shop.

This is {{CostNoExch}}. The template accepts the same input that {{Cost}} accepts, for players who have Stock Exchange active on one of their stations. The template then removes the 20% discount received for having Stock Exchange active, then produces output in the same format as {{Cost}}, showing the original, full cost of a theme or extension.

Background

Users can input data for items much more quickly and easily than before. This template eliminates the need for users to input a calculated 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!!

{{CostNoExch}} is almost an exact duplicate of {{CostExch}}, 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.

Syntax

  • {{CostNoExch|<resource1=amount1>}}
  • {{CostNoExch|<resource1=amount1>|<resource2=amount2>}}
  • {{CostNoExch|<resource1=amount1>|<resource2=amount2>|<resource3=amount3>}}
  • {{CostNoExch|<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.

Examples

NOTE: This template is designed to be used with {{Cost}}. Use {{CostNoExch}} alone ONLY when creating or editing infoboxes for themes.

{{CostNoSam|gold=9000}} gives...
11,250 Gold*

{{CostNoSam|gold=9000|wood=18000|bric=1111111101}} gives...
11,250 Gold
22,500 Wood
1,388,888,876 Bricks
*

Example themes table (abbreviated)

{| border="0" class="article-table sortable" style="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"| Cost
!scope="col" style="text-align:right;" class="unsortable"| [[Discounts#Themes & extensions|Discounted Cost]]
|-
|style="text-align:left;"| [[:Category:Metropolis Theme|Metropolis]]
| {{formatnum:50}}
| {{costNoExch|gems=200}}
| {{Cost|gems=200}}
|-
|style="text-align:left;"| [[:Category:Nippon Theme|Nippon]]
| {{formatnum:60}}
| {{costNoExch|gold=600000|wood=160000|ceme=60000}}
| {{cost|gold=600000|wood=160000|ceme=60000}}
|}
gives...
Name Level Cost Discounted Cost
Metropolis 50 250 Gems* 200 Gems
Nippon 60 750,000 Gold
200,000 Wood
75,000 Cement
*
600,000 Gold
160,000 Wood
60,000 Cement

Example horizontal output

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

gives...
Cost: 6,250 Wood; 6,250 Bricks; 6,250 Silicon*
Disc.: 5,000 Wood; 5,000 Bricks; 5,000 Silicon

See also

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