Template:NPC: Difference between revisions
Template page
More actions
Aurelianus (talk | contribs) Add reusable infobox picture field and fallback |
Aurelianus (talk | contribs) Use native image field fallback without ParserFunctions |
||
| Line 8: | Line 8: | ||
<div class="hw-infobox-title">{{{name|{{PAGENAME}}}}}</div> | <div class="hw-infobox-title">{{{name|{{PAGENAME}}}}}</div> | ||
<div class="hw-infobox-image" role="group" aria-label="Image for {{{name|{{PAGENAME}}}}}"> | <div class="hw-infobox-image" role="group" aria-label="Image for {{{name|{{PAGENAME}}}}}"> | ||
{{{image|<div class="hw-infobox-image-empty">No Picture Uploaded</div>}}} | |||
</div> | </div> | ||
<div class="hw-infobox-heading">Profile</div> | <div class="hw-infobox-heading">Profile</div> | ||
| Line 59: | Line 59: | ||
Set <code>| image = Example.png</code> to display an uploaded file in the infobox. Leave it empty to show “No Picture Uploaded”. | Set <code>| image = [[File:Example.png|frameless|600px]]</code> to display an uploaded file in the infobox. Leave it empty to show “No Picture Uploaded”. | ||
[[Category:Infobox templates]] | [[Category:Infobox templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 09:33, 29 July 2026
This template displays an NPC profile followed by embedded Quest and Dialogue sections. The quests and dialogues fields accept any number of stacked quest or dialogue templates.
Usage
{{NPC
| name = Rowan
| photo = Rowan.png
| location = [[Mainland]]
| number of quests = 2
| follow up quests = Yes
| has dialogue = Yes
| quests =
{{Quest
| name = First Quest
| giver = [[Rowan]]
}}
{{Quest
| name = Second Quest
| giver = [[Rowan]]
}}
| dialogues =
{{Dialogue start|title=Introduction}}
:'''[[Rowan]]:''' Welcome.
{{Dialogue end}}
}}
Use number of quests = 0 and leave the content fields empty when none are documented.
Set | image = File:Example.png to display an uploaded file in the infobox. Leave it empty to show “No Picture Uploaded”.