aorecomp

Anarchy Online classic in the browser

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


commit b107961db26fc384a6c8e28f1bead59177365388
parent 8c228509f8b33ee079e754f29de77989c7f66a6a
Author: anon <anon@example.com>
Date:   Fri,  6 Nov 2026 02:30:36 +0000

Enable training human combat with durable rewards and visible corpses

Diffstat:
MTODO.md | 8+++++++-
Mdocs/corpse-loot.md | 2+-
Mdocs/corpse-pose.md | 28++++++++++++++++++++++++++--
Mdocs/npc-appearances.md | 7++++---
Adocs/training-human-combat.md | 110+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mserver/browser_training_corpses_test.go | 89++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------
Mserver/combat.go | 6+++---
Mserver/corpse_placement_test.go | 15+++++++++------
Mserver/gamedata/corpse_poses.yaml | 828+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mserver/gamedata/load.go | 6++++++
Mserver/gamedata/npc_combat.go | 3++-
Mserver/gamedata/npc_combat.yaml | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mserver/gamedata/npc_combat_test.go | 30++++++++++++++++++++++++++----
Mserver/gamedata/types.go | 4++++
Mserver/jab_of_the_snake.go | 2+-
Mserver/loot.go | 35+++++++++++++++++++++++++++++++++--
Mserver/nano_casting.go | 2+-
Mserver/npcs.go | 7+++++++
Mserver/pet_follow.go | 4++--
Mserver/target_protocol.go | 2+-
Aserver/training_humans_test.go | 122+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mserver/weapon_special.go | 2+-
Mtools/client/test_training_corpses.mjs | 70+++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
Mtools/data/extract_corpse_poses.py | 9+++++++--
24 files changed, 1380 insertions(+), 73 deletions(-)

diff --git a/TODO.md b/TODO.md @@ -214,7 +214,13 @@ research separately. More screenshots and test cases do not count as new gamepla and all five distinct Neutral creature bodies now also have bounded profiles, with original attack items and explicit provisional reward/balance choices. Android loot uses original Robot Junk; Blackout uses the starter boss policy. - The six human opponent populations remain appearance-only combat scope. + The six human opponent populations now support attacks, retaliation, rewards, + corpse loot and respawn through the shared combat path. Explicit population + bindings keep guards, vendors and reused templates outside this scope. + Native kills retain heads/outfits, visible slope placement and exact loot + ownership after reconnect/cold recovery; see [human encounters](docs/training-human-combat.md). + A7 remains open for the compact faction/profession progression matrix and + its bounded integration and affordability/pace checks. - [x] **A8: Isolate administration before public hosting.** The current HTTP and HTTPS listeners share a handler. Administration now requires separate diff --git a/docs/corpse-loot.md b/docs/corpse-loot.md @@ -1,6 +1,6 @@ # Corpse and loot protocol -The server creates native corpses for killed creatures with a recovered death +The server creates native corpses for killed NPCs with a recovered death animation. It handles opening, closing and reopening the loot window, validates pickup and persists the new owner before acknowledging the transfer. The fixed WASM test fixture supplies QL 1 Monster Parts after an actual server combat kill. diff --git a/docs/corpse-pose.md b/docs/corpse-pose.md @@ -13,8 +13,9 @@ remains open. ## Current placement rule -The server uses a provisional geometric correction for four independently -validated held poses, Leet, Aquaan, Android and Clawfinger. `tools/data/extract_corpse_poses.py` +The server uses a provisional geometric correction for six independently +validated held poses: Leet, Aquaan, Android, Clawfinger, the training Functionary +and mercenaries. `tools/data/extract_corpse_poses.py` reconstructs their final skinned vertices from the original mesh and animation; `server/gamedata/corpse_poses.yaml` retains the distinct vertices and input payload hashes. These vertices match the previously native-validated poses @@ -65,6 +66,8 @@ and original `bbr.dll`, SHA-256 | Aquaan | 30369 | 25717 | 25721 | 2333 ms | | Android | 17649 | 15215 | 17340 | 3000 ms | | Clawfinger | 38387 | 38188 | 29979 | 1666 ms | +| Functionary | 26147 | 17905 | 15621 | 3833 ms | +| Mercenary | 26088 | 17534 | 15621 | 3833 ms | The compressed animation loader is `bbr.dll` `sub_251176C0` in the maintained relocated C, with translation/quaternion sampling in `sub_25118180` and @@ -118,6 +121,27 @@ recovery. The Android final fixture at `20261105-152014` passes the same checks with its corrected Y=5.7780766. Both use the existing shared rule; no species-specific placement handler was added. +### Training human correction (November 5) + +Native kills of the Functionary at `[65.821846, 16.346714, 175.79474]` and +Clan mercenary at `[155.22652, 11.569292, 184.89328]` reproduced buried bodies. +Each body now contributes 408 distinct held-pose vertices to the same clearance +rule. Their shared male death clip matches all 32 original bone samplers within +`1e-6`; original skeleton composition agrees within `1.3e-7` for both bodies. +The regression checks death through the combat handler, unchanged horizontal +placement/facing and persistence of the raised anchor after database recovery. + +The Solitus thin mesh begins with an empty selection group. The extractor now +consumes the two zero fields between groups instead of mistaking them for +another group header. This also correctly traverses the Aquaan's empty groups; +its extracted vertices and the other three retained creature poses are unchanged. +Nonzero inter-group fields remain unsupported. Human poses cover the body mesh; +the separately attached head is not part of these clearance samples. + +Sampler/skeleton comparisons and resource-layout checks are retained under +`local/alpha-human-opponents/`. The [human encounter verification](training-human-combat.md) +records native warm activation, reconnect and exact loot ownership checks. + ## Corpse activation Original `kkr.dll`, SHA-256 diff --git a/docs/npc-appearances.md b/docs/npc-appearances.md @@ -25,9 +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. +The human opponents' clothing adds no armor bonuses. Their six populations now +have [bounded combat and corpse support](training-human-combat.md), with explicit +provisional balance and reward rules. Outfit assignments do not establish +historical equipment or ordinary progression pace. ## Native initialization order diff --git a/docs/training-human-combat.md b/docs/training-human-combat.md @@ -0,0 +1,110 @@ +# Training-ground human encounters + +A7 admits the six human opponent populations already reviewed for appearance: + +| Population | Original group | Levels | MonsterData | +| --- | --- | --- | --- | +| Daft Clan Diversionist | `950/district/1/group/0/authored_point` | 1-2 | 26135 | +| Fresh Clan Functionary | `950/district/3/group/0/authored_point` | 1-2 | 26147 | +| Daft Clan Informer | `950/district/4/group/0/authored_point` | 2-4 | 26076 | +| Wandering Mercenary | `952/district/2/group/0/authored_point` | 1-4 | 26088 | +| Wandering Mercenary | `952/district/3/group/1/authored_point` | 1-3 | 26088 | +| Wandering Mercenary | `954/district/4/group/3/spread_authored_point` | 3-4 | 26088 | + +These template codes also occur in other playfields. The profile's explicit +`groups` binding prevents those populations, guards and vendors from acquiring +combat through a shared body or template code. Ordinary attacks, weapon +specials, hostile nanos, Jab of the Snake and pet attacks share the same PvE +admission. Player and pet targets remain excluded. + +## Provisional encounter policy + +The original BreedmonsterRightfist endpoints 120697/120698 supply Martial Arts +attack rating, Evade Close defense, melee damage and 235-centisecond attack +and recharge. QL1 damage is 6-12 with a 6-point critical bonus. The original +BRW1 equip item 120699 identifies this weapon family; choosing it for these +specific populations remains provisional. The actor's level selects its QL, +with zero initiative and AggDef 75. No NPC special attacks or nanos are added. + +The bounded starter baseline supplies 100 HP/XP at levels 1-2, 125 at level 3 +and 150 at level 4, with raw MA/evades/Nano Resist 5, 10 and 15 respectively. +Corpse cash is 1-5 credits. A 50% drop supplies one original QL1 Rustic Shirt +82102, or Uniform Shirt 82912 for the Functionary. This is a separate owned +item, not a transfer of the NPC's identity-free display equipment. Respawn +occurs after 100 seconds, with a fresh actor identity; the original corpse +expires after 180 seconds. These balance, drop and lifecycle choices are +explicit alpha rules, not recovered original server measurements. + +## Native appearance and protocol + +The first corpse check could be looted, but its body lost its head and worn +clothing. Human corpse packets now retain the original head and OnWear texture +assignments, using the same skin compositing as the living body. Creature +corpse packets retain their existing layout. + +The retained original consumers are `kkr.dll` `sub_36005440` / `sub_36005370` +(indexed ClothData reader), `sub_3608C630` (clothing application) and +`bbr.dll` `VisualCATMesh_t::ChangeClothes` at 0x10096190. ClothPart order is +hands, body, feet, arms, legs. The native clothing consumer is retained as REA +Evidence `ev_5f5761dfe87737b01fd1a3248ae6b977d7ec7b4abf309adca7ec0063d370edc6`; +SimpleItem activation at 0x100b2830 is +`ev_e6dc6920c19ac67b6882ca051b894d391aacb6511734839e0fd65d1a3bf38c11`. +Snapshots are under `local/alpha-human-opponents/`. This bounded inspection +answers packet construction, not historical outfit or reward assignments. + +Native combat also exposed a shared humanoid spawn regression: the player +MA/Brawl/Dimach tail conversion treated every non-monster-layout actor as a +player. Humanoid NPCs use flag bit 18 with a single weapon row. Recognizing +that bit prevents the converter from inserting group bytes inside their +texture data. The focused packet regression includes an opponent and a vendor. + +## Verification + +The initial regression rejects ordinary combat for all six populations. +After the fix, all six exchange damage with original fist timing. Killing hits +through ordinary attack, Fling Shot, hostile nano, Jab and pet attack retain +XP, exact shirt identity, cash, corpse deadlines and respawn after cold load. +The respawn check retains the head, five display garments and combat profile +without allocating display equipment as loot. Data coverage checks all human +populations against the finite six-group admission set. + +Native verification uses controlled one-HP opponents at their original +placements. Mouse selection and Q perform the killing action; the test checks +XP, warm and reconnected corpse appearance, native corpse picking and exact +loot transfer, then cold database ownership. These fixtures do not establish +ordinary fight duration, earned progression pace or A7's full profession matrix. + +The Functionary and first Clan mercenary checks exposed buried fallen bodies. +Both now use the existing [held-pose terrain clearance](corpse-pose.md), with +408 original body vertices each and independently checked original skeleton +calculations. No body-specific height offset or alternative death animation +was introduced. Other human bodies retain their existing placement. + +The final native captures are retained under `local/alpha-training-corpses/`: + +| Population | Run directory | Result | +| --- | --- | --- | +| Diversionist | `20261105-181633` | Native kill, warm/cold appearance, exact loot and recovery pass | +| Functionary | `20261105-182612` | Same, with corrected slope clearance | +| Informer | `20261105-181812` | Native kill, warm/cold appearance, exact loot and recovery pass | +| Clan mercenary, district 2 | `20261105-182658` | Same, with corrected slope clearance | +| Clan mercenary, district 3 | `20261105-182727` | Same, with corrected slope clearance | +| Neutral mercenary | `20261105-182758` | Same, with corrected slope clearance | + +`final-focused.log` passes the human combat/reward, shared spawn, terrain, +transaction failure/retry and cold pose checks. `data-final.log` passes bounded +profile interpolation and six-population admission. The selected existing +invalid-target and creature/lifecycle regressions also pass. These logs and +`vet.log` are under `local/alpha-human-opponents/`; JavaScript syntax and diff +checks pass. No full server-suite or earned-progression run is claimed. + +This closes A7's named appearance-only human encounter gap. A7 itself remains +open for its compact faction/profession progression matrix and bounded +integration/pace acceptance. + +The shared humanoid spawn repair also passes the existing two-client OT Food +Provider `710/district/0/fixed/18` appearance, native picking and equipment +replay scenario, before and after reconnect. Both observers retain the intended +head and uniform. Inspected captures are under +`local/npc-appearances/20261105-182851/`; the log is +`local/alpha-human-opponents/browser-vendor-final.log`. diff --git a/server/browser_training_corpses_test.go b/server/browser_training_corpses_test.go @@ -1,6 +1,7 @@ package main import ( + "ao/server/gamedata" "context" "crypto/sha256" "encoding/json" @@ -77,27 +78,36 @@ func testBrowserTrainingCorpse(t *testing.T, route string) { } return 0 } - world.clients[1] = &worldClient{id: 1, ready: true, target: true, conn: &combatTestConn{}, npcs: map[uint32]bool{target.id: true}} - if err := world.handleCombat(world.clients[1], attackPacket(1, target.id)[20:]); err != nil { - t.Fatal(err) - } - world.advanceCombat(player.nextAttack) - if target.corpse == nil || len(target.corpse.items) == 0 { - t.Fatalf("controlled attack did not produce corpse loot: health=%d corpse=%+v player=%v target=%v appearance=%d range=%v visible=%v", - target.health, target.corpse, player.position, target.position, target.appearance, - world.combatInRange_locked(player, target, time.Now()), world.combatVisible_locked(player, target, time.Now())) - } - if target.corpse.expiresAt.IsZero() || len(world.npcRespawns) != 1 { - t.Fatal("training death did not schedule corpse expiry and respawn") - } - items, credits := slices.Clone(target.corpse.items), target.corpse.credits - for index := range items { - items[index].Slot = 64 + uint32(index) + var items []ownedItem + var credits uint32 + if target.appearance>>4&7 < 6 { + // Native mouse/Q input performs the human kill in the browser below. + drop := target.combatProfile.Loot[0] + items = []ownedItem{{ID: world.nextItem + 1, Type: gamedata.ItemTemplates[drop.Template].HeaderWords[0], + Template: drop.Template, Quality: 1, Count: 1, Slot: 64}} + credits = 1 + } else { + world.clients[1] = &worldClient{id: 1, ready: true, target: true, conn: &combatTestConn{}, npcs: map[uint32]bool{target.id: true}} + if err := world.handleCombat(world.clients[1], attackPacket(1, target.id)[20:]); err != nil { + t.Fatal(err) + } + world.advanceCombat(player.nextAttack) + if target.corpse == nil || len(target.corpse.items) == 0 { + t.Fatal("controlled attack did not produce corpse loot", target.health, target.position) + } + items, credits = slices.Clone(target.corpse.items), target.corpse.credits + for index := range items { + items[index].Slot = 64 + uint32(index) + } + delete(world.clients, 1) } - delete(world.clients, 1) // Stand on the nearest-height side of an authored ledge, within loot range. heightDifference := math.MaxFloat64 - for _, offset := range [][2]float32{{0, 4}, {4, 0}, {0, -4}, {-4, 0}} { + distance := float32(4) + if target.appearance>>4&7 < 6 { + distance = 2 + } + for _, offset := range [][2]float32{{0, distance}, {distance, 0}, {0, -distance}, {-distance, 0}} { position := [3]float32{target.position[0] + offset[0], 0, target.position[2] + offset[1]} position[1], _ = world.terrain[player.playfield].elevation(position[0], position[2]) position[1] += .2 @@ -124,25 +134,58 @@ func testBrowserTrainingCorpse(t *testing.T, route string) { mux.HandleFunc("GET /test-state", func(w http.ResponseWriter, r *http.Request) { world.mutex.Lock() defer world.mutex.Unlock() - json.NewEncoder(w).Encode(map[string]any{"target": target.id, "name": target.name, "monster": target.monsterData, "route": route, - "position": target.position, "items": target.corpse.items, - "credits": target.corpse.credits, "inventory": player.inventory}) + corpse := target.corpse + if corpse == nil { + corpse = &npcCorpse{} + } + json.NewEncoder(w).Encode(map[string]any{"health": target.health, "experience": player.experience, "target": target.id, "name": target.name, "monster": target.monsterData, "route": route, + "position": target.position, "items": corpse.items, + "credits": corpse.credits, "inventory": player.inventory}) }) host := httptest.NewServer(mux) defer host.Close() defer closeTestSessions(t, world) ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute) - defer cancel() + stopped := make(chan struct{}) + go func() { + defer close(stopped) + ticker := time.NewTicker(20 * time.Millisecond) + defer ticker.Stop() + for { + select { + case now := <-ticker.C: + world.advanceCombat(now) + case <-ctx.Done(): + return + } + } + }() + defer func() { cancel(); <-stopped }() command := exec.CommandContext(ctx, "node", filepath.Join(root, "tools/client/test_training_corpses.mjs"), host.URL, output) command.Dir, command.Stdout, command.Stderr = root, os.Stdout, os.Stderr err := command.Run() + cancel() + <-stopped + closeTestSessions(t, world) t.Logf("Browser artifacts: %s", output) if err != nil { t.Fatal(err) } + if target.corpse == nil || target.corpse.expiresAt.IsZero() || len(world.npcRespawns) != 1 { + t.Fatal("training death did not schedule corpse expiry and respawn") + } cold := newTestInventoryServer(t) if !reflect.DeepEqual(cold.characters[1].inventory.Items, items) || cold.characters[1].inventory.Credits != credits || - len(cold.characters[target.id].corpse.items) != 0 || cold.characters[target.id].corpse.credits != 0 { + cold.characters[1].experience != player.experience || len(cold.characters[target.id].corpse.items) != 0 || cold.characters[target.id].corpse.credits != 0 { t.Fatal("native corpse pickup changed exact ownership after cold load") } } + +func TestBrowserTrainingHumanCorpses(t *testing.T) { + for _, route := range []string{ + "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) { testBrowserTrainingCorpse(t, route) }) + } +} diff --git a/server/combat.go b/server/combat.go @@ -51,11 +51,11 @@ func (server *server) handleCombat(client *worldClient, body []byte) error { } else if key == 0x4a41203e || binary.BigEndian.Uint32(body[20:24]) == 0 { server.stopAttack_locked(player, updates) } else { - // Only visible creatures participate in this initial unarmed PvE loop. + // Admit only visible PvE encounters with the shared targeting policy. target := server.characters[binary.BigEndian.Uint32(body[20:24])] now := time.Now() - if !player.driving() && binary.BigEndian.Uint32(body[16:20]) == 50000 && target != nil && target.npc && target.pet == nil && - target.appearance>>4&7 == 6 && client.npcs[target.id] && target.health > 0 && + if !player.driving() && binary.BigEndian.Uint32(body[16:20]) == 50000 && target != nil && target.attackableNPC() && + client.npcs[target.id] && target.health > 0 && target.playfield == player.playfield && server.combatInRange_locked(player, target, now) && server.combatVisible_locked(player, target, now) { server.startAttack_locked(player, target, now, updates) } else { diff --git a/server/corpse_placement_test.go b/server/corpse_placement_test.go @@ -6,17 +6,20 @@ import ( "testing" ) -func TestNeutralCorpsePlacementRetainsOriginalRouteAndColdPose(t *testing.T) { +func TestTrainingCorpsePlacementRetainsOriginalRouteAndColdPose(t *testing.T) { for _, row := range []struct { name string monster uint32 + zone uint32 position [3]float32 }{ - {"Android", 17649, [3]float32{98.22058, 4.3194237, 107.11992}}, - {"Clawfinger", 38387, [3]float32{90.388504, 5.5916004, 144.4074}}, + {"Android", 17649, 954, [3]float32{98.22058, 4.3194237, 107.11992}}, + {"Clawfinger", 38387, 954, [3]float32{90.388504, 5.5916004, 144.4074}}, + {"Functionary", 26147, 950, [3]float32{65.821846, 16.346714, 175.79474}}, + {"Mercenary", 26088, 952, [3]float32{155.22652, 11.569292, 184.89328}}, } { t.Run(row.name, func(t *testing.T) { - // Reproduce the body buried at the original Neutral training placement. + // Reproduce the body buried at its original training placement. world, _ := newKillExperienceWorld(t, "unarmed") ground, err := readTerrain() if err != nil { @@ -24,9 +27,9 @@ func TestNeutralCorpsePlacementRetainsOriginalRouteAndColdPose(t *testing.T) { } world.terrain = ground target := world.characters[1000000] - target.monsterData, target.playfield = row.monster, 954 + target.monsterData, target.playfield = row.monster, row.zone target.position, target.rotation = row.position, [4]float32{0, 0, 0, 1} - world.characters[1].playfield, world.characters[1].position = 954, target.position + world.characters[1].playfield, world.characters[1].position = row.zone, target.position world.characters[1].position[2]++ if err := world.flushWorld(); err != nil { t.Fatal(err) diff --git a/server/gamedata/corpse_poses.yaml b/server/gamedata/corpse_poses.yaml @@ -932,6 +932,834 @@ - [0.285136, 0.007806, -0.2108] - [0.285728, 0.010481, -0.211942] - [0.35601, 0.009879, -0.188645] +26088: + mesh: 17534 + animation: 15621 + # Mesh SHA-256: 4806c95678399bb1be8ce3d5452337deeb933d654190210447536b71f8b5c622 + # Animation SHA-256: d713c6b0336b097302a9438de76bb5ef2d27b4d2422569059f23ca63131356d5 + vertices: + - [-0.426409, 0.014005, 0.01125] + - [-0.426326, -0.007797, -0.029054] + - [-0.422847, 0.040896, 0.025826] + - [-0.410226, 0.073464, 0.026245] + - [-0.406996, 0.012918, -0.064805] + - [-0.396701, 0.039432, -0.076608] + - [-0.385825, 0.070552, -0.070635] + - [-0.37611, 0.097514, -0.01779] + - [-0.368509, 0.000787, 0.041712] + - [-0.366555, 0.037291, 0.049419] + - [-0.364808, -0.009055, 0.136502] + - [-0.359733, -0.015166, 0.003694] + - [-0.35452, -0.023896, -0.006771] + - [-0.352747, -0.007145, 0.166296] + - [-0.350203, -0.015668, -0.018022] + - [-0.343969, -0.04025, 0.095794] + - [-0.34249, 0.065388, 0.033693] + - [-0.33831, 0.045175, 0.138904] + - [-0.335999, -0.04022, 0.191433] + - [-0.333757, -0.000718, -0.051237] + - [-0.332033, 0.054173, 0.172314] + - [-0.322323, 0.034962, -0.051371] + - [-0.316721, -0.072926, 0.118502] + - [-0.315089, 0.063945, -0.028746] + - [-0.313964, 0.07848, 0.008661] + - [-0.312881, 0.001341, 0.274155] + - [-0.310605, -0.062814, 0.013396] + - [-0.309039, 0.073198, 0.142403] + - [-0.301534, -0.040346, 0.275652] + - [-0.29982, 0.05302, 0.235625] + - [-0.296289, -0.040613, 0.185622] + - [-0.285028, 0.00105, 0.332516] + - [-0.284943, -0.075071, 0.024941] + - [-0.279298, 0.058934, 0.275299] + - [-0.277195, -0.03583, -0.073457] + - [-0.273912, -0.037528, 0.312751] + - [-0.268178, 0.000336, -0.114388] + - [-0.261572, 0.032261, 0.421884] + - [-0.259127, 0.111804, 0.04128] + - [-0.252264, 0.111443, 0.025642] + - [-0.249864, 0.061794, 0.429142] + - [-0.247278, 0.046139, 0.501355] + - [-0.246442, 0.019672, 0.452479] + - [-0.243316, 0.048189, -0.095014] + - [-0.241064, 0.006409, -0.129585] + - [-0.240418, -0.03636, 0.222483] + - [-0.238719, -0.073162, -0.068305] + - [-0.238384, 0.070932, 0.500252] + - [-0.234677, 0.052702, 0.459597] + - [-0.227867, 0.075226, 0.208503] + - [-0.21819, 0.073855, -0.076924] + - [-0.217677, 0.130325, 0.061523] + - [-0.217554, -0.000502, 0.511287] + - [-0.216876, -0.028186, 0.387517] + - [-0.216757, 0.08673, 0.7115] + - [-0.215861, -0.016722, 0.434593] + - [-0.215025, 0.057461, -0.114814] + - [-0.211792, 0.116009, 0.133433] + - [-0.211511, 0.071527, 0.50423] + - [-0.209858, 0.122769, 0.053319] + - [-0.209318, -0.03411, -0.121291] + - [-0.209222, 0.104189, 0.184718] + - [-0.208989, 0.129867, 0.041727] + - [-0.206526, 0.062524, 0.819656] + - [-0.202789, 0.044329, 0.819877] + - [-0.198957, 0.06113, 0.710612] + - [-0.197655, 0.028465, 0.812078] + - [-0.19756, 0.098052, 0.76089] + - [-0.197343, 0.111761, 0.712704] + - [-0.197219, 0.054774, 0.864302] + - [-0.196338, 0.010674, 0.313483] + - [-0.195448, 0.028446, 0.768902] + - [-0.195371, -0.096167, 0.064732] + - [-0.194886, 0.091145, 0.795176] + - [-0.193804, -0.014261, 0.349689] + - [-0.19278, 0.051278, 0.863275] + - [-0.190636, 0.073683, 0.828477] + - [-0.190374, 0.032675, 0.379738] + - [-0.189074, 0.013547, 0.806441] + - [-0.186773, 0.063353, 0.863853] + - [-0.184167, 0.038452, 0.417362] + - [-0.183984, -0.02712, -0.094849] + - [-0.18228, 0.109708, 0.810184] + - [-0.181596, 0.038297, 0.862547] + - [-0.17924, 0.054119, 0.859275] + - [-0.179188, 0.135964, 0.088782] + - [-0.17907, -0.077907, 0.184049] + - [-0.178362, 0.092379, 0.712698] + - [-0.178048, 0.062263, 0.824345] + - [-0.177734, 0.12058, 0.138801] + - [-0.176124, 0.117818, 0.765913] + - [-0.175514, 0.023144, 0.856039] + - [-0.175481, 0.116408, 0.745695] + - [-0.175297, 0.028115, 0.852913] + - [-0.174061, 0.052003, 0.900573] + - [-0.173954, 0.097953, 0.201002] + - [-0.171806, 0.108522, 0.840955] + - [-0.171168, 0.060066, 0.896621] + - [-0.170901, 0.045641, 0.821291] + - [-0.170688, -0.00193, 0.421486] + - [-0.170489, 0.050223, 0.858473] + - [-0.169844, 0.097919, 0.802638] + - [-0.169728, 0.11238, 0.849694] + - [-0.1675, 0.050956, 0.893028] + - [-0.167067, 0.030326, 0.810159] + - [-0.166447, 0.028577, 0.750498] + - [-0.166236, 0.038765, 0.854907] + - [-0.164892, 0.010947, 0.84712] + - [-0.1648, 0.007009, 0.845789] + - [-0.164685, 0.121538, 0.818347] + - [-0.163513, 0.06779, 0.708877] + - [-0.163381, 0.005338, 0.484821] + - [-0.16257, 0.106543, 0.821648] + - [-0.162414, 0.036915, 0.848907] + - [-0.16239, 0.015388, 0.804307] + - [-0.161986, 0.135054, 0.051459] + - [-0.160673, 0.119088, 0.840846] + - [-0.160212, 0.027111, 0.842825] + - [-0.159453, 0.107906, 0.84265] + - [-0.157361, 0.019973, 0.841185] + - [-0.157047, 0.054175, 0.497712] + - [-0.154205, 0.010356, 0.838231] + - [-0.150155, 0.112733, -0.001613] + - [-0.146543, 0.115407, 0.160937] + - [-0.144471, 0.04466, -0.14481] + - [-0.141689, 0.041594, 0.89699] + - [-0.141165, 0.132625, 0.084379] + - [-0.139955, 0.050481, 0.890848] + - [-0.138384, 0.029449, 0.881456] + - [-0.137179, 0.037314, 0.874608] + - [-0.136307, 0.040843, 0.886912] + - [-0.134493, 0.017888, 0.86396] + - [-0.134222, 0.029278, 0.871178] + - [-0.133961, 0.023552, 0.85908] + - [-0.132141, 0.017573, 0.856469] + - [-0.12589, 0.00466, -0.158061] + - [-0.12167, 0.1176, 0.022425] + - [-0.120694, -0.02064, -0.078895] + - [-0.118156, -0.0352, -0.145189] + - [-0.115589, -0.04882, 0.19266] + - [-0.110427, -0.066908, 0.104296] + - [-0.106648, 0.069369, -0.105313] + - [-0.10574, 0.09869, -0.030084] + - [-0.104776, 0.056058, -0.169111] + - [-0.104328, 0.115395, 0.204859] + - [-0.104305, -0.010467, 0.263345] + - [-0.101076, 0.14292, 0.103428] + - [-0.092541, -0.082212, 0.004442] + - [-0.088554, 0.065342, 0.250242] + - [-0.085025, 0.112138, 0.033241] + - [-0.07285, -0.028876, -0.144799] + - [-0.07115, 0.092489, -0.012395] + - [-0.065166, -0.000791, -0.178779] + - [-0.04565, -0.052233, 0.04749] + - [-0.030441, 0.026851, -0.10034] + - [-0.021657, 0.111391, 0.043461] + - [-0.019226, 0.091723, 0.291423] + - [-0.016868, 0.025013, 0.295776] + - [0.000949, 0.014815, -0.113691] + - [0.001828, 0.119991, 0.242545] + - [0.012015, 0.029879, 0.305096] + - [0.015421, -0.017058, 0.240153] + - [0.020243, -0.012664, -0.145782] + - [0.020606, 0.019821, -0.21457] + - [0.023957, 0.059574, 0.033239] + - [0.0241, -0.01707, 0.016134] + - [0.024729, 0.054021, -0.145553] + - [0.027658, 0.052307, -0.257306] + - [0.029097, 0.049887, -0.220955] + - [0.030341, 0.103789, 0.311449] + - [0.031163, 0.026217, -0.255869] + - [0.035689, 0.140316, 0.173408] + - [0.03681, -0.013672, 0.250848] + - [0.043017, 0.029419, 0.320885] + - [0.045461, -0.018605, 0.182939] + - [0.047455, 0.008052, -0.211472] + - [0.048213, 0.04135, -0.218037] + - [0.051661, 0.066454, -0.258119] + - [0.060565, 0.118582, 0.271743] + - [0.06788, -0.009299, -0.178654] + - [0.068542, 0.090616, -0.469512] + - [0.069539, 0.058207, -0.46447] + - [0.072988, 0.116255, 0.107304] + - [0.072997, 0.055497, -0.167156] + - [0.074629, 0.134212, 0.339316] + - [0.075601, -0.020218, 0.125779] + - [0.076084, 0.100759, -0.502851] + - [0.07741, 0.06998, -0.514335] + - [0.07783, 0.096726, -0.524779] + - [0.078001, -0.021937, 0.267598] + - [0.079234, -0.00281, -0.253609] + - [0.079954, 0.080724, 0.361316] + - [0.083961, 0.079382, -0.566315] + - [0.087528, 0.098742, -0.577655] + - [0.088063, 0.0606, -0.547363] + - [0.091812, -0.038372, 0.207876] + - [0.093962, 0.08376, -0.606397] + - [0.094113, 0.096342, -0.599546] + - [0.094646, 0.08122, -0.59698] + - [0.096834, 0.025287, -0.160452] + - [0.09732, -0.017136, 0.137496] + - [0.097363, 0.087928, -0.465679] + - [0.100249, 0.082408, -0.55759] + - [0.100408, 0.090144, -0.578297] + - [0.100676, 0.085428, 0.063548] + - [0.100749, 0.049353, -0.458239] + - [0.101878, 0.144126, 0.207857] + - [0.10197, 0.017972, 0.36047] + - [0.103421, 0.08978, -0.59935] + - [0.103998, 0.029357, -0.56538] + - [0.104079, 0.018663, 0.065914] + - [0.106407, 0.076944, -0.243878] + - [0.106996, 0.046883, -0.577144] + - [0.11538, 0.148417, 0.302892] + - [0.120042, 0.020437, -0.562526] + - [0.120105, 0.023748, -0.608381] + - [0.120567, 0.037142, -0.610204] + - [0.120843, 0.030456, -0.225599] + - [0.123431, 0.049682, -0.571849] + - [0.123569, 0.080942, -0.457825] + - [0.125545, 0.025001, -0.607032] + - [0.127977, 0.130445, 0.403067] + - [0.128442, -0.022914, 0.30969] + - [0.128777, 0.022485, 0.085561] + - [0.13195, 0.024439, -0.510107] + - [0.131992, 0.037634, -0.60453] + - [0.134021, 0.113722, 0.138122] + - [0.134524, 0.015437, -0.552321] + - [0.136285, 0.036597, 0.397883] + - [0.136393, 0.041129, -0.642788] + - [0.140252, 0.044892, -0.566291] + - [0.14037, -0.024798, 0.166751] + - [0.140599, 0.041818, -0.603616] + - [0.140862, 0.03312, -0.645] + - [0.142534, 0.025166, -0.604694] + - [0.143851, 0.164845, 0.235716] + - [0.145266, 0.038641, -0.637845] + - [0.147792, 0.092015, 0.09149] + - [0.149274, 0.049351, -0.494012] + - [0.150779, 0.013249, -0.544643] + - [0.15161, 0.038257, -0.59831] + - [0.153153, 0.039838, -0.552833] + - [0.153377, 0.024987, -0.593805] + - [0.15495, 0.040952, -0.592341] + - [0.157231, 0.021105, -0.59595] + - [0.163139, 0.037346, -0.584732] + - [0.163602, 0.059313, -0.637457] + - [0.166825, 0.034755, -0.544677] + - [0.168506, -0.03173, 0.259576] + - [0.169655, 0.051271, -0.641744] + - [0.170187, 0.03518, -0.582011] + - [0.172496, 0.022746, -0.585683] + - [0.172823, 0.056531, -0.63208] + - [0.173724, 0.05571, -0.619309] + - [0.174108, 0.067281, 0.429958] + - [0.174603, 0.159502, 0.348594] + - [0.175367, 0.020516, -0.583664] + - [0.179159, 0.031875, -0.577568] + - [0.179431, 0.048598, -0.624509] + - [0.181343, 0.053351, -0.614674] + - [0.182734, -0.00508, 0.356887] + - [0.184647, 0.051934, -0.601779] + - [0.188974, 0.047073, -0.605496] + - [0.190059, 0.049905, -0.598248] + - [0.192753, 0.023774, 0.119659] + - [0.196831, 0.013115, 0.433254] + - [0.197816, 0.180356, 0.299395] + - [0.199339, 0.070658, 0.510658] + - [0.205198, -0.025807, 0.20654] + - [0.208772, 0.125693, 0.14474] + - [0.209436, 0.180007, 0.284094] + - [0.212278, 0.147624, 0.507193] + - [0.213729, 0.027928, 0.398569] + - [0.214982, 0.11842, 0.329312] + - [0.216992, 0.164322, 0.307689] + - [0.220753, 0.179491, 0.268571] + - [0.223364, -0.008964, 0.299758] + - [0.22609, 0.070208, 0.124126] + - [0.22668, 0.16472, 0.297354] + - [0.233777, 0.163689, 0.285131] + - [0.240516, 0.023949, 0.354987] + - [0.245913, 0.027835, 0.315505] + - [0.247298, 0.012494, 0.165167] + - [0.250686, 0.009789, 0.503015] + - [0.255164, 0.064028, 0.37008] + - [0.255955, 0.061989, 0.152912] + - [0.262571, 0.151332, 0.23664] + - [0.26309, 0.056619, 0.327479] + - [0.266476, -0.008236, 0.244348] + - [0.272364, 0.147361, 0.165864] + - [0.275063, 0.07676, 0.620342] + - [0.280519, 0.139277, 0.598273] + - [0.282055, 0.022383, 0.299164] + - [0.285726, 0.163642, 0.473247] + - [0.293486, 0.030672, 0.186625] + - [0.299083, 0.034089, 0.438922] + - [0.301793, 0.06227, 0.307415] + - [0.303734, 0.055113, 0.15226] + - [0.31007, 0.111344, 0.43489] + - [0.316182, 0.024066, 0.260885] + - [0.335014, 0.084999, 0.284725] + - [0.335895, 0.061183, 0.212537] + - [0.33776, 0.021028, 0.604631] + - [0.356525, 0.156775, 0.56373] + - [0.359008, 0.073122, 0.69905] + - [0.359557, 0.11249, 0.681026] + - [0.38684, 0.04225, 0.745204] + - [0.388771, 0.168119, 0.291952] + - [0.396323, 0.09826, 0.729691] + - [0.405193, 0.052847, 0.556848] + - [0.409047, 0.020325, 0.675148] + - [0.409927, 0.194296, 0.214604] + - [0.41567, 0.056543, 0.240074] + - [0.418941, 0.096934, 0.309052] + - [0.422634, 0.13019, 0.640272] + - [0.435722, 0.079094, 0.168015] + - [0.440475, -5.9e-05, 0.720129] + - [0.443525, 0.161106, 0.163923] + - [0.460867, 0.047484, 0.84628] + - [0.460871, 0.096917, 0.822938] + - [0.465594, 0.050252, 0.639989] + - [0.471525, 0.106157, 0.710225] + - [0.484556, 0.053958, 0.692731] + - [0.503142, 0.053527, 0.722999] + - [0.508289, 0.007055, 0.807805] + - [0.517036, 0.007398, 0.739622] + - [0.523373, 0.113735, 0.774906] + - [0.52432, 0.082618, 0.730534] + - [0.52734, 0.039998, 0.665143] + - [0.535876, 0.013293, 0.643164] + - [0.54346, 0.092384, 0.203196] + - [0.545363, 0.209367, 0.308272] + - [0.546069, 0.069009, 0.265421] + - [0.547219, 0.048322, 0.548891] + - [0.548707, 0.123788, 0.330812] + - [0.552245, 0.177081, 0.198149] + - [0.553111, 0.070899, 0.665573] + - [0.553259, 0.029731, 0.759855] + - [0.553503, -0.005701, 0.759158] + - [0.554027, -0.017145, 0.671535] + - [0.554925, 0.056707, 0.648978] + - [0.556328, 0.104708, 0.402323] + - [0.559493, 0.097538, 0.571075] + - [0.563133, 0.093736, 0.747849] + - [0.565541, -0.020718, 0.631799] + - [0.579417, 0.069258, 0.949116] + - [0.582226, 0.164705, 0.426099] + - [0.582783, 0.106739, 0.940207] + - [0.583476, -0.013704, 0.777204] + - [0.585598, 0.003185, 0.535489] + - [0.593371, 0.093123, 0.76845] + - [0.594137, 0.045061, 0.382921] + - [0.597369, 0.102928, 0.576647] + - [0.602881, -0.021662, 0.641493] + - [0.603387, 0.073201, 0.634102] + - [0.610741, 0.152927, 0.333749] + - [0.61516, 0.028881, 0.921149] + - [0.623512, 0.008439, 0.541013] + - [0.626545, 0.135671, 0.893548] + - [0.628729, 0.158925, 0.326534] + - [0.63905, 0.224862, 0.320615] + - [0.642638, 0.102744, 1.000674] + - [0.645765, -0.007512, 0.714811] + - [0.646595, 0.060368, 0.381384] + - [0.64744, 0.197209, 0.342621] + - [0.649537, 0.067277, 0.709104] + - [0.650348, 0.101428, 0.303524] + - [0.650765, 0.062442, 1.003864] + - [0.651624, 0.108663, 0.282402] + - [0.652412, 0.120631, 0.252951] + - [0.655357, 0.039141, 0.884489] + - [0.65544, 0.066058, 0.5653] + - [0.656268, -0.008393, 0.808687] + - [0.657983, 0.032236, 0.651867] + - [0.658829, 0.07658, 0.875485] + - [0.662354, 0.196748, 0.25402] + - [0.663962, 0.030747, 0.696962] + - [0.66704, 0.12993, 0.418401] + - [0.672026, 0.091845, 0.79942] + - [0.679284, 0.042537, 1.01129] + - [0.680246, 0.036055, 0.813867] + - [0.684026, -0.01388, 0.757502] + - [0.684709, 0.038477, 0.991404] + - [0.686954, 0.118937, 0.286218] + - [0.68779, 0.184656, 0.303805] + - [0.692931, 0.148593, 0.978038] + - [0.693905, 0.074009, 0.747666] + - [0.698905, 0.027717, 0.750003] + - [0.70391, 0.105619, 0.933112] + - [0.705735, 0.026305, 0.958006] + - [0.709525, 0.056948, 0.952564] + - [0.721452, 0.109886, 1.055997] + - [0.727276, 0.054533, 0.942584] + - [0.731466, 0.144217, 1.014261] + - [0.736086, -0.01756, 1.018436] + - [0.74604, 0.007602, 1.052361] + - [0.752289, -0.015915, 0.970144] + - [0.753291, 0.127685, 1.103679] + - [0.757517, 0.028231, 1.079394] + - [0.76602, 0.128155, 1.002355] + - [0.775133, 0.152405, 1.073314] + - [0.779188, 0.007362, 0.96086] + - [0.791013, 0.087292, 1.118852] + - [0.803546, 0.04033, 0.976663] + - [0.804384, 0.157832, 1.03735] + - [0.821794, 0.061923, 0.999898] + - [0.826476, 0.117031, 1.097987] + - [0.851223, 0.125243, 1.04594] +26147: + mesh: 17905 + animation: 15621 + # Mesh SHA-256: 595a1f9b4bdda443c49fb1885a3062a381cf55679bca29208eb38426a48be07b + # Animation SHA-256: d713c6b0336b097302a9438de76bb5ef2d27b4d2422569059f23ca63131356d5 + vertices: + - [-0.422732, 0.014036, 0.014394] + - [-0.4216, -0.007406, -0.026045] + - [-0.419573, 0.040319, 0.029014] + - [-0.408983, 0.065733, 0.027677] + - [-0.40313, 0.012939, -0.062405] + - [-0.393171, 0.038841, -0.074423] + - [-0.384343, 0.064354, -0.068857] + - [-0.377493, 0.091424, -0.016199] + - [-0.355709, -0.025119, 0.17031] + - [-0.355081, -0.01305, 0.066727] + - [-0.35081, 0.038388, 0.075208] + - [-0.343789, -0.036092, 0.016979] + - [-0.340569, -0.019098, 0.204489] + - [-0.336717, -0.046074, 0.003439] + - [-0.335469, -0.069606, 0.119435] + - [-0.334179, 0.059532, 0.297935] + - [-0.331374, -0.036759, -0.011239] + - [-0.331004, 0.055027, 0.17232] + - [-0.329893, -0.058184, 0.236682] + - [-0.32721, -0.012717, 0.323795] + - [-0.326987, 0.081949, 0.053075] + - [-0.326446, 0.068097, 0.212246] + - [-0.318431, -0.114111, 0.147428] + - [-0.306893, -0.011891, -0.052449] + - [-0.306335, 0.070398, 0.334986] + - [-0.303271, -0.07276, 0.323276] + - [-0.302129, 0.096779, 0.174581] + - [-0.29777, 0.038558, -0.053788] + - [-0.297602, -0.103043, 0.021922] + - [-0.29461, 0.101779, 0.0185] + - [-0.291447, 0.080072, -0.027936] + - [-0.290507, -0.012445, 0.373971] + - [-0.290022, -0.07126, 0.224219] + - [-0.284716, 0.025518, 0.461822] + - [-0.2777, 0.033888, 0.535628] + - [-0.27384, -0.119613, 0.032733] + - [-0.271559, 0.064492, 0.465344] + - [-0.267954, -0.06262, 0.353094] + - [-0.265958, 0.06627, 0.530212] + - [-0.265118, -0.107648, 0.243127] + - [-0.263823, 0.001878, 0.491476] + - [-0.254682, -0.065378, -0.083518] + - [-0.25046, 0.044722, 0.492703] + - [-0.2421, 0.152898, 0.05171] + - [-0.241314, 0.058618, 0.719153] + - [-0.240941, 0.042421, 0.825771] + - [-0.240176, -0.012561, -0.132686] + - [-0.235422, 0.01762, 0.82434] + - [-0.234343, 0.104325, 0.242241] + - [-0.233753, 0.152459, 0.032689] + - [-0.232534, -0.042697, 0.554801] + - [-0.23068, 0.085878, 0.763813] + - [-0.2306, 0.035286, 0.873158] + - [-0.228017, -0.004785, 0.814356] + - [-0.227168, 0.078475, 0.801278] + - [-0.224908, 0.030241, 0.871595] + - [-0.223798, -0.008625, 0.767462] + - [-0.222704, 0.02362, 0.71199] + - [-0.222197, 0.057481, 0.835752] + - [-0.219957, 0.090566, 0.71878] + - [-0.219658, -0.118917, -0.078667] + - [-0.218119, 0.046335, 0.87305] + - [-0.216734, -0.045921, 0.478872] + - [-0.216465, -0.025897, 0.806636] + - [-0.215539, 0.058105, -0.110896] + - [-0.214609, 0.070332, 0.531177] + - [-0.213051, 0.104254, 0.818695] + - [-0.212396, 0.110381, 0.741152] + - [-0.211876, -0.059104, 0.423801] + - [-0.210628, 0.186688, 0.15172] + - [-0.21042, 0.01204, 0.86931] + - [-0.210003, 2e-05, -0.153407] + - [-0.209519, 0.169869, 0.21345] + - [-0.208196, 0.033062, 0.867042] + - [-0.205938, 0.041031, 0.829868] + - [-0.204886, 0.111393, 0.770795] + - [-0.203109, 0.033476, 0.911408] + - [-0.201924, -0.009338, 0.860755] + - [-0.2018, -0.002887, 0.857788] + - [-0.201104, 0.10476, 0.851561] + - [-0.199808, 0.043907, 0.90772] + - [-0.199464, 0.194254, 0.072482] + - [-0.199031, 0.110628, 0.861286] + - [-0.197167, 0.027277, 0.86554] + - [-0.196842, 0.087019, 0.809088] + - [-0.19617, 0.017907, 0.824892] + - [-0.194698, 0.031082, 0.902922] + - [-0.192722, 0.06329, 0.718542] + - [-0.192199, 0.120079, 0.827952] + - [-0.191499, 0.097363, -0.091416] + - [-0.191465, 0.183457, 0.061839] + - [-0.191217, 0.011245, 0.86055] + - [-0.190278, -0.003974, 0.811384] + - [-0.188942, 0.099957, 0.830169] + - [-0.188897, 0.193697, 0.048404] + - [-0.187889, -0.02715, 0.849687] + - [-0.187886, 0.118491, 0.851972] + - [-0.187531, -0.0326, 0.847904] + - [-0.187368, -0.011493, 0.746556] + - [-0.186198, 0.008034, 0.853762] + - [-0.185877, 0.103447, 0.852923] + - [-0.18548, 0.073135, -0.136301] + - [-0.183533, -0.024926, 0.803622] + - [-0.182778, -0.005871, 0.84626] + - [-0.182722, -0.118412, 0.209587] + - [-0.179602, 0.025358, 0.707506] + - [-0.178841, -0.015819, 0.843775] + - [-0.177722, -0.146612, 0.075838] + - [-0.176228, 0.160967, 0.228662] + - [-0.175587, 0.021286, 0.406562] + - [-0.174359, -0.02925, 0.839643] + - [-0.173189, 0.194057, 0.156545] + - [-0.172636, 0.216709, 0.096746] + - [-0.172157, 0.004415, 0.346491] + - [-0.172154, 0.027873, 0.453165] + - [-0.171632, -0.030577, -0.152594] + - [-0.162493, 0.017446, 0.905527] + - [-0.162342, -0.047524, 0.375708] + - [-0.16059, 0.028863, 0.899578] + - [-0.157268, -0.000494, 0.887549] + - [-0.156423, -0.057666, -0.118395] + - [-0.155942, 0.009506, 0.880767] + - [-0.155465, 0.015294, 0.894364] + - [-0.151769, -0.001817, 0.876262] + - [-0.151282, -0.017841, 0.867477] + - [-0.150939, 0.215556, 0.051709] + - [-0.150919, -0.023721, 0.523834] + - [-0.150743, -0.010618, 0.86266] + - [-0.150663, -0.025579, 0.470649] + - [-0.148106, -0.019029, 0.859257] + - [-0.14457, 0.186659, 0.179008] + - [-0.138254, 0.047248, 0.525535] + - [-0.132259, 0.182524, -0.010955] + - [-0.130922, 0.211981, 0.089203] + - [-0.124987, 0.058269, -0.216145] + - [-0.124027, -0.02036, 0.310468] + - [-0.121946, -0.068752, 0.216224] + - [-0.106229, 0.189704, 0.231403] + - [-0.106111, -0.116321, 0.109561] + - [-0.104998, 0.190433, 0.014998] + - [-0.101592, 0.084723, 0.293889] + - [-0.100698, -0.004262, -0.212329] + - [-0.09315, 0.220225, 0.107189] + - [-0.087757, -0.024248, -0.08773] + - [-0.084928, 0.07724, -0.2334] + - [-0.083936, -0.050758, -0.170668] + - [-0.083657, 0.163181, -0.04781] + - [-0.077942, 0.096014, -0.08241] + - [-0.077477, -0.123579, -0.008867] + - [-0.069747, 0.182682, 0.023693] + - [-0.053503, 0.122299, 0.345769] + - [-0.051189, 0.154322, -0.030889] + - [-0.050131, 0.028968, 0.352013] + - [-0.040199, -0.033912, -0.164155] + - [-0.038719, 0.000549, -0.211824] + - [-0.033477, -0.073028, 0.032593] + - [-0.018268, 0.033347, 0.353216] + - [-0.008949, 0.134119, 0.371204] + - [-0.007621, 0.232708, 0.278717] + - [-0.006643, 0.184838, 0.024695] + - [-0.002207, -0.030041, 0.268967] + - [0.003557, 0.063, -0.115084] + - [0.014787, 0.027926, 0.384779] + - [0.020234, -0.036623, 0.276104] + - [0.029715, 0.053263, -0.289422] + - [0.034785, 0.018827, -0.291477] + - [0.035028, 0.022428, -0.268956] + - [0.036513, 0.01383, -0.103088] + - [0.039854, -0.028643, -0.029701] + - [0.041941, 0.184502, 0.35489] + - [0.042538, 0.062396, -0.276626] + - [0.042566, -0.032346, 0.183759] + - [0.042986, 0.077465, -0.006212] + - [0.044379, 0.28107, 0.176056] + - [0.045551, 0.028073, 0.419033] + - [0.04885, 0.011791, 0.38507] + - [0.049374, -0.022699, -0.161405] + - [0.04939, 0.067093, -0.156666] + - [0.052729, -0.051145, 0.292645] + - [0.054688, 0.063733, 0.405394] + - [0.056149, 0.227527, 0.315583] + - [0.063375, 0.045018, -0.253988] + - [0.065183, 0.001434, -0.249395] + - [0.073214, 0.08063, -0.285812] + - [0.080325, 0.041068, 0.460558] + - [0.081864, 0.097165, -0.503887] + - [0.083934, 0.169066, 0.420466] + - [0.085528, 0.093543, -0.533812] + - [0.085575, 0.062246, -0.519888] + - [0.085582, 0.080202, -0.476431] + - [0.087389, -0.074803, 0.20852] + - [0.087434, -0.034747, 0.098602] + - [0.08878, 0.040576, -0.471225] + - [0.089664, 0.074427, -0.578849] + - [0.092506, 0.098601, -0.592209] + - [0.097919, 0.050297, -0.556115] + - [0.098165, 0.081753, -0.622726] + - [0.098376, 0.227143, 0.077268] + - [0.09879, 0.096719, -0.615769] + - [0.100257, 0.078094, -0.611978] + - [0.10268, -0.019874, -0.21155] + - [0.105875, -0.041119, 0.113341] + - [0.106446, -0.058017, 0.345148] + - [0.108454, 0.206684, 0.305358] + - [0.109859, 0.087753, -0.590927] + - [0.111417, 0.088411, -0.61409] + - [0.11192, -0.029216, -0.295334] + - [0.112308, 0.077134, -0.56736] + - [0.115833, 0.068794, -0.19839] + - [0.117889, 0.287848, 0.21455] + - [0.117986, 0.012692, -0.572625] + - [0.120072, 0.034664, -0.586422] + - [0.125097, 0.112922, 0.006338] + - [0.125801, 0.076106, -0.470279] + - [0.126755, 0.258615, 0.222531] + - [0.130026, 0.01951, 0.009622] + - [0.131107, 0.028549, -0.459959] + - [0.134572, 0.024229, -0.62124] + - [0.134576, 0.007786, -0.618496] + - [0.13758, -0.0556, 0.131383] + - [0.139977, 0.001157, -0.567056] + - [0.141947, 0.009075, -0.616422] + - [0.142515, 0.037283, -0.578736] + - [0.147776, 0.083246, 0.525776] + - [0.149167, 0.024557, 0.035003] + - [0.149936, 0.096166, -0.269463] + - [0.150452, 0.024161, -0.613585] + - [0.151723, 0.030467, -0.656027] + - [0.157422, -0.00059, 0.442783] + - [0.157662, 0.02068, -0.65752] + - [0.160178, 0.029962, -0.204108] + - [0.160627, -0.00597, -0.553668] + - [0.160997, 0.063781, -0.455201] + - [0.161878, 0.00271, -0.507269] + - [0.161903, 0.028958, -0.611792] + - [0.162375, 0.213466, 0.348069] + - [0.16402, 0.190688, 0.51796] + - [0.164204, 0.026881, -0.64932] + - [0.164752, 0.221826, 0.10918] + - [0.16486, 0.008628, -0.611824] + - [0.165731, 0.030611, -0.570281] + - [0.170487, 0.0278, -0.25929] + - [0.171557, 0.124642, 0.028151] + - [0.172777, -0.071218, 0.266029] + - [0.173329, -0.059521, 0.385608] + - [0.17731, 0.023975, -0.604367] + - [0.180595, 0.007464, -0.598371] + - [0.18238, 0.026825, -0.597458] + - [0.183264, -0.009552, -0.543032] + - [0.184661, 0.023289, -0.553434] + - [0.185598, 0.002728, -0.600096] + - [0.186107, 0.031682, -0.488667] + - [0.188063, 0.051543, -0.64791] + - [0.19377, 0.01853, 0.044618] + - [0.194297, 0.021743, -0.587788] + - [0.194524, 0.138601, 0.32105] + - [0.195872, 0.041783, -0.651534] + - [0.197222, -0.02427, 0.429098] + - [0.197409, 0.192525, 0.301426] + - [0.201069, 0.047562, -0.64066] + - [0.203792, 0.045807, -0.626234] + - [0.204001, 0.01622, -0.542449] + - [0.204076, 0.01873, -0.583797] + - [0.207099, 0.003688, -0.586923] + - [0.208782, -0.00117, 0.507967] + - [0.211005, 0.037246, -0.630972] + - [0.21123, 0.000763, -0.584204] + - [0.212024, 0.163884, 0.311205] + - [0.21319, 0.01128, 0.388814] + - [0.214563, 0.042433, -0.620026] + - [0.216656, 0.014172, -0.57759] + - [0.220345, -0.025695, 0.203673] + - [0.220523, 0.039871, -0.605145] + - [0.221321, 0.184035, 0.286144] + - [0.221462, 0.115104, 0.072431] + - [0.22277, 0.086824, 0.626018] + - [0.226001, 0.034015, -0.608516] + - [0.227297, 0.159633, 0.299583] + - [0.2282, -0.060624, 0.186039] + - [0.228212, 0.037029, -0.600448] + - [0.229575, -0.064473, 0.308104] + - [0.233935, 0.174396, 0.599049] + - [0.234037, 0.014335, 0.076017] + - [0.235476, -0.028817, 0.37077] + - [0.236783, -0.017882, 0.165181] + - [0.239038, 0.201242, 0.185718] + - [0.247617, -0.02044, 0.320294] + - [0.249645, 0.158055, 0.211895] + - [0.250368, 0.186715, 0.210114] + - [0.255866, 0.029754, 0.325025] + - [0.256123, -0.033621, 0.236671] + - [0.260838, 0.226884, 0.463888] + - [0.284489, 0.058836, 0.413023] + - [0.28639, 0.157405, 0.4083] + - [0.287732, -0.063833, 0.231865] + - [0.289519, 0.125258, 0.073281] + - [0.290606, -0.008569, 0.604527] + - [0.292224, -0.030956, 0.294508] + - [0.298377, 0.063747, 0.299191] + - [0.304104, 0.081475, 0.697904] + - [0.306254, 0.016555, 0.108907] + - [0.308751, 0.136633, 0.677146] + - [0.310654, -0.022287, 0.237266] + - [0.321212, 0.047702, 0.291903] + - [0.32567, 0.201416, 0.548172] + - [0.337186, -0.029546, 0.241004] + - [0.342704, 0.029913, 0.767793] + - [0.358519, 0.116863, 0.745165] + - [0.363331, 0.009724, 0.665332] + - [0.365142, 0.160502, 0.288578] + - [0.379377, 0.058457, 0.535838] + - [0.383646, 0.180785, 0.215726] + - [0.391649, 0.176915, 0.621004] + - [0.400669, 0.060069, 0.312415] + - [0.406998, 0.009333, 0.219945] + - [0.408636, -0.029643, 0.736888] + - [0.409746, 0.030947, 0.868288] + - [0.415029, 0.108409, 0.837871] + - [0.429961, 0.131678, 0.689658] + - [0.431594, 0.040702, 0.118555] + - [0.433636, 0.05317, 0.616978] + - [0.437202, 0.155269, 0.097326] + - [0.462756, 0.055536, 0.692519] + - [0.468567, -0.02601, 0.820971] + - [0.486938, -0.028082, 0.718607] + - [0.493953, 0.140279, 0.772107] + - [0.495514, -0.012556, 0.60395] + - [0.496122, 0.067077, 0.707166] + - [0.497553, -0.029459, 0.662337] + - [0.505589, -0.051195, 0.721397] + - [0.506421, 0.023429, 0.512118] + - [0.509705, 0.076104, 0.373079] + - [0.512269, -0.044873, 0.6518] + - [0.515745, 0.201173, 0.295618] + - [0.519535, 0.08252, 0.350372] + - [0.519834, 0.055285, 0.64467] + - [0.521674, 0.040219, 0.621994] + - [0.525859, 0.057975, 0.960468] + - [0.527887, 0.014029, 0.757862] + - [0.528367, 0.025471, 0.246301] + - [0.529097, 0.087278, 0.541173] + - [0.529718, 0.059324, 0.160435] + - [0.532135, 0.116007, 0.94661] + - [0.533718, 0.166785, 0.147401] + - [0.538939, 0.124061, 0.294799] + - [0.543264, -0.044867, 0.749715] + - [0.548802, -0.060204, 0.587373] + - [0.553765, 0.153994, 0.406194] + - [0.555585, 0.080895, 0.735357] + - [0.562042, -0.032313, 0.49678] + - [0.563345, 0.001725, 0.349983] + - [0.569759, -0.000148, 0.926842] + - [0.587654, 0.096111, 0.55071] + - [0.587753, 0.060669, 0.622023] + - [0.590039, 0.165438, 0.884585] + - [0.590108, -0.055277, 0.777322] + - [0.595018, -0.056113, 0.612621] + - [0.595756, 0.063237, 1.025636] + - [0.603568, 0.07967, 0.76548] + - [0.604345, 0.123819, 0.338186] + - [0.610039, 0.075174, 1.0203] + - [0.613885, 0.215909, 0.305861] + - [0.620645, -0.023652, 0.506256] + - [0.621462, 0.019825, 0.878232] + - [0.621627, 0.057575, 0.283481] + - [0.622717, 0.080936, 0.223733] + - [0.625252, 0.185558, 0.196808] + - [0.626204, 0.059827, 0.278843] + - [0.627873, 0.077802, 0.864255] + - [0.634795, -0.008334, 1.000299] + - [0.63696, 0.008506, 0.99934] + - [0.641077, 0.184971, 0.332632] + - [0.643944, 0.022544, 0.354866] + - [0.658137, -0.042777, 0.727448] + - [0.667205, 0.051173, 0.716151] + - [0.670988, 0.008483, 0.651934] + - [0.673053, 0.03208, 0.953771] + - [0.673864, 0.051605, 0.540131] + - [0.678425, 0.156925, 1.003738] + - [0.678456, 0.112335, 0.40299] + - [0.680047, 0.005602, 0.711593] + - [0.681401, 0.022135, 1.03856] + - [0.683528, 0.096239, 0.931434] + - [0.684986, 0.082892, 0.265725] + - [0.690205, 0.16892, 0.283332] + - [0.691061, -0.048256, 1.019473] + - [0.694995, 0.025518, 0.925206] + - [0.706238, 0.105035, 1.096121] + - [0.706387, -0.048185, 0.839822] + - [0.709102, -0.050473, 0.954691] + - [0.709386, -0.008977, 1.069906] + - [0.727319, -0.053022, 0.781391] + - [0.727905, 0.078589, 0.829206] + - [0.728246, 0.023876, 1.110277] + - [0.72828, 0.140159, 1.059345] + - [0.740183, 0.058149, 0.769222] + - [0.742315, 0.007879, 0.849536] + - [0.745627, -0.016774, 0.946658] + - [0.747316, 0.15053, 1.159711] + - [0.752372, 0.000567, 0.78513] + - [0.760108, 0.136118, 1.02423] + - [0.78209, 0.032563, 0.974186] + - [0.787784, 0.183578, 1.131719] + - [0.792058, 0.114009, 1.18295] + - [0.808958, 0.067571, 1.009736] + - [0.812185, 0.188921, 1.076102] + - [0.839776, 0.155817, 1.16051] + - [0.869204, 0.163142, 1.091946] 30369: mesh: 25717 animation: 25721 diff --git a/server/gamedata/load.go b/server/gamedata/load.go @@ -293,6 +293,12 @@ func init() { } } // Template-specific encounters must match an admitted original population. + for index, id := range profile.Groups { + group := NPCGroups[id] + if group == nil || slices.Contains(profile.Groups[:index], id) || !group.SupportsCombatProfile(monster, profile) { + panic(fmt.Errorf("NPC combat profile %d/%d has invalid group %q", monster, level, id)) + } + } if len(profile.TemplateCodes) != 0 { for index, code := range profile.TemplateCodes { if code == "" || slices.Contains(profile.TemplateCodes[:index], code) { diff --git a/server/gamedata/npc_combat.go b/server/gamedata/npc_combat.go @@ -16,7 +16,7 @@ func interpolateNPCProfiles(profiles map[uint32]map[uint16]*NPCCombatProfile) er continue } first, second := levels[low], levels[high] - if !slices.Equal(first.TemplateCodes, second.TemplateCodes) || first.Weapon != second.Weapon || + if !slices.Equal(first.TemplateCodes, second.TemplateCodes) || !slices.Equal(first.Groups, second.Groups) || first.Weapon != second.Weapon || first.Initiative != second.Initiative || first.AggDef != second.AggDef || first.RespawnSeconds != second.RespawnSeconds || first.CorpseSeconds != second.CorpseSeconds || first.Credits != second.Credits || len(first.Loot) != len(second.Loot) { @@ -35,6 +35,7 @@ func interpolateNPCProfiles(profiles map[uint32]map[uint16]*NPCCombatProfile) er } profile := *first profile.TemplateCodes = slices.Clone(first.TemplateCodes) + profile.Groups = slices.Clone(first.Groups) profile.Health = uint32(interpolate(int64(first.Health), int64(second.Health))) profile.Experience = uint32(interpolate(int64(first.Experience), int64(second.Experience))) profile.Skills, profile.Modifiers = maps.Clone(first.Skills), maps.Clone(first.Modifiers) diff --git a/server/gamedata/npc_combat.yaml b/server/gamedata/npc_combat.yaml @@ -490,3 +490,65 @@ - template: 123742 quality: [4, 4] chance: 25 + +# Six reviewed training human populations only. Their template codes are reused +# outside these routes. Combat/rewards are provisional; original BRW1 fist data +# supplies the damage and timing. Clothing drops are separate owned instances. +26135: + 1: &training_human + template_codes: [H320] + groups: [950/district/1/group/0/authored_point] + health: 100 + experience: 100 + skills: {100: 5, 153: 5, 154: 5, 155: 5, 168: 5} + weapon: [120697, 120698] + initiative: 0 + agg_def: 75 + respawn_seconds: 100 + corpse_seconds: 180 + credits: [1, 5] + loot: + - template: 82102 + quality: [1, 1] + chance: 50 + 2: + <<: *training_human + +26147: + 1: &training_functionary + <<: *training_human + template_codes: [H366] + groups: [950/district/3/group/0/authored_point] + loot: + - template: 82912 + quality: [1, 1] + chance: 50 + 2: + <<: *training_functionary + +26076: + 2: &training_informer + <<: *training_human + template_codes: [H476] + groups: [950/district/4/group/0/authored_point] + 4: + <<: *training_informer + health: 150 + experience: 150 + skills: {100: 15, 153: 15, 154: 15, 155: 15, 168: 15} + +26088: + 1: &training_mercenary + <<: *training_human + template_codes: [H525, H660, H410] + groups: + - 952/district/2/group/0/authored_point + - 952/district/3/group/1/authored_point + - 954/district/4/group/3/spread_authored_point + 2: + <<: *training_mercenary + 4: + <<: *training_mercenary + health: 150 + experience: 150 + skills: {100: 15, 153: 15, 154: 15, 155: 15, 168: 15} diff --git a/server/gamedata/npc_combat_test.go b/server/gamedata/npc_combat_test.go @@ -7,9 +7,9 @@ import ( ) func TestNPCLevelAnchorsResolveBoundedIndependentProfiles(t *testing.T) { - first := &NPCCombatProfile{TemplateCodes: []string{"SN01", "SN02"}, Health: 125, Experience: 125, Skills: map[uint32]int32{100: 10}, + first := &NPCCombatProfile{TemplateCodes: []string{"SN01", "SN02"}, Groups: []string{"selected"}, Health: 125, Experience: 125, Skills: map[uint32]int32{100: 10}, Modifiers: map[uint32]int32{276: 3, 277: -3}, Loot: []NPCLoot{{Template: 42640, Quality: [2]uint32{2, 4}, Chance: 50}}} - second := &NPCCombatProfile{TemplateCodes: []string{"SN01", "SN02"}, Health: 175, Experience: 175, Skills: map[uint32]int32{100: 20}, + second := &NPCCombatProfile{TemplateCodes: []string{"SN01", "SN02"}, Groups: []string{"selected"}, Health: 175, Experience: 175, Skills: map[uint32]int32{100: 20}, Modifiers: map[uint32]int32{276: 8, 277: -8}, Loot: []NPCLoot{{Template: 42640, Quality: [2]uint32{4, 6}, Chance: 50}}} profiles := map[uint32]map[uint16]*NPCCombatProfile{17655: {3: first, 5: second}} @@ -21,15 +21,17 @@ func TestNPCLevelAnchorsResolveBoundedIndependentProfiles(t *testing.T) { t.Fatal("bounded interpolation changed numeric rounding or omitted a foundation", profile, err) } profile.Skills[100], profile.Modifiers[276], profile.Loot[0].Quality[0], profile.TemplateCodes[0] = 99, 99, 99, "other" + profile.Groups[0] = "other" if first.Skills[100] != 10 || second.Skills[100] != 20 || first.Modifiers[276] != 3 || second.Modifiers[276] != 8 || first.Loot[0].Quality != [2]uint32{2, 4} || second.Loot[0].Quality != [2]uint32{4, 6} || - !slices.Equal(first.TemplateCodes, []string{"SN01", "SN02"}) || !slices.Equal(second.TemplateCodes, []string{"SN01", "SN02"}) { + !slices.Equal(first.TemplateCodes, []string{"SN01", "SN02"}) || !slices.Equal(second.TemplateCodes, []string{"SN01", "SN02"}) || + first.Groups[0] != "selected" || second.Groups[0] != "selected" { t.Fatal("resolved profile shares mutable data with an anchor") } } func TestNPCLevelAnchorsRejectAmbiguousIntermediateIdentity(t *testing.T) { - for _, change := range []string{"template", "weapon", "initiative", "aggdef", "respawn", "corpse", "cash", "loot count", "loot template", "loot chance", "skill count", "skill identity", "modifier identity"} { + for _, change := range []string{"template", "group", "weapon", "initiative", "aggdef", "respawn", "corpse", "cash", "loot count", "loot template", "loot chance", "skill count", "skill identity", "modifier identity"} { t.Run(change, func(t *testing.T) { first := &NPCCombatProfile{Health: 100, Skills: map[uint32]int32{100: 5}, Modifiers: map[uint32]int32{276: 5}, Loot: []NPCLoot{{Template: 42640, Quality: [2]uint32{1, 1}, Chance: 50}}} @@ -37,6 +39,8 @@ func TestNPCLevelAnchorsRejectAmbiguousIntermediateIdentity(t *testing.T) { switch change { case "template": second.TemplateCodes = []string{"other"} + case "group": + second.Groups = []string{"other"} case "weapon": second.Weapon = [2]uint32{120910, 120911} case "initiative": @@ -93,3 +97,21 @@ func TestProductionNPCGrowthRetainsBaselineAndStopsAtReviewedBoundary(t *testing t.Fatal("growth extrapolated beyond its reviewed range or changed boss scope") } } + +func TestTrainingHumanProfilesStayWithinSixReviewedPopulations(t *testing.T) { + expected := map[string]bool{ + "950/district/1/group/0/authored_point": true, "950/district/3/group/0/authored_point": true, "950/district/4/group/0/authored_point": true, + "952/district/2/group/0/authored_point": true, "952/district/3/group/1/authored_point": true, "954/district/4/group/3/spread_authored_point": true, + } + for _, group := range NPCGroups { + if group.Appearance>>4&7 >= 6 { + continue + } + for level := group.Levels[0]; level <= group.Levels[1]; level++ { + profile := NPCCombatProfiles[group.MonsterData][level] + if group.SupportsCombatProfile(group.MonsterData, profile) != expected[group.ID] { + t.Fatal("human combat escaped the reviewed population/level scope", group.ID, level) + } + } + } +} diff --git a/server/gamedata/types.go b/server/gamedata/types.go @@ -64,6 +64,7 @@ type NPCData struct { type NPCCombatProfile struct { TemplateCodes []string `yaml:"template_codes,flow"` + Groups []string `yaml:"groups,omitempty"` Health uint32 `yaml:"health"` Experience uint32 `yaml:"experience"` Skills map[uint32]int32 `yaml:"skills"` @@ -140,6 +141,9 @@ func (group *NPCGroup) SupportsCombatProfile(monster uint32, profile *NPCCombatP if profile == nil || group.MonsterData != monster { return false } + if len(profile.Groups) != 0 && !slices.Contains(profile.Groups, group.ID) { + return false + } if len(profile.TemplateCodes) != 0 { return slices.Contains(profile.TemplateCodes, group.TemplateCode) && (group.AppearanceStatus == "inferred_species" || group.AppearanceStatus == "best_effort") diff --git a/server/jab_of_the_snake.go b/server/jab_of_the_snake.go @@ -44,7 +44,7 @@ func (server *server) useSnakeJab_locked(client *worldClient, item ownedItem, bo player := server.characters[client.id] target := server.characters[player.fighting] now := time.Now() - accepted := snakeJab(item) && target != nil && target.npc && target.pet == nil && target.appearance>>4&7 == 6 && + accepted := snakeJab(item) && target != nil && target.attackableNPC() && target.health > 0 && target.playfield == player.playfield && client.npcs[target.id] && !player.sitting && !player.driving() && !now.Before(player.skillLocks[100]) if accepted { diff --git a/server/loot.go b/server/loot.go @@ -39,6 +39,27 @@ func corpsePacket(character *character) []byte { stats := [][2]uint32{{12, 0}, {26, 0xffffffff}, {42, monster.Mesh}, {4, uint32(character.appearance >> 4 & 7)}, {59, uint32(character.appearance >> 7 & 3)}, {89, uint32(character.appearance & 3)}, {223, 0}, {360, 100}, {415, 50000}, {416, character.id}, {61, character.corpse.credits}} + var cloth []uint32 + if character.appearance>>4&7 < 6 { + head, textures := character.appearanceAssets() + stats[6] = [2]uint32{223, 1} + stats = append(stats, [2]uint32{64, head}) + // ClothPart order is hands, body, feet, arms, legs. Preserve the same + // original OnWear textures as the living actor, including both sleeves. + cloth = []uint32{textures[2], textures[4], textures[1], textures[0], textures[3]} + for _, item := range character.inventory.Items { + for _, section := range item.templateDefinition().Sections { + if section.Type != 2 || section.Subtype != 14 { + continue + } + for _, function := range *section.Functions { + if function.ID == 53039 { + cloth[*function.Arguments[1].Integer] = uint32(*function.Arguments[0].Integer) + } + } + } + } + } body = binary.BigEndian.AppendUint32(body, uint32(len(stats)+1)*1009) for _, stat := range stats { body = binary.BigEndian.AppendUint32(body, stat[0]) @@ -55,8 +76,18 @@ func corpsePacket(character *character) []byte { looterType = 0 } for _, value := range []uint32{2, 0, 1009, 3, 2018, 53003, 0, 4, 0, 1, 0, 0, 0xffffffff, - 51050, character.id, monster.DeathAnimations[0], 1, 0, - 50000, character.id, 1009, 0, character.corpse.team, 3 + character.corpse.lootOrder, looterType, character.corpse.looter, 0} { + 51050, character.id, monster.DeathAnimations[0], 1, 0, 50000, character.id} { + body = binary.BigEndian.AppendUint32(body, value) + } + // kkr.dll sub_36005440 reads indexed ClothData entries, each containing + // its material category, original texture identity and a boolean. + body = binary.BigEndian.AppendUint32(body, uint32(len(cloth)+1)*1009) + for index, texture := range cloth { + for _, value := range []uint32{uint32(index), uint32(index), texture, 1} { + body = binary.BigEndian.AppendUint32(body, value) + } + } + for _, value := range []uint32{0, character.corpse.team, 3 + character.corpse.lootOrder, looterType, character.corpse.looter, 0} { body = binary.BigEndian.AppendUint32(body, value) } return n3Packet(0x4f474e05, 51050, character.id, body) diff --git a/server/nano_casting.go b/server/nano_casting.go @@ -135,7 +135,7 @@ func (server *server) nanoTarget_locked(player, target *character, client *world } second := target.position if directDamageNano(program) != nil || damageOverTimeNano(program) != nil || controlNano(program) != nil { - if !target.npc || target.pet != nil || target.appearance>>4&7 != 6 || !client.npcs[target.id] { + if !target.attackableNPC() || !client.npcs[target.id] { return false } if (damageOverTimeNano(program) != nil || controlNano(program) != nil) && !target.acceptsNano(program) { diff --git a/server/npcs.go b/server/npcs.go @@ -5,6 +5,13 @@ import ( "fmt" ) +func (character *character) attackableNPC() bool { + // Human encounters require an explicit population binding; guards and vendors + // keep their appearances without acquiring combat from a shared body/template. + return character.npc && character.pet == nil && (character.appearance>>4&7 == 6 || + character.combatProfile != nil && len(character.combatProfile.Groups) != 0) +} + func npcCombatProfile(definition string, monster uint32, level uint16) *gamedata.NPCCombatProfile { group := gamedata.NPCGroups[definition] if group == nil { diff --git a/server/pet_follow.go b/server/pet_follow.go @@ -31,8 +31,8 @@ func (server *server) handlePetCommand(client *worldClient, body []byte) error { now := time.Now() updates := make(map[*worldClient][][]byte) target := server.characters[client.selectedTarget[1]] - if command == 7 && (owner.driving() || client.selectedTarget[0] != 50000 || target == nil || !target.npc || - target.pet != nil || target.appearance>>4&7 != 6 || !client.npcs[target.id] || target.health == 0 || target.playfield != owner.playfield) { + if command == 7 && (owner.driving() || client.selectedTarget[0] != 50000 || target == nil || !target.attackableNPC() || + !client.npcs[target.id] || target.health == 0 || target.playfield != owner.playfield) { server.mutex.Unlock() return nil } diff --git a/server/target_protocol.go b/server/target_protocol.go @@ -77,7 +77,7 @@ func targetPacket(packet []byte) []byte { // Three empty byte-counted groups separate the final encoded lists. // Players carry MA, Brawl and Dimach; NPCs carry their attack row. tailLength := 24 - if flags&1 == 0 { + if flags&(1|0x40000) == 0 { tailLength += 32 } tail = append([]byte(nil), packet[len(packet)-tailLength:]...) diff --git a/server/training_humans_test.go b/server/training_humans_test.go @@ -0,0 +1,122 @@ +package main + +import ( + "ao/server/gamedata" + "bytes" + "encoding/binary" + "testing" + "time" +) + +func TestHumanoidNPCSpawnKeepsOneWeaponRowAfterTextureData(t *testing.T) { + for _, route := range []string{"950/district/1/group/0/authored_point", "710/district/0/fixed/18"} { + group := gamedata.NPCGroups[route] + npc := makeNPCSpawn(group, group.Levels[0], group.Positions[0]) + original := characterPacket(&npc) + end := int(binary.BigEndian.Uint16(original[6:8])) + want := append([]byte{0, 0, 0}, original[end-24:end]...) + + packet := targetPacket(original) + end = int(binary.BigEndian.Uint16(packet[6:8])) + + if !bytes.Equal(packet[end-27:end], want) { + t.Fatal("humanoid NPC used the player's three-weapon tail and split texture data", route) + } + } +} + +func TestTrainingHumansCanFightAndRetaliate(t *testing.T) { + for _, route := range []string{ + "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, _ := newCombatWorld(t) + group := gamedata.NPCGroups[route] + target := makeNPCSpawn(group, group.Levels[0], [3]float32{1, 0, 0}) + target.id, target.playfield = 1000000, 950 + world.characters[target.id] = &target + player := world.characters[1] + health := target.health + + if err := world.handleCombat(world.clients[1], attackPacket(1, target.id)[20:]); err != nil { + t.Fatal(err) + } + if player.fighting != target.id { + t.Fatal("training human rejected ordinary combat") + } + world.advanceCombat(player.nextAttack) + world.advanceCombat(target.nextAttack) + + if target.health >= health || player.health >= 100 || target.fighting != player.id { + t.Fatal("training human did not exchange damage", target.health, player.health, target.fighting) + } + attack, recharge := target.attackDelays() + if attack != 2350*time.Millisecond || recharge != 2350*time.Millisecond || len(target.inventory.Items) != 5 { + t.Fatal("human lost original fist timing or clothing", attack, recharge) + } + }) + } +} + +func TestTrainingHumanKillsPersistRewardsAcrossAttackPaths(t *testing.T) { + for _, attack := range []string{"unarmed", "fling", "nano", "jab", "pet"} { + t.Run(attack, func(t *testing.T) { + var world *server + switch attack { + case "jab": + world, _ = newSnakeJabWorld(t) + case "pet": + world, _ = newPetAttackWorld(t) + default: + world, _ = newKillExperienceWorld(t, attack) + } + target := world.characters[1000000] + group := gamedata.NPCGroups["950/district/1/group/0/authored_point"] + target.npcDefinitionID, target.monsterData, target.appearance, target.level = group.ID, group.MonsterData, group.Appearance, 1 + target.combatProfile = npcCombatProfile(group.ID, group.MonsterData, 1) + target.equipNPCOutfit() + target.health = 1 + world.nextNPC = 1000010 + world.combatRoll = func(uint32) uint32 { return 0 } + identity := world.nextItem + 1 + if err := world.flushWorld(); err != nil { + t.Fatal(err) + } + + switch attack { + case "jab": + if err := world.handleOwnedItemUse(world.clients[1], backpackUseRequest(1, 64, 1)[20:]); err != nil { + t.Fatal(err) + } + case "pet": + if err := world.handlePetCommand(world.clients[1], petAttackRequest()); err != nil { + t.Fatal(err) + } + world.advanceCombat(world.characters[1000001].nextAttack) + default: + 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 || npc.corpse.looter != 1 || + current.characters[1].experience != 100 || len(npc.corpse.items) != 1 || + npc.corpse.items[0] != (ownedItem{ID: identity, Type: 51022, Template: 82102, Quality: 1, Count: 1}) || + npc.corpse.expiresAt.IsZero() || len(current.npcRespawns) != 1 || len(npc.inventory.Items) != 5 { + t.Fatalf("human death lost rewards, clothing or lifecycle: health=%d xp=%d corpse=%+v respawns=%d", npc.health, current.characters[1].experience, npc.corpse, len(current.npcRespawns)) + } + } + if attack == "unarmed" { + cold.advanceNPCRespawns(cold.npcRespawns[0].at) + replacement := newTestInventoryServer(t).characters[1000010] + if replacement == nil || replacement.health != 100 || replacement.corpse != nil || + replacement.combatProfile != target.combatProfile || len(replacement.inventory.Items) != 5 || + replacement.headMesh != 40252 || replacement.inventory.Items[0].ID != 0 { + t.Fatal("respawn lost human appearance/profile or allocated wearable loot", replacement) + } + } + }) + } +} diff --git a/server/weapon_special.go b/server/weapon_special.go @@ -45,7 +45,7 @@ func (server *server) handleWeaponSpecial(client *worldClient, body []byte) erro } target := server.characters[binary.BigEndian.Uint32(body[20:24])] now := time.Now() - if target == nil || !target.npc || target.pet != nil || target.appearance>>4&7 != 6 || !client.npcs[target.id] || target.health == 0 || + if target == nil || !target.attackableNPC() || !client.npcs[target.id] || target.health == 0 || target.playfield != player.playfield || !implicit && !server.combatInRange_locked(player, target, now) || !server.combatVisible_locked(player, target, now) || player.sitting || player.driving() || client.equipment != nil || now.Before(client.reloadUntil) || now.Before(player.skillLocks[skill]) { diff --git a/tools/client/test_training_corpses.mjs b/tools/client/test_training_corpses.mjs @@ -20,27 +20,59 @@ try { await game.ready(); if (!game.state.camera.firstPerson) await game.key('F8'); evidence.before = await server(); - // Aim above chat even when the original placement is on steep terrain. - 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 === 51050 && actor.id === evidence.before.target).screenPosition[1]; - if (y >= 400 && y <= 450) break; - assert(Date.now() < deadline, 'Camera did not frame the corpse above chat'); - mouseY += y > 450 ? 10 : -10; - await game.page.mouse.move(cameraPoint.x, mouseY, {steps: 2}); + async function frame(type, lower, upper) { + await game.wait("target appears", state => state.actors.some(actor => actor.type === type && actor.id === evidence.before.target)); + 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 === type && actor.id === evidence.before.target).screenPosition[1]; + if (y >= lower && y <= upper) break; + assert(Date.now() < deadline, 'Camera did not frame the corpse above chat'); + mouseY += y > upper ? 10 : -10; + await game.page.mouse.move(cameraPoint.x, mouseY, {steps: 2}); + // Recenter the drag before it leaves the canvas on steep viewpoints. + if (mouseY < 100 || mouseY > 600) { + sequence = game.sequence; + await game.page.mouse.up({button: 'right'}); + await game.waitInput(sequence, 1026); + mouseY = cameraPoint.y; + await game.page.mouse.move(cameraPoint.x, mouseY); + sequence = game.sequence; + await game.page.mouse.down({button: 'right'}); + await game.waitInput(sequence, 1025); + } + } + } finally { + sequence = game.sequence; + await game.page.mouse.up({button: 'right'}); } - } finally { - sequence = game.sequence; - await game.page.mouse.up({button: 'right'}); + await game.waitInput(sequence, 1026); + } + if (evidence.before.health > 0) { + await frame(50000, 500, 550); + await game.save(output + '/living'); + await game.click(...await game.pick(50000, evidence.before.target)); + await game.wait('human opponent selected', state => state.selected[0] === 50000 && state.selected[1] === evidence.before.target); + await game.key('q'); + await game.waitFor('native attack killed human opponent', async () => (await server()).health === 0); + evidence.killed = await server(); + assert(evidence.killed.experience > evidence.before.experience, 'Human kill granted no XP'); + evidence.before = evidence.killed; + await game.wait('human corpse appears', state => state.actors.some(actor => actor.type === 51050 && actor.id === evidence.before.target)); + await frame(51050, 400, 450); + await game.save(output + '/warm-corpse'); + await page.reload(); + await game.ready(); + if (!game.state.camera.firstPerson) await game.key('F8'); } - await game.waitInput(sequence, 1026); + // Cold replay must retain both a visible body and its original loot. + await frame(51050, 400, 450); await game.save(output + '/corpse'); await game.click(...await game.pick(51050, evidence.before.target), 'right'); await game.wait('original training loot appears', state => state.grids.some(grid => grid.cells.some(cell => cell.identity[0] === 107 && !cell.dummy))); diff --git a/tools/data/extract_corpse_poses.py b/tools/data/extract_corpse_poses.py @@ -111,7 +111,7 @@ def held_vertices(mesh, keys): sections = struct.unpack_from('<I', mesh, cursor)[0] cursor += 4 points = set() - for _ in range(sections): + for section in range(sections): size = struct.unpack_from('<I', mesh, cursor)[0] cursor += 4 + size parts = struct.unpack_from('<I', mesh, cursor)[0] @@ -133,6 +133,11 @@ def held_vertices(mesh, keys): cursor += 4 assert max(struct.unpack_from('<' + 'H' * indices, mesh, cursor)) < vertices cursor += indices * 2 + # Selected resources have two empty fields between selection groups. + # Do not interpret an empty group's fields as the next group's header. + if section < sections - 1: + assert struct.unpack_from('<II', mesh, cursor) == (0, 0) + cursor += 8 assert points return sorted(points) @@ -141,7 +146,7 @@ def held_vertices(mesh, keys): assert pathlib.Path('anarchy-vanilla-14.9.1/version.id').read_text().strip() == '14.9.1' database = ao_database.Database('anarchy-vanilla-14.9.1') monsters = yaml.safe_load(pathlib.Path('server/gamedata/monsters.yaml').read_text()) -selected = {17649, 17655, 30369, 38387} +selected = {17649, 17655, 26088, 26147, 30369, 38387} lines = ['# Generated by tools/data/extract_corpse_poses.py from original 14.9.1 resources.', '# Held-pose vertices at unit scale; this is geometry, not an original server placement rule.'] for monster in monsters: