Loot: Difference between revisions

From PSwiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 7: Line 7:
2.1) Special chests, declared as 'CONSUMABLE' . This is the current list of items:
2.1) Special chests, declared as 'CONSUMABLE' . This is the current list of items:


* Hardened crate
* Hardened treasure crate
* Adorned Crate
* Adorned treasure Crate
* Sturdy Chest
* Sturdy treasure Chest
* Metal Chest
* Metal treasure Chest
* Reinforced Chest
* Reinforced treasure Chest
* Wide Chest
* Wide treasure Chest
* Ancient Chest
* Ancient treasure Chest
*Jeweled Chest
*Jeweled treasure Chest


These have a special consume script stored in [[ItemStatsTable|item_stats.consume_script]] which is pointing to a [[ProgressionEventsTable|progression event]] . This can be the legacy 'treasure_chest' script looking at the base price and scaling rewards accordingly, OR it can be a new script using the [[ProgressionEvents#LootSetOp|LootSetOp]] which points to [[Loot rulesTable|loot_rules.id]].
These have a special consume script stored in [[ItemStatsTable|item_stats.consume_script]] which is pointing to a [[ProgressionEventsTable|progression event]] . This can be the legacy 'treasure_chest' script looking at the base price and scaling rewards accordingly, OR it can be a new script using the [[ProgressionEvents#LootSetOp|LootSetOp]] which points to [[Loot rulesTable|loot_rules.id]].

Latest revision as of 20:58, 21 July 2026

You can get loot through a number of methods:

1) Through quests, we have the possibility to reward players items or money. See Give script directive. At the moment this cannot be randomized.

2) Harvesting loot items from Hunt Locations and Natural Resources, which spawn items on the ground or allow you to dig for items. At the moment this cannot be randomized. Only quality changes when harvesting.

2.1) Special chests, declared as 'CONSUMABLE' . This is the current list of items:

  • Hardened treasure crate
  • Adorned treasure Crate
  • Sturdy treasure Chest
  • Metal treasure Chest
  • Reinforced treasure Chest
  • Wide treasure Chest
  • Ancient treasure Chest
  • Jeweled treasure Chest

These have a special consume script stored in item_stats.consume_script which is pointing to a progression event . This can be the legacy 'treasure_chest' script looking at the base price and scaling rewards accordingly, OR it can be a new script using the LootSetOp which points to loot_rules.id.

2.2) For Procedural Dungeon Generation we added a new feature. The chests are generated with a defined item_quality, which will determine the loot rule to use. In psScheduleItem::CreateItem() we set the quality, and then the consume script (treasure_chest_rnd_loot) uses the quality to determine the loot rules. The chest used is ID 7111 (Arcana treasure Chest).

3) Killing creatures will allow players to loot. Loot is defined in characters.npc_addl_loot_category_id field, which points to loot_rules.id , and then to loot_rule_details table. Here we can control the list of items and the % of chance to be random.

4) Buy from merchants. Any item present in the inventory of a NPC in a bulk slot can be bought is the NPC is a merchant. This is defined in table merchant_item_categories where all item categories are listed for this NPC.

5) Generated events:

  • may spawn chests or puzzles providing rewards. in this case we may spawn a chest listed in point 2.1) above, but we will then specify in the event XML the traps properties.
  • may spawn creatures with special loot tables, see point 3) above
  • may spawn merchants with special goods to sell, see point 4) above

6) Main loot and furniture loot in generated dungeons