Difference between revisions of "NPCLoot data"

From Stoneshard wiki
Jump to navigation Jump to search
m
Line 26: Line 26:


You can base it on the old NPC page, and list the types of items he sells like:
You can base it on the old NPC page, and list the types of items he sells like:
Logic to implement:
If Trader=1, show template, else "This NPC is not a trader.".
If Sells exists, show it, else "This NPC does not sell anything.".
 


If a parameter is empty (for example, [[Bert]] does not Sell any Jewelry), it can be left empty or omitted completely.<br>
If a parameter is empty (for example, [[Bert]] does not Sell any Jewelry), it can be left empty or omitted completely.<br>
Here are two examples of NPCLoot data syntax, these two would produce the same result:
Here are two examples of NPCLoot data syntax, these two would produce the same result:


<nowiki>
  <nowiki>
|Bert = {{#switch:{{{2}}}
|Bert = {{#switch:{{{2}}}
   | Buys = Beverages;Armor;Books;Drugs;Food;Jewelry;Medicine;Potions;Tools;Weapons;Valuables
   | Buys = Beverages;Armor;Books;Drugs;Food;Jewelry;Medicine;Potions;Tools;Weapons;Valuables
Line 50: Line 42:
| #default = }}</nowiki>
| #default = }}</nowiki>


<nowiki>
    <nowiki>
|Bert = {{#switch:{{{2}}}
|Bert = {{#switch:{{{2}}}
   | Buys = Beverages;Armor;Books;Drugs;Food;Jewelry;Medicine;Potions;Tools;Weapons;Valuables
   | Buys = Beverages;Armor;Books;Drugs;Food;Jewelry;Medicine;Potions;Tools;Weapons;Valuables

Revision as of 01:39, 27 January 2025

Page for all Stoneshard NPC Loot data. [TEST]

---

NPCLoot data is maintained manually (for now).


Usage

The idea is to define this simple template and later on update it to a more complex one, with more parameters and options, if needed.
The parameters are as follows:

 Category;Weapons;Armor;Jewelry;Artifacts;Treatises;Loot;Food;Beverages;Potions;Ingredients;Drugs;Medicine;Scrools;Ammunition;Tools;Traps

Possible updates could include:

 Weapons(Swords;Axes;Maces;Daggers;THSwords;THAxes;THMaces;Spears;Ranged Weapons;Shields;Staves);Armor;Jewelry;Artifaccts;Treatises;Loot;Food;Beverages;Potions;Ingredients;Drugs;Medicine;Scrools;Ammunition;Tools;Traps


This template "integrates" with Friendly data template, which will be used to gather the data needed for each NPC.

Update Data

The idea here, is to centralize only what the NPCs trade. Buying and selling prices are not needed, as they are already in the determined data pages.

You can base it on the old NPC page, and list the types of items he sells like:

If a parameter is empty (for example, Bert does not Sell any Jewelry), it can be left empty or omitted completely.
Here are two examples of NPCLoot data syntax, these two would produce the same result:

 
|Bert = {{#switch:{{{2}}}
  | Buys = Beverages;Armor;Books;Drugs;Food;Jewelry;Medicine;Potions;Tools;Weapons;Valuables
  | Sells = Weapons;Armor;Jewelry;Medicine;Valuables;Food;Junk
  | Weapons = Training Crossbow
  | Armor = Travelling Shoes
  | Beverages = Mannshire Fortified
  | Food = Bread;Cheese;Morel
  | Medicine = Bandage;Healing Salve;Herbal Extract
  | Tools = Hammer;Pickaxe;Bedroll
| #default = }}
   
|Bert = {{#switch:{{{2}}}
  | Buys = Beverages;Armor;Books;Drugs;Food;Jewelry;Medicine;Potions;Tools;Weapons;Valuables
  | Sells = Weapons;Armor;Jewelry;Medicine;Valuables;Food;Junk
  | Weapons = Training Crossbow
  | Armor = Travelling Shoes
  | Jewelry = 
  | Beverages = Mannshire Fortified
  | Food = Bread;Cheese;Morel
  | Medicine = Bandage;Healing Salve;Herbal Extract
  | Tools = Hammer;Pickaxe;Bedroll
| #default = }}

Used by:

Bert test