Template:CostCorn/doc

This is CostCorn. It accepts the same input that Cost accepts, applies the 25% discount received for finishing Cornelius, then produces output in the same format as Cost. This template is designed to be used in tandem with Cost when creating tables for buildings.

Background
Users can input data for buildings much more quickly and easily than before. This template eliminates the need for users to calculate discounts themselves, eliminates errors in calculating or typing discounted prices, and eliminates inconsistencies between users when rounding. Just input cost data, copy and paste, change the name of the template, and that's it!!

CostCorn 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 calculate the discount.

Syntax

 * 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 {{}} . DO NOT add extra pipes (|) for the unnecessary parameters.
 * 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, if present, will cause the output to display on one horizontal line.
 * 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 {{}} . DO NOT add extra pipes (|) for the unnecessary parameters.
 * 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, if present, will cause the output to display on one horizontal line.

Examples
'NOTE:'' This template is designed to be used with Cost. CostExch should rarely be used alone, if ever.'''

gives...

gives...

Example horizontal output
Cost:

Disc.: gives...

Cost:

Disc.: