Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:NPCTableHead/doc: Difference between revisions

Template page
Hirmuolio Pine (talk | contribs)
Sample output: sample to use ewar=Damp instead of usign icon template
Add info to template date that this template is not visual editor friendly.
 
(30 intermediate revisions by 6 users not shown)
Line 1: Line 1:
This template is used to create NPC table header for the pages describing combat complexes.
; Description
== Dependencies ==
: This template is used to start an NPCTable. It needs to be paired with the standard wiki parser code to end the table <nowiki>|}</nowiki>. It needs to be used once for every NPCTable on a page.
* Uses {{t|NPCTableCSS}} to acquire proper CSS. This template is transcluded through {{t|CMBSite}} so that template works for CSS too.
* Uses {{t|NPCTableRow}} to generate rows.
* Uses {{t|NPCTableSeparator}} for separating parts of table with title.
== Syntax ==
<code>{{t|CMBSite|Name of the complex}} OR {{t|NPCTableCSS}} (either one once)<br>
{{t|NPCTableHead|Table header}}<br>
{{t|NPCTableRow|Parameters - see NPCTableRow documentation}}<br>
{{t|NPCTableSeparator|Parameters - see NPCTableSeparator documentation}}<br>
{{t|NPCTableRow|Parameters - see NPCTableRow documentation}}<br>
|}</code>


=== Parameters ===
; Dependencies:
;Name of complex
:; Requires
:This is the title of the NPC group, e.g. <code>Wave 1</code>, <code>Initial defenders</code>, <code>Commander wave</code>, etc.  
:: {{T|NPCTableCSS}} is required only <em>once</em> per page where there's at least one NPCTable. It is included into {{T|CMBSiteInfo}} and {{T|CMBSite}}(deprecated), so when one of those is used there is no need to add it separately.
:; Paired with
:: <nowiki>|}</nowiki> to close the table, or include <nowiki>|end=true}}</nowiki> as the last parameter of the last {{T|NPCTableRow}}.
:; Sub templates
:: {{T|NPCTableRow}} one or more for each NPCTable.
:: {{T|NPCTableSeparator}} zero or more for each NPCTable.


== Sample output ==
; Syntax
<code><nowiki>{{NPCTableCSS}}</nowiki><br>
: {{T|NPCTableHead|caption}}
<nowiki>{{NPCTableHead|Wave #34}}</nowiki><br>
:; Parameters
<nowiki>{{NPCTableRow|Frigate|100|Coreli Agent|point=yes|ewar=Damp|ewar2=Web|cargo=Drops Gist X-Type 100MN Microwarpdrive}}</nowiki><br>
::; caption : Caption of the table. May be omitted.
<nowiki>{{NPCTableSeparator|After 25% on target structure}}</nowiki><br>
 
<nowiki>{{NPCTableRow|Frigate|100|Coreli Agent|point=yes|ewar=Damp|ewar2=Web|cargo=Drops Gist X-Type 100MN Microwarpdrive}}</nowiki><br>
; Sample
<nowiki>|}</nowiki></code>
:gives...
{{NPCTableCSS}}
{{NPCTableCSS}}
{{NPCTableHead|Wave #34}}
: <code><nowiki>{{NPCTableHead|Initial defenders}}</nowiki></code>
{{NPCTableRow|Frigate|100|Coreli Agent|point=yes|ewar=Damp|ewar2=Web|cargo=Drops Gist X-Type 100MN Microwarpdrive}}
 
{{NPCTableSeparator|After 25% on target structure}}
: <code><nowiki>|}</nowiki></code>
{{NPCTableRow|Frigate|100|Coreli Agent|point=yes|ewar=Damp|ewar2=Web|cargo=Drops Gist X-Type 100MN Microwarpdrive}}
:: gives...
{{NPCTableHead|Initial defenders}}
 
|}
|}
Note: #222222 is used for the background color of the NPCTable headers. But because the background color of the documentation section of a template is also #222222 it can not be seen on a template page.
; See also
* [[UniWiki:Mission formatting guidelines|Mission formatting guidelines]]
; Template data
: This is the [[mediawikiwiki:Help:TemplateData|TemplateData]] documentation for this template used by [[mediawikiwiki:VisualEditor|VisualEditor]] and other tools.
:: <templatedata>
{
"params": {
"1": {
"label": "Caption",
"description": "Caption of the table. May be omitted.",
"example": "Initial forces",
"type": "line"
}
},
"description": "This template is used to start an NPCTable. It needs to be paired with the standard wiki parser code to end the table |}. It needs to be used once for every NPCTable on a page. Additional the template NPCTableCSS is required once on the page unless the template CMBSiteInfo or CMBSiteBox (deprecated) is used on the page. Those have the NPCTableCSS build in. This template is not visual editor friendly so it is best to use it in text editor mode.",
"paramOrder": [
"1"
],
"format": "inline"
}
</templatedata>


<includeonly>[[Category:Template|{{PAGENAME}}]]<!-- Any categories for the template itself --></includeonly>
<includeonly>[[Category:Formatting templates]]<!-- Any categories for the template itself --></includeonly>
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 11:18, 28 October 2025

Description
This template is used to start an NPCTable. It needs to be paired with the standard wiki parser code to end the table |}. It needs to be used once for every NPCTable on a page.
Dependencies
Requires
{{NPCTableCSS}} is required only once per page where there's at least one NPCTable. It is included into {{CMBSiteInfo}} and {{CMBSite}}(deprecated), so when one of those is used there is no need to add it separately.
Paired with
|} to close the table, or include |end=true}} as the last parameter of the last {{NPCTableRow}}.
Sub templates
{{NPCTableRow}} one or more for each NPCTable.
{{NPCTableSeparator}} zero or more for each NPCTable.
Syntax
{{NPCTableHead|<caption>}}
Parameters
caption
Caption of the table. May be omitted.
Sample
{{NPCTableHead|Initial defenders}}
|}
gives...
Initial defenders
WD EWAR L


Note: #222222 is used for the background color of the NPCTable headers. But because the background color of the documentation section of a template is also #222222 it can not be seen on a template page.


See also
Template data
This is the TemplateData documentation for this template used by VisualEditor and other tools.

This template is used to start an NPCTable. It needs to be paired with the standard wiki parser code to end the table |}. It needs to be used once for every NPCTable on a page. Additional the template NPCTableCSS is required once on the page unless the template CMBSiteInfo or CMBSiteBox (deprecated) is used on the page. Those have the NPCTableCSS build in. This template is not visual editor friendly so it is best to use it in text editor mode.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Caption1

Caption of the table. May be omitted.

Example
Initial forces
Lineoptional