Skip to main content

Base Types

Base types define the template for items - their category, slot, size, and implicit modifiers.

BaseType Structure

interface BaseType {
baseTypeId: string; // Unique identifier (e.g., "iron-sword")
name: string; // Display name (e.g., "Iron Sword")
category: ItemCategory; // Weapon, Armour, Accessory, etc.
slot?: EquipmentSlot; // Which slot it can be equipped to
width: number; // Grid width (inventory)
height: number; // Grid height (inventory)
implicitModifiers: string[]; // Built-in modifiers
requirements: Requirements; // Level, attribute requirements
tags: string[]; // For modifier filtering
}

Item Categories

public enum ItemCategory
{
Weapon = 0,
Armour = 1,
Accessory = 2,
Gem = 3,
Currency = 4,
Map = 5,
Misc = 6
}

Requirements

interface Requirements {
level?: number;
strength?: number;
dexterity?: number;
intelligence?: number;
}

Example Base Types

One-Handed Sword

{
"baseTypeId": "iron-sword",
"name": "Iron Sword",
"category": 0,
"slot": 4,
"width": 1,
"height": 3,
"implicitModifiers": [],
"requirements": { "level": 1, "strength": 10 },
"tags": ["sword", "melee", "one_handed"]
}

Helmet

{
"baseTypeId": "iron-helmet",
"name": "Iron Helmet",
"category": 1,
"slot": 0,
"width": 2,
"height": 2,
"implicitModifiers": [],
"requirements": { "level": 1, "strength": 12 },
"tags": ["armour", "helmet"]
}

Ring with Implicit

{
"baseTypeId": "gold-ring",
"name": "Gold Ring",
"category": 2,
"slot": 7,
"width": 1,
"height": 1,
"implicitModifiers": ["implicit_rarity"],
"requirements": { "level": 1 },
"tags": ["ring", "accessory"]
}

Modifier Definitions

Modifiers add stats to items:

interface Modifier {
modifierId: string;
name: string;
type: ModifierType; // Prefix, Suffix, Implicit
tier: number; // 1 = best, higher = weaker
stats: StatModifier[]; // Stat changes
weight: number; // Spawn weight
requiredLevel: number; // Item level requirement
allowedTags: string[]; // Which base types can roll this
}

Modifier Types

TypeSlotCount
ImplicitBuilt into base typeFixed
PrefixBefore item name0-3
SuffixAfter item name0-3

Example Modifiers

{
"modifierId": "added_cold_damage_t1",
"name": "of the Blizzard",
"type": 1,
"tier": 1,
"stats": [
{ "stat": "added_cold_min", "min": 10, "max": 15 },
{ "stat": "added_cold_max", "min": 20, "max": 25 }
],
"weight": 100,
"requiredLevel": 50,
"allowedTags": ["weapon"]
}

Registry Management

Base types and modifiers are managed via the admin dashboard or BaseTypeHub:

// Create via SignalR
await connection.invoke("Create", {
baseTypeId: "steel-sword",
name: "Steel Sword",
category: 0,
slot: 4,
width: 1,
height: 3,
implicitModifiers: [],
requirements: { level: 10, strength: 20 },
tags: ["sword", "melee", "one_handed"]
});

Tag System

Tags control which modifiers can appear on items:

TagExample Base Types
weaponAll weapons
swordSwords only
meleeMelee weapons
armourAll armour pieces
helmetHelmets only
ringRings

Modifiers specify allowedTags to restrict where they can roll.