Difference between revisions of "Template:New Trait Box"

From CYOE Wiki
Jump to: navigation, search
(Created page with '<noinclude> Positive Traits <pre>{{Trait Box |colour=#DDFFAA |align={{{align|none}}} |trait= |description= }} <noinclude>Category:Trait Category:Positive Trait</no…')
 
m (13 revisions)
 
(12 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
  
Positive Traits
+
* For positive traits, use colour #DDFFAA
<pre>{{Trait Box
+
* For negative traits, use colour #FFDDDD
|colour=#DDFFAA
+
* For neutral traits, use colour #FFFF99
|align={{{align|none}}}
+
* For techs, skip the colour line
|trait=
 
|description=
 
}}
 
&lt;noinclude>[[Category:Trait]] [[Category:Positive Trait]]&lt;/noinclude>
 
</pre>
 
  
Negative Traits
+
For traits:
<pre>{{Trait Box
+
<pre>
|colour=#FFDDDD
+
&lt;includeonly>{{New Trait Box
|align={{{align|none}}}
 
 
|trait=
 
|trait=
|description=
+
|game={{{era|}}}{{{game|}}}
}}
 
&lt;noinclude>[[Category:Trait]] [[Category:Negative Trait]]&lt;/noinclude>
 
</pre>
 
 
 
Neutral Traits
 
<pre>{{Trait Box
 
|colour=#FFFF99
 
 
|align={{{align|none}}}
 
|align={{{align|none}}}
|trait=
+
|colour_cyoe1=
|description=
+
|description_cyoe1=
}}
+
|colour_cyoe2=
&lt;noinclude>[[Category:Trait]] [[Category:Neutral Trait]]&lt;/noinclude>
+
|description_cyoe2=
 +
...
 +
}}&lt;/includeonly>&lt;noinclude>
 +
{{:{{PAGENAME}}|era=cyoe1}}
 +
{{:{{PAGENAME}}|era=cyoe2}}
 +
{{:{{PAGENAME}}|era=cyoe3}}
 +
[[Category:Trait]] [[Category:Unaligned Trait]]
 +
&lt;/noinclude>
 
</pre>
 
</pre>
  
Technology
+
For techs:
<pre>{{Trait Box
+
<pre>
|align={{{align|none}}}
+
&lt;includeonly>{{New Trait Box
 
|trait=
 
|trait=
|description=
+
|game={{{era|}}}{{{game|}}}
}}
 
&lt;noinclude>[[Category:Technology]]&lt;/noinclude>
 
</pre>
 
 
 
 
 
For a trait that must vary from game to game, use the following format, and use a link such as the one shown. Note in particular that the string for each era must be input twice, once in the switch statement for the included box, and once in the boxes further down. Viewing the trait page directly will show all instances of that trait, while including it will only show the requested version (defaults to cyoe1 in the example shown below, can be altered for traits that were added in later revisions).
 
 
 
<pre>[[My Trait|era=cyoe2]]</pre>
 
 
 
<pre>&lt;includeonly>{{Trait Box
 
|colour=#DDFFAA
 
 
|align={{{align|none}}}
 
|align={{{align|none}}}
|trait=My Trait
+
|cost_cyoe1=
|description=
+
|time_cyoe1=
{{#switch: {{{era|cyoe1}}}
+
|description_cyoe1=
|
+
|cost_cyoe2=
|"cyoe1"
+
|time_cyoe2=
|cyoe1 = In CYOE1, this was the description we used.
+
|description_cyoe2=
|"cyoe2"
+
...
|cyoe2 = But in CYOE2 it changed to this.
+
}}&lt;/includeonly>&lt;noinclude>
|Not available in {{{era|cyoe1}}}.
+
{{:{{PAGENAME}}|era=cyoe1}}
}}
+
{{:{{PAGENAME}}|era=cyoe2}}
}}
+
{{:{{PAGENAME}}|era=cyoe3}}
&lt;/includeonly>&lt;noinclude>
+
[[Category:Technology]]
{{Trait Box
+
&lt;/noinclude>
|colour=#DDFFAA
 
|trait= My Trait (CYOE1)
 
|description=In CYOE1, this was the description we used.
 
}}
 
 
 
{{Trait Box
 
|colour=#DDFFAA
 
|trait=My Trait (CYOE2)
 
|description=But in CYOE2 it changed to this.
 
}}
 
[[Category:Trait]] [[Category:Positive Trait]]&lt;/noinclude>
 
 
</pre>
 
</pre>
  
And similarly for technology (where the title changes too).
+
Tech and trait lines can be mixed, see [[Mass Production]] for an example of this in action.
<pre>&lt;includeonly>{{Trait Box
 
|align={{{align|none}}}
 
|trait={{#switch: {{{era|cyoe1}}}
 
|
 
|"cyoe1"
 
|cyoe1 = CYOE 1 title and cost
 
|"cyoe2"
 
|cyoe2 = CYOE 2 title and cost
 
|Not available in {{{era|cyoe1}}}.
 
}}
 
|description={{#switch: {{{era|cyoe1}}}
 
|
 
|"cyoe1"
 
|cyoe1 = CYOE 1 description
 
|"cyoe2"
 
|cyoe2 = CYOE 2 description
 
|Not available in {{{era|cyoe1}}}.
 
}}
 
}}
 
&lt;/includeonly>&lt;noinclude>
 
{{Trait Box
 
|trait= CYOE 1 title and cost (CYOE1)
 
|description=CYOE 1 description
 
}}
 
  
{{Trait Box
 
|trait=CYOE 2 title and cost (CYOE2)
 
|description=CYOE 2 description
 
}}[[Category:Technology]]&lt;/noinclude></pre>
 
 
</noinclude>
 
</noinclude>
  
 
{|class="collapsible collapsed" align="{{{align|none}}}" width="480" style="border: 1px solid darkgray;"
 
{|class="collapsible collapsed" align="{{{align|none}}}" width="480" style="border: 1px solid darkgray;"
 
|-
 
|-
!align="center" bgcolor="{{{colour|#CCCCCC}}}" colspan="2"|{{{trait|Unknown Trait}}}{{#if: {{{cost_{{{game|none}}}|}}} |({{{cost_{{{game|none}}}|0}}} RP, {{{time_{{{game|none}}}|0}}} turns) | }}
+
!align="center" bgcolor="{{{colour_{{{game|cyoe1}}}|#CCCCCC}}}" colspan="2"|{{{trait|Unknown Trait}}}{{#if: {{{cost_{{{game|cyoe1}}}|}}} | &nbsp;({{{cost_{{{game|cyoe1}}}|0}}} RP, {{{time_{{{game|cyoe1}}}|0}}} turns) | }}
 
|-
 
|-
|align="center"|{{{description_{{{game|none}}}|Not available in {{{game|unspecified game}}}}}}
+
|align="center"|{{{description_{{{game|cyoe1}}}|Not available in {{{game|cyoe1}}}}}}
 
|}
 
|}

Latest revision as of 19:55, 13 September 2014


  • For positive traits, use colour #DDFFAA
  • For negative traits, use colour #FFDDDD
  • For neutral traits, use colour #FFFF99
  • For techs, skip the colour line

For traits:

<includeonly>{{New Trait Box
|trait=
|game={{{era|}}}{{{game|}}}
|align={{{align|none}}}
|colour_cyoe1=
|description_cyoe1=
|colour_cyoe2=
|description_cyoe2=
...
}}</includeonly><noinclude>
{{:{{PAGENAME}}|era=cyoe1}}
{{:{{PAGENAME}}|era=cyoe2}}
{{:{{PAGENAME}}|era=cyoe3}}
[[Category:Trait]] [[Category:Unaligned Trait]]
</noinclude>

For techs:

<includeonly>{{New Trait Box
|trait=
|game={{{era|}}}{{{game|}}}
|align={{{align|none}}}
|cost_cyoe1=
|time_cyoe1=
|description_cyoe1=
|cost_cyoe2=
|time_cyoe2=
|description_cyoe2=
...
}}</includeonly><noinclude>
{{:{{PAGENAME}}|era=cyoe1}}
{{:{{PAGENAME}}|era=cyoe2}}
{{:{{PAGENAME}}|era=cyoe3}}
[[Category:Technology]]
</noinclude>

Tech and trait lines can be mixed, see Mass Production for an example of this in action.