Items & Equipment
Relevant source files
The following files were used as context for generating this wiki page:
- core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java
- core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java
- core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/ArcaneResin.java
- core/src/main/java/com/shatterdpixel/shatteredpixeldungeon/ui/changelist/v2_X_Changes.java
- core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v1_X_Changes.java
- core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v0_9_X_Changes.java
- core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v0_7_X_Changes.java
- core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v0_4_X_Changes.java
The Items and Equipment system is a core component of Shattered Pixel Dungeon, providing the player with the tools necessary for survival and progression. The system encompasses a vast array of items, from weapons and armor to magical artifacts and consumable potions. These items are central to the game's roguelike nature, with randomized drops and properties ensuring each run is unique. The system is managed through the Hero's Belongings and tracked globally via the Catalog.
The item system has undergone significant evolution, including major reworks to item categories like weapons, wands, and artifacts, the introduction of a comprehensive alchemy crafting system, and the addition of entirely new item types like Trinkets. These changes, documented across numerous changelog files, have consistently aimed to increase strategic depth and gameplay variety.
Item Categorization and Tracking
The Catalog enum serves as the central registry for all discoverable items, enchantments, and glyphs in the game. It organizes items into logical categories and tracks player progress, such as which items have been identified and how many times they have been used.
Sources: core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java:140-164, 303-324
Catalog Structure
The Catalog is divided into two primary groups: equipmentCatalogs and consumableCatalogs. Each group contains several specific categories.
This diagram shows the high-level structure of the item catalog.
Tracking Mechanics
For each item class, the Catalog maintains two key pieces of information in LinkedHashMap structures:
seen: A boolean flag that tracks whether an item has been collected while identified. This is used for the in-game journal and for unlocking certain badges.useCount: An integer that tracks how many times an item has been used (for consumables) or how many upgrades have been spent on it (for equipment).
The Catalog class provides static methods like isSeen(), setSeen(), and countUse() to manage this data globally. Progress is saved to the game's Bundle during serialization.
Hero's Belongings
The Hero class manages its inventory and equipment through an inner class called Belongings. This class holds references to all items the hero possesses, whether equipped, in the backpack, or in specialized containers.
This diagram illustrates the relationship between the Hero, their Belongings, and the Items they carry.
The Belongings class contains fields for equipped items such as weapon, armor, two ring slots, and an artifact. It also manages the main backpack and specialized containers like the PotionBandolier and ScrollHolder.
Sources: core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java:1010-1017, core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v2_X_Changes.java:132, core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v0_2_X_Changes.java:125-126
Equipment Types
Equipment items are persistent items that provide passive or active benefits. They are generally upgradeable.
Weapons
Weapons are divided into melee and ranged (thrown) categories and are organized into five tiers of power.
| Category | Description |
|---|---|
| Melee Weapons | Used for close-quarters combat. Includes swords, axes, maces, etc. Organized in tiers 1-5. |
| Thrown Weapons | Consumable ranged weapons. Can be upgraded to increase durability and damage. Overhauled in v0.6.3 to use a durability system. Further changed in v3.2.0 to spawn in sets of three. |
Enchantments are magical properties that can be applied to weapons, granting them special on-hit effects. Examples include Blazing, Chilling, and Vampiric. The enchantment system was significantly overhauled in v0.7.2 to focus more on utility than raw damage.
Sources: core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java:204-209, 216-221, core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v0_7_X_Changes.java:825-842, core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v0_6_X_Changes.java:806-821, core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v3_X_Changes.java:626-646
Armor
Armor provides damage reduction (DR) and can be enhanced with Glyphs. Glyphs are magical inscriptions that grant special defensive properties, such as Thorns (reflecting damage) or Viscosity (deferring damage). Like enchantments, glyphs were overhauled in v0.4.0 and v0.6.5 to be more about unique effects.
Sources: core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java:211, 223-228, core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v0_4_X_Changes.java:264-273, core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v0_6_X_Changes.java:214-230
Magical Equipment
- Wands: Magical items that can be zapped to produce a variety of effects, from damaging bolts to utility spells. They recharge over time. The wand system was reworked in v0.3.0.
- Rings: Provide passive bonuses to the hero's stats, such as increased strength (
Ring of Might) or faster attack speed (Ring of Furor). - Artifacts: Unique items with powerful, chargeable abilities. They were introduced in v0.2.0, replacing several old rings. Examples include the
Cloak of ShadowsandTimekeeper's Hourglass.
Sources: core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java:230-236, core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v0_3_X_Changes.java:480-505, core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v0_2_X_Changes.java:411-428
Trinkets
Trinkets are a newer category of item introduced in v2.4.0. They are produced and upgraded via alchemical energy and are designed to tweak gameplay variables rather than providing direct power. A Trinket Catalyst is found early in the game to produce one of three initial options.
| Trinket Example | Effect |
|---|---|
| Salt Cube | Extends food satiety duration but reduces HP regeneration. |
| Vial of Blood | Increases healing from major sources but slows the healing rate. |
| Shard of Oblivion | Increases loot drops from enemies when wearing unidentified equipment. |
| Chaotic Censer | Randomly spreads harmful gasses nearby. |
| Ferret Tuft | Increases evasion for all characters, including enemies. |
Sources: core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v2_X_Changes.java:80-99, 755-764, core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v3_X_Changes.java:1012-1021
Alchemy and Crafting
The Alchemy system, overhauled in v0.7.0, allows players to craft a wide variety of consumables and special items. It revolves around Alchemical Energy, a resource gained from alchemy pots or by breaking down other consumable items.
Sources: core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v0_7_X_Changes.java:1320-1331, core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v1_X_Changes.java:1066-1084
Crafting Process
The general flow for crafting an item via alchemy is as follows:
Recipes
Recipes are implemented as inner classes extending com.shatteredpixel.shatteredpixeldungeon.items.Recipe. A recipe defines the required ingredients, energy cost, and the resulting item.
For example, the recipe for ArcaneResin involves sacrificing a wand to produce a quantity of resin, which can then be used to upgrade other wands.
// core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/ArcaneResin.java:131-171
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe {
@Override
public boolean testIngredients(ArrayList<Item> ingredients) {
return ingredients.size() == 1
&& ingredients.get(0) instanceof Wand
&& ingredients.get(0).cursedKnown
&& !ingredients.get(0).cursed;
}
@Override
public int cost(ArrayList<Item> ingredients) {
return 5;
}
@Override
public Item brew(ArrayList<Item> ingredients) {
// ... logic to create ArcaneResin ...
}
}
Sources: core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/ArcaneResin.java:131-171
The alchemy system has been expanded over time to include:
- Exotic Potions and Scrolls: Crafted by mixing a standard potion/scroll with other ingredients. (v0.7.0)
- Catalysts: Formerly required for high-cost recipes, they were removed in v2.4.0 to streamline the system.
- Spells: Powerful single-use items crafted from rare ingredients.
Sources: core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v0_7_X_Changes.java:1350-1378, core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/v2_X_Changes.java:828-831
Summary
The Items and Equipment of Shattered Pixel Dungeon form a deep and interconnected system that is fundamental to the gameplay loop. From the basic tiered structure of weapons and armor to the complex crafting possibilities of the alchemy system, item management offers players a wide range of strategic choices. The Catalog provides a robust framework for tracking hundreds of items, while the Hero.Belongings class manages the player's direct interaction with them. The system's continuous evolution, as seen through numerous updates, reflects a design philosophy that prioritizes variety, balance, and strategic depth.