TrainStation Wiki
TrainStation Wiki

Template {{contract}} creates a link to one or more (up to 9) particular contracts on a contractor's main page. It also can display the text "(required)", "(required, as set)", "(optional)", or "(optional, as set)" for use in infoboxes of items used for the relevant contract(s).

Syntax

{{contract}} accepts:

  • two required unnamed parameters
  • eight optional unnamed parameters
  • three optional named parameters

{{contract|<contractor name (with year)>|<contract number #1>|<contract number #2>|<contract number #3>|<...>|<contract number #9>}}

Simple link

A simple link uses two required pieces of data, as unnamed parameters.

  • contractor name (required) - The name of the contractor's main page, including year, if applicable.
  • contract number #1 (required) - The number of the (first or only) relevant contract.

Linking multiple related contracts

To display multiple related contracts, the template allows eight optional pieces of data, as unnamed parameters.
Simply add the contract numbers needed, one at a time, each separated by a pipe (|) character. DO NOT add extra pipes (|) for unneeded parameters.
The template will accept 0-8 additional contract numbers, for a possible total of 9 contracts linked. Each contract number added will generate a new, separate link. The contractor's name (and year) will display only once.

Required or optional?

When adding {{contract}} to an infobox of an item to be built or sent to complete a contract objectively, the template uses two optional pieces of data, both as named parameters, each with two possible values. In these cases, editors are required to use one of these parameters.

  • Optional parameter req, if present, will display the text (required) after the final link.
    • req=s will display (required, as Logo Set.png) after the final link.
      • This applied if there is one set for that item.
    • req=o|set=Set Name will display (required) using [[<Set Name>|<Set Name>]] Logo Set.png) after the final link.
      • This applied if there is more than one set for that item. Also, easier for the reader to identify which contract objective it applied for.
  • Optional parameter opt, if present, will display the text (optional) after the final link.
    • opt=s will display (optional, as Logo Set.png) after the final link.
      • This applied if there is one set for that item.
    • opt=o|set=Set Name will display (required) using [[<Set Name>|<Set Name>]] Logo Set.png) after the final link.
      • This applied if there is more than one set for that item. Also, easier for the reader to identify which contract objective it applied for.
  • Optional parameter cat, if present, will display the no text No text given after the final link.
    • cat=h will display Reference provided after the final link.
      • This applied within the award parameter from {{infobox items}} only. This parameter tells the reader this item was the previous reward, trigger reward icon change (grey reward icon) via the item category DPL reward page.

Examples

{{contract|Johann|12}}
gives: DPL-Reward-On.png from Johann #12


{{contract|Mrs. Wilma|9}}
gives: DPL-Reward-On.png from Mrs. Wilma #9


{{contract|Valentina (2015)|4|5|6|7}}
gives: DPL-Reward-On.png from Valentina #4, #5, #6, #7


{{contract|Otto|5|22|31|req=y}}
gives: DPL-Reward-On.png from Otto #5, #22, #31 (required)


{{contract|Ethan|14|41|opt=s}}
gives: DPL-Reward-On.png from Ethan #14, #41 (optional, as Logo Set.png)


{{Contract|Zack (2018)|21|level=30-119|req=o|set=Chrome Cargo II (C)}}
gives: DPL-Reward-On.png from Zack - Levels 30-119 #21 (required) using Chrome Cargo II Logo Set.png


{{Contract|Esther (2016)|21|cat=h}}
gives: DPL-Reward-Off.png from Esther #21