How Weapons & Tools was built

Raw game files read

Processing

Every itemtypes/ variant that looks like gear -- it has a tool type, an attackpower, an attributes.damage/damageTier, or a tool/weapon tag -- and at least one numeric stat to show (durability, attack power, tool tier, damage or mining speed) becomes a row.

Nearly every stat is a *ByType glob map (durabilitybytype, attackpowerbytype, tooltierbytype, damageByType, ...), resolved for each concrete variant (spear-generic-copper) with the most specific matching pattern winning. The game reads these names case-insensitively and the files use every casing, so property lookup here is case-insensitive too. Melee stats sit at the top of the item; ranged damage and attack tier sit under attributes. Category comes from the tags: weapon-melee is a melee weapon, a tool (bow, sling) with its own attributes.damage is ranged, a bare attributes.damage (arrows, bullets) is ammo, the rest are tools.

Each row is also given an item page even if no recipe or drop table references it.

Pipeline code