This page is preserved for project history and is not the current reference. Use Loot, Inventory and Crafting for current information.
Loot, Inventory & Crafting
Server rolls loot, the client picks it up, and the API persists it. Crafting/smelting runs through professions and recipes with server-side XP awards.
The loot β inventory flow
Enemy dies (server) β DropTable weighted roll β WorldItem net-spawned pickup
β player pickup β InventoryManager.OnItemPickedUp β POST /api/inventory/save
β item survives relog
DropTableβ ScriptableObject weighted rolls; server-side only. EachDropEntrysupports two assignment modes: aLootItemDefinitionreference (preferred β owns the item ID, world visual prefab, and rarity in one asset) or a legacyitemIdstring with no visual data. Helper propertiesResolvedItemId,ResolvedWorldVisualPrefab, andResolvedRarityonDropEntryreturn the values from whichever source is assigned.DropTable.TryGetEntry(string, out DropEntry)looks up an entry by its resolved item ID (case-insensitive).
LootItemDefinitionβScriptableObjectthat centralises a single item's data for both the backend and the client. Fields:itemIdβ stable backend inventory item ID; 1β64 lowercase letters, numbers, underscores, or hyphensdisplayNameβ player-facing name stored in the items database and shown by inventory UIdatabaseItemType(LootDatabaseItemType) β database inventory category; must match the liveitems.item_typeenum. Values: Material, Weapon, ArmorHead, ArmorChest, ArmorLegs, ArmorFeet, ArmorHands, Offhand, Ring, Trinketrarity(ItemRarity) β Common, Uncommon, Rare, or Epic. Legendary is not supported by the live database;LootForgeWindowrejects it at validation time.inventoryIconβSpriteshown in the player's inventory bagsellValueβ base database sell value (minimum 0)craftedβ whether the database should mark this item as craft-producedworldVisualPrefabβ model shown in the world for this item (colliders disabled when attached to the pickup)
Drop tables reference this asset so an item's appearance and rarity are authored only once. LootForgeWindow (BCE βΆ Loot Forge) is the dedicated editor for creating and assigning these assets β see Editor Tooling.
LootItemCatalogβ static client/server catalog loaded lazily fromResources/LootForge/Items.LootItemCatalog.Find(itemId)returns the matchingLootItemDefinitionor null.LootItemCatalog.Allreturns all loaded definitions.LootItemCatalog.RarityColor(rarity)returns the canonical UI color for a given rarity level. Used byInventoryBagUIandItemTooltipUIto resolve sprites and display data at runtime.
LootPersistenceServiceβ server-side service that syncsLootItemDefinitionassets to the database. On server start (whenCROSSWORLDS_GAME_SERVICE_TOKENis set), it loads all definitions fromResources/LootForge/Itemsand posts each to/api/game/items/definitionsso the live items table stays in sync with authored content.
WorldItemβ network-spawned pickup prefab (float animation, rarity glow, trigger pickup). Carries alootRaritySyncVar(hooked toOnLootRarityChanged) that drives the glow color and attached beam tint.AttachLootVisual(prefab)replaces the defaultVisualchild with an item-specific model;AttachLootBeam(prefab)parents a VFX beam to the pickup and recolors all particle systems, lights, and trail/line renderers to match the item's rarity color.AttachLootPresentation(visualPrefab, beamPrefab)calls both. These methods are called on the client byEnemyController.RpcAttachLootPresentationafter the pickup spawns. Server-sideCmdPickupvalidates proximity (maximum 3 m) before awarding the item, rejecting out-of-range collection attempts with a server log warning.
EnemyControllerβ exposes alootBeamPrefabfield (optional VFX attached to each spawnedWorldItem; automatically recolored to the item's rarity and destroyed on collection).
InventoryManagerβ client REST singleton; stackingAddItem,EquipItem, auto-save. Equip posts/api/inventory/equipβ server stat recalc fromstat_bonusJSON.
InventoryBagUIβ the player's inventory bag grid. Each slot shows theinventoryIconsprite from the item'sLootItemDefinitionwhen one is available; falls back to a rarity-color-coded icon when no definition is found. Chat input focus blocks inventory keybinds while typing.
ItemTooltipUIβ item tooltip shown on slot hover. Resolves display name, item type line, sell value, and rarity border color fromLootItemCatalogwhen the item has aLootItemDefinition; falls back toItemCatalogManager(the legacy REST-backed catalog) otherwise.
Do not call /api/loot/drop or save-progress on kill β /api/combat/kill awards XP + gold + loot in one transaction. See Auth & Game API.
Progression
Level/experience/gold and per-hero mastery are covered on Progression & Hero Mastery (PlayerProgressManager, HeroMasteryManager). DB column is experience, not xp (Database Schema).
Attunement (a CreateAssetMenu(menuName="Legacy/Inventory/β¦") ScriptableObject β a stat-modifier upgrade socketed into gear) is legacy local data; the server-backed inventory does not use it. Don't build new features on it.
Crafting
ForgeCraftingPanelβ Smelt + Craft tabs, progress bar, ingredient-shortage highlighting.ConsumableEffectβ hp_regen, resist_void, resist_blast, speed, damage_amp (timed).- Server:
POST /api/craft(transactional, XP award, level-up loop, smelt support),POST /api/professions/award-xp. - Seeded content: 5 raw + 5 refined materials, 6 consumables (Void Resist Flask, Iron Warden Blast Kitβ¦), 8 crafted gear items, 19 recipes.
Consumable resist buffs, ThreatProtocol, and SiegeMode all write the same DR scalar on Health and clobber each other. It needs a ref-counted refactor β don't drive-by fix. See Known Issues & Tech Debt.
Related: Database Schema Β· Auth & Game API Β· Enemies, Waves & Bosses