Log inGet started
Package

gearStatsKit.package

This package holds more than this page lists. See all of its files in its world.

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.

FieldMeaning
idThe 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, nameScifiThe base's name in the item's name ("Sword" / "Plasma Blade"), by naming theme.
kindweapon, armour or jewelry. Decides which affixes it can roll. Jewelry has no implicit stats, only affixes.
slotThe inventoryKit equipment slot: head, chest, legs, feet, hands, mainHand, offHand, accessory.
itemThe inventoryKit item whose icons, model and hold the rolled item reuses (sword, helmet, ring ...).
weightHow often this base comes up when a roll does not name one.
minLevelThe lowest item level this base drops at.
damage, armor, maxHealth, attackSpeed, critChance, moveSpeed, cooldownSpeedImplicit stats at level 1 (damage flat weapon damage, armor and maxHealth flat, the rest percent).
tagsFree 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.