Jump to content

Template:NPCEntry: Difference between revisions

From Apogea Wiki
Dane (talk | contribs)
Fix expression error - use #switch instead of #ifexpr for #pos checks (via update-page on MediaWiki MCP Server)
Dane (talk | contribs)
Add default_form:NPC, fix category logic using #ifeq (via update-page on MediaWiki MCP Server)
Line 9: Line 9:
{{Documentation}}
{{Documentation}}
[[Category:Data templates]]
[[Category:Data templates]]
</noinclude><includeonly>{{#cargo_store:_table=NPCs
</noinclude><includeonly>{{#default_form:NPC}}{{#cargo_store:_table=NPCs
|name={{{name|}}}
|name={{{name|}}}
|sprite={{{sprite|{{{name|}}}}}}
|sprite={{{sprite|{{{name|}}}}}}
Line 15: Line 15:
|type={{{type|}}}
|type={{{type|}}}
|trainer={{{trainer|}}}
|trainer={{{trainer|}}}
}}{{#ifeq:{{NAMESPACE}}||[[Category:NPCs]]{{#switch:{{#pos:{{{type|}}}|Merchant}}|=|#default=[[Category:Merchants]]}}{{#switch:{{#pos:{{{type|}}}|Quest Giver}}|=|#default=[[Category:Quest Givers]]}}{{#if:{{{trainer|}}}|[[Category:Trainers]]}}}}</includeonly>
}}{{#ifeq:{{NAMESPACE}}||[[Category:NPCs]]{{#ifeq:{{#pos:{{{type|}}}|Merchant}}|||[[Category:Merchants]]}}{{#ifeq:{{#pos:{{{type|}}}|Quest Giver}}|||[[Category:Quest Givers]]}}{{#if:{{{trainer|}}}|[[Category:Trainers]]}}}}</includeonly>

Revision as of 18:30, 30 January 2026

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

Documentation

Template:NPCEntry/doc

The above documentation is transcluded from Template:NPCEntry/doc. Edit