Template:NPC Text: Difference between revisions

From City of Heroes: Rebirth Wiki
Jump to navigation Jump to search
imported>Sekoia
(adding option to specify title)
(Header Color Fix)
 
(20 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{Hidden|{{{title|}}}|NPC Text|{{{text|{{{1}}}}}}|headercss = background: #ccccff;|contentcss = border: #ccccff solid 1px;}}</includeonly><noinclude>This template is used for adding NCP text to a mission article.
<includeonly>{{Hidden|header={{{title|NPC Text}}}|content={{{text|'''Please supply text. See [[Template:NPC Text]] for usage.'''}}}|headercss = background:
 
{{#switch: {{{type|}}} | hero=#0B3C5D| villain=#b91e25| #default=#0B3C5D}};
This:
color: white;
:<nowiki>{{NPC Text|Person A: This is an example.<br />Person B: That's so cool!}}</nowiki>
border: solid 2px #D9B310
 
{{#switch: {{{type|}}} | hero=#0B3C5D| villain=#b91e25| #default=#0B3C5D}};|contentcss: padding: 5px; border: solid 1px
Results in this:
{{#switch: {{{type|}}} | hero=#0B3C5D| villain=#b91e25| #default=#0B3C5D}}; border-top: 0px;}}</includeonly><noinclude>{{Documentation}}</noinclude>
 
{{NPC Text|Person A: This is an example.<br />Person B: That's so cool!}}
 
You can also specify a title.
:<nowiki>{{NPC Text|title=Example Dialog|Person A: This is an example.<br />Person B: That's so cool!}}</nowiki>
 
Result:
{{NPC Text|title=Example Dialog|Person A: This is an example.<br />Person B: That's so cool!}}
 
And you can also call it like this if you want:
 
:<nowiki>{{NPC Text|title=Example Dialog|text=Person A: This is an example.<br />Person B: That's so cool!}}</nowiki>
 
Result:
{{NPC Text|title=Example Dialog|text=Person A: This is an example.<br />Person B: That's so cool!}}
[[Category:Templates]]</noinclude>

Latest revision as of 03:58, 16 November 2019

[edit] [purge] Documentation

Usage

This template is used for adding NPC text to a mission article.

Normal usage:

{{NPC Text|title=Example dialogue|text=Person A: This is an example.<br />Person B: That's so cool!}}

Result:

Example dialogue 

Person A: This is an example.
Person B: That's so cool!


If omitted, title= defaults to "NPC Text".

You can also use the type= flag to specify hero or villain to get different results.

{{NPC Text|type=hero|text=Person A: This is an example.<br />Person B: That's so cool!}}
NPC Text 

Person A: This is an example.
Person B: That's so cool!


{{NPC Text|type=villain|text=Person A: This is an example.<br />Person B: That's so cool!}}
NPC Text 

Person A: This is an example.
Person B: That's so cool!


See also