Jump to content

Module:Gear/data

From Community Wiki | Soulbound: Online

The vocabulary behind every stat, rarity and slot on the wiki. It is a data-only module: five tables, no functions. Module:Stat loads it with mw.loadData, which means it is parsed once per page no matter how many times a stat is named — and also means nothing in here may be a function.

{{Stat}} , {{Stat/unit}} , {{RollStat}} , {{Rarity}}

and {{Range}}
all read from it. 213 mainspace pages depend on it.

Generated — read this first

This page is generated from current game data by the wiki's maintainers and re-published when the game's stat list changes. A hand edit will work immediately and correctly, but it can be overwritten by the next refresh. So:

  • Add the stat you need, then note it on Module talk:Gear/data so it goes into the source the generator reads. That is the only way to make it permanent.
  • Never restructure the tables or re-order the keys wholesale; a big diff makes the next refresh impossible to review.

p.stats

One entry per stat, keyed by the game's own snake_case name. Currently 54.

Field Meaning
label Wikitext, emitted verbatim — normally a link, e.g. "[[Attack Speed]]". It must point at a page that exists. Two live special cases: Precision links [[Precision (stat)|Precision]] because plain Precision is an old relic page, and all eight resistances link to the single Resistances page with a piped label.
unit "%" for a percentage stat, "" for a flat one. Nothing else. This is what {{Stat/unit}}
returns and what {{RollStat}}
appends to a range.
primary true for the six primaries — Power, Precision, Focus, Ferocity, Vitality, Will. Everything else is false.
page Optional. The article title for stats that have their own page. Omit it for a stat whose label points at a shared page (the resistances, DoT Interval, Projectile Speed, Applied Threat).

Adding a stat

One line, in alphabetical order by key:

["burn_chance"] = { label = "Burn Chance", unit = "%", primary = false },

With a page of its own:

["burn_chance"] = { label = "[[Burn Chance]]", unit = "%", primary = false, page = "Burn Chance" },

Then check three things: preview a page that uses the stat, confirm Category:Pages with script errors

is still empty, and confirm the label is not a red link. A stat left out of this table is not an error — {{Stat}}
renders an unknown key as itself, unlinked, so it shows up as plain text rather than disappearing.

Adding a stat here does not add a base-stat row to {{Infobox Gear}}

that template holds its own list. See Wiki:Item templates.

p.rarity

The rarity map, indexed 0–5: 0 = None, 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Epic, 5 = Legendary. Each entry carries the display name, the CSS class cls (sb-q0sb-q5), and the colour, bar and glow values used by the infoboxes.

This is the single source of the names. The actual text colours a reader sees come from Template:ItemStyles/styles.css via those classes — change a colour there, not here, and keep the two in step.

p.slots

Game item type → the wiki's slot label, its family, and its category. arms becomes Weapon / Weapons / Category:Weapons; neck becomes Necklace / Accessories / Category:Accessories - Necklaces. This is the mapping that keeps the game's internal names out of articles.

p.sets and p.stations

p.sets is the list of gear sets — Foundation, Lunar, Neotilus, Virelda. p.stations maps a station's internal id to its article title (Weapon Station, Gearforge Station, Manufacturing Station).

See also


-- Module:Gear/data — single source of truth for gear vocabulary.
-- GENERATED by scripts/build_lua_data.py from Template:Stat, Template:Stat/unit
-- and the game's gear_stat_types. Edit the generator, not this page.
-- 'label' is the exact wikitext the pre-Lua templates emitted, so rendering is unchanged.

local p = {}

p.stats = {
	["aoe_radius"] = { label = "[[AoE Radius]]", unit = "", primary = false, page = "AoE Radius" },
	["applied_threat"] = { label = "[[Threat|Applied Threat]]", unit = "", primary = false },
	["attack_speed"] = { label = "[[Attack Speed]]", unit = "%", primary = false, page = "Attack Speed" },
	["base_impact"] = { label = "Base Impact", unit = "", primary = false },
	["buff_power"] = { label = "[[Buff Power]]", unit = "", primary = false, page = "Buff Power" },
	["burn_chance"] = { label = "Burn Chance", unit = "%", primary = false },
	["catch_radius"] = { label = "Catch Radius", unit = "", primary = false },
	["cooldown_reduction"] = { label = "[[Cooldown Reduction]]", unit = "%", primary = false, page = "Cooldown Reduction" },
	["critical_strike_chance"] = { label = "[[Critical Strike Chance]]", unit = "%", primary = false, page = "Critical Strike Chance" },
	["critical_strike_damage"] = { label = "[[Critical Strike Damage]]", unit = "%", primary = false, page = "Critical Strike Damage" },
	["damage_reduction"] = { label = "Damage Reduction", unit = "", primary = false },
	["dodge_chance"] = { label = "[[Dodge Chance]]", unit = "%", primary = false, page = "Dodge Chance" },
	["dot_interval"] = { label = "[[DoT Potency|DoT Interval]]", unit = "", primary = false },
	["dot_potency"] = { label = "[[DoT Potency]]", unit = "", primary = false, page = "DoT Potency" },
	["duration"] = { label = "[[Duration]]", unit = "", primary = false, page = "Duration" },
	["events"] = { label = "[[Legendary Effects|Legendary Effect]]", unit = "", primary = false },
	["ferocity"] = { label = "[[Ferocity]]", unit = "", primary = true, page = "Ferocity" },
	["focus"] = { label = "[[Focus]]", unit = "", primary = true, page = "Focus" },
	["freeze_chance"] = { label = "Freeze Chance", unit = "%", primary = false },
	["health"] = { label = "[[Max Health]]", unit = "", primary = false, page = "Max Health" },
	["health_regen"] = { label = "[[Health Regeneration]]", unit = "", primary = false, page = "Health Regeneration" },
	["heavy_hit_chance"] = { label = "[[Heavy Hit Chance]]", unit = "%", primary = false, page = "Heavy Hit Chance" },
	["heavy_hit_damage"] = { label = "[[Heavy Hit Damage]]", unit = "%", primary = false, page = "Heavy Hit Damage" },
	["knockback"] = { label = "[[Knockback]]", unit = "", primary = false, page = "Knockback" },
	["link_count"] = { label = "[[Link Count]]", unit = "", primary = false, page = "Link Count" },
	["movement_speed"] = { label = "[[Movement Speed]]", unit = "%", primary = false, page = "Movement Speed" },
	["power"] = { label = "[[Power]]", unit = "", primary = true, page = "Power" },
	["power_cold"] = { label = "[[Cold Damage]]", unit = "%", primary = false, page = "Cold Damage" },
	["power_ethereal"] = { label = "[[Ethereal Damage]]", unit = "%", primary = false, page = "Ethereal Damage" },
	["power_explosive"] = { label = "[[Explosive Damage]]", unit = "%", primary = false, page = "Explosive Damage" },
	["power_fire"] = { label = "[[Fire Damage]]", unit = "%", primary = false, page = "Fire Damage" },
	["power_healing"] = { label = "[[Healing Power]]", unit = "%", primary = false, page = "Healing Power" },
	["power_lightning"] = { label = "[[Lightning Damage]]", unit = "%", primary = false, page = "Lightning Damage" },
	["power_physical"] = { label = "[[Physical Damage]]", unit = "%", primary = false, page = "Physical Damage" },
	["power_poison"] = { label = "[[Poison Damage]]", unit = "%", primary = false, page = "Poison Damage" },
	["power_shielding"] = { label = "[[Shielding Power]]", unit = "%", primary = false, page = "Shielding Power" },
	["power_void"] = { label = "[[Void Damage]]", unit = "%", primary = false, page = "Void Damage" },
	["precision"] = { label = "[[Precision (stat)|Precision]]", unit = "", primary = true, page = "Precision (stat)" },
	["projectile_count"] = { label = "[[Projectile Count]]", unit = "", primary = false, page = "Projectile Count" },
	["projectile_speed"] = { label = "[[Projectile Count|Projectile Speed]]", unit = "", primary = false },
	["resistance_cold"] = { label = "[[Resistances|Cold Resistance]]", unit = "%", primary = false },
	["resistance_ethereal"] = { label = "[[Resistances|Ethereal Resistance]]", unit = "%", primary = false },
	["resistance_fire"] = { label = "[[Resistances|Fire Resistance]]", unit = "%", primary = false },
	["resistance_lightning"] = { label = "[[Resistances|Lightning Resistance]]", unit = "%", primary = false },
	["resistance_physical"] = { label = "[[Resistances|Physical Resistance]]", unit = "%", primary = false },
	["resistance_poison"] = { label = "[[Resistances|Poison Resistance]]", unit = "%", primary = false },
	["resistance_stun"] = { label = "[[Resistances|Stun Resistance]]", unit = "%", primary = false },
	["resistance_void"] = { label = "[[Resistances|Void Resistance]]", unit = "%", primary = false },
	["scythe_count"] = { label = "Scythe Count", unit = "", primary = false },
	["shots_per_tick"] = { label = "Shots Per Tick", unit = "", primary = false },
	["threat"] = { label = "[[Threat]]", unit = "", primary = false, page = "Threat" },
	["trigger_ability_chance"] = { label = "[[Trigger Ability Chance]]", unit = "%", primary = false, page = "Trigger Ability Chance" },
	["vitality"] = { label = "[[Vitality]]", unit = "", primary = true, page = "Vitality" },
	["will"] = { label = "[[Will]]", unit = "", primary = true, page = "Will" },
}

p.rarity = {
	[0] = { name = "None", cls = "sb-q0", colour = "#444", bar = "#ffffff", glow = "transparent" },
	[1] = { name = "Common", cls = "sb-q1", colour = "#808080", bar = "#ffffff", glow = "#80808066" },
	[2] = { name = "Uncommon", cls = "sb-q2", colour = "#6cd820", bar = "#1e1e1e", glow = "#6cd82066" },
	[3] = { name = "Rare", cls = "sb-q3", colour = "#009ef3", bar = "#ffffff", glow = "#009ef366" },
	[4] = { name = "Epic", cls = "sb-q4", colour = "#a020f0", bar = "#ffffff", glow = "#a020f066" },
	[5] = { name = "Legendary", cls = "sb-q5", colour = "#f9c22b", bar = "#1e1e1e", glow = "#f9c22b66" },
}

-- game item type -> wiki slot label, family and category
p.slots = {
	arms = { label = "Weapon", family = "Weapons", cat = "Weapons" },
	head = { label = "Head", family = "Armor", cat = "Armor - Head" },
	chest = { label = "Chest", family = "Armor", cat = "Armor - Chest" },
	feet = { label = "Feet", family = "Armor", cat = "Armor - Feet" },
	belt = { label = "Belt", family = "Accessories", cat = "Accessories - Belts" },
	ring = { label = "Ring", family = "Accessories", cat = "Accessories - Rings" },
	neck = { label = "Necklace", family = "Accessories", cat = "Accessories - Necklaces" },
	back = { label = "Back", family = "Accessories", cat = "Accessories - Backs" },
}

p.sets = { "Foundation", "Lunar", "Neotilus", "Virelda" }

p.stations = {
	weapon_001 = "Weapon Station",
	gearforge_001 = "Gearforge Station",
	crafting_001 = "Manufacturing Station",
}

return p