Template:RegionalNPCs: Difference between revisions

From IdleOn MMO Wiki
(Created page with "<noinclude> <!-- ### Cargo Declare ### --> {{#cargo_declare:_table=NPCs |MapLocation=String |QuestCount=Integer |NPCType=String }} </noinclude> <!-- ### Carge Store ### --> <includeonly> {{Npctable/head|{{{title}}}}} {{#cargo_query:tables=NPCs |fields=_pageName=%PAGE%,MapLocation=location,QuestCount=noquest |where=(MapLocation IN ({{{areas}}})) AND (NPCType IN ({{{npctypes}}})) |format=template |template=Npc/row |named args=yes }} |} </includeonly> <!-- ### Usage...")
 
No edit summary
Line 13: Line 13:
{{#cargo_query:tables=NPCs
{{#cargo_query:tables=NPCs
|fields=_pageName=%PAGE%,MapLocation=location,QuestCount=noquest
|fields=_pageName=%PAGE%,MapLocation=location,QuestCount=noquest
|where=(MapLocation IN ({{{areas}}})) AND (NPCType IN ({{{npctypes}}}))
|where=(MapLocation IN ({{{areas}}})) AND (NPCType IN ({{{npctypes|NPC}}}))
|format=template
|format=template
|template=Npc/row
|template=Npc/row

Revision as of 21:40, 17 May 2023

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



Renders NPCs and their location from the "NPCs" Cargo table

Usage:
{{WorldNPCs
|title=example (title of the section for that sub-table | remark: this might truly make it not worth for this template, which should just define a single title I guess
|areas=example,example
|npctypes=example,example ("NPC", if omitted)
}}