aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


commit 25c2047107c7b31e539f40a6f14698f2920b3a21
parent cd2240e242cce2bb478ff532d843f13d3fc10603
Author: anon <anon@example.com>
Date:   Thu, 29 Oct 2026 09:49:26 +0000

Extend bounded Leet progression through level ten

Diffstat:
MTODO.md | 28+++++++++++++++++++++++++---
Mdocs/combat-npc-balance.md | 55++++++++++++++++++++++++++++++++++++++++++++++++++-----
Mserver/gamedata/npc_combat.yaml | 13+++++++++++++
Mserver/gamedata/npc_combat_test.go | 3++-
Mserver/mission_encounters_test.go | 2+-
Mserver/mission_levels_test.go | 14+++++++++-----
Mserver/npc_combat_test.go | 17+++++++++++------
Mserver/npc_growth_test.go | 14++++++++++++--
Mserver/npc_population_levels_test.go | 3++-
9 files changed, 125 insertions(+), 24 deletions(-)

diff --git a/TODO.md b/TODO.md @@ -72,7 +72,7 @@ booth now completes the fixed contract and atomically grants authored cash and a selected-quality equipment reward. The small reward pool is provisional; new missions now select the five Leets' level and scalable reward QL from player level and difficulty, using explicitly provisional later measurements. Leet -levels 1..5 currently have admitted combat profiles; unsupported requests +levels 1..10 currently have admitted combat profiles; unsupported requests return no offer without charging. See [mission levels](docs/mission-levels.md). Indoor combatants now use shared body/collision probes to plan bounded detours; native movement timing still needs refinement. An earned level-2 Enforcer can @@ -683,8 +683,17 @@ for exact records, protocol, tests and remaining reconstruction assumptions. restart. The seven owner-health audits reconcile damage and observed recovery. All 16,418 Go results, 64 focused race results and vet pass. See [NPC balance and evidence limits](docs/combat-npc-balance.md). -- [ ] [P0] Extend reviewed progression beyond enemy level 5 and to additional - early enemy families. Admit resources, attacks, defenses, XP and useful loot +- [x] [P0] Admit Leet encounters at levels 6..10 through shared data rules. + One explicit provisional level-10 anchor supplies interpolated levels 6..9; + original Leet Bite endpoints, nearby Monster Parts QLs, mission fees/rewards + and population admission keep their existing consumers. An ordinary level-4 + Enforcer trained with earned IP, wore its earned QL5 bat, defeated a full-health + level-6 enemy for 200 XP and returned the book for QL6 gloves and 20 credits. + Two laboratory charges were consumed; all 31 prior items and the new reward + survived page/cold recovery. All 16,695 Go results, 435 focused race results + and vet pass. See [balance evidence and limits](docs/combat-npc-balance.md). +- [ ] [P0] Verify further earned player levels and broaden early enemy families. + Admit resources, attacks, defenses, XP and useful loot through shared data rules, retaining evidence and explicit provisional balance where historical measurements are missing. Do not infer universal health/XP curves from the starter placeholders or silently extrapolate an anchored range. @@ -692,6 +701,10 @@ for exact records, protocol, tests and remaining reconstruction assumptions. and further player levels without admin grants. Preserve authored outdoor ranges; enemies outside the admitted range still reject mission generation before fees. Original NPC growth and damage-rating scaling remain unresolved. + Leet levels 1..10 are admitted; higher levels and additional early families + remain open. The ordinary native check of a level-6 contract leaves the player + at level4; it does not establish a complete further leveling loop or an + original universal HP/XP/skill curve. - [x] Verify mapped Tiny Stalkers as a second ordinary early combat family. Admit only SR01 at levels 2..4 through shared profiles, preserving medium identity confidence, attack-selection uncertainty and provisional balance. @@ -1757,6 +1770,15 @@ client rendering fixes and checks are in [nano damage](docs/nano-damage.md). Cold server/client reconnect retains the fee and an empty accepted journal. Narrative, reward amounts and duration are provisional; acceptance is separate. See [mission offers](docs/mission-offers.md). +- [ ] [P0] Make a starter mission available from each supported starter backyard. + The recipe table currently contains only booth 3221228472 in backyard 3000; + mapped booths such as 3221228482 in backyard 3010 have no generation recipe. + The earned level-4 character's harder-mission check therefore required a city + trip from Backyard 11 to Backyard 1. Recover the original booth/Surveillance + Office pairings and reuse the shared recipe/instance rules with each authored + exterior, rather than adding per-backyard handlers or inventing doorway IDs. + Verify fresh-character access, faction/level gates, independent private worlds, + fees, acceptance/return, expiry and cold ownership from multiple backyards. - [x] Accept that mission. Check: its journal entry and assigned destination survive reconnect. Native CreateQuest0x291f361b/version2 validates the session's exact offered diff --git a/docs/combat-npc-balance.md b/docs/combat-npc-balance.md @@ -2,7 +2,7 @@ The local wiki database provides useful weapon and behavior leads, but it does not supply a complete set of historical creature health, ratings and armor. -The server admits Leet levels 1..5 through the bounded profiles below and +The server admits Leet levels 1..10 through the bounded profiles below and [mapped Tiny Stalkers at levels 2..4](tiny-stalker.md). Unprofiled creatures retain prototype 100 HP, 5 damage and one-second attack/recharge phases. The [Omni training boss](omni-training-boss.md) now uses an explicit level-4 @@ -26,12 +26,18 @@ catalog, weapon QL, loot and population-scope validation as an explicit anchor. | 3 | 125 / 125 | 10 | 2..4 | | 4 | 150 / 150 | 15 | 3..5 | | 5 | 175 / 175 | 20 | 4..6 | +| 6 | 200 / 200 | 25 | 5..7 | +| 7 | 225 / 225 | 30 | 6..8 | +| 8 | 250 / 250 | 35 | 7..9 | +| 9 | 275 / 275 | 40 | 8..10 | +| 10 | 300 / 300 | 45 | 9..11 | All numbers in this table are **provisional gameplay balance**. Levels 1 and 2 retain their independently tested baseline. From level 2, each next level adds -25 HP/XP and five raw skill points. Levels 3 and 5 are explicit anchors; level 4 -is resolved by the shared interpolation. This bounded choice unlocks the next -ordinary missions without claiming that the original server used these slopes. +25 HP/XP and five raw skill points. Levels 3, 5 and 10 are explicit anchors; +levels 4 and 6..9 are resolved by the shared interpolation. This bounded choice +unlocks the next ordinary missions without claiming that the original server +used these slopes. Cash remains 1..5 and the Monster Parts chance remains 50%, also provisional. Mission reward equipment uses its independently selected mission QL; no new unverified equipment loot table is inferred for Leets. @@ -48,7 +54,7 @@ original Leet Bite weapon's damage, critical bonus and timing fields. The original outdoor population levels, positions and identity evidence are unchanged. Species eligibility still applies before profile lookup; unresolved -NPCs using a Leet stand-in do not gain these profiles. Level 6 and above remain +NPCs using a Leet stand-in do not gain these profiles. Level 11 and above remain unsupported for generated Leet encounters, with admission checked before fees. The Clan Training salamander boss retains its independent template-scoped QL4 profile and does not inherit Leet growth. @@ -154,6 +160,45 @@ the level-5/6 boundary and independent Leet/boss profiles before that clean run. `local/early-npc-growth/native/native-verified.json` retains the completed native audit. Every owned test browser closed; one preview retains all default ports. +### Level 6 native check + +The next bounded extension adds only the provisional level-10 YAML anchor; +the existing loader resolves levels 6..9. Fresh parsing of the complete original +120910/120911 payloads matches the maintained catalog. Native construction of +all five level-6 mission actors shows 200 HP, actor QL6 and Leet Bite damage +5..13, critical bonus5 and attack/recharge175 cs. + +The retained level-4 Enforcer spent 646 earned IP through the skills window and +equipped its previously earned QL5 bat93. An earlier rejected attempt retained +the bat while its Sneak Attack/Dimach requirements were unmet. Difficulty10 +charged four credits and selected a level-6 contract with QL6 reward gloves. +One full-health Leet died normally for 200 XP. The owner received 125 damage, +recovered four HP during combat and finished at 52 HP; subsequent recovery to +56 matched the live control panel. Outgoing damage was 203, including a +26-point Fast Attack and one three-point enemy recovery tick. + +The corpse yielded two credits and no item. Two existing laboratory charges +plus ordinary recovery restored health. Picking up and returning the actual +book consumed only key167/book168, awarded 20 credits and created gloves169 at +QL6. The other four nonaggressive encounters remained alive. All 31 prior item +identities survived, with only the two laboratory charges consumed. The reward +arrives as the original AddTemplate representation, which has no instance-ID +field; its slot, endpoints, QL and count match the saved item. Page and cold +reconstruction restore that item's persistent identity. + +After both page reconnect and a real restart of the sole preview, the native +client retained all 32 items, worn bat93, stored pistol163 with 12 rounds, +173 HP, 159 credits, 11,229 IP and cumulative XP7,725 (575 within level4). +No admin grants or state edits were used. This checks one harder encounter and +Find Item return; it does not establish further earned player levels or balance +for every profession. Conditional completion XP/token eligibility remains open. + +The full Go suite passed 1,705 roots / 16,695 results, the focused race run passed +68 / 435 and vet passed. Tests cover all newly admitted levels, original attack +construction, nearby loot QLs, cold rewards, unsupported-level fees and unchanged +population placement/identity scope. Evidence and the native health/ownership +audits are retained under `local/next-npc-growth/`; all owned browsers closed. + ## Local wiki search Read-only source: `~/tmp/fandom-scraper/anarchyonline.db`, 879 pages, diff --git a/server/gamedata/npc_combat.yaml b/server/gamedata/npc_combat.yaml @@ -66,6 +66,19 @@ quality: [4, 6] chance: 50 + # Explicit provisional upper anchor for the next early progression range. + # HP/XP/skills and loot remain balance choices, not original server measurements. + # The shared loader interpolates levels 6..9; it does not admit level 11. + 10: + <<: *leet + health: 300 + experience: 300 + skills: {100: 45, 153: 45, 154: 45, 155: 45, 168: 45} + loot: + - template: 42640 + quality: [9, 11] + chance: 50 + 17708: 2: &tiny_stalker # SR01's species binding is medium-confidence; see docs/tiny-stalker.md. diff --git a/server/gamedata/npc_combat_test.go b/server/gamedata/npc_combat_test.go @@ -74,6 +74,7 @@ func TestNPCLevelAnchorsRejectAmbiguousIntermediateIdentity(t *testing.T) { func TestProductionNPCGrowthRetainsBaselineAndStopsAtReviewedBoundary(t *testing.T) { expected := []struct{ health, skill, qualityLow, qualityHigh int32 }{ {100, 5, 1, 1}, {100, 5, 1, 3}, {125, 10, 2, 4}, {150, 15, 3, 5}, {175, 20, 4, 6}, + {200, 25, 5, 7}, {225, 30, 6, 8}, {250, 35, 7, 9}, {275, 40, 8, 10}, {300, 45, 9, 11}, } profiles := NPCCombatProfiles[17655] @@ -86,7 +87,7 @@ func TestProductionNPCGrowthRetainsBaselineAndStopsAtReviewedBoundary(t *testing t.Fatal("production profile changed the declared bounded growth", index+1, profile) } } - if len(profiles) != 5 || profiles[0] != nil || profiles[6] != nil || len(NPCCombatProfiles[30354]) != 1 || NPCCombatProfiles[30354][4].TemplateCode != "BSML" { + if len(profiles) != 10 || profiles[0] != nil || profiles[11] != nil || len(NPCCombatProfiles[30354]) != 1 || NPCCombatProfiles[30354][4].TemplateCode != "BSML" { t.Fatal("growth extrapolated beyond its reviewed range or changed boss scope") } } diff --git a/server/mission_encounters_test.go b/server/mission_encounters_test.go @@ -77,7 +77,7 @@ func TestMissionEncounterInvalidSelectionCannotConsumeOfferOrKey(t *testing.T) { case "unknown definition": definition.Encounters[0].Definition = "missing" case "unsupported level": - definition.Encounters[0].Level = 6 + definition.Encounters[0].Level = 11 case "empty positions": definition.Encounters[0].Positions = nil case "outside": diff --git a/server/mission_levels_test.go b/server/mission_levels_test.go @@ -130,7 +130,11 @@ func TestMissionUnsupportedEncounterLevelDoesNotChargeOrAllocate(t *testing.T) { world, output := newMissionOfferWorld(t) t.Cleanup(func() { world.db.Close() }) player := world.characters[1] - player.level = 4 + player.level = 7 + player.inventory.Credits = 20 + if err := world.saveInventory_locked(player, player.inventory); err != nil { + t.Fatal(err) + } definition := gamedata.MissionTemplates[3221228472] definition.RewardItems = []uint32{122691} definition.Encounters = []gamedata.MissionEncounter{{Definition: "950/district/2/group/0/authored_point", Positions: [][3]float32{{15, 0, 43}}}} @@ -144,16 +148,16 @@ func TestMissionUnsupportedEncounterLevelDoesNotChargeOrAllocate(t *testing.T) { } cold := newTestInventoryServer(t) - if world.clients[1].missionOffer != nil || len(output.packets) != 1 || player.inventory.Credits != 5 || - cold.characters[1].inventory.Credits != 5 || world.nextItem != 1 || len(player.missions) != 0 { + if world.clients[1].missionOffer != nil || len(output.packets) != 1 || player.inventory.Credits != 20 || + cold.characters[1].inventory.Credits != 20 || world.nextItem != 1 || len(player.missions) != 0 { t.Fatal("unimplemented encounter level produced a paid or partial contract") } request[17] = 6 if err := world.handleMissionOffers(world.clients[1], request); err != nil { t.Fatal(err) } - if world.clients[1].missionOffer == nil || world.clients[1].missionOffer.definition.Encounters[0].Level != 4 || player.inventory.Credits != 1 { - t.Fatal("a supported retry did not charge once and advertise level four") + if world.clients[1].missionOffer == nil || world.clients[1].missionOffer.definition.Encounters[0].Level != 7 || player.inventory.Credits != 13 { + t.Fatal("a supported retry did not charge once and advertise level seven") } } diff --git a/server/npc_combat_test.go b/server/npc_combat_test.go @@ -11,7 +11,7 @@ import ( ) func TestNPCProfileNativeSpawnUsesLeetBiteAfterRestart(t *testing.T) { - for _, level := range []uint16{1, 2} { + for _, level := range []uint16{1, 2, 6, 10} { t.Run(fmt.Sprint(level), func(t *testing.T) { data := testNPCData() data.Playfields[0].Districts[0].Groups[0].AppearanceStatus = "inferred_species" @@ -41,7 +41,10 @@ func TestNPCProfileNativeSpawnUsesLeetBiteAfterRestart(t *testing.T) { if key == 0x271b3a6b && binary.BigEndian.Uint32(packet[24:28]) == 1000000 { spawned = true end := int(binary.BigEndian.Uint16(packet[6:8])) - expected := map[uint16]string{1: "000007e20001d84e0001d84f0000006400000001", 2: "000007e20001d84e0001d84f0000006400000002"}[level] + expected := map[uint16]string{ + 1: "000007e20001d84e0001d84f0000006400000001", 2: "000007e20001d84e0001d84f0000006400000002", + 6: "000007e20001d84e0001d84f0000006400000006", 10: "000007e20001d84e0001d84f000000640000000a", + }[level] if hex.EncodeToString(packet[end-20:end]) != expected { client.Close() t.Fatalf("initial native Leet Bite weapon: %x", packet[end-20:end]) @@ -64,14 +67,16 @@ func TestNPCProfileNativeSpawnUsesLeetBiteAfterRestart(t *testing.T) { } expected := map[uint16]string{ - 1: "000007e20001d84e0001d84f0000006400000001000000000000000000000000000000000000004b", - 2: "000007e20001d84e0001d84f0000006400000002000000000000000000000000000000000000004b", + 1: "000007e20001d84e0001d84f0000006400000001000000000000000000000000000000000000004b", + 2: "000007e20001d84e0001d84f0000006400000002000000000000000000000000000000000000004b", + 6: "000007e20001d84e0001d84f0000006400000006000000000000000000000000000000000000004b", + 10: "000007e20001d84e0001d84f000000640000000a000000000000000000000000000000000000004b", }[level] if len(weapon) == 0 || binary.BigEndian.Uint32(weapon[24:28]) != 1000000 || hex.EncodeToString(weapon[29:69]) != expected { t.Fatalf("native Leet Bite profile: %x", weapon) } - if world.characters[1000000].health != 100 { + if world.characters[1000000].health != map[uint16]uint32{1: 100, 2: 100, 6: 200, 10: 300}[level] { t.Fatal("profile did not initialize the NPC's health") } world = newServer() @@ -134,7 +139,7 @@ func TestNPCProfileDoesNotApplyToOtherLevelsOrSpecies(t *testing.T) { monster uint32 level uint16 }{ - {"other level", 17655, 7}, + {"other level", 17655, 11}, {"extended level", 17655, 300}, {"other species", 17627, 1}, } { diff --git a/server/npc_growth_test.go b/server/npc_growth_test.go @@ -12,12 +12,19 @@ func TestMissionEarlyGrowthLevelsSurviveColdAcceptance(t *testing.T) { health uint32 rating int32 credits uint32 - }{{3, 125, 10, 2}, {4, 150, 15, 1}, {5, 175, 20, 0}} { + }{ + {3, 125, 10, 7}, {4, 150, 15, 6}, {5, 175, 20, 5}, {6, 200, 25, 4}, + {7, 225, 30, 3}, {8, 250, 35, 2}, {9, 275, 40, 1}, {10, 300, 45, 0}, + } { t.Run(fmt.Sprint(expected.level), func(t *testing.T) { world, _ := newMissionOfferWorld(t) t.Cleanup(func() { world.db.Close() }) player, client := world.characters[1], world.clients[1] player.level, world.nextNPC = expected.level, 2000000 + player.inventory.Credits = 10 + if err := world.saveInventory_locked(player, player.inventory); err != nil { + t.Fatal(err) + } definition := gamedata.MissionTemplates[3221228472] definition.RewardItems = []uint32{122691} definition.Encounters = []gamedata.MissionEncounter{{Definition: "950/district/2/group/0/authored_point", Positions: [][3]float32{{15, 0, 43}}}} @@ -49,7 +56,10 @@ func TestEarlyGrowthKillRewardsRetainSelectedQualityAcrossRestart(t *testing.T) level uint16 experience uint32 quality uint32 - }{{3, 125, 2}, {4, 150, 3}, {5, 175, 4}} { + }{ + {3, 125, 2}, {4, 150, 3}, {5, 175, 4}, {6, 200, 5}, + {7, 225, 6}, {8, 250, 7}, {9, 275, 8}, {10, 300, 9}, + } { for _, attack := range []string{"unarmed", "pistol", "nano"} { t.Run(fmt.Sprintf("%d/%s", expected.level, attack), func(t *testing.T) { world, _ := newKillExperienceWorld(t, attack) diff --git a/server/npc_population_levels_test.go b/server/npc_population_levels_test.go @@ -69,6 +69,7 @@ func TestNPCPopulationRangesIncludeExtendedLevelsWithoutChangingPlacement(t *tes {[2]uint16{1, 2}, []uint16{1, 2, 1, 2}}, {[2]uint16{2, 4}, []uint16{2, 3, 4, 2}}, {[2]uint16{5, 6}, []uint16{5, 6, 5, 6}}, + {[2]uint16{10, 11}, []uint16{10, 11, 10, 11}}, {[2]uint16{300, 301}, []uint16{300, 301, 300, 301}}, {[2]uint16{65534, 65535}, []uint16{65534, 65535, 65534, 65535}}, {[2]uint16{1, 65535}, []uint16{1, 2, 3, 4}}, @@ -92,7 +93,7 @@ func TestNPCPopulationRangesIncludeExtendedLevelsWithoutChangingPlacement(t *tes if spawn.id != 1000000+uint32(index) || spawn.position != data.Playfields[0].Districts[0].Groups[0].Positions[index] || spawn.npcDefinitionID != "test/npc" { t.Fatal("level allocation changed placement or definition", spawn) } - if (spawn.combatProfile != nil) != (spawn.level <= 5) { + if (spawn.combatProfile != nil) != (spawn.level <= 10) { t.Fatal("unlisted level inherited a supported profile", spawn.level) } }