Star Trek Online Wiki
No edit summary
No edit summary
(30 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
|boff={{#vardefine:character|boff}}{{#vardefine:char|{{#ifexist:{{#titleparts:{{PAGENAME}}|1|1}}|1|0}} }}{{#vardefine:boff|0}}{{#vardefine:doff|{{#ifexist:{{#titleparts:{{PAGENAME}}|1|1}}/doff|1|0}} }}
 
|boff={{#vardefine:character|boff}}{{#vardefine:char|{{#ifexist:{{#titleparts:{{PAGENAME}}|1|1}}|1|0}} }}{{#vardefine:boff|0}}{{#vardefine:doff|{{#ifexist:{{#titleparts:{{PAGENAME}}|1|1}}/doff|1|0}} }}
 
|doff={{#vardefine:character|doff}}{{#vardefine:char|{{#ifexist:{{#titleparts:{{PAGENAME}}|1|1}}|1|0}} }}{{#vardefine:boff|{{#ifexist:{{#titleparts:{{PAGENAME}}|1|1}}/boff|1|0}} }}{{#vardefine:doff|0}}
 
|doff={{#vardefine:character|doff}}{{#vardefine:char|{{#ifexist:{{#titleparts:{{PAGENAME}}|1|1}}|1|0}} }}{{#vardefine:boff|{{#ifexist:{{#titleparts:{{PAGENAME}}|1|1}}/boff|1|0}} }}{{#vardefine:doff|0}}
|{{#vardefine:character|char}}{{#vardefine:char|0}}{{#vardefine:doff|{{#ifexist:{{#titleparts:{{PAGENAME}}|1|1}}/boff|1|0}} }}{{#vardefine:doff|{{#ifexist:{{#titleparts:{{PAGENAME}}|1|1}}/doff|1|0}} }}
+
|{{#vardefine:character|char}}{{#vardefine:char|0}}{{#vardefine:boff|{{#ifexist:{{#titleparts:{{PAGENAME}}|1|0}}/boff|1|0}} }}{{#vardefine:doff|{{#ifexist:{{#titleparts:{{PAGENAME}}|1|1}}/doff|1|0}} }}
}}{{#set:
 
|Is for character type={{#switch:{{#titleparts:{{PAGENAME}}|1|2}}
 
|boff=boff
 
|doff=doff
 
|char
 
}}
 
|Is for environment={{{environment|}}}
 
|Trait type={{{type|}}}
 
|Has unique effect={{{hasUniqueEffect|false}}}
 
 
}}{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|doff
 
}}{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|doff
|<div style="width: {{{2|16px}}};" class="itemicon">[[{{#ask:[[File:{{{icon|{{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}} }}} doff.png]]|mainlabel=|link=none|default=File:No icon.png}}|{{{iconAlt|{{PAGENAME}} }}}]]</div>{{#if:{{#ask:[[File:{{{icon|{{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}} }}} doff.png]]|mainlabel=|link=none}}
+
|<div style="width: {{{2|16px}}};" class="itemicon">[[{{#ifexist:File:{{{icon|{{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}} }}} doff.png|File:{{{icon|{{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}} }}} doff.png|File:No icon.png}}|{{{iconAlt|{{PAGENAME}} }}}]]</div>{{#ifexist:File:{{{icon|{{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}} }}} doff.png
 
|
 
|
 
|[[Category:Articles with missing icons]]
 
|[[Category:Articles with missing icons]]
 
}}
 
}}
|<div style="width: {{{2|49px}}};" class="itemicon">[[{{#ask:[[File:{{{icon|{{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}} }}} icon.png]]|mainlabel=|link=none|default=File:No icon.png}}|{{{iconAlt|{{PAGENAME}} }}}]]</div>{{#if:{{#ask:[[File:{{{icon|{{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}} }}} icon.png]]|mainlabel=|link=none}}
+
|<div style="width: {{{2|49px}}};" class="itemicon">[[{{#ifexist:File:{{{icon|{{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}} }}} icon.png|File:{{{icon|{{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}} }}} icon.png|File:No icon.png}}|{{{iconAlt|{{PAGENAME}} }}}]]</div>{{#ifexist:File:{{{icon|{{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}} }}} icon.png
 
|
 
|
 
|[[Category:Articles with missing icons]]
 
|[[Category:Articles with missing icons]]
}}{{#if:{{{icon2|}}}|<div style="width: {{{2|49px}}};" class="itemicon">[[{{#ask:[[File:{{{icon2}}} icon.png]]|mainlabel=|link=none|default=File:No icon.png}}|{{{iconAlt2|}}}]]</div>|}}
+
}}{{#if:{{{icon2|}}}|<div style="width: {{{2|49px}}};" class="itemicon">[[{{#ifexist:File:{{{icon2}}} icon.png|File:{{{icon2}}} icon.png|File:No icon.png}}|{{{iconAlt2|}}}]]</div>|}}
 
}}
 
}}
'''[[Has name::{{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}}]]''' is a {{#switch:{{#titleparts:{{PAGENAME}}|1|2}}
+
'''{{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}}''' is a {{#switch:{{#titleparts:{{PAGENAME}}|1|2}}
 
|boff=[[bridge officer]]{{#ifeq:{{#var:char}}|1|
 
|boff=[[bridge officer]]{{#ifeq:{{#var:char}}|1|
|{{#set:Is master trait=false|Is master or unique trait={{{hasUniqueEffect|false}}} }}{{#vardefine:master|0}}
+
|{{#vardefine:master|0}}
|{{#set:Is master trait=true|Is master or unique trait=true}}{{#vardefine:master|1}}
+
|{{#vardefine:master|1}}
 
}}|doff=[[duty officer]]{{#ifexpr:{{#var:char}}+{{#var:boff}}>0
 
}}|doff=[[duty officer]]{{#ifexpr:{{#var:char}}+{{#var:boff}}>0
|{{#set:Is master trait=false|Is master or unique trait={{{hasUniqueEffect|false}}} }}{{#vardefine:master|0}}
+
|{{#vardefine:master|0}}
|{{#set:Is master trait=true|Is master or unique trait=true}}{{#vardefine:master|1}}
+
|{{#vardefine:master|1}}
}}|player character{{#set:Is master trait=true|Is master or unique trait=true }}{{#vardefine:master|1}}
+
}}|[[Personal traits|player character]]{{#vardefine:master|1}}
}} {{{environment|}}} {{{type|}}} {{{active|}}} trait.{{#switch:{{#var:char}}{{#var:boff}}{{#var:doff}}
+
}} {{{environment|}}} {{{type|}}} {{{active|}}} [[trait]].{{#switch:{{#var:char}}{{#var:boff}}{{#var:doff}}
|100=::''Are you looking for the [[{{#titleparts:{{PAGENAME}}|1|1}}|player character version]] of this trait?''{{#set:|Has other versions=char}}
+
|100=::''Are you looking for the [[{{#titleparts:{{PAGENAME}}|1|1}}|player character version]] of this trait?''
|110=::''Are you looking for the [[{{#titleparts:{{PAGENAME}}|1|1}}|player character]] or [[{{#titleparts:{{PAGENAME}}|1|1}}/boff|bridge officer version]] of this trait?''{{#set:|Has other versions=char|Has other versions=boff}}
+
|110=::''Are you looking for the [[{{#titleparts:{{PAGENAME}}|1|1}}|player character]] or [[{{#titleparts:{{PAGENAME}}|1|1}}/boff|bridge officer version]] of this trait?''
|101=::''Are you looking for the [[{{#titleparts:{{PAGENAME}}|1|1}}|player character]] or [[{{#titleparts:{{PAGENAME}}|1|1}}/doff|duty officer version]] of this trait?''{{#set:|Has other versions=char|Has other versions=doff}}
+
|101=::''Are you looking for the [[{{#titleparts:{{PAGENAME}}|1|1}}|player character]] or [[{{#titleparts:{{PAGENAME}}|1|1}}/doff|duty officer version]] of this trait?''
|010=::''Are you looking for the [[{{#titleparts:{{PAGENAME}}|1|1}}/boff|bridge officer version]] of this trait?''{{#set:|Has other versions=boff}}
+
|010=::''Are you looking for the [[{{#titleparts:{{PAGENAME}}|1|1}}/boff|bridge officer version]] of this trait?''
|011=::''Are you looking for the [[{{#titleparts:{{PAGENAME}}|1|1}}/boff|bridge officer]] or [[{{#titleparts:{{PAGENAME}}|1|1}}/doff|duty officer version]] of this trait?''{{#set:|Has other versions=boff|Has other versions=doff}}
+
|011=::''Are you looking for the [[{{#titleparts:{{PAGENAME}}|1|1}}/boff|bridge officer]] or [[{{#titleparts:{{PAGENAME}}|1|1}}/doff|duty officer version]] of this trait?''
|001=::''Are you looking for the [[{{#titleparts:{{PAGENAME}}|1|1}}/doff|duty officer version]] of this trait?''{{#set:|Has other versions=doff}}
+
|001=::''Are you looking for the [[{{#titleparts:{{PAGENAME}}|1|1}}/doff|duty officer version]] of this trait?''
 
|000=::''This trait is only available for {{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}||player characters|}}{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|boff|bridge officers|}}{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|doff|duty officers|}}.
 
|000=::''This trait is only available for {{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}||player characters|}}{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|boff|bridge officers|}}{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|doff|duty officers|}}.
}}{{#switch:{{#titleparts:{{PAGENAME}}|1|2}}|doff=|==Basic information==
+
}}{{#ifeq:{{#titleparts:{{PAGENAME}}|1|2}}|doff||{{clear|left}}{{#ueif:{{{desc|}}}{{{required|}}}{{{possible|}}}{{{available|}}}|\n==Basic information==|}}
 
<ul><!--
 
<ul><!--
-->{{#if:{{{desc|}}}|<li>'''Game description''': [[Has game description::{{{desc|}}}]]</li>|}}<!--
+
-->{{#if:{{{desc|}}}|<li>'''Game description''': {{{desc|}}}</li>|}}<!--
-->{{#if:{{{required|}}}|<li>'''Species that will always have the trait''': {{#lstsep:{{{required|}}}|,|,_}}</li>|}}<!--
+
-->{{#if:{{{required|}}}|{{#vardefine:required|{{{required|}}} }}|}}{{#if:{{#var:required}}|<li>'''Species that will always have the trait''': {{#lstmap:{{#var:required}}|,|@@@@|[[@@@@]]|,\_}}</li>|}}<!--
-->{{#if:{{{possible|}}}|<li>'''Species that will can have the trait''': {{#lstsep:{{{possible|}}},|,_}}</li>|}}<!--
+
-->{{#if:{{{possible|}}}|{{#vardefine:possible|{{{possible|}}} }}|}}{{#if:{{#var:possible}}|<li>'''Species that can have the trait''': {{#lstmap:{{#var:possible}}|,|@@@@|[[@@@@]]|,\_}}</li>|}}<!--
--></ul>{{#lstmap:{{{required|}}}|,|@@@@|<esc>{{#set:Trait is required for=@@@@}}</esc>|}}{{#lstmap:{{{possible|}}}|,|@@@@|<esc>{{#set:Trait is possible for=@@@@}}</esc>|}}
+
-->{{#if:{{{available|}}}|<li>'''Available from''': <ul>{{#lstmap:{{{available|}}}|\n|@@@@|<li>@@@@</li>|}}</ul></li>|}}<!--
  +
--></ul>
}}
 
{{#cargo_store:
+
}}{{#cargo_store:
 
_table=Traits
 
_table=Traits
 
|name={{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}}
 
|name={{#sub:{{#titleparts:{{PAGENAME}}|1|1}}|7}}
|character={{#switch:{{#titleparts:{{PAGENAME}}|1|2}}
+
|chartype={{#switch:{{#titleparts:{{PAGENAME}}|1|2}}
 
|boff=boff
 
|boff=boff
 
|doff=doff
 
|doff=doff
Line 55: Line 46:
 
|environment={{{environment|}}}
 
|environment={{{environment|}}}
 
|type={{{type|}}}
 
|type={{{type|}}}
|unique={{{hasUniqueEffect|0}}}
+
|isunique={{{hasUniqueEffect|0}}}
 
|master={{#var:master}}
 
|master={{#var:master}}
|desc={{{desc|}}}
+
|description={{{desc|}}}
 
|required={{#lstsep:{{{required|}}}|,|,}}
 
|required={{#lstsep:{{{required|}}}|,|,}}
|possible={{#lstsep:{{{possible|}}},|,}}
+
|possible={{#lstsep:{{{possible|}}}|,|,}}
}}
+
}}<!--
[[Category:Traits|{{#sub:{{PAGENAME}}|7}}]]
+
-->[[Category:Traits|{{#sub:{{PAGENAME}}|7}}]]<!--
{{#if:{{{environment|}}}|[[Category:{{ucfirst:{{{environment}}}}} Traits|{{#sub:{{PAGENAME}}|7}}]]|}}
+
-->[[Category:{{#switch:{{#titleparts:{{PAGENAME}}|1|2}}
  +
|boff=Bridge officer
{{#if:{{{type|}}}|[[Category:{{ucfirst:{{{type}}}}} Traits|{{#sub:{{PAGENAME}}|7}}]]|}}
 
  +
|doff=Duty officer
  +
|Player character
  +
}} traits|{{#sub:{{PAGENAME}}|7}}]]<!--
  +
-->{{#if:{{{environment|}}}|[[Category:{{ucfirst:{{{environment}}}}} Traits|{{#sub:{{PAGENAME}}|7}}]]|}}<!--
 
-->{{#if:{{{type|}}}|[[Category:{{ucfirst:{{{type}}}}} Traits|{{#sub:{{PAGENAME}}|7}}]]|}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>
{{Doc}}<!--[[Category:Icon templates]]
+
{{#invoke:cargo|declare|_table=Traits}}{{Doc}}[[Category:Icon templates]][[Category:Trait semantics]]
[[Category:Trait semantics]]-->
 
 
</noinclude>
 
</noinclude>

Revision as of 07:03, 30 June 2020

This template defines the table "Traits". View table.

The following documentation is transcluded from Template:Traitpage/doc (edit):

This template displays the header text for a trait page, whether that trait be for characters, bridge officers, or duty officers.

Usage:

{{traitpage
  |environment=ground or space (keep either lowercase)
  |type=optional trait type, often "reputation"
  |icon=name of the icon, not including the icon part (optional - if not provided, it defaults to the page name)
  |iconAlt=alt text for the icon (optional - if not provided, it defaults to the page name)
  |icon2=name of the icon, not including the icon part (optional - erase to have only one icon)
  |iconAlt2=alt text for the second icon
  |desc=in-game description
  |required=comma separated list of species that always have the trait
  |possible=comma separated list of species that can have the trait
  |available=what makes it available, often a reputation tier
  |career=if it is exclusive to a specific career path (optional - eng/sci/tac)
  |source=method of attainment (optional)
}}

Note that the template determines the trait type from the page name as follows:

  • page names ending in /boff are determined to be for bridge officer traits;
  • page names ending in /doff are determined to be for duty officer traits;
  • all other page names are determined to be for character traits.