aorecomp

Anarchy Online classic in the browser

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


commit 05bd2304b1c665240322fb1ed95dde7aaa16f593
parent e173aaaac6dab1dab994e76d513545d35edb44c3
Author: anon <anon@example.com>
Date:   Thu,  5 Nov 2026 19:04:15 +0000

Dress early-route human opponents in original clothing

Diffstat:
MTODO.md | 4+++-
Mdocs/npc-appearances.md | 24+++++++++++++++++++++---
Mserver/browser_npc_outfits_test.go | 4+++-
Mserver/gamedata/npc_outfits.go | 7+++++++
Mtools/client/test_npc_outfits.mjs | 22++++++++++++++++++++++
5 files changed, 56 insertions(+), 5 deletions(-)

diff --git a/TODO.md b/TODO.md @@ -72,7 +72,9 @@ research separately. More screenshots and test cases do not count as new gamepla a reproduced clothing-compositing crash. Garments are original assets, with provisional actor assignments. The five training guides and Neutral guard now also wear original garments and pass front-view two-observer/reconnect - checks. Human enemies and representative creature appearance checks remain. See + checks. All six training-ground human opponent populations now have original + clothing and pass the same checks, with mouse-look correcting slope-obscured + test views. Representative creature appearance checks remain. See [NPC appearance scope and evidence](docs/npc-appearances.md). - [ ] **A4: Doors visibly open where players enter.** Reproduce Entertainment diff --git a/docs/npc-appearances.md b/docs/npc-appearances.md @@ -2,7 +2,7 @@ The A3 implementation equips the seven Omni Trade Elite Guards, both Food Providers, three faction training-ground Secondhand Peddlers, five training -guides and the Neutral training-ground guard. +guides, the Neutral training-ground guard and six human opponent populations. The garments and body/head meshes come from the original 14.9.1 catalogs. Assigning these particular outfits to those actors is provisional, rather than recovered server outfit data. @@ -15,6 +15,8 @@ recovered server outfit data. | Omni guides: `950/district/2/fixed/0,1`; Neutral guide: `954/district/2/fixed/1` | QL 1 uniform, as above | | Clan guides: `952/district/0/fixed/0,1` | QL 1 rustic clothing, as above | | Neutral guard: `954/district/2/fixed/0` | QL 200 faction-independent Kevlar: body 22026/21, sleeves 21929/23 and /25, gloves 22178/24, pants 22301/27, boots 22116/30; original head remains visible | +| Fresh Clan Functionary: `950/district/3/group/0/authored_point` | QL 1 uniform, as above | +| Daft Clan Diversionist and Informer: `950/district/1/group/0/authored_point`, `950/district/4/group/0/authored_point`; Wandering Mercenaries: `952/district/2/group/0/authored_point`, `952/district/3/group/1/authored_point`, `954/district/4/group/3/spread_authored_point` | QL 1 rustic clothing, as above | `gamedata.NPCOutfits` supplies definition equipment on spawn, world reload and respawn. It uses the shared item wear and armor consumers. Equipment has no @@ -23,6 +25,10 @@ authored corpse-loot table still determines rewards. Head meshes use the selected MonsterData template's stat 64. This does not establish the historical guard protection values or add rifle equipment. +The human opponents' clothing adds no armor bonuses. Their existing prototype +combat behavior and missing authored combat profiles remain an A7 content issue; +these appearance assignments do not establish balanced encounters or progression. + ## Native initialization order Clothing requires SimpleChar flag bit 3 (CanChangeClothes, stat 223), followed @@ -94,12 +100,24 @@ head and Kevlar armor. The guard's native ACs match the server's `2750, 2750, 2403, 1717, 550, 1717, 1717, 550` on both clients after reconnect. These assignments use existing garment consumers without further protocol changes. +The six human opponent populations also pass both observers and reconnect. +The Diversionist, Informer and second Clan Mercenary passed in +`local/npc-appearances/20261105-105735/`. The first run exposed a fixture issue +at the other three placements: the camera cut off actors below the chat panel +on steep terrain, so native picking could not reach them. Ordinary right-button +mouse-look now frames each actor before picking. Those three cases and the +Informer passed in `local/npc-appearances/20261105-110059/`, with no client +exceptions and zero armor bonuses from their clothing. The captures show the +Opifex Diversionist, Nanomage Functionary, female Solitus Informer and male +Solitus Mercenaries with their intended heads and garments. The Functionary's +authored position remains partly screened by grass. + The focused server checks cover outfit reload and packet order, NPC shops, interest boundaries, population membership and respawn persistence. Shop fixtures now construct valid NPC definitions. The population membership fixture places actors in range and uses the authored 1,842-actor count for playfield 646; its previous range-dependent expectations also failed on the prior build. -A3 remains open for early-route human enemies and representative creature -appearances. These controlled appearance checks do not +A3 remains open for representative creature appearances. These controlled +appearance checks do not establish earned progression, encounter balance or exact historical outfits. diff --git a/server/browser_npc_outfits_test.go b/server/browser_npc_outfits_test.go @@ -26,7 +26,9 @@ func TestBrowserNPCOutfits(t *testing.T) { for _, route := range []string{"710/district/0/fixed/8", "710/district/1/fixed/2", "710/district/0/fixed/18", "710/district/0/fixed/19", "950/district/1/fixed/0", "952/district/3/fixed/0", "954/district/1/fixed/0", "950/district/2/fixed/0", "950/district/2/fixed/1", "952/district/0/fixed/0", "952/district/0/fixed/1", - "954/district/2/fixed/0", "954/district/2/fixed/1"} { + "954/district/2/fixed/0", "954/district/2/fixed/1", + "950/district/1/group/0/authored_point", "950/district/3/group/0/authored_point", "950/district/4/group/0/authored_point", + "952/district/2/group/0/authored_point", "952/district/3/group/1/authored_point", "954/district/4/group/3/spread_authored_point"} { t.Run(route, func(t *testing.T) { world := newTestServer(t) var npc *character diff --git a/server/gamedata/npc_outfits.go b/server/gamedata/npc_outfits.go @@ -41,4 +41,11 @@ var NPCOutfits = map[string][]NPCOutfitItem{ "954/district/2/fixed/0": { {22026, 21}, {21929, 23}, {22178, 24}, {21929, 25}, {22301, 27}, {22116, 30}, }, + // Starter opponents use clothing without armor bonuses. + "950/district/1/group/0/authored_point": npcRusticOutfit, + "950/district/3/group/0/authored_point": npcUniformOutfit, + "950/district/4/group/0/authored_point": npcRusticOutfit, + "952/district/2/group/0/authored_point": npcRusticOutfit, + "952/district/3/group/1/authored_point": npcRusticOutfit, + "954/district/4/group/3/spread_authored_point": npcRusticOutfit, } diff --git a/tools/client/test_npc_outfits.mjs b/tools/client/test_npc_outfits.mjs @@ -51,6 +51,28 @@ try { .map(event => { const packet = Buffer.from(event.hex, 'hex'); return [packet.readUInt32BE(29), packet.readUInt32BE(37), packet.readUInt32BE(45), packet.readUInt32BE(53)]; }); assert.deepEqual(wear, expected.items.map(item => [item.Template, item.Quality, 6, item.Slot])); + + // Aim at the actor above the chat panel even when nearby terrain is steep. + const cameraPoint = await game.point(512, 300); + let mouseY = cameraPoint.y, sequence = game.sequence; + await game.page.mouse.move(cameraPoint.x, mouseY); + await game.page.mouse.down({button: 'right'}); + try { + await game.waitInput(sequence, 1025); + const deadline = Date.now() + 10000; + for (;;) { + await game.snapshot(); + const y = game.state.actors.find(actor => actor.type === 50000 && actor.id === expected.id).screenPosition[1]; + if (y >= 500 && y <= 600) break; + assert(Date.now() < deadline, 'Camera did not frame the NPC above chat'); + mouseY += y > 600 ? 20 : -20; + await game.page.mouse.move(cameraPoint.x, mouseY, {steps: 2}); + } + } finally { + sequence = game.sequence; + await game.page.mouse.up({button: 'right'}); + } + await game.waitInput(sequence, 1026); await game.click(...await game.pick(50000, expected.id)); await game.wait('NPC selected', state => state.selected[0] === 50000 && state.selected[1] === expected.id); await game.save(`${output}/${phase}-${index}`);