Difference between revisions of "Template:NPCLootTable/row"
Jump to navigation
Jump to search
A) With a NPC
B) With
(Add NPCTable/row copy.) |
m (Removed unused data.) |
||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
--- Define variables, goal is to only load each property from the Data page once. --- | --- Define variables, goal is to only load each property from the Data page once. --- | ||
-->{{#vardefine:Exists|{{#ifeq: {{:Friendly data|{{{1}}}|Occupation}}|NPC {{{1}}} does not exist in [[Friendly data]].||{{:Friendly data|{{{1}}}|Occupation}}}}}}<!-- | -->{{#vardefine:Datastring|{{:NPCLoot data|{{{1}}}}}}}<!-- | ||
-->{{#vardefine:Name|{{:Friendly data|{{{1}}}|Name}}}}<!-- | -->{{#vardefine:Exists|{{#ifeq: {{:Friendly data|{{{1}}}|Occupation}}|NPC {{{1}}} does not exist in [[Friendly data]].||{{:Friendly data|{{{1}}}|Occupation}}}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Name|{{:Friendly data|{{{1}}}|Name}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Trader|{{:Friendly data|{{{1}}}|Trader}}}}<!-- | ||
--> | -->{{#vardefine:Buy|{{:NPCLoot data|{{{1}}}|Buy}}}}<!-- | ||
--> | |||
|- | |||
--> | <!-- Second column --> | ||
| {{:Friendly data|{{{1}}}|Occupation}} | |||
| {{:Friendly data|{{{1}}}|Occupation}} | | {{#if:{{#var:Exists}}|[[File:{{#if:{{#var:Image}}|{{#var:Image}}|{{{1}}}.png}}|37px|link={{#if:{{#var:Name}}|{{#if:{{#pos:{{lc:{{#var:Name}}}}|random}}||{{Translate|{{#var:Name}}|NPCNames}}}}|{{Translate|{{{1}}}|NPCNames}}}}]]<!-- | ||
| {{#if:{{#var:Exists}}|[[File:{{#if:{{#var:Image}}|{{#var:Image}}|{{{1}}}.png}}|37px|link={{#if:{{#var:Name}}|{{#if:{{#pos:{{lc:{{#var:Name}}}}|random}}||{{Translate|{{#var:Name}}|NPCNames}}}}|{{Translate|{{{1}}}|NPCNames}}}}]]<!-- | --- Extra images for NPC entries like generic guards or peasants. Many face images with no link. --- | ||
--- Extra images for NPC entries like generic guards or peasants. Many face images with no link. --- | -->{{#if:{{#var:Image2}}|[[File:{{#var:Image2}}|37px|link=]]}}<!-- | ||
-->{{#if:{{#var:Image2}}|[[File:{{#var:Image2}}|37px|link=]]}}<!-- | --><br>{{#if:{{#var:Name}}|{{#if:{{#pos:{{lc:{{#var:Name}}}}|random}}|{{Translate|{{#var:Name}}|NPCNames}}|[[{{Translate|{{#var:Name}}|NPCNames}}]]}}|[[{{Translate|{{{1}}}|NPCNames}}]]}}}}<!-- | ||
-->{{#if:{{#var:Exists}}|{{#if:{{:Friendly data|{{{1}}}|Quest}}|'''✓'''}}}}{{#if:{{{2|}}}|<sup>{{{2|}}}</sup>}}<!-- | |||
--></includeonly><noinclude>{{doc|Template:NPCLootTable/row}}[[Category:Templates]]</noinclude> | |||
--><br>{{#if:{{#var:Name}}|{{#if:{{#pos:{{lc:{{#var:Name}}}}|random}}|{{Translate|{{#var:Name}}|NPCNames}}|[[{{Translate|{{#var:Name}}|NPCNames}}]]}}|[[{{Translate|{{{1}}}|NPCNames}}]]}}}} | |||
--></includeonly><noinclude>{{doc|Template: |
Revision as of 02:24, 26 January 2025
![]() |
This article is a stub. You can help Stoneshard wiki by expanding it. |
This Template is used to display every category & type of items a NPC trades.
Syntax
{{NPCTable/head}}
Usage
The header is always followed by the {{NPCLootTable/row}}
, according to the necessary amount of NPCs to be display.
{{NPCLootTable/head|Bert}}
{{NPCLootTable/row}}
|}
Any NPC Loot information added in NPCLoot data, can be used with the '/row' template.
Examples
A) With a NPC {{NPCLootTable/head|Bert}}
:
Category | Types |
---|
B) With {{NPCLootTable/head|Bert}}
& {{NPCLootTable/row|NPC*}}
:
Trades
Bert as example
Buys
- With "head|Bert|Buys", "Buys" & "end"
Bert Buys | ||||||||
---|---|---|---|---|---|---|---|---|
Category | Types | |||||||
Merchant | ![]() Bert✓Buys | |||||||
{{{2}}}) |
- With "head" & "Buys"
Category | Types |
---|---|
Merchant | ![]() Bert✓Buys |
Sells
- With "head", "Sells" & "end"
Category | Types | |||||||
---|---|---|---|---|---|---|---|---|
Merchant | ![]() Bert✓Sells | |||||||
{{{2}}}) |
- With "head|Bert|Sells" & "SellsX3"
Bert Sells | |
---|---|
Category | Types |
Merchant | ![]() Bert✓Sells |
Merchant | ![]() Bert✓Sells |
Merchant | ![]() Bert✓Sells |
- With "head" & "SellsX2"
Category | Types |
---|---|
Merchant | ![]() Bert✓Sells |
Merchant | ![]() Bert✓Sells |