commit fc2a13adf0d2a3d2153b9c94d973b465dbc7567f
parent 2c1c5533766f019a04a578cd7e6d54e490d59599
Author: anon <anon@example.com>
Date: Mon, 26 Oct 2026 19:20:25 +0000
Verify ordinary starter combat, earned loot recovery and sale
Record two normal Atrox kills, healing and XP, corpse cash/pickup, server
restart, native cancelled/accepted sale and reconnect without admin grants.
Account for the generated instance and every issued item. Keep broader
starter viability, useful upgrades, purchases and full progression open.
Add generated-weapon pickup/requirements/training/equip/re-equip coverage,
and generated-loot sale after cold loading without losing worn equipment.
Full server regression: 1359 roots / 14489 results. Focused and race each:
157 roots / 471 results. The previous death pipeline fails 13 reward roots;
its nonlethal control passes. Vet and owned-fixture cleanup pass.
Diffstat:
4 files changed, 280 insertions(+), 2 deletions(-)
diff --git a/TODO.md b/TODO.md
@@ -45,7 +45,11 @@ shop sales and a limited purchase subset. These are separate verified examples;
they do not yet prove ordinary players can progress without admin provisioning.
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 a connected native gameplay regression are the immediate gaps. Quest and mission checkboxes below
+and the remaining connected native gameplay regression are the 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).
+Quest and mission checkboxes below
are still open; they have not been implemented by the shop or dialogue work.
Next execution order:
@@ -508,6 +512,13 @@ for exact records, protocol, tests and remaining reconstruction assumptions.
leaving the survivor without XP or loot access. Both returns used the default
city resurrection location. These observations identify scenarios to resolve,
not historical proof of the correct balance, reward or arrival rules.
+ A later full-AggDef Solitus attempt also died; its first-aid click did not
+ consume a charge, so successful first-aid survival is still untested. An Atrox with
+ 84 HP, the issued bat/shirt, trained Treatment and AggDef 100 won two ordinary
+ fights and recovered between them. Keep the broader viability/death route
+ open; neither an invented Leet HP value nor a new training reclaim terminal
+ follows from these observations. The shipped training playfields contain no
+ reclaim placement. See [starter checks](docs/starter-progression.md).
- [ ] [P1] Add a second species with different behavior or equipment. Check: changing
one species' profile does not change the other species.
- [x] Reconcile recovery for currently unprofiled creatures. Check: a damaged
@@ -623,7 +634,10 @@ are recorded in [reclaim](docs/reclaim.md).
items, and checkpoint/respawn cannot reroll existing corpses. An ordinary native
Leet kill produced a durable QL 1 Monster Part and 3 credits without admin
provisioning. Its deceased leading contributor retained loot rights; native
- pickup/sale remains unverified in that run. See [NPC loot](docs/npc-loot.md).
+ pickup/sale remained unverified in that run. A later normal Atrox run completed
+ 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
documented entries and quantities, including an empty result where allowed.
Wire the profile into ordinary production spawns/deaths, not only controlled
@@ -638,6 +652,14 @@ are recorded in [reclaim](docs/reclaim.md).
sale route 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).
+- [x] Follow generated loot through equipment and sale consumers. Check: a
+ controlled weapon drop survives pickup, cold load, rejected wear below its
+ requirements, skill-training requests and wear/remove/wear with one stable identity.
+ Monster Parts cannot replace worn gear; cancelled sale retains the reward,
+ and accepted/repeated sale after cold load credits once without losing the
+ equipped weapon. These fixtures do not establish historical drop membership.
+ See `server/npc_loot_progression_test.go` and the separate ordinary native
+ pickup/restart/sale check in [starter progression](docs/starter-progression.md).
- [x] Remove an expired corpse. Check: observers lose the corpse and stale loot
requests cannot recover or duplicate its contents.
@@ -2293,6 +2315,12 @@ and server restarts. Turn every reproduced bug into a focused regression test.
contributor died before the kill, denying the survivor loot and XP. This is
partial coverage, not completion of the loop. Native captures and cleanup:
`local/npc-loot/`. Prioritize the starter fight/recovery task above.
+ A later Atrox run completed two normal solo kills, 200 XP, healing and earned
+ corpse cash, plus native pickup -> server restart -> cancelled sale -> sale ->
+ reconnect for one generated Monster Part. All issued gear stayed accounted
+ for. The normal training shop's purchase catalog is empty; useful upgrades,
+ purchases, level-up and the rest of this acceptance scenario remain open.
+ Evidence and automated integration checks: [starter progression](docs/starter-progression.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/npc-loot.md b/docs/npc-loot.md
@@ -88,3 +88,10 @@ Both owned clients closed without page errors. All nine owned characters and
35 issued items were removed with foreign-key/integrity checks and unchanged
unrelated rows. The single shared HTTPS preview remains available; generated
world corpses use their ordinary expiry lifecycle.
+
+A subsequent normal Atrox check completed two solo kills, collected both cash
+awards, picked up the generated Monster Part, retained it across server restart,
+cancelled and accepted its native sale, and reconnected with the correct cash
+and original issued gear. The separate
+[starter progression report](starter-progression.md) records the exact scope,
+remaining gaps and additional generated-equipment/sale regression tests.
diff --git a/docs/starter-progression.md b/docs/starter-progression.md
@@ -0,0 +1,95 @@
+# Ordinary starter progression checks
+
+The current server has one normally played combat/reward path, with important
+remaining gaps. These checks use the shared HTTPS preview and headed Chromium
+on the GPU. Character creation, training, equipment, movement, targeting,
+combat and healing use ordinary Options/native controls. No admin-created
+items, edited stats, cash or enemies are used in the browser scenario.
+
+## Starting controls and resources
+
+A Solitus Enforcer trained Body Development to raw 10 and Stamina to 9, wore its
+issued Baseballbat and Omni shirt, healed to 53 HP and selected AggDef 100.
+It died fighting a normal level 1 Leet. A first-aid click did not consume a
+charge, so this run does not test survival with successful first aid. Earlier
+midpoint fights also failed. This is a reproducible starter scenario to audit,
+not evidence of canonical Leet health or a universal claim that Solitus cannot
+progress. Original Brawl, hit/miss defenses, complete starting skills, NPC
+ratings and balance remain incomplete.
+
+The Agg/Def slider works: its thumb must be dragged. A click beside the thumb
+moves one step; a test that missed the thumb retained a value near zero. Native
+snapshots and outgoing SetAggDef messages distinguish 0, 1, 100 and 99. No
+client or server change was needed. The
+[February 2002 firsthand walkthrough](https://game.watch.impress.co.jp/docs/20020213/yuki14_2.htm)
+explicitly starts at the midpoint and recommends maximum aggression for solo
+combat. It also describes self-targeted healing, corpse cash collection and
+selling loot through the training-area machine. This corroborates the route,
+not the reconstruction's enemy health, drop chances or reward amounts.
+
+An Atrox Enforcer trained Body Development to 10 and Stamina to 13, giving
+84 maximum HP. Its initial effective Treatment was only 5: the native lab
+rejected use without consuming a charge. Native IP purchases raised Treatment
+and First Aid to raw 7. Self-targeting, sitting and using the lab then consumed
+one charge and restored resources. This does not bypass item requirements.
+
+## Normal combat and earned ownership
+
+The Atrox used its issued bat and shirt at AggDef 100. Two ordinary, fully
+healthy level 1 Leets (MonsterData 17655) died to its solo attacks, awarding
+100 XP each. The observing character received no XP. The first kill left cash
+and no item; the second generated one QL 1 Monster Part. These outcomes use the
+explicitly provisional profile in [NPC loot](npc-loot.md).
+
+The native corpse window showed the Monster Part. Its ordinary pickup moved
+generated instance 496 from corpse 1068650/slot 0 to player 193/inventory slot
+67. Both corpse opens awarded one credit, for a balance of 2. The issued bat
+492 remained equipped in slot 6, shirt 495 in slot 21, and all other issued
+items retained their identities. Only successful lab uses reduced charges.
+
+Both owned clients then closed and the sole shared server restarted, using
+the same binary and database. The earned instance, slot, 200 XP, 2 credits and
+issued inventory survived. The same two browser accounts reconnected; the native
+inventory and HUD showed the retained item, XP and cash. The Atrox walked through the gate to the authored
+training-ground shop at [60, 14, 50]. Its purchase catalog was empty. Ordinary
+pick/drop offered the Monster Part for 5 credits; Decline restored its native
+inventory row without changing durable ownership or cash. A second offer and
+Accept sold it. Reconnect retained 7 credits and 200 XP; instance 496 was absent
+from both items and placements, while every issued item retained its identity,
+slot and charge count. No browser errors occurred.
+
+## Automated boundary
+
+`server/npc_loot_progression_test.go` follows a generated weapon through corpse
+pickup, cold loading, rejected wear below requirements, skill-training requests,
+wear/remove/wear and further database reopens. A second case rejects wearing
+Monster Parts without replacing the equipped axe, cancels a proposed sale,
+reopens the database, then accepts the sale twice. Only one sale is credited;
+the generated item disappears while the equipped axe and earned XP remain.
+
+Those isolated tests place the shop fixture at its authored location and use
+a controlled loot entry/one-hit victim. They do not establish the axe as
+historical Leet loot or prove ordinary travel, starter balance or a complete
+progression loop. The browser checks above supply separate normal-play evidence.
+
+## Remaining acceptance
+
+Useful equippable production drops, affordable useful shop purchases, earning
+a level and spending its IP, the next enemy level, and a complete death/return/
+reclaim route remain open. Solitus starter viability needs further audit. The
+training playfields contain no reclaim statel in the shipped placement records;
+that alone does not select a default resurrection location. Do not replace the
+current default with an invented training-ground reclaim terminal.
+
+The full server suite passed 1,359 roots (14,489 results). Focused and race
+selections each passed 157 roots (471 results), including the two new integration
+cases. Against the previous outcome pipeline, 13 reward roots failed and the
+nonlethal control passed; this overlay retains current table/schema/test source.
+`go vet` passed. An initial full-suite attempt lacked sandbox listener access;
+the complete rerun with required local socket access passed.
+
+Both owned clients closed. All nine owned characters and their 35 issued items
+were removed; unrelated rows and the two user players were preserved, with
+foreign-key/integrity checks. One shared HTTPS preview remains available.
+Captures, ordered native-wire decoding, read-only heap samples, item accounting,
+source manifests, automated logs and cleanup checks are in `local/starter-play/`.
diff --git a/server/npc_loot_progression_test.go b/server/npc_loot_progression_test.go
@@ -0,0 +1,148 @@
+package main
+
+import (
+ "ao/server/gamedata"
+ "slices"
+ "testing"
+)
+
+func TestNPCLootWeaponRetainsInstanceAcrossRejectedWearTrainingAndReequip(t *testing.T) {
+ world, _ := newKillExperienceWorld(t, "unarmed")
+ player, client := world.characters[1], world.clients[1]
+ player.stats.Melee.OneHandEdged, player.stats.Melee.FastAttack = 0, 0
+ if err := world.saveUser_locked(player); err != nil {
+ t.Fatal(err)
+ }
+ // This controlled table tests weapon delivery, not historical Leet membership.
+ profile := *world.characters[1000000].combatProfile
+ profile.Loot = []gamedata.NPCLoot{{Template: 209283, Chance: 100}}
+ world.characters[1000000].combatProfile = &profile
+ world.combatRoll = func(uint32) uint32 { return 0 }
+ identity := world.nextItem + 1
+
+ attackForExperience(t, world, "unarmed")
+ if err := world.handleLootUse(client, lootUseRequest(1)); err != nil {
+ t.Fatal(err)
+ }
+ if err := world.handleInventory(client, lootTakeRequest()); err != nil {
+ t.Fatal(err)
+ }
+ world = newTestInventoryServer(t)
+ player = world.characters[1]
+ client = &worldClient{id: 1, conn: &combatTestConn{}, target: true, ready: true}
+ world.clients[1] = client
+ if err := world.handleInventory(client, inventoryMovePacket(1, 64, 6)[20:]); err != nil {
+ t.Fatal(err)
+ }
+
+ expected := []ownedItem{{ID: identity, Type: 51018, Template: 209283, Quality: 1, Slot: 64, Count: 1}}
+ if client.equipment != nil || !slices.Equal(player.inventory.Items, expected) ||
+ !slices.Equal(newTestInventoryServer(t).characters[1].inventory.Items, expected) {
+ t.Fatal("rejected wear lost or changed the generated weapon")
+ }
+
+ // Train the actual requirements, then wear/remove/wear that same instance.
+ stats := player.baseStats()
+ stats.Melee.OneHandEdged, stats.Melee.FastAttack = 5, 5
+ if err := world.handleSkillTraining(client, skillTrainingRequest(stats)[20:]); err != nil {
+ t.Fatal(err)
+ }
+ for _, move := range [][2]uint32{{64, 6}, {6, 64}, {64, 6}} {
+ 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("qualified generated weapon did not begin its move", move, err, player.stats.Melee, player.inventory.Items, client.lootCorpse)
+ }
+ world.advanceEquipment(client.equipment.readyAt)
+ expected[0].Slot = move[1]
+ cold := newTestInventoryServer(t)
+ if !slices.Equal(player.inventory.Items, expected) || !slices.Equal(cold.characters[1].inventory.Items, expected) ||
+ world.items[identity].Type != 51018 || world.itemPlacements[identity] != (itemPlacement{Player: 1, Slot: move[1]}) ||
+ player.experience != 100 || player.inventory.Credits != 1 || world.nextItem != identity {
+ t.Fatal("generated weapon changed identity, type, placement or rewards during wear/recovery")
+ }
+ }
+}
+
+func TestNPCLootSaleAfterRestartPreservesEquippedWeaponAndConsumesRewardOnce(t *testing.T) {
+ world, _ := newKillExperienceWorld(t, "axe")
+ world.combatRoll = func(uint32) uint32 { return 0 }
+ player, client := world.characters[1], world.clients[1]
+ player.appearance = 0x515
+ if err := world.saveUser_locked(player); err != nil {
+ t.Fatal(err)
+ }
+ weapon := player.inventory.Items[0]
+ identity := world.nextItem + 1
+
+ attackForExperience(t, world, "axe")
+ if err := world.handleLootUse(client, lootUseRequest(1)); err != nil {
+ t.Fatal(err)
+ }
+ if err := world.handleInventory(client, lootTakeRequest()); err != nil {
+ t.Fatal(err)
+ }
+ world = newTestInventoryServer(t)
+ player = world.characters[1]
+ client = &worldClient{id: 1, conn: &combatTestConn{}, target: true, ready: true}
+ world.clients[1] = client
+ // Monster Parts cannot replace the already equipped weapon.
+ if err := world.handleInventory(client, inventoryMovePacket(1, 64, 6)[20:]); err != nil {
+ t.Fatal(err)
+ }
+ expected := []ownedItem{weapon, {ID: identity, Type: 51005, Template: 42640, Quality: 1, Slot: 64, Count: 1}}
+ if client.equipment != nil || !slices.Equal(player.inventory.Items, expected) {
+ t.Fatal("invalid Monster Parts wear lost the reward or equipped weapon")
+ }
+
+ // Isolate shop ownership at its authored location; native tests cover travel.
+ player.position = [3]float32{60, 14.75, 53}
+ if err := world.savePosition_locked(player); err != nil {
+ t.Fatal(err)
+ }
+ if err := world.handleShopUse(client, shopUseRequest(2)); err != nil {
+ t.Fatal(err)
+ }
+ add := shopTradePacket([2]uint32{50000, 1}, 4, [2]uint32{50000, 1}, [2]uint32{104, 64})[20:]
+ if err := world.handleTrade(client, add); err != nil {
+ t.Fatal(err)
+ }
+ if err := world.handleTrade(client, shopTradePacket([2]uint32{50000, 1}, 2, [2]uint32{}, [2]uint32{})[20:]); err != nil {
+ t.Fatal(err)
+ }
+ cold := newTestInventoryServer(t)
+ if !slices.Equal(cold.characters[1].inventory.Items, expected) || cold.characters[1].inventory.Credits != 1 {
+ t.Fatal("cancelled sale changed durable reward ownership or cash")
+ }
+ world, player = cold, cold.characters[1]
+ client = &worldClient{id: 1, conn: &combatTestConn{}, target: true, ready: true}
+ world.clients[1] = client
+ if err := world.handleShopUse(client, shopUseRequest(1)); err != nil {
+ t.Fatal(err)
+ }
+ if err := world.handleTrade(client, add); err != nil {
+ t.Fatal(err)
+ }
+ for range 2 {
+ if err := world.handleTrade(client, shopTradePacket([2]uint32{50000, 1}, 1, [2]uint32{}, [2]uint32{})[20:]); err != nil {
+ t.Fatal(err)
+ }
+ }
+ restored := newTestInventoryServer(t)
+
+ for _, current := range []*server{world, restored} {
+ if !slices.Equal(current.characters[1].inventory.Items, []ownedItem{weapon}) || current.characters[1].inventory.Credits != 6 ||
+ current.characters[1].experience != 100 || current.nextItem != identity || len(current.characters[1000000].corpse.items) != 0 ||
+ current.characters[1000000].corpse.credits != 0 {
+ t.Fatal("sale lost equipped gear, repeated rewards or resurrected the sold instance", current.characters[1].inventory, current.characters[1].experience, current.nextItem, identity)
+ }
+ if _, exists := current.items[identity]; exists {
+ t.Fatal("sold generated instance remained in the shared item cache")
+ }
+ if _, exists := current.itemPlacements[identity]; exists {
+ t.Fatal("sold generated instance retained a placement")
+ }
+ }
+}