Equipment sets, item quality, soul sockets (26.11.2026, Claude, owner-approved)
Janari asked (26.11): armor grouped into themed sets incl. weapons, shields, bows and rings; bonuses at 2, 3, ... full pieces that fit each set's look; item quality tiers like MMO "plus/quality" systems (our own names chosen by Janari); souls are rare boss drops.
Owner decisions
- Set = 7 pieces: helmet, vest, bracers, boots, weapon, off-hand (shield; bow sets: quiver), ring. Bonus tiers at 2/3/4/5/6/7 worn pieces, all reached tiers add up; full set = biggest.
- Quality: Normal (white) x1.00, Refined (light blue) x1.10, Unique (green) x1.20, Elite (purple) x1.35, Super (dark gold) x1.45 of the item's own positive base stats.
- Soul sockets per quality: Normal 0, Refined 0, Unique 1, Elite 2, Super 3.
- Souls: very rare, each soul from one specific boss.
- Souls have quality too (later the same day): Refined = base, Unique +10 %, Elite +25 %, Super +40 % to the soul bonuses. Boss soul drop per kill: Refined 2 %, Unique 1 %, Elite 0.5 %, Super 0.1 %.
- Drop table (Janari approved "a balanced, sensible drop table" from comparable-MMO data): ONE config,
Scripts/Services/DropTable.gd(pure static, server-ready). normal mob: gold 50 % of kills, potion box 10 %, gear 4 % (quality split 80/16/3.5/0.45/0.05 % -> Super 1 in 50 000 kills); elite: gold always, potion 30 %, gear 25 % (55/30/12/2.7/0.3); boss: gold always, 1-3 potion boxes, 2-4 worn pieces always, first at least Unique (20/35/30/12/3). Boss souls 2/1/0.5/0.1 % per kill (~1 in 28). Scene drop chances for loot boxes and gear are ignored (they said 100 %); material_drop_entries (ores) unchanged. Test harness enemies can set fixed_drop_chances = true to keep their own chances.
What was built
Scripts/Services/EquipmentSetRules.gd(pure static): 12 themes (knight, warrior, ranger, shadow, mage, holy, dark, samurai/"Duelist", nature/"Wild", worker, court, festive) with epic tables for tiers 2..7; tier factor common 0.5 / rare 0.75 / epic 1.0, every value >= 1. Values assume attributes start at 10 with unchanged per-point effects (NativeAttributeRules). Set bonuses ignore quality.Scripts/Services/ItemQualityRules.gd(pure static): order, colours, multipliers, socket caps, sell price multipliers (1/1.25/1.6/2.2/3), drop weights per mob kind (normal 70/18/8/3.5/0.5 %, elite and boss better).Scripts/Build/build_set_gear.py->Scripts/Lists/GeneratedSetGear.gd+ 371 icons inAssets/Generated/SetGearIcons/: theme/tier per set (127 sets = 10 handcrafted + 117 generated) and its weapon, off-hand, ring. Ids: generated sets 10000+variant*10 +4/+5/+6; handcrafted base_item_id +5 (off-hand) / +6 (ring), weapons keep 1010-1019. Rings have no paper-doll look: icon = pack ring by tier + gem in theme colour.Equipment.gd: get_set_bonuses uses the themed table (old 2/4/5 tables stay in NEW_ARMOR_SET_DEFINITIONS as history only); create_set_gear_item; the 10 old set weapons now draw the art that matches their icon (old variants pointed at other swords).ForgeUpgradeService.gd: apply_quality(item, q); apply_stats scales base stats by quality before forge levels and souls; get_max_sockets_for(item) (quality cap, never below the sockets an item already had); global max 3; socket 3 cost added to forge_upgrade_config.json.Inventory.gd: quality saved as item field "quality" (absent = Normal, old saves unchanged); title colour + "Quality | ..." meta line; set tiers in the tooltip green when reached.- Drops: RewardService rolls quality for equipment drops (mob_kind normal/elite/boss), WorldPickup keeps it and shows "Elite Xyz" in the quality colour; fallback path too.
- Souls:
MobGearRules.BOSS_SOULSDemon Lord -> Ember Soul, Orc Warlord -> Ward Soul, quality rolled by ItemQualityRules.roll_soul (rates above). Hunter and Vital Soul have no boss yet. Soul qualities are separate Ingredients ids: base 9500-9503 (Refined) +10 Unique, +20 Elite, +30 Super (Ingredients.get_soul_quality_variants; ForgeUpgradeService.get_soul_definitions expands the config souls). Socketed souls keep their own item id, name and scaled bonuses. Small base values round: e.g. Ember +3 attack = 3/3/4/4. - Rig fix:
Assets/Rig/player_variant_map.jsonShield table re-matched by hand (pack icon order: FantasyHeroes Basic 1-29 alphabetical, Epic 30-38, Caramel 39, Patreon 40-44; #42 = Patreon GreatShield is the least certain). Before, almost every shield drew as RustedRoundShield on the skeletal rig. Magictwo names in that map are still wrong; the rig only has DivineStaff/PhoenixStaff/Broomstick, so sets use those or wands. - PlayerStats.gd NOT changed (its generic set summing already handles any threshold table).
Evidence
Scripts/Build/VerifyEquipmentSetsQuality.gd, isolated APPDATA: 35/35 PASS (incl. soul qualities and DropTable rates; VerifyMobGear 726/0, VerifyPetSystemRestoration PASS),test-results/equipment_sets_quality_20261126/report.json(127 sets x 7 roles, unique ids, icons, paper-doll frames, rig keys exist, tables, PlayerStats sums, quality scaling, price, penalties not scaled, socket caps, legacy sockets kept, save/load round trip, roll shares).- Rendered game check
Scripts/Build/GameChecks/game_check_sets.gdon the test profile (owner saves untouched by run_one_game_check.ps1): 7/7 PASS,test-results/game_checks/20261126_162052_game_check_sets/(player look + tooltips for Super Golden Knight, Elite Royal Archer, Unique Fire Wizard). - Catalog build: cold 472 ms (loads all icons once), warm 29 ms. Baseline before the change was not measured (debt: maybe lazy-load icons if the first save load feels slow).
- VerifyWorldPickupLifecycle / VerifyPetSystemRestored still fail on click/pet collection and "commits each entry" (3 saves): pre-existing, the pickup now goes through NativeCommands with a range-checked collector and one save per pickup (perf work); not caused by this change.
- NOT checked: online server (untouched by design; online catalog has its own Graveborn set), balance feel, shield look while walking/attacking in every direction, mob gear using set weapons (mob pools unchanged).
Open / next
- Janari may want to tweak themes per set, numbers, which shield/weapon a set has (edit GENERATED/HANDCRAFTED in build_set_gear.py and rerun, then Godot --import).
- Quality upgrade at the forge (rare material) was proposed, not built.
- Souls 9502/9503 need bosses; shop never sells souls.
Rollback
Before copies: D:/WieldHavenBackups/archive/equipment_sets_quality_20261126/before/ (same relative paths). New files can stay unused: EquipmentSetRules.gd, ItemQualityRules.gd, GeneratedSetGear.gd, build_set_gear.py, SetGearIcons/, verifiers.
Round 3 (26.11 evening): simple stats, requirements, gold piles, shop test stock
Owner asks: weapons + rings = attack, armor = defense (sets may add attack); only melee / ranged / magic attack and defense; gear gated by attribute points not level (all gear); gear leans to melee / ranged / magic; gold rarer but bigger, something on every 4th-5th normal kill; test shop with every quality; forge NPC; test everything.
Scripts/Services/EquipmentStatRules.gd: item keys melee_atk/ranged_atk/magic_atk and melee_def/ranged_def/magic_def; player stats Attack, RangedAttack, MagicAttack, MeleeDefense, RangedDefense, MagicDefense. Old blunt/stab/slash keys convert everywhere (catalog configure_item, saved forge_base_stats, socketed souls): attack = strongest old value of the weapon's kind; melee def = avg(slash, blunt), ranged def = stab. Armor leans: heavy melee x1.2 ranged x0.9, light melee x0.85 ranged x1.3, arcane magic x1.15. Armor piece attack bonuses dropped. Rings: set rings 3/5/8 attack of the theme's kind; old Bronze/Gold ring +2/+3. Requirements: common 15, rare 25, epic 40 (medium armor x0.8) of Strength (melee weapons, heavy/medium armor, shields), Agility (bows, quivers, light armor), Intelligence (staves, arcane armor), rings their main attribute; non-set gear by price (<=120 none). Checked against BASE attributes (gear bonuses excluded) only when equipping; old equipped gear stays on. Items carry "focus" (melee/ranged/magic) and "requirements"; tooltip shows both.- Combat: Player.calculate_received_damage: magic -> MagicDefense, pierce/ranged (arrows) -> RangedDefense, everything else -> MeleeDefense (same 0.22 factor). Attributes unchanged: Strength -> melee attack, Agility -> ranged, Intelligence -> magic (NativeAttributeRules), Endurance -> melee+ranged defense. PlayerStats migrates old saves (old defense keys erased, new base 10).
- DropTable gold: a click pickup ("Gold" entry, coin icon) worth gold_reward x3: normal 14 %, elite 50 %, boss always. Normal mob: potions 6 %, gear 3 %; elite potions 25 %, gear 20 %. Gold is no longer paid directly on kill (except test harnesses / callers without rng).
- Shop.gd QUALITY_TEST_STOCK (true for Janari's testing): Golden Knight set, Royal Archer bow/ quiver/ring, Fire Wizard staff/ring in all five qualities, quality colour + tag; buying applies the listed quality (ShopTransactionService). Set QUALITY_TEST_STOCK false to hide.
- Forge NPC: already in Main (ForgekeeperNPC "Borin", "F" marker) - upgrades, sockets, souls. No new NPC added.
- Evidence: VerifyEquipmentSetsQuality 46/46 PASS; rendered game_check_forge_drops 28/28 (forge +3 and socket caps 0/0/1/2/3 with souls on normal..super armor/sword/bow, quality ladder 19/21/23/26/28 melee def, requirement block/allow, shop Super buy, 1000-kill drop simulation on real Goblin/elite Orc/Orc Warlord scenes, real gold pile pickup) in test-results/game_checks/20261126_174258_game_check_forge_drops/ (forge_drops_report.json); game_check_sets 7/7; VerifyMobGear 726/0; VerifySkillUnlocks 41/41.
- 1000 kills: goblin anything 237 (gold 167 piles, potions 59, gear 38: 31 N/4 R/3 U); elite orc anything 688, gear 179 incl 3 Super; Orc Warlord 3023 pieces, souls 41.
- Archive of this round: D:/WieldHavenBackups/archive/equipment_sets_quality_20261126/before_stat_simplify/.
- NOT done: online server stats (separate catalog, untouched); enemy defenses still one value.
Round 4 (26.11 evening): soul types, remove/combine, XP, Speed cap, drag and drop
Scripts/Services/SoulRules.gd: 16 soul types (7 attributes - no Speed soul, owner -, blade/ arrow/arcane attack, battle = all attacks, guard/deflect/spellward defense, bulwark = all defenses, wisdom = XP %), ids 7000 + 40*n (+10/+20/+30 per quality; 7160 unused = removed Speed soul). Soul quality curve x1 / x1.4 / x2 / x3 (owner: Super attribute soul +15): attribute 5/7/10/15, attack/defense 6/8/12/18, all-kind 3/4/6/9, XP 6/8/12/18 %. Legacy Ember/Ward/Hunter/ Vital keep ids and get the same curve. Icons: Scripts/Build/build_soul_icons.py -> Assets/Generated/SoulIcons/ (speed_soul.png left unused).- Boss pools (SoulRules.BOSS_POOLS): Orc Warlord strength/endurance/agility/blade/arrow/guard/ deflect + Ward/Hunter/Vital; Demon Lord intelligence/willpower/personality/luck/arcane/battle/ spellward/bulwark/wisdom + Ember. Quality chance per kill unchanged (DropTable.SOUL_CHANCES).
- Forge: unsocket_soul (returns one quality lower, Refined breaks), combine_souls (4 same type and quality -> 1 next quality); ForgeMenu "Remove soul" per filled socket and "Combine 4 selected into 1 better"; gear list names in quality colour.
- XP: item key xp_bonus -> PlayerStats "ExperienceBonus" (percent); the rebirth thread applies xp * (1 + (rebirth + ExperienceBonus)/100) in RewardService.grant_player_rewards.
- PlayerStats.Level_Up starts with the rebirth level-cap guard (RebirthRules.level_cap) at the rebirth thread's request.
- Speed max 100 (owner): NativeAttributeRules.SPEED_MAX, PlayerStats.SPEED_STAT_MAX, dev buttons in GUI/Inventory; speed_multiplier clamps gear-boosted Speed too (100 = 1.9x walk speed).
- Drag and drop (owner OK after the risk note):
Scripts/UI/InventoryDragDrop.gdforwards drags from the All-items and Equipment lists onto the character slot buttons; the drop calls equip_equipment_item (requirements, sound, stats, save) like double-click. ForgeMenu: drag a soul button onto a gear button to bind it (socket_soul). - Evidence: VerifyEquipmentSetsQuality 51/51; game_check_forge_drops 34/34 (test-results/game_checks/20261126_175332_game_check_forge_drops/: remove Super -> Elite in bag, Refined breaks, 4 Refined Strength -> 1 Unique, Super Wisdom +18 % ExperienceBonus, soul drag binds, helmet drag equips and refuses the boots slot); game_check_sets 7/7; VerifySkillUnlocks 41/41; VerifyMobGear 726/0.
- NOT checked: a real mouse drag gesture (checks call the forwarding functions directly), feel of Speed 100, balance in long play.
- Editor note: the open Godot editor holds an older MainWorld in memory (rebirth thread added NPC Vaara on disk). Do not save MainWorld from that editor session; reopen it from disk first.
Round 5 (26.11 late): inventory reordering, hover tooltip with comparison
- InventoryDragDrop.gd now also reorders: drag an item onto another item of the same list to swap them (slot-grid style), onto empty list space to move it to the end; All-items list swaps only within a category. The array order is the saved order. Drops inside a list use the last hover point (can_drop sees every motion).
- Hovering an item (mouse motion over the list) opens its description; equipment descriptions start with "Compared to equipped <item>": per-stat difference vs the item in the same slot (green better, red worse), or "Nothing equipped in this slot." (Inventory.format_equipped_comparison). Potions/ingredients show their normal description (no comparison).
- Evidence: Scripts/Build/GameChecks/game_check_dragdrop.gd with real InputEvents (Input.parse_input_event in window coordinates): 9/9 twice (test-results/game_checks/20261126_190633_*/, 20261126_190656_*/): swap, move to end, helmet dragged onto the helmet slot, boots refused there, sword onto melee slot, click still selects, hover helm/bow comparison, no cross-category swap. Limitation: Godot reads the drop POSITION inside a list from the real OS cursor, so the two list-reorder drops call the same can_drop/drop functions with the final hover point; the slot drops are fully real. If Janari moves the real mouse over the game window during the check it can disturb it (seen once).
Round 6: player at the anvil in the forge window
Scripts/UI/ForgeStage.gd(child of ForgeMenu, left of the window): the player's own rig look (copied from the player's RigCharacter appearance) with the BlacksmithHammer in hand, Borin's anvil sprite, the selected item lying on the anvil; every successful forge action (upgrade, socket, bind, remove, combine) swings the hammer ("slash" row), plays the "forge" sound at the hit and shows sparks + a small item bounce, then back to idle.- Evidence: Scripts/Build/GameChecks/game_check_forge_stage.gd 7/7 (test-results/game_checks/20261126_191521_game_check_forge_stage/forge_stage_hit.png).
- Not checked: the sound by ear (AudioHooks call only), other races' rigs (human tested).
- Owner follow-up (26.11 evening): anvil smaller and in proportion (anvil-on-stump art only, 52 px, on the floor in front of the smith); rest pose = hammer raised ("slash" frame 7); each action steps frames 8..11 down (sound + sparks exactly at frame 11 when the hammer head is on the item), short hold, frames 10..7 back up. Frames found with Scripts/Build/GameChecks/game_check_forge_frames.gd (contact sheet). game_check_forge_stage 7/7 checks the frame order and that sparks start at frame 11; GIF: test-results/game_checks/20261126_204335_game_check_forge_stage/forge_blow.gif.
- Later owner fixes: anvil 68 px on the same floor line as the smith; the rig's own swings all end at knee height, so ForgeStage builds its own "forge" row per rig (shallow copy of the shared rig data): slash frames 7..10 plus an IMPACT pose interpolated between slash 10 and 11 (IMPACT_BLEND 0.68, Transform2D.interpolate_with per part) so the hammer's lower end stops in the middle of the item; the rig is drawn over the item (hammer in front). Runtime draw format is [slot, Transform2D, sort layer, sort order] (RigData), not the JSON's flat numbers. game_check_forge_stage 7/7 (test-results/game_checks/20261126_215237_game_check_forge_stage/).
- Items on the anvil: ForgeStage.set_item trims transparent icon borders (AtlasTexture of the used rect) so all items show at a similar size (max 40 px; long weapons 62 px, turned -45 degrees to lie flat); the bottom rests on the anvil top, centre 14 px right of the anvil centre so the hammer covers about half; IMPACT_BLEND 0.56. GIF of 9 items (shield, 4 armour pieces, sword, bow, staff, ring): test-results/game_checks/20261126_215659_game_check_forge_items/forge_items.gif (Scripts/Build/GameChecks/game_check_forge_items.gd). game_check_forge_stage still 7/7.
- Anvil items, owner round 2: centred on the anvil; rings 26 px; weapons turned along their own long axis (principal axis of the opaque pixels, ForgeStage._long_axis) so swords, bows and staves all lie straight. Set-bow icons now come from the player sheet (build_set_gear.py) because the pack icons cut the bow ends off; old weapon icons copied to D:/WieldHavenBackups/archive/equipment_sets_quality_20261126/bow_icons_before/. GIF: test-results/game_checks/20261126_220244_game_check_forge_items/forge_items.gif; stage 7/7.
- Waiting pose: ForgeStage._process plays play_split(lower "idle" row, upper raised-hammer pose), so the smith breathes/idles with the hammer up. Bows on the anvil 76 px. The quiver stays on the back (only Bow, Shield, Weapon2 give way to the hammer). Gear check Scripts/Build/GameChecks/game_check_forge_gear.gd: 4 loadouts (bow + Royal Archer, staff + Fire Wizard, sword + shield Golden Knight, axe + shield Elite Knight) 43/43: same armour as the player, hammer in hand, no bow/shield, quiver kept, idle alive; GIF test-results/game_checks/20261126_221140_game_check_forge_gear/forge_gear.gif.
- 27.11: forge clank plays SOUND_DELAY 0.1 s after the impact frame (Janari); sparks stay on the hit. Stage check 7/7.
- 27.11: anvil stump base on the smith's feet line (anvil.y 305, Janari: same ground, 2D side view); IMPACT_BLEND 0.4 so the hammer still stops on the item centre. GIF test-results/game_checks/20261127_164537_game_check_forge_items/forge_items.gif.
- 27.11: smith one step back to the left (rig.x 146); items sit 14 px left of the anvil centre so the hammer (fixed reach) still lands on them.
- 27.11: items back in the anvil centre (owner: their old anvil positions were right); the hammer slides forward in the hand on the way down (REACH_PX 14 on Weapon1 slots, weights 0/0/0/0.6/1 per forge frame) so it still lands on the item with the smith a step back.
- 27.11: one forge action at a time: ForgeMenu locks upgrade/socket/bind buttons (and ignores remove/combine/soul drops) while the blow plays and unlocks after it (ForgeMenu._forge_busy/_set_actions_locked). game_check_forge_stage 10/10 incl. 7 rapid clicks = 1 upgrade.
27.11 evening: one shield look per set (owner option 1)
- Owner: each visually distinct item belongs to exactly ONE set; Light sets have no shield; shields only for the 42 Heavy sets and the most soldier-like Medium sets. Sets without an off-hand are 6-piece sets and that is fine.
- build_set_gear.py
SHIELDS(set -> shield variant, each once, checked by the generator): 41 Heavy + Guard (old Guard Shield 2014 is now its set piece) = 42 Heavy; 7 Medium soldiers + Wild Boar (old Big Wooden Shield 2004 is its set piece) = 8; Piper gets the Bagpipes, Townsfolk Cap the Drum (pack shield-slot items). 52 looks = 44 paper-doll + 8 rig-only shields (variants 45-52 in player_variant_map: Rusted Buckler/Knight/Large/Round/Shield, Slavic Round/Tower, Varangian; items carry rig_only, no paper-doll sheet; FrameStreamer/ArmorPrefetch skip missing sheets). Heavy Epic Monster Hunter (bow) now carries the Monster Shield instead of a quiver. - GeneratedSetGear: "pieces" per set (71 x 7, 56 x 6), "legacy_pieces" for 2004/2014. EquipmentSetRules.bonus_table(theme, tier, pieces): a 6-piece set gets 2..6, its full step = the 6- and 7-piece bonuses together (a complete 6-piece set is as strong as a complete 7-piece one).
- Weapons that copied old shop items got new looks: Epic Dark Steel axe Axeone 64, Robe staff Magicone 169, Warlock staff Magicone 66, Lamp Miner pickaxe Specialtwo 12.
- Retired item ids (shields of sets that no longer have one) are skipped when a save loads.
- Not fixable without new art: Fox Mask and Magician armour share one rig look.
- Evidence: VerifyEquipmentSetsQuality 56/56 (each shield look in one item, 52 looks, every Heavy set has a shield, no Light set has one, 6-piece full = 7-piece full); game_check_forge_gear 54/54 (incl. Warg + rig-only Rusted Buckler drawn on the player), game_check_sets 7/7, game_check_forge_drops 34/34. Armour class sheets rebuilt (docs/ai_context/armor_classes_20261127); WieldHavenSite rebuilt locally (content.json 'decided' entry); deploy (build.py --deploy) was blocked by auto mode, needs Janari's OK or AVALDA_SAIT.cmd.
- Archive: D:/WieldHavenBackups/archive/equipment_sets_quality_20261126/before_stat_simplify/ (GeneratedSetGear_before_unique_shields.gd, player_variant_map_before_rig_only_shields.json), content_before_shields.json.
Round 27.11 evening: weapon options, 4 quality set bonuses, two-handed weapons (Janari)
- Weapon options: every unused player weapon look is now a set weapon, and each look sits in one item only.
build_set_gear.pyrunsassign_extras, which matches theme and class parts plus name hints.- Each set has 1 to 4 weapons; any of them is the set's weapon piece, and only the active weapon counts.
- 169 new items. Generated sets use ids base+7/8/9; handcrafted sets use base+4/7/8/9.
weapon_optionsis stored on the set. - 17 looks are left out: 15 Magictwo staffs that the rig draws as other art, and Dagger 1 and Dagger 91, whose rig match score is under 0.9.
- Overview pictures:
docs/ai_context/weapons_by_set_20261127/, built byScripts/Build/build_weapon_set_sheets.py. - Set bonus by quality (owner approved): there are 4 bonuses, and table keys 2..5 are worn pieces.
| Bonus | Pieces needed | Lowest quality |
|---|---|---|
| 1 | 2 | Refined |
| 2 | 3 | Unique |
| 3 | 4 | Elite |
| 4 | 5 | Super |
- Normal pieces never count, and adding a piece never lowers the bonus.
- The 4th bonus holds the old 5-, 6- and 7-piece values.
- Rules:
EquipmentSetRules.reached_steps,next_step,STEP_QUALITY. - The tooltip shows "Bonus n (k x Quality+)" and "Next: ...".
- The "Dressed for War" achievement now means all 4 bonuses of one set.
- Two-handed melee weapons:
EquipmentStatRules.is_two_handed. - A 2H weapon takes the shield back to the bag, and a shield takes the 2H weapon off.
- While a 2H weapon is worn, the shield slot shows that weapon faded.
- Old saves with both lose the shield on sync.
- Off-hand drawing: done in
Player.rebuild_equipment_visual_layers. Melee draws the shield, Ranged draws the quiver, Magic draws neither. - Evidence:
- VerifyEquipmentSetsQuality 63/63 (examples, monotonic, weapon looks unique).
- game_check_sets 17/17 (2H/shield and off-hand per mode), game_check_forge_gear 54/54, game_check_dragdrop 9/9, game_check_forge_drops 34/34.
- The 51 get_inventory_state_payload errors in forge_drops were there before this round.