Skip to content

Equipment, loot, and crafting

Use these components to turn session inventory into weapons, armor, tools, enemy drops, and recipes. The game server owns every grant and multiplier.

Give the player equipment

  1. Select the Player object.
  2. Choose Add component → Equipment. Workshop adds Inventory if it is missing.
  3. Add one item per line in the Equipment inspector: item ID, player-facing label, slot, attack multiplier, damage-taken multiplier, terrain-damage multiplier, and whether it auto-equips.
  4. Place a normal Inventory pickup, Loot object, or Crafting station that produces the same item ID and label.

There is one equipped item in each weapon, armor, and tool slot. A weapon multiplies authoritative attack damage. Armor multiplies damage received; 0.5 means half damage. A tool multiplies damage against diggable Terrain. Auto-equip replaces the current item in that slot when the new item enters inventory.

Drop loot from an object

Add Loot to an object that already has Health, or place the ready-made Loot crate. Each line declares an item, minimum and maximum quantity, and a chance from 0 to 1. The server uses the Rift's deterministic random state when an authoritative player attack defeats the object.

Loot is added directly to that player's Inventory. If the Inventory has no slot or the result would exceed its stack limit, that entry is not granted. A loot table does not create a loose world object.

Add a crafting recipe

Place the ready-made Crafting station, or add Crafting to an object with a Transform and sensor Collider. Declare a recipe ID and label, then its required inputs and produced outputs. When a player overlaps the sensor, the server checks the complete recipe, consumes all inputs, and adds all outputs as one authoritative operation. If any input is missing or the outputs do not fit, nothing changes.

For example, 2 Scrap → 1 Ingot needs a project definition for Scrap (a pickup or loot entry) and defines Ingot through the output label. The same item ID must use the same label everywhere in the project.

Save equipped items

On the Player's Persistent save component, enable both Inventory and Equipment. Save state v2 stores equipped item IDs alongside inventory quantities. Loading revalidates every ID against the immutable published Rift; an item absent from inventory or the Player's Equipment catalog is rejected.

Equipment is local to this Rift's authoritative save. It is not a platform cosmetic, Coin balance, marketplace item, or transferable account possession.

See Session inventory and pickups, Combat and enemies, Terrain and world settings, Persistent saves, and the generated component reference.

PixelRifts creator documentation · generated reference · protocol 21