commit 404abba4fe110ed9f5690aff82bd5aae07eab4da
parent 677a43b5c858bebbe30b67cfa9218d14dc23894c
Author: anon <anon@example.com>
Date: Thu, 29 Oct 2026 12:26:09 +0000
Admit starter Reets through shared combat profiles
Diffstat:
6 files changed, 287 insertions(+), 2 deletions(-)
diff --git a/TODO.md b/TODO.md
@@ -716,6 +716,20 @@ for exact records, protocol, tests and remaining reconstruction assumptions.
and vet pass. Broader families, higher levels and useful equipment drops remain
open. See
[Tiny Stalker scope](docs/tiny-stalker.md).
+- [x] [P0] Admit and verify original starter Reets through shared combat rules.
+ RT01's original summon item names Reet of Paradise; preserve the inferred
+ body and full-template uncertainty. Original Omni/Clan training groups cover
+ levels 1..2. Audit Peck/Facepeck records, keep attack selection and balance
+ provisional, and verify population recovery, attack timing, pursuit,
+ selected-quality loot, native kills/pickup and cold item/progress retention.
+ Do not infer later island drops or a universal species growth formula.
+ Data-only profiles now cover both levels. Full regression (16,752 results),
+ focused race checks, vet and the build pass. Ordinary native fights retain
+ earned loot/cash/XP; two clients verify combat health and private XP, followed
+ by exact item/charge/equipment recovery across page and cold reconnects.
+ A corpse expired before the observer's attempted use; foreign-looter rejection
+ remains part of the broader loot audit rather than a claimed native result.
+ See [starter Reets](docs/reet-progression.md).
- [x] Make the next supported enemy level available through ordinary starter
play. Check: a new player can reach and identify supported level-1 and level-2
enemies without admin placement. Resolve the generator's minimum-only choice
diff --git a/docs/reet-progression.md b/docs/reet-progression.md
@@ -0,0 +1,100 @@
+# Starter Reet combat
+
+Original starter RT01 groups now have bounded level-1 and level-2 combat
+profiles. They use the shared attack, pursuit, recovery, corpse, reward and
+persistence rules. No Reet-specific runtime handler is added. Other codes,
+bodies, placeholder appearances and levels outside this range remain unadmitted.
+
+## Original records and uncertainty
+
+The original GM Pet Shell: Reet of Paradise (163515) explicitly summons RT01.
+This supports the code's name; it does not recover the complete NPC template.
+The existing MonsterData 30365 / appearance 229 binding remains inferred.
+A format-aware reread of original resource 1000014 confirms four RT01 starter
+groups with 19 authored positions at levels 1..2: two each in Omni Training 950
+and Clan Training 952. Neutral Training 954 has no RT01 group. Their original
+areas and level ranges remain unchanged. Coordinates come from authored points;
+allocating each creature to a particular point remains inferred.
+
+| Original endpoints | Attack | QL 1 damage / critical bonus | Attack / recharge |
+| --- | --- | --- | --- |
+| 121038 / 121039 | Reet Peck | 4..9 / 4 | 235 / 235 cs |
+| 121041 / 121042 | Reet Facepeck | 6..12 / 6 | 430 / 430 cs |
+
+Both use Martial Arts against Evade Close, MeleeAC and range 5. Their original
+equippers 121040/121043 name REW1/REW2. Selecting Peck alone remains provisional;
+the records do not establish how the original server chose between attacks.
+All seven complete records, including the summon item, independently match
+every decoded field in the maintained catalog. The original resource index
+SHA256 is `46e5dc54af9358cc9bff05f4358e86af630e497bc677f361c133c88073b84d71`.
+
+## Bounded reconstruction policy
+
+Both levels use 100 HP, 100 solo kill XP and raw Martial Arts, Dodge, Duck,
+Evade Close and Nano Resist 5. Initiative 0 / AggDef 75 retain Peck's original
+phases. Level 1 uses its exact 4..9 attack; level 2 resolves 4..10 through the
+shared weapon interpolation. Cash 1..5, a 50% Monster Part chance, QL 1 at level 1
+or QL 1..3 at level 2, 100-second respawn and 180-second corpse lifetime are
+explicit gameplay choices. They are not recovered species growth or loot curves.
+No later island equipment, speech or universal combat statistics are inferred.
+
+Original records, population audits, test logs and native evidence are retained
+under `local/reet-progression/`.
+
+## Verification
+
+Public-handler checks load and cold-recover every starter Reet group, retain
+selected levels and native Peck endpoints, and reject different codes, bodies,
+placeholder appearances and level 3. Combat checks the original 235 cs attack
+phase and 470 cs cycle. Six direct killing actions cover both admitted levels,
+selected QL 1/3 Monster Parts, exact XP/cash and cold corpse ownership. Shared
+pursuit/return, out-of-range engagement and native recovery regressions cover
+both levels. Focused and race runs each pass 17 roots / 65 results; vet and the
+server build pass.
+
+## Ordinary WASM combat
+
+The retained Clan Atrox Enforcer walked from Tir Backyard 1 into its original
+training area with seven owned instances, 22 credits, 100 XP, 1,265 IP and its
+earned QL 1 Advanced Baseballbat 189. No stats, items, money, enemies or outcomes
+were supplied through admin edits.
+
+Normal Tab targeting and T inspection identified full-health level-1 and level-2
+Reets in their authored areas. Native weapon probes matched Peck endpoints,
+selected QL, 4..9 / 4..10 damage, critical bonus 4, MeleeAC and 235 cs phases.
+The first fight awarded 100 XP and two credits. Its visible corpse opened and
+ordinary left-click pickup transferred QL 1 Monster Part 190 into inventory.
+One issued laboratory charge was consumed during recovery to 84 HP.
+
+The full-health level-2 fight awarded another 100 XP and four credits. The
+corpse opened normally with no item, exercising the empty roll. The character
+retained all eight owned identities, 28 credits, 300 XP and 1,265 IP. Both corpses
+were visible and clickable after their death animations settled; this does not
+resolve the separate generic corpse/slope audit.
+
+A second normally created Clan Enforcer observed another full-health level-2
+fight. Both clients agreed on the fighter's settled 74 HP and the observer's
+60 HP. Only the fighter gained 100 XP and two corpse credits, reaching 400 XP
+and 30 credits. Both typed native registries contained the corpse at the same
+position. The fighter initially obscured the observer's view; moving aside
+exposed the remains. The corpse expired before the attempted observer use and
+subsequent item pickup. Its part remained unclaimed, so this is an expiry case,
+not a verified foreign-looter rejection or another owned drop.
+
+Both page reconnects retained every item, slot, quality and charge. The fighter
+retained all eight instances, equipped reward 189, QL 1 part 190, 20 laboratory
+charges, 400 XP, 30 credits and 1,265 IP. The observer retained its six issued
+instances, zero XP/credits and 1,500 IP. Natural recovery restored the fighter
+to 84 HP without consuming another laboratory charge during the observer run.
+
+The sole preview stopped and flushed normally before a private backup and cold
+restart of the same binary. All player records, wallets, item locations,
+missions/encounters and learned nanos matched across restart; integrity and
+foreign-key checks passed. Fresh GPU WASM sessions then restored both clients'
+exact inventories, charges, equipped weapon, XP, IP and cash. Their page and
+cold snapshots are checked independently against the saved owned instances.
+
+The complete server/data regression passed 1,714 roots / 16,752 results. All
+started test packages completed successfully; no individual tests were skipped.
+Owned test browsers were closed and their normal reconnect leases expired,
+leaving the single default-port LAN preview available.
diff --git a/server/gamedata/npc_combat.yaml b/server/gamedata/npc_combat.yaml
@@ -79,6 +79,32 @@
quality: [9, 11]
chance: 50
+30365:
+ 1: &reet
+ # RT01's name is an original client reference; its complete template is inferred.
+ template_code: RT01
+ # Provisional starter balance, not a recovered species growth or loot formula.
+ health: 100
+ experience: 100
+ skills: {100: 5, 153: 5, 154: 5, 155: 5, 168: 5}
+ # Original ReetPeck endpoints; selecting Peck rather than Facepeck is provisional.
+ weapon: [121038, 121039]
+ initiative: 0
+ agg_def: 75
+ respawn_seconds: 100
+ corpse_seconds: 180
+ credits: [1, 5]
+ loot:
+ - template: 42640
+ quality: [1, 1]
+ chance: 50
+ 2:
+ <<: *reet
+ loot:
+ - template: 42640
+ quality: [1, 3]
+ chance: 50
+
17708:
2: &tiny_stalker
# SR01's species binding is medium-confidence; see docs/tiny-stalker.md.
diff --git a/server/npc_engagement_range_test.go b/server/npc_engagement_range_test.go
@@ -14,7 +14,7 @@ func TestProfiledNPCRetainsEngagementOutsideWeaponRange(t *testing.T) {
level uint16
rangeM float32
}{
- {17655, 1, 10}, {17655, 2, 10}, {30354, 4, 12},
+ {17655, 1, 10}, {17655, 2, 10}, {30365, 1, 5}, {30365, 2, 5}, {30354, 4, 12},
} {
for _, roaming := range []bool{false, true} {
t.Run(fmt.Sprintf("%d/%d/roaming=%t", profile.monster, profile.level, roaming), func(t *testing.T) {
diff --git a/server/npc_shared_pursuit_test.go b/server/npc_shared_pursuit_test.go
@@ -11,7 +11,7 @@ func TestAdmittedNPCProfilesSharePursuitAndReturn(t *testing.T) {
for _, profile := range []struct {
monster uint32
level uint16
- }{{17655, 1}, {17655, 2}, {17708, 2}, {17708, 3}, {17708, 4}, {30354, 4}} {
+ }{{17655, 1}, {17655, 2}, {30365, 1}, {30365, 2}, {17708, 2}, {17708, 3}, {17708, 4}, {30354, 4}} {
for _, roaming := range []bool{false, true} {
t.Run(fmt.Sprintf("%d/%d/roaming=%t", profile.monster, profile.level, roaming), func(t *testing.T) {
world, _, start := newNPCPursuitWorld()
diff --git a/server/reet_test.go b/server/reet_test.go
@@ -0,0 +1,145 @@
+package main
+
+import (
+ "ao/server/gamedata"
+ "encoding/binary"
+ "fmt"
+ "slices"
+ "testing"
+ "time"
+)
+
+func TestReetStarterPopulationsRetainProfilesAndNativeWeapons(t *testing.T) {
+ for _, id := range []string{"950/district/2/group/1/authored_point", "950/district/3/group/2/authored_point", "952/district/0/group/2/authored_point", "952/district/4/group/3/authored_point"} {
+ t.Run(id, func(t *testing.T) {
+ data := testNPCData()
+ data.Playfields[0].Districts[0].Groups[0] = *gamedata.NPCGroups[id]
+ useNPCData(t, data)
+ world := newTestServer(t)
+ if err := world.flushWorld(); err != nil {
+ t.Fatal(err)
+ }
+
+ cold := newTestInventoryServer(t)
+
+ for _, current := range []*server{world, cold} {
+ for index := range data.Playfields[0].Districts[0].Groups[0].Positions {
+ npc := current.characters[1000000+uint32(index)]
+ if npc.name != "Reet of Paradise" || npc.monsterData != 30365 || npc.level < 1 || npc.level > 2 ||
+ npc.combatProfile == nil || npc.combatProfile.TemplateCode != "RT01" || npc.maximumHealth() != 100 ||
+ npc.health != 100 || npc.attackRating() != 5 || itemStat(npc.attackWeapon(), 286) != 4 ||
+ itemStat(npc.attackWeapon(), 285) != uint32(8+npc.level) {
+ t.Fatal("original Reet population lost its bounded profile, level or weapon", npc.id, npc.level, npc.combatProfile)
+ }
+ packet := targetPacket(characterPacket(npc))
+ end := int(binary.BigEndian.Uint16(packet[6:8]))
+ if binary.BigEndian.Uint32(packet[end-16:end-12]) != 121038 || binary.BigEndian.Uint32(packet[end-12:end-8]) != 121039 ||
+ binary.BigEndian.Uint32(packet[end-4:end]) != uint32(npc.level) {
+ t.Fatal("native Reet spawn lost its selected-quality Peck weapon")
+ }
+ }
+ }
+ })
+ }
+}
+
+func TestReetProfileRejectsOtherCodesBodiesAndLevels(t *testing.T) {
+ for _, change := range []string{"other code", "placeholder", "other body", "level 3"} {
+ t.Run(change, func(t *testing.T) {
+ data := testNPCData()
+ group := &data.Playfields[0].Districts[0].Groups[0]
+ group.TemplateCode, group.MonsterData, group.Levels, group.AppearanceStatus = "RT01", 30365, [2]uint16{1, 1}, "inferred_species"
+ switch change {
+ case "other code":
+ group.TemplateCode = "RT02"
+ case "placeholder":
+ group.AppearanceStatus = "placeholder_creature"
+ case "other body":
+ group.MonsterData = 17708
+ case "level 3":
+ group.Levels = [2]uint16{3, 3}
+ }
+ useNPCData(t, data)
+ world := newTestServer(t)
+ if err := world.flushWorld(); err != nil {
+ t.Fatal(err)
+ }
+
+ cold := newTestInventoryServer(t)
+
+ if world.characters[1000000].combatProfile != nil || cold.characters[1000000].combatProfile != nil {
+ t.Fatal("unreviewed Reet identity or level inherited an admitted profile")
+ }
+ })
+ }
+}
+
+func TestReetCombatUsesOriginalPeckTiming(t *testing.T) {
+ data := testNPCData()
+ group := &data.Playfields[0].Districts[0].Groups[0]
+ group.TemplateCode, group.MonsterData, group.Levels, group.AppearanceStatus = "RT01", 30365, [2]uint16{1, 1}, "inferred_species"
+ useNPCData(t, data)
+ world := newTestServer(t)
+ player := world.newCharacter()
+ player.position = group.Positions[0]
+ world.clients[player.id] = &worldClient{id: player.id, conn: &combatTestConn{}, target: true, ready: true, npcs: map[uint32]bool{1000000: true}}
+ world.combatRoll = func(limit uint32) uint32 {
+ if limit == 100 {
+ return 50
+ }
+ return 0
+ }
+
+ if err := world.handleCombat(world.clients[player.id], attackPacket(player.id, 1000000)[20:]); err != nil {
+ t.Fatal(err)
+ }
+ start := player.nextAttack
+ world.advanceCombat(start)
+ world.advanceCombat(start.Add(2350*time.Millisecond - time.Nanosecond))
+ if player.health != 34 {
+ t.Fatal("Peck landed before its original attack phase ended")
+ }
+ world.advanceCombat(start.Add(2350 * time.Millisecond))
+
+ if player.health != 30 || world.characters[1000000].nextAttack != start.Add(7050*time.Millisecond) {
+ t.Fatal("Reet did not use original Peck damage and attack/recharge phases", player.health, world.characters[1000000].nextAttack.Sub(start))
+ }
+}
+
+func TestReetDeathsRetainSelectedQualityRewardsAcrossActions(t *testing.T) {
+ for _, attack := range []string{"unarmed", "axe", "pistol", "fling", "fast", "nano"} {
+ for _, expected := range []struct {
+ level uint16
+ quality uint32
+ }{{1, 1}, {2, 3}} {
+ t.Run(fmt.Sprintf("%s/%d", attack, expected.level), func(t *testing.T) {
+ world, _ := newKillExperienceWorld(t, attack)
+ target := world.characters[1000000]
+ target.monsterData, target.level, target.npcDefinitionID = 30365, expected.level, "952/district/4/group/3/authored_point"
+ target.combatProfile = gamedata.NPCCombatProfiles[30365][expected.level]
+ world.combatRoll = func(limit uint32) uint32 {
+ if limit == 3 {
+ return 2
+ }
+ return 0
+ }
+ identity := world.nextItem + 1
+ if err := world.flushWorld(); err != nil {
+ t.Fatal(err)
+ }
+
+ attackForExperience(t, world, attack)
+ cold := newTestInventoryServer(t)
+
+ for _, current := range []*server{world, cold} {
+ npc := current.characters[1000000]
+ if npc.health != 0 || npc.corpse == nil || npc.corpse.credits != 1 || current.characters[1].experience != 100 ||
+ !slices.Equal(npc.corpse.items, []ownedItem{{ID: identity, Type: 51005, Template: 42640, Quality: expected.quality, Count: 1}}) ||
+ current.nextItem != identity || npc.combatProfile != gamedata.NPCCombatProfiles[30365][expected.level] {
+ t.Fatal("Reet death lost shared XP/cash/loot or its cold profile", npc.corpse)
+ }
+ }
+ })
+ }
+ }
+}