Template:Npcbox: Difference between revisions
m Removing line returns to experiment with aberrant spacing |
No edit summary |
||
| (23 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly><templatestyles src="Npcbox/styles.css" />{{#cargo_store: | ||
< | _table=NPCs | ||
|Name={{{name|{{PAGENAME}}}}} | |||
|Faction={{{faction|}}} | |||
|Sex={{{sex|}}} | |||
|Race={{#if:{{{race|}}}|[[{{{race}}}]]}} | |||
|Creature_type={{{creature|}}} | |||
|Level={{{level|}}} | |||
|Class={{#if:{{{class|}}}|[[{{{class}}}]]}} | |||
|Affiliation={{{affiliation|}}} | |||
|Former_affiliation={{{faffiliation|}}} | |||
|Occupation={{{occupation|}}} | |||
|Former_occupation={{{foccupation|}}} | |||
|Profession={{{profession|}}} | |||
|Current_location={{{location|}}} | |||
|Status={{{status|}}} | |||
|Source={{{source|}}} | |||
}}<table class="npcbox"> | |||
<tr> | <tr> | ||
<th colspan="2" | <th colspan="2" class="npcbox-header">{{#if:{{{faction|}}}|<span class="npcbox-faction">{{FactionIcon|{{{faction}}}}}</span>}}<span class="npcbox-name">{{{name|{{PAGENAME}}}}}</span>{{#if:{{{title|}}}|<br><small>{{{title}}}</small>}}</th> | ||
{{#if:{{{faction|}}}| | </tr><!-- | ||
<span | -->{{#if:{{{image|}}}|<tr><td colspan="2" class="npcbox-image">[[File:{{{image}}}|200px|center|{{{name|{{PAGENAME}}}}}]]</td></tr>}}<!-- | ||
}}<span | -->{{#if:{{{sex|}}}|<tr><th>Sex</th><td>{{{sex}}}</td></tr>}}<!-- | ||
{{#if:{{{title|}}}| | -->{{#if:{{{race|}}}|<tr><th>Race</th><td>[[{{{race}}}]]</td></tr>}}<!-- | ||
<br><small>{{{title}}}</small> | -->{{#if:{{{creature|}}}|<tr><th>Creature type</th><td>{{{creature}}}</td></tr>}}<!-- | ||
}} | -->{{#if:{{{level|}}}|<tr><th>Level</th><td>{{{level}}}</td></tr>}}<!-- | ||
</th> | -->{{#if:{{{class|}}}|<tr><th>Class</th><td>[[{{{class}}}]]</td></tr>}}<!-- | ||
</tr> | -->{{#if:{{{affiliation|}}}|<tr><th>Affiliation(s)</th><td>{{{affiliation}}}</td></tr>}}<!-- | ||
{{#if:{{{image|}}}| | -->{{#if:{{{faffiliation|}}}|<tr><th>Former affiliation(s)</th><td>{{{faffiliation}}}</td></tr>}}<!-- | ||
<tr> | -->{{#if:{{{occupation|}}}|<tr><th>Occupation</th><td>{{{occupation}}}</td></tr>}}<!-- | ||
<td colspan="2" | -->{{#if:{{{foccupation|}}}|<tr><th>Former occupation(s)</th><td>{{{foccupation}}}</td></tr>}}<!-- | ||
[[File:{{{image}}}| | -->{{#if:{{{profession|}}}|<tr><th>Profession(s)</th><td>{{{profession}}}</td></tr>}}<!-- | ||
</td> | -->{{#if:{{{location|}}}|<tr><th>Location</th><td>{{{location}}}</td></tr>}}<!-- | ||
</tr> | -->{{#if:{{{status|}}}|<tr><th>Status</th><td>{{{status}}}</td></tr>}}<!-- | ||
}} | -->{{#if:{{{relatives|}}}|<tr><th>Relative(s)</th><td>{{{relatives}}}</td></tr>}}<!-- | ||
-->{{#if:{{{mentors|}}}|<tr><th>Mentor(s)</th><td>{{{mentors}}}</td></tr>}}<!-- | |||
{{#if:{{{sex|}}}| | -->{{#if:{{{students|}}}|<tr><th>Student(s)</th><td>{{{students}}}</td></tr>}}<!-- | ||
<tr> | -->{{#if:{{{companions|}}}|<tr><th>Companion(s)</th><td>{{{companions}}}</td></tr>}}<!-- | ||
<th | -->{{#if:{{{source|}}}|<tr><th>Source(s)</th><td>{{{source}}}</td></tr>}} | ||
<td>{{{sex}}}</td> | </table>[[category:NPCs]]</includeonly><noinclude> | ||
</tr> | {{#cargo_declare: | ||
}} | _table=NPCs | ||
|Name=String | |||
{{#if:{{{race|}}}| | |Faction=String | ||
<tr> | |Sex=String | ||
<th | |Race=Wikitext string | ||
<td>{{{race}}}</td> | |Creature_type=Wikitext string | ||
</tr> | |Level=String | ||
}} | |Class=Wikitext string | ||
|Affiliation=Wikitext string | |||
{{#if:{{{creature|}}}| | |Former_affiliation=Wikitext string | ||
<tr> | |Occupation=Wikitext string | ||
<th | |Former_occupation=Wikitext string | ||
<td>{{{creature}}}</td> | |Profession=Wikitext string | ||
</tr> | |Current_location=Wikitext string | ||
}} | |Status=String | ||
|Source=Wikitext string | |||
{{#if:{{{level|}}}| | |||
<tr> | |||
<th | |||
<td>{{{level}}}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{class|}}}| | |||
<tr> | |||
<th | |||
<td>{{{class}}}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{affiliation|}}}| | |||
<tr> | |||
<th | |||
<td>{{{affiliation}}}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{faffiliation|}}}| | |||
<tr> | |||
<th | |||
<td>{{{faffiliation}}}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{occupation|}}}| | |||
<tr> | |||
<th | |||
<td>{{{occupation}}}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{foccupation|}}}| | |||
<tr> | |||
<th | |||
<td>{{{foccupation}}}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{profession|}}}| | |||
<tr> | |||
<th | |||
<td>{{{profession}}}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{location|}}}| | |||
<tr> | |||
<th | |||
<td>{{{location}}}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{status|}}}| | |||
<tr> | |||
<th | |||
<td>{{{status}}}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{relatives|}}}| | |||
<tr> | |||
<th | |||
<td>{{{relatives}}}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{mentors|}}}| | |||
<tr> | |||
<th | |||
<td>{{{mentors}}}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{students|}}}| | |||
<tr> | |||
<th | |||
<td>{{{students}}}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{companions|}}}| | |||
<tr> | |||
<th | |||
<td>{{{companions}}}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{source|}}}| | |||
<tr> | |||
<th | |||
<td>{{{source}}}</td> | |||
</ | |||
}} | }} | ||
{{Documentation}} | {{Documentation}} | ||
[[category:Templates]] | |||
</noinclude> | </noinclude> | ||
Latest revision as of 12:31 AM, September 12, 2026
This template defines the table "NPCs". View table.
{{Npcbox
|name =
|faction =
|image =
|title =
|sex =
|race =
|creature =
|level =
|class =
|affiliation =
|faffiliation =
|occupation =
|foccupation =
|profession =
|location =
|status =
|relatives =
|mentors =
|students =
|companions =
|source =
}}
Any parameter can be dropped.
faction is used to display an icon beside the name. It must take one of the following variables or none at all:
alliancefor Alliance of Lordaeronhordefor Hordeashenfor Ashen Covenantguardiansfor Guardians of Hyjalneutralfor neutral partiescombatfor general enemies, such as wild animals or typically violent opponentsscourgefor Scourge
image takes a file name directly for display.
title appears directly under the character name.
creature is for an in-game classification, such as Humanoid, Beast, Demon, Mechanical, etc.
level is for an in-game character level in a numeric value, but it can accept any value ultimately.
affiliation is a character's direct loyalty, such as the Undercity for Forsaken. faffiliation is any former affiliations.
occupation is a character's job. foccupation is any former occupation.
profession is a character's particular skillset, such as leatherworking or blacksmithing.
location is the current location of the character.
status is whether a character is alive, dead, missing, etc.
relatives, mentors, and students are self-explanatory.
companions might be friends, tamed animals, etc.
source is where this character appears within the overall lore. This might perhaps just be "Personal lore" for new characters.