commit 6b3e7321b45d8a78fc756cce0ec8857ad2fed494
parent 738803cf892b00b0c503c2e090b1e1a95597aec7
Author: anon <anon@example.com>
Date: Thu, 29 Oct 2026 06:59:38 +0000
Verify earned boss armor progression through level four
Diffstat:
4 files changed, 275 insertions(+), 17 deletions(-)
diff --git a/TODO.md b/TODO.md
@@ -41,11 +41,15 @@ as a whole rather than silently granting partial effects.
The existing server already supports fighting, respawn, fixed corpse items and
credits, provisional solo kill XP, leveling/IP, equipment, resurrection/reclaim,
-shop sales and a limited purchase subset. These are separate verified examples;
-they do not yet prove ordinary players can progress without admin provisioning.
+shop sales and a limited purchase subset. Completing the repeatable
+fresh-character progression loop remains a P0 gate.
An ordinary level 1 Leet death now generates provisional Monster Parts and cash
-through a shared loot profile. Useful equipment drops, useful purchasable stock
-and the remaining connected native gameplay regression are the immediate gaps.
+through a shared loot profile. Useful equipment drops and purchasable stock still
+need wider coverage. One authored training boss now supplies a provisional
+selected-quality equipment pool with ordinary qualified armor wear, earned
+level-4 training, sales and two-client cold recovery verified;
+see [earned creature upgrades](docs/earned-creature-upgrade.md). The remaining
+connected native regression and corpse presentation audit are immediate gaps.
A normally created Atrox Enforcer has now killed two ordinary Leets, recovered,
collected cash, picked up a Monster Part, retained it across a server restart
and sold it through the training shop. See [starter progression](docs/starter-progression.md).
@@ -264,8 +268,12 @@ unverified mass/deletion/reclaim policies are in [backpacks](docs/backpacks.md).
the same consumers, with ordinary earned purchases and wear of gloves and a
sleeve verified. A QL2 Advanced Baseballbat also passes ordinary mission earning,
rejected wear, earned IP training, equip/remove, a full-health kill, canceled
- sale and cold retention. Useful creature equipment pools and wider early
- families remain. See [early armor](docs/early-armor.md) and
+ sale and cold retention. Ordinary Omni boss drops now also provide qualified
+ QL3 glove wear and earned level-4 training into retained QL5 gloves, with
+ two-client effects, sales and cold retention verified. Wider early families
+ and historical loot membership remain. See
+ [earned creature upgrades](docs/earned-creature-upgrade.md),
+ [early armor](docs/early-armor.md) and
[early melee](docs/early-melee.md).
- [x] Admit the complete Low-Tech armor set through shared quality and shop data.
Eight explicit original pairs cover QL1..200, including alternate body and leg
@@ -935,7 +943,7 @@ are recorded in [reclaim](docs/reclaim.md).
pickup, server restart, cancelled sale and accepted sale of the same generated
Monster Part, preserving issued gear and XP. See [NPC loot](docs/npc-loot.md)
and [starter progression](docs/starter-progression.md).
-- [ ] [P0] Roll loot for one creature profile. Check: controlled rolls select the
+- [x] Roll loot for one creature profile. Check: controlled rolls select the
documented entries and quantities, including an empty result where allowed.
Wire the profile into ordinary production spawns/deaths, not only controlled
corpse fixtures. Include a useful equippable upgrade and saleable loot, plus
@@ -945,7 +953,7 @@ are recorded in [reclaim](docs/reclaim.md).
provisional chances/cash values separately; reuse shared reward/item rules.
The production level-1/2 Leet profiles roll Monster Parts independently at a
provisional 50% chance and 1..5 cash. Level 1 selects QL1; level 2 selects
- uniformly from QL1..3. Useful equipment, broader levels/species and original
+ uniformly from QL1..3. Broader levels/species and original
distributions remain open. The mirrored Leets page names Monster Parts but dates
to 2010; neither it nor the dated newbie gathering accounts establish 14.9.1
drop chances or cash formulas. See [NPC loot](docs/npc-loot.md).
@@ -956,9 +964,16 @@ are recorded in [reclaim](docs/reclaim.md).
kills earned 600 XP, 10 corpse credits and QL 5 gloves / a QL 3 pistol. Pickup,
refusal without losing the unqualified gloves, pistol sale, a loot-funded
boots purchase, qualified wear and page/server restart preservation passed
- with the retained ordinary earned character. Raising that character to wear
- the retained gloves and the broader progression gate remain open.
- See [Omni training boss](docs/omni-training-boss.md).
+ with the retained ordinary earned character. A further nine full-health lives
+ now earn level 4, 1,350 XP and 19 collected corpse credits. A fresh QL3 drop
+ wears after earned training; the retained QL5 pair wears after the level-4
+ cap unlock. Both clients agree on removal/re-wear effects. A QL5 pistol sells
+ for 126 credits; cold recovery retains 235 credits, 26 items and 25 laboratory
+ charges. No grants or reward overrides were used. This completes the chosen
+ profile's functional progression check; its mapping, balance and loot choices
+ remain provisional. Historical distributions and the broader regression gate
+ remain separate work. See [Omni training boss](docs/omni-training-boss.md) and
+ [earned creature upgrades](docs/earned-creature-upgrade.md).
- [x] Connect selected-quality regular equipment to an authored training boss.
The original level-4 Clan Training BSML placement now admits a code-restricted
Salamander profile with original bite endpoints and explicit QL4 gloves/pistol
@@ -2919,6 +2934,12 @@ and server restarts. Turn every reproduced bug into a focused regression test.
after reconnect and restart. The rejected-drag defect below is reproduced and
fixed; continue auditing other paths rather than treating that one fix or
passing Go tests as proof that the entire earlier report is resolved.
+ The ordinary creature-upgrade run now conserves all 26 final identities through
+ level-cap refusal, skill purchases, two selected glove qualities, repeated
+ wear/removal, a cancelled/accepted pistol sale and both-client page/cold
+ recovery. Two unclaimed glove drops expired while still corpse-owned; neither
+ was an owned-item disappearance. See
+ [earned creature upgrades](docs/earned-creature-upgrade.md).
- [ ] [P2] Review nearly invisible original item icons separately from ownership
loss. Low-Tech sleeves 70561/85744 reference icon 1010008/13228: the original
14.9.1 PNG is almost entirely chroma-key green, with only a tiny shoulder in
@@ -3057,6 +3078,14 @@ and server restarts. Turn every reproduced bug into a focused regression test.
expiry, with untaken and partially looted items. Compare typed native
identities with server NPC interest; a successful shop-reentry fix does not
establish corpse or actor reentry correctness.
+ The ordinary Omni boss run instantiated nine native corpses using mesh 25717
+ and death resource 25721. Some showed only two small mesh portions above a
+ slope; backing away exposed clickable portions. Recover the generic death-pose,
+ root-motion and terrain placement contract before adding height offsets or
+ species exceptions. Retain the open-window expiry case where credits were
+ collected but the untaken gloves expired before pickup committed. Evidence:
+ [earned creature upgrades](docs/earned-creature-upgrade.md) and
+ `local/earned-creature-upgrade/`.
- [x] Commit corpse expiry before native removal. Check: unclaimed loot and filled
bags retire atomically before close/delete packets; failed or ignored writes
and failed COMMIT preserve state and retry. Cover both respawn/expiry orderings,
@@ -3151,6 +3180,13 @@ and server restarts. Turn every reproduced bug into a focused regression test.
the normal training shop's purchase catalog is empty. Useful upgrades,
purchases, ordinary level-up/IP spending and the rest of this scenario remain open.
Evidence and automated integration checks: [starter progression](docs/starter-progression.md).
+ The retained ordinary Enforcer now also follows full-health boss kills into
+ useful QL3 armor, earned level 4/IP training, stronger QL5 armor and a QL5
+ pistol sale. An ordinary observer verifies private progression isolation and
+ matching armor effects; all 26 final items survive both-client page reload
+ and cold restart. This advances the connected gate without completing its
+ repeatable fresh-character, death/reclaim and next-level coverage. See
+ [earned creature upgrades](docs/earned-creature-upgrade.md).
- [ ] [P2] Audit native input across focus transitions and rapid target changes.
Cover leaving/returning to the tab, opening/closing options or chat, held
keys/modifiers, repeats, reconnect and slow frames. Compare the first input
diff --git a/docs/earned-creature-upgrade.md b/docs/earned-creature-upgrade.md
@@ -0,0 +1,127 @@
+# Earned creature armor progression
+
+An ordinarily created Omni Atrox Enforcer now picks up and wears useful
+creature-dropped armor, earns another level, trains into a stronger retained
+drop and sells other creature loot. Both native WASM clients and SQLite agree
+on the equipment effects and durable ownership after page reload and a cold
+restart. This verifies the selected [Omni training boss](omni-training-boss.md)
+progression path; its mapping, balance and loot probabilities remain explicit
+reconstruction policy.
+
+## Ordinary acquisition
+
+The retained character began at level 3, with 1,825 current-level XP, 8,309 IP,
+90 credits and 23 owned items. Strength was 15 and Agility 11. Its previously
+earned QL 5 gloves 145 remained in inventory; bought Low-Tech gloves 38 and
+boots 147 were worn. Bought laboratory 144 held 48 charges.
+Creation used the current Options flow; the original game creation sequence
+remains a separate TODO.
+
+Nine successive authored boss lives began at full 150 HP. The player began
+each fight at its full 138 HP, using the existing QL 3 bat and native Fast
+Attack. There were no grants, edited skills, health resets, moved enemies or
+controlled reward rolls. The control panel and SQLite were used for observation
+and consistent private snapshots. Normal sitting, self-targeting and laboratory
+use provided recovery. Brawl remains unavailable as described in
+[its existing research](brawl.md); attempted B keys are not counted as attacks.
+
+| Boss instance | Final captured player HP | Corpse credits | Equipment outcome |
+| --- | ---: | ---: | --- |
+| 1068716 | 62 | 2 | QL 3 gloves 156 expired unclaimed |
+| 1068717 | 76 | 1 | QL 3 gloves 157 expired before pickup committed |
+| 1068718 | 59 | 1 | No equipment |
+| 1068719 | 75 | 3 | QL 5 pistol 158 picked up |
+| 1068720 | 66 | 1 | QL 5 gloves 159 picked up |
+| 1068721 | 47 | 3 | QL 3 gloves 160 picked up and worn |
+| 1068722 | 58 | 3 | No equipment |
+| 1068723 | 49 | 4 | QL 3 gloves 161 picked up |
+| 1068724 | 60 | 3 | No equipment; earned level 4 |
+
+HP values describe the retained native samples; passive recovery can advance
+before a later SQL read. The last boss still had 4 HP at the end of the timed
+fight capture. Its final blow and level-up occur in the subsequent ordinary
+backward-step capture, which supplies the final row above.
+
+Each death awarded 150 XP. Native packet reconstruction identifies all nine
+corpses, mesh 25717 and death resource 25721, with 21 total rolled credits.
+The first corpse's two credits expired unclaimed; ordinary Use collected the
+other 19. The two expired glove drops never became player-owned. Opening a
+corpse window alone does not establish successful pickup.
+
+The second client resumed the separately created level-1 character and walked
+to observe the final five fights. It remained at zero XP, 1,500 IP and zero
+credits with its same seven issued items. It saw the fighter's visible level
+change without receiving private XP/IP or its own level-up feedback.
+
+## Qualification and wear
+
+At level 3, native training spent 31 IP on Strength 15->17 and 100 IP on
+Agility 11->15. Another Agility point was refused at the level cap. With the
+hands slot empty, gloves 145 still required Agility 18 and remained owned.
+Re-wearing the original Low-Tech pair restored its exact armor contribution.
+
+New QL 3 gloves 160 qualified at Strength 17/Agility 15. Removing Low-Tech
+gloves 38 preserved them in inventory slot 85. Wearing 160 in hands slot 24
+changed the complete AC vector, stats 90..97, from
+`9/19/3/3/3/3/3/3` to `10/19/6/5/3/3/3/3`. Both clients agreed. Removal
+restored `6/16/2/2/2/2/2/2`, and re-wear restored the selected-quality effects
+without stacking them. The gloves rendered on the character.
+
+The ninth death raised the fighter to level 4 and granted 4,000 IP. Native
+training then admitted Agility 15->18 for exactly 96 IP. Retained QL 5 gloves
+145 now wore in slot 24; the QL 3 pair remained in inventory slot 86. Both
+clients reported `12/21/8/7/4/4/4/4`. Removal and re-wear repeated the same
+baseline and totals. No instance was replaced to make the stronger armor fit.
+
+## Sale and conservation
+
+Ordinary travel returned both characters to the restored Startup Shop. It
+quoted 126 credits for pistol 158. Declining preserved that same instance and
+the 109-credit wallet. The native return selected the first free inventory
+slot, moving the pistol from 82 to 81. Selecting that returned instance and
+accepting a new offer removed only 158 and paid exactly 126 credits.
+
+The final accounting is:
+
+- Cumulative XP: 5,875 + 1,350 = 7,225, or level 4 with 75/4,000 progress.
+- IP: 8,309 + 4,000 - 131 - 96 = 12,082.
+- Credits: 90 + 19 + 126 = 235.
+- Laboratory charges: 48 - 23 = 25, with ordinary recovery reaching 145 HP.
+- Owned items: the original 23 plus retained drops 159, 160 and 161 = 26.
+
+Both page reloads and a restart of the same server binary restored every native
+item identity, slot, quality and the laboratory count. Gloves 145 remained worn,
+the three new gloves remained owned, and the sold pistol stayed absent. All
+other original item records and placements were conserved apart from the
+documented equipment moves and consumed charges. Other players' inventories
+and the observer's progression remained unchanged. SQLite integrity and
+foreign-key checks passed.
+
+Both isolated clients used the GPU OpenGL renderer. Their runs recorded
+no page errors or WASM aborts. The browsers were closed after verification;
+the single development preview remains available on its default ports.
+
+## Regression and remaining work
+
+`server/earned_armor_training_test.go` follows rejected retained-armor wear and
+level-3 training through a killing action, level 4, the real 96-IP training
+price and durable wear/removal of the same instance. Its seeded near-boundary
+XP and one-hit target isolate qualification; the native fights above establish
+ordinary acquisition and full-health combat.
+
+The focused regression passes. The related normal and race runs each pass
+23 top-level tests and 125 results including subtests, with no skipped tests.
+`go vet ./server/... ./tools/data/...` passes. Production rules and data are
+unchanged from the preceding complete 1,701-test regression run.
+
+Evidence, replay-aware packet reconstruction, exact SQL comparisons and native
+screenshots are under `local/earned-creature-upgrade/`, particularly
+`combat-verified.json`, `native-verified.json` and `cold-restart.json`.
+
+Corpse presentation on slopes remains a P0 audit item. These native corpses
+existed at the recorded positions with visual instances, but sometimes only
+two small mesh portions protruded above the terrain. Backing away exposed
+clickable portions. Recover the original death-pose, root-motion and terrain
+placement contract before introducing offsets or species exceptions. Broader
+historical loot recovery, fresh-character regression, death/reclaim and the
+next enemy-level progression gate remain open.
diff --git a/docs/omni-training-boss.md b/docs/omni-training-boss.md
@@ -143,9 +143,10 @@ records and locations except intentionally sold bat 72 remain unchanged. The
character owns 23 items. SQLite integrity and foreign-key checks pass, and the
isolated GPU WASM runs captured no page errors.
-The native training Startup Shop body could not be found during this level-3
-run, although an earlier level-2 run rendered and used it. Its vending packet
-body is byte-identical in the two captures. The successful resupply and armor
-purchase above used ordinary travel to the basic city shop. A P0 TODO retains
-the startup-shop reproduction and camera/level/scene/picking alternatives;
-these checks do not establish a missing packet or its cause.
+The missing training Startup Shop from this run was traced to native scene
+section retirement and restored through shared scene replay; see
+[scene reentry](scene-reentry.md). A subsequent ordinary progression run now
+wears a fresh QL 3 drop, earns level 4 and trains into retained gloves 145, with
+two-client removal/re-wear, loot sale and cold recovery; see
+[earned creature upgrades](earned-creature-upgrade.md). Historical loot and the
+broader P0 gameplay regression remain open.
diff --git a/server/earned_armor_training_test.go b/server/earned_armor_training_test.go
@@ -0,0 +1,94 @@
+package main
+
+import (
+ "slices"
+ "testing"
+ "time"
+)
+
+func TestEarnedLevelFourUnlocksRetainedBossArmorTraining(t *testing.T) {
+ world := newOmniTrainingBossKillWorld(t, "unarmed")
+ player, client := world.characters[1], world.clients[1]
+ player.appearance = player.appearance&^(7<<4) | 4<<4
+ player.profession, player.level, player.experience = 9, 3, 3025
+ player.stats.Abilities.Strength, player.stats.Abilities.Agility = 17, 15
+ player.stats.ImprovementPoints = 8178
+ if err := world.saveUser_locked(player); err != nil {
+ t.Fatal(err)
+ }
+
+ // A retained drop and one-hit target isolate qualification, not combat balance.
+ identity := world.nextItem + 1
+ expected := []ownedItem{{ID: identity, Type: 51022, Template: 85596, Quality: 5, Count: 1, Slot: 64}}
+ if err := world.saveInventory_locked(player, playerInventory{LastID: identity, Items: slices.Clone(expected)}); err != nil {
+ t.Fatal(err)
+ }
+ world.combatRoll = func(uint32) uint32 { return 0 }
+ trained := player.baseStats()
+ trained.Abilities.Agility = 18
+
+ if err := world.handleInventory(client, inventoryMovePacket(1, 64, 24)[20:]); err != nil {
+ t.Fatal(err)
+ }
+ if err := world.handleSkillTraining(client, skillTrainingRequest(trained)[20:]); err != nil {
+ t.Fatal(err)
+ }
+ cold := newTestInventoryServer(t)
+
+ for _, current := range []*server{world, cold} {
+ owner := current.characters[1]
+ if owner.level != 3 || owner.experience != 3025 || owner.stats.Abilities.Agility != 15 || owner.stats.ImprovementPoints != 8178 ||
+ !slices.Equal(owner.inventory.Items, expected) || owner.inventory.equipmentBonus(91) != 0 || client.equipment != nil {
+ t.Fatal("level-three cap or rejected wear changed training, IP or retained armor", owner.profile())
+ }
+ }
+
+ attackForExperience(t, world, "unarmed")
+ cold = newTestInventoryServer(t)
+
+ for _, current := range []*server{world, cold} {
+ owner := current.characters[1]
+ if owner.level != 4 || owner.experience != 75 || owner.stats.ImprovementPoints != 12178 ||
+ owner.stats.Abilities.Agility != 15 || owner.health != 25 || !slices.Equal(owner.inventory.Items, expected) {
+ t.Fatal("earned level changed raw abilities, healed the player or lost the retained drop", owner.profile())
+ }
+ }
+
+ trained = player.baseStats()
+ trained.Abilities.Agility = 18
+ if err := world.handleSkillTraining(client, skillTrainingRequest(trained)[20:]); err != nil {
+ t.Fatal(err)
+ }
+ // Finish the killing swing before beginning the ordinary equipment delay.
+ time.Sleep(time.Until(player.rechargeUntil))
+ for _, move := range [][2]uint32{{64, 24}, {24, 64}, {64, 24}} {
+ request := inventoryMovePacket(1, move[0], move[1])
+ if move[0] < 64 {
+ request = itemMovePacket(1, move[0], move[1])
+ }
+ if err := world.handleInventory(client, request[20:]); err != nil || client.equipment == nil {
+ t.Fatal("earned qualification did not admit retained armor wear/removal", move, err)
+ }
+ world.advanceEquipment(client.equipment.readyAt)
+ expected[0].Slot = move[1]
+ cold = newTestInventoryServer(t)
+
+ for _, current := range []*server{world, cold} {
+ owner := current.characters[1]
+ if owner.level != 4 || owner.experience != 75 || owner.stats.ImprovementPoints != 12082 ||
+ owner.stats.Abilities.Strength != 17 || owner.stats.Abilities.Agility != 18 || owner.health != 25 ||
+ owner.inventory.Credits != 0 || !slices.Equal(owner.inventory.Items, expected) ||
+ current.itemPlacements[identity] != (itemPlacement{Player: 1, Slot: move[1]}) {
+ t.Fatal("trained armor lifecycle changed its instance, earned state or durable placement", move, owner.profile())
+ }
+ for index, bonus := range []int32{6, 5, 6, 5, 2, 2, 2, 2} {
+ if move[1] != 24 {
+ bonus = 0
+ }
+ if owner.inventory.equipmentBonus(90+uint32(index)) != bonus {
+ t.Fatal("retained selected-quality armor lost or repeated a modifier", move, index)
+ }
+ }
+ }
+ }
+}