Difference between revisions of "Template:NPCLootTable/row"
Jump to navigation
Jump to search
A) With a NPC
B) With
m (Partially working.) |
m (Fix base idea. Clear code.) |
||
Line 3: | Line 3: | ||
-->{{#vardefine:Datastring|{{:NPCLoot data|{{{1}}}}}}}<!-- | -->{{#vardefine:Datastring|{{:NPCLoot data|{{{1}}}}}}}<!-- | ||
-->{{#vardefine:Exists|{{#ifeq: {{:Friendly data|{{{1}}}|Occupation}}|NPC {{{1}}} does not exist in [[Friendly data]].||{{:Friendly data|{{{1}}}|Occupation}}}}}}<!-- | -->{{#vardefine:Exists|{{#ifeq: {{:Friendly data|{{{1}}}|Occupation}}|NPC {{{1}}} does not exist in [[Friendly data]].||{{:Friendly data|{{{1}}}|Occupation}}}}}}<!-- | ||
-->{{#vardefine:Name|{{:Friendly data|{{{1}}}|Name}}}}<!-- | -->{{#vardefine:Name|{{:Friendly data|{{{1}}}|Name}}}}<!-- | ||
-->{{#vardefine:Trader|{{:Friendly data|{{{1}}}|Trader}}}}<!-- | -->{{#vardefine:Trader|{{:Friendly data|{{{1}}}|Trader}}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine:Category|{{{2}}}}}<!-- | ||
-->{{#vardefine:CategoryData|{{:NPCLoot data|{{{1}}}|{{#var:Category}}}}}}<!-- | |||
--> | --> | ||
|- | |- | ||
<!-- Second column --> | <!-- Second column --> | ||
| | | Armor<br>[[File:Armor_icon.png|42px|link=|]] | ||
| {{#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. --- | ||
Line 16: | Line 16: | ||
--><br>{{#if:{{#var:Name}}|{{#if:{{#pos:{{lc:{{#var:Name}}}}|random}}|{{Translate|{{#var:Name}}|NPCNames}}|[[{{Translate|{{#var:Name}}|NPCNames}}]]}}|[[{{Translate|{{{1}}}|NPCNames}}]]}}}}<!-- | --><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:{{:NPCLoot data|{{{1}}}|Quest}}|'''✓'''}}}}{{#if:{{{2|}}}|<sup>{{{2|}}}</sup>}}<!-- | -->{{#if:{{#var:Exists}}|{{#if:{{:NPCLoot data|{{{1}}}|Quest}}|'''✓'''}}}}{{#if:{{{2|}}}|<sup>{{{2|}}}</sup>}}<!-- | ||
<!-- Display items in the specified category --> | |||
{{#explode:{{#var:CategoryData}}|;|1}} [[File:{{#explode:{{#var:CategoryData}}|;|1}}_icon.png|37px|link={{#explode:{{#var:CategoryData}}|;|1}}]]<!-- | |||
-->{{#if:{{#explode:{{#var:CategoryData}}|;|2}}|{{#explode:{{#var:CategoryData}}|;|2}} [[File:{{#explode:{{#var:CategoryData}}|;|2}}_icon.png|37px|link={{#explode:{{#var:CategoryData}}|;|2}}]]}}<!-- | |||
-->{{#if:{{#explode:{{#var:CategoryData}}|;|3}}|{{#explode:{{#var:CategoryData}}|;|3}} [[File:{{#explode:{{#var:CategoryData}}|;|3}}_icon.png|37px|link={{#explode:{{#var:CategoryData}}|;|3}}]]}}<!-- | |||
-->{{#if:{{#explode:{{#var:CategoryData}}|;|4}}|{{#explode:{{#var:CategoryData}}|;|4}} [[File:{{#explode:{{#var:CategoryData}}|;|4}}_icon.png|37px|link={{#explode:{{#var:CategoryData}}|;|4}}]]}}<!-- | |||
-->{{#if:{{#explode:{{#var:CategoryData}}|;|5}}|{{#explode:{{#var:CategoryData}}|;|5}} [[File:{{#explode:{{#var:CategoryData}}|;|5}}_icon.png|37px|link={{#explode:{{#var:CategoryData}}|;|5}}]]}}<!-- | |||
-->{{#if:{{#explode:{{#var:CategoryData}}|;|6}}|{{#explode:{{#var:CategoryData}}|;|6}} [[File:{{#explode:{{#var:CategoryData}}|;|6}}_icon.png|37px|link={{#explode:{{#var:CategoryData}}|;|6}}]]}}<!-- | |||
--></includeonly><noinclude>{{doc|Template:NPCLootTable/row}}[[Category:Templates]]</noinclude> | --></includeonly><noinclude>{{doc|Template:NPCLootTable/row}}[[Category:Templates]]</noinclude> |
Revision as of 06:08, 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 | |||||||
Armor![]() |
![]() BertBuys Scrolls | |||||||
{{{2}}}) |
- With "head" & "Buys"
Category | Types |
---|---|
Armor![]() |
![]() BertBuys Scrolls |
Sells
- With "head", "Sells" & "end"
Category | Types | |||||||
---|---|---|---|---|---|---|---|---|
Armor![]() |
![]() BertSells Armor | |||||||
{{{2}}}) |
- With "head|Bert|Sells" & "SellsX3"
Bert Sells | |
---|---|
Category | Types |
Armor![]() |
![]() BertSells Armor |
Armor![]() |
![]() BertSells Armor |
Armor![]() |
![]() BertSells Armor |
- With "head" & "SellsX2"
Category | Types |
---|---|
Armor![]() |
![]() BertSells Armor |
Armor![]() |
![]() BertSells Armor |