From GamingWiki
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Get a listing of major NPCs in the given campaign. | Get a listing of major NPCs in the given campaign. | ||
− | The | + | The only argument to this template is the campaign name, and if that is omitted the "campaign" property of the current page will be used. |
− | <onlyinclude><!-- | + | <!-- |
− | -->{{#vardefine: campaign | {{{1| {{#show: {{PAGENAME}} | ?campaign}} }}} }}<!-- | + | |
+ | --><onlyinclude><!-- | ||
+ | -->{{#vardefine: campaign | {{{1| {{#show: {{PAGENAME}} | ?campaign#}} }}} }}<!-- | ||
+ | -->{{#vardefine: limit | {{{limit|}}} }}<!-- | ||
+ | --></onlyinclude><!-- | ||
--> | --> | ||
− | + | Here is what this template looks like when called on a page belonging to the {{#vardefineecho: campaign|Humans are the Worst}} campaign, limiting the number of results to {{#vardefineecho: limit|5}}: | |
− | <!-- | + | |
+ | <pre> | ||
+ | {{NPC listing}} | ||
+ | </pre> | ||
+ | |||
+ | <onlyinclude><!-- | ||
− | -->{{#ask: [[ | + | -->{{#if: {{#var:campaign}} | <!-- |
− | |?high concept= | + | -->{{#ask: [[NPC in campaign::{{#var:campaign}}]] |
− | | format = ul | + | |?high concept= |
− | | template = SMW character list item | + | | format = ul |
− | | default =: No | + | | limit = {{#var:limit}} |
− | }}<!-- | + | | order = {{#if: {{#var:limit}}|random|asc}} |
+ | | template = SMW character list item | ||
+ | | default =: No NPCs found for campaign: [[{{#var:campaign}}]] | ||
+ | }}<!-- | ||
+ | -->|''template error: no campaign name provided''<!-- | ||
+ | -->}}<!-- | ||
--></onlyinclude> | --></onlyinclude> | ||
+ | [[Category: campaign templates]] |
Latest revision as of 01:59, 6 July 2014
Get a listing of major NPCs in the given campaign.
The only argument to this template is the campaign name, and if that is omitted the "campaign" property of the current page will be used.
Here is what this template looks like when called on a page belonging to the Humans are the Worst campaign, limiting the number of results to 5:
{{NPC listing}}
{{#ask: NPC in campaign::Humans are the Worst
|?high concept= | format = ul | limit = 5 | order = random | template = SMW character list item | default =: No NPCs found for campaign: Humans are the Worst }}