Forge of Fortune: Diablo-Style Item Stats, Affixes, Sets and Uniques Kit
- ..
- .metadata323 B
- README.md2.0 KB
- schema.yaml943 B
README.md
gearBase (dataType contract)
One kind of gear that gearStatsKit can roll: a sword, a helmet, a ring. Every .data asset bound to gearStatsKit.gearBase anywhere in a world is found by itself, so a game adds a new weapon or armour type by adding one data file and no code (or Gear.defineBase(raw) from code).
A rolled item reuses the look of an inventoryKit item (item): its icons in the bag, its 3D model on the ground and in the hand, and its hold placement. The base's own numbers are the item's implicit stats at item level 1; gearStatsKit scales them with item level and the rarity's quality multiplier, then adds random affixes on top.
| Field | Meaning |
|---|---|
id | The base id used in rolled item ids (gk-<id>-r3-l12-s48213). Letters, digits and _ only. Never change it once players hold items of it. |
name, nameScifi | The base's name in the item's name ("Sword" / "Plasma Blade"), by naming theme. |
kind | weapon, armour or jewelry. Decides which affixes it can roll. Jewelry has no implicit stats, only affixes. |
slot | The inventoryKit equipment slot: head, chest, legs, feet, hands, mainHand, offHand, accessory. |
item | The inventoryKit item whose icons, model and hold the rolled item reuses (sword, helmet, ring ...). |
weight | How often this base comes up when a roll does not name one. |
minLevel | The lowest item level this base drops at. |
damage, armor, maxHealth, attackSpeed, critChance, moveSpeed, cooldownSpeed | Implicit stats at level 1 (damage flat weapon damage, armor and maxHealth flat, the rest percent). |
tags | Free words. |
contract: gearStatsKit.gearBase
values:
id: warhammer
name: "Warhammer"
nameScifi: "Impact Driver"
kind: weapon
slot: mainHand
item: axe
damage: 15
attackSpeed: -10
Every base here is found by gearStatsKit.catalog on first use; Gear.catalogue().bases lists them.