Difference between revisions of "Template:Variants/doc"

From Captain of Industry Wiki
Jump to: navigation, search
m (Corrected omissions.)
 
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:
::<code>{{{1}}}</code>: Common part of the machine name for all tiers, such as "Pipe" and "Boiler."
::<code>{{{1}}}</code>: Common part of the machine name for all tiers, such as "Pipe" and "Boiler."
::<code>{{{2}}}</code> - <code>{{{8}}}</code>: Remaining part of the machine's name, such as "II" and "Gas." If <code>{{{2}}}</code> is omitted or "auto", all variants of the machine will be listed.
::<code>{{{2}}}</code> - <code>{{{8}}}</code>: Remaining part of the machine's name, such as "II" and "Gas." If <code>{{{2}}}</code> is omitted or "auto", all variants of the machine will be listed.
::<code>{{{sep}}}</code> (optional, rare): Specify separator. Default: &amp;bull;(&bull;)
::<code>{{{skipunmarked}}}</code> (optional, rare): If yes, the building whose name is an exact match as {{{1}}} (mostly tier 1) will not be listed. See also an example.
:This template requires the page of 1st tier of the machine in the wiki. Notably, all parameters are case-sensitive.
:This template requires the page of 1st tier of the machine in the wiki. Notably, all parameters are case-sensitive.


Line 18: Line 20:
* Specify variants manually
* Specify variants manually
** {{t|Variants|Research Lab|III|V}} &rarr; {{Variants|Research Lab|III|V}}
** {{t|Variants|Research Lab|III|V}} &rarr; {{Variants|Research Lab|III|V}}
** {{t|Variants|Research Lab|III|V|skipunmarked&#x3D;yes}} &rarr; {{Variants|Research Lab|III|V|skipunmarked=yes}}
** {{t|Variants|Boiler|Coal|Gas}} &rarr; {{Variants|Boiler|Coal|Gas}}
** {{t|Variants|Boiler|Coal|Gas}} &rarr; {{Variants|Boiler|Coal|Gas}}
* Specify format
** {{t|Variants|Pipe|sep&#x3D;,}} &rarr; {{Variants|Pipe|sep=,}}
* Error
* Error
** {{t|Variants}} &rarr; {{Variants}}
** {{t|Variants}} &rarr; {{Variants}}
** {{t|Variants|Ipsum}} &rarr; {{Variants|Ipsum|II|III}}
** {{t|Variants|Ipsum|II|III}} &rarr; {{Variants|Ipsum|II|III}}
 
;Unsupported machines (version 0.4.12)
:The following machines are NOT supported by this template
:* [[The Statue of Maintenance]] &lbrack;[[The Statue of Maintenance#Supporter Edition content|Golden]]&rbrack;
:* [[Farm]] &lbrack;[[Irrigated Farm|Irrigated]]&rbrack;
:* [[Maintenance Depot]] &lbrack;[[Maintenance Depot (Basic)|Basic]]&bull;[[Maintenance II Depot|II]]&bull;[[Maintenance III Depot|III]]&rbrack;


;Details
;Details

Latest revision as of 22:50, 16 November 2022

Purpose
This template provides a method to rapidly line variants of machines with the link
Usage
This template accepts the following parameters:
{{{1}}}: Common part of the machine name for all tiers, such as "Pipe" and "Boiler."
{{{2}}} - {{{8}}}: Remaining part of the machine's name, such as "II" and "Gas." If {{{2}}} is omitted or "auto", all variants of the machine will be listed.
{{{sep}}} (optional, rare): Specify separator. Default: &bull;(•)
{{{skipunmarked}}} (optional, rare): If yes, the building whose name is an exact match as {{{1}}} (mostly tier 1) will not be listed. See also an example.
This template requires the page of 1st tier of the machine in the wiki. Notably, all parameters are case-sensitive.
Example
Details
Bracket Completion
The round brackets may be omitted if the entire parameter is covered by the brackets. For example, you can input "Gas" instead of "(Gas)." However, the brackets cannot be omitted if the parameter is covered partially such as "(Electric) II."
Name of 1st tier machine
This template searches the machine page in the wiki for choosing a format. If there is a page named {{{1}}}, it is considered as 1st tier of the machine. If there is a page named "{{{1}}} {{{2}}}" or "{{{1}}} ({{{2}}})", this name is considered as 1st tier of the machine.
Automatically listing variants
If the variants are named regularly by Roman numerals, the variants whose page exists on the wiki are listed. If the variants are irregularly named, the variants to be listed are defined in the code of this template.