commit ef2bbf83eef901c2f8fcae581a6d78b71410f344
parent 2485586d1ce1dfea3437aff581816f7f3fcfc34d
Author: anon <anon@example.com>
Date: Tue, 27 Oct 2026 16:09:47 +0000
Recover native door messages and original placement descriptors
Diffstat:
6 files changed, 208 insertions(+), 4 deletions(-)
diff --git a/TODO.md b/TODO.md
@@ -1516,10 +1516,13 @@ client rendering fixes and checks are in [nano damage](docs/nano-damage.md).
the extractor decodes 298 rooms from four original ACD libraries. An GPU
WASM protocol fixture loads a capped two-room layout, verifies reciprocal
native door links and one exterior exit, and walks both ways with collision.
- Recover the door object/status lifecycle too: the fixture's room link remains
- closed with no door identity, and adjacent geometry is black until crossing.
+ Door create/status messages now register a real native door and animate it.
+ Complete their flag/close-notification lifecycle and trace RoomMonitor/camera
+ visibility: adjacent geometry is still black with a fully open door and open
+ room link. Closed-link state alone does not explain it. Original door data
+ now decodes3692 placements and53 templates; the mission-style mapping is open.
This is not usable entry, recovered style selection or a private-world boundary.
- See [mission interiors](docs/mission-interiors.md).
+ See [mission interiors](docs/mission-interiors.md) and [doors](docs/mission-doors.md).
- [ ] [P1] Complete mission-key destination metadata and duplication. Check:
keys identify their assigned destination in the native UI, copies retain the
same assignment, and door admission follows actual key-instance bindings.
diff --git a/docs/mission-doors.md b/docs/mission-doors.md
@@ -0,0 +1,114 @@
+# Original mission door contracts
+
+Private mission entry remains unimplemented. These contracts and owned native
+fixtures extend the [mission interior investigation](mission-interiors.md);
+there is no production door-state consumer yet. No server or client runtime
+change was needed for these protocol experiments.
+
+## Native messages
+
+Original14.9.1 `kkr.dll` SHA256
+`a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0`
+registers DoorFullUpdateIIR_t through `0x10011d00` / factory `0x10011c80` and
+DoorStatusUpdateIIR_t through `0x1000fe80` / factory `0x1000fe00`.
+LLR `n3InfoItemRemote_t::MapToKey` at `0x10023f20` XORs character bytes into
+four byte lanes. Their native N3 keys are `0x365a5071` and `0x4c7d403b`.
+Door item templates and the test subjects use identity type51016.
+
+The full-update reader `KKR:0x100b0230` inherits SimpleItem11 (`0x100b2440`)
+and Lockable2 (`0x100b1030`), then reads Door2 and one additional uint32.
+The prototype sets that last word to zero; its meaning is not established.
+SimpleItem carries parent identity, world XYZ/quaternion when parentless,
+playfield, owner identity, two placement bytes, encoded stat pairs and an
+optional byte payload. Lockable adds a value stored as stat299 and an encoded
+identity list.
+Do not use a Chest or vending-machine subclass tail for a door.
+
+Apply `0x100b02d0` creates the absent Door, applies its template/stats and world
+position, and calls `0x1008da10` to link it to nearby room portals. That routine
+records the packed room pair, registers internal doors with the room-link
+table, and handles unmatched exterior entrances separately. Initial opening
+depends on Flags bit128. The prototype uses original template41884/mesh41798;
+this is not a recovered mission-style-to-door assignment.
+
+The status reader/writer (`0x100b0460` / `0x100b06f0`) carry:
+
+| Field | Wire representation |
+| --- | --- |
+| Version | uint32, value2 |
+| First state (lock/unlock path) | byte Boolean |
+| Open state | byte Boolean |
+| Value applied to stat195 | uint32 |
+| Additional state flag | byte Boolean |
+| Identity list | `(count+1)*1009`, then type/instance pairs |
+
+Apply `0x100b07a0` changes lock/open state, sets Door byte0x1c5 when the
+additional flag is true, and stores the uint32 as stat195. The identity list
+is read but unused by that Apply body; its wider purpose is unresolved.
+The original producer and the additional flag's full lifecycle still need
+recovery. Do not label it as a general animation-enable flag.
+
+## Original data
+
+`tools/data/extract_backyards.py` now also reads descriptor function53016's
+four signed integers, function53083's four integers plus12 opaque bytes, and
+zero-argument function53109. These additions let the offline door census
+decode all3692 type51016 placements in original resources1000026. There are53
+type51016 item templates. All original raw records, overrides and source/index
+hashes are retained in `local/mission-interior/door-catalog.json` and
+`door-placements.json`. They do not establish a generated-mission door choice.
+
+Three unmodified original placement fixtures cover each added function and
+preservation of following stats; truncated descriptors are rejected. All48
+data-tool tests pass. No generated live world data changes in this milestone.
+
+## Native observation and remaining work
+
+Owned GPU Chromium fixtures267..269 receive the actual Go-overlay-produced
+door packets after the generated world update. Native probes show subject
+51016/8000001 at [15,0,29.999], packed room link65536, and the real door identity
+in room0's neighbor1 entry. Captures include original/rewritten streams,
+screenshots, native frame/controller state and, in the final run, outgoing
+requests. All fixtures are client-side rewrites on the sole existing preview;
+they prove no authoritative private entry, ownership, loot or reward behavior.
+
+The unflagged open update changes the room link but the client promptly reverses
+the animation. With the additional state flag set, Flags bit128 stays set and
+the native animation reaches its0.6-second end pose. A subsequent unflagged
+close reaches time0 and clears bit128; another unflagged open reaches0.6 again.
+The room-link close notification had not completed at the one-second sample,
+so its delay must be verified separately. The flag latches native byte0x1c5;
+these experiments do not establish every lifetime or producer rule.
+
+Original `bbr.dll` SHA256
+`28f196f650edbb1573fb874ccaf7746453d3e4a183e1d86db1d790c1c32ecc2c`
+confirms total duration at VisualMesh byte0x24 (`0x1009b3a0`) and recursive
+frame evaluation through `RRefFrame_t::SetAnimationTime` (`0x100e3010`). Native
+frame times, changing controller transforms and screenshots show working door
+animation. Do not patch the C animation code to compensate for an incomplete
+status sequence. Both templates41565 and41884 were tested; only41884's run
+establishes a return walk. The sampled movement-counter byte1 was already
+present before movement, so it is not evidence of a newly imposed root.
+
+Adjoining geometry is still black while the real door is fully open and its
+room link is open1. Closed-link state alone therefore does not explain the
+visibility gap. Trace the native RoomMonitor's visible-room/camera selection
+and the generated world's room graph before enabling entry. Keep authoritative
+mission/world/key allocation, movement/terrain, isolation and retirement open.
+
+Final timed captures are in `local/mission-interior/runtime-door-observe/`,
+with earlier exterior/interior template runs in `runtime-door/` and
+`runtime-door-interior/`. No page exceptions or adapter crashes occurred;
+the only browser resource errors identify `favicon.ico`. Owned browsers and
+native analysis sessions are closed; the shared HTTPS8443 preview is retained.
+
+Complete evidence bundles: `kkr-door-messages-evidence.json`,
+`kkr-door-animation-evidence.json`, `llr-key-hash-evidence.json` and
+`bbr-door-time-evidence.json` in `local/mission-interior/`. Key records:
+
+- Full reader: `ev_da0e1e6f47533eedd4fe1b37960bcba8051012a8e85fec7247b64daeb83b569f`.
+- Status reader: `ev_a3349f67e1f20067f263673b0b2e3ebc750eee6acb66965ff83868c2958099dc`.
+- Status Apply: `ev_11f652b6807fe3fa84d277db4a9fefb8037f452364a933b752440f84a9d5a123`.
+- Room registration: `ev_31100d524c5f3d3ab2ab6a1d56fe9bb472071b8035656f441b0bac84160ca5e6`.
+- Key hashing: `ev_357e5b852dc22d8e79b1b755e1f0f48831608614a42575692f563b85a9787662`.
+- Frame evaluation: `ev_10496a0c940675df68a5c8cf50aa2569089fb3c91fc8e86f38ef7c7f026a339e`.
diff --git a/docs/mission-interiors.md b/docs/mission-interiors.md
@@ -128,6 +128,9 @@ room-link table contains neighbor1 with open0 and door identity0/0. Original
lifecycle rather than forcing all rooms visible. `ChangeRoomStatus`
(`0x1002bf30`) and `RegisterDoorWithRoomLink` (`0x1002ba00`) update that table.
This is a remaining mission-entry requirement, not a fixed client rendering bug.
+Further [door investigation](mission-doors.md) registers a real door and verifies
+its animation, but adjoining geometry remains black even with open1. Closed
+door-link state alone is insufficient to explain the remaining visibility gap.
Final captures are in `local/mission-interior/runtime-capped/`, with earlier
fixtures retained separately. There are no page exceptions or native adapter
diff --git a/tools/data/extract_backyards.py b/tools/data/extract_backyards.py
@@ -41,7 +41,8 @@ def parse_descriptor(data):
function['tick_count'], function['tick_interval'], function['target'], function['argument_header'] = [reader.word() for _ in range(4)]
# Preserve the complete selected HighLow argument layouts.
- layouts = {53059: ('3n', '4x'), 53082: ('4n', '8x'), 53134: ('2s', '4x')}
+ layouts = {53016: ('4n',), 53059: ('3n', '4x'), 53082: ('4n', '8x'),
+ 53083: ('4n', '12x'), 53109: (), 53134: ('2s', '4x')}
assert function['id'] in layouts, ('unsupported statel function', function['id'])
arguments = []
for layout in layouts[function['id']]:
diff --git a/tools/data/test_door_statels.py b/tools/data/test_door_statels.py
@@ -0,0 +1,51 @@
+import json
+import pathlib
+import unittest
+
+import extract_backyards
+
+
+class DoorStatelTests(unittest.TestCase):
+ def setUp(self):
+ source = json.loads((pathlib.Path(__file__).parent / 'testdata/door_statels_1491.json').read_text())
+ self.records = {record['identity']: record for record in source['records']}
+
+ def test_four_integer_door_teleport(self):
+ descriptor = bytes.fromhex(self.records[3221356668]['raw_hex'])[64:]
+
+ attributes = extract_backyards.parse_descriptor(descriptor)
+
+ self.assertEqual(len(attributes), 1)
+ function = attributes[0]['functions'][0]
+ self.assertEqual(function['id'], 53016)
+ self.assertEqual(function['argument_header'], 9)
+ self.assertEqual(function['arguments'], [
+ {'integer': 604}, {'integer': 0}, {'integer': 402}, {'integer': 640}])
+
+ def test_instance_door_preserves_its_destination_and_following_stats(self):
+ descriptor = bytes.fromhex(self.records[3221488221]['raw_hex'])[64:]
+
+ attributes = extract_backyards.parse_descriptor(descriptor)
+
+ self.assertEqual(attributes[0]['functions'][0]['id'], 53083)
+ self.assertEqual(attributes[0]['functions'][0]['arguments'], [
+ {'integer': 51102}, {'integer': 1004}, {'integer': 0}, {'integer': 0},
+ {'bytes_hex': '000186a1000703ec000001f4'}])
+ self.assertEqual(attributes[1], {'stats': [[12, 41611]]})
+
+ def test_zero_argument_door_function_preserves_following_stats(self):
+ descriptor = bytes.fromhex(self.records[3222078006]['raw_hex'])[64:]
+
+ attributes = extract_backyards.parse_descriptor(descriptor)
+
+ self.assertEqual(attributes[0]['functions'][0]['id'], 53109)
+ self.assertEqual(attributes[0]['functions'][0]['arguments'], [])
+ self.assertEqual(attributes[1], {'stats': [[12, 42037]]})
+
+ def test_truncated_door_descriptors_are_rejected(self):
+ for identity, record in self.records.items():
+ with self.subTest(identity=identity):
+ descriptor = bytes.fromhex(record['raw_hex'])[64:-1]
+
+ with self.assertRaises(ValueError):
+ extract_backyards.parse_descriptor(descriptor)
diff --git a/tools/data/testdata/door_statels_1491.json b/tools/data/testdata/door_statels_1491.json
@@ -0,0 +1,32 @@
+{
+ "index_sha256": "46e5dc54af9358cc9bff05f4358e86af630e497bc677f361c133c88073b84d71",
+ "records": [
+ {
+ "playfield": 124,
+ "identity": 3221356668,
+ "template": 41557,
+ "ordinal": 6,
+ "raw_hex": "48c700007c0002c00100000000000000000000007c00000046fc65436a006041ee002943f404353f00000000f20435bf000000000000000055a20000500000000000006600000067000003f1000000010000000200000010000007e20000cf18000000000000000400000000000000010000000000000002000000090000025c00000000000001920000028000000000",
+ "raw_sha256": "cca61a65b875b44ca6d68b15d04d9e0d835a56309c19177de43dfac17bc50f99",
+ "resource_sha256": "c89cd3946f4dc7267d4fc371dcfb3c8d2281b27b78e5aea5d9992d409fbb4374"
+ },
+ {
+ "playfield": 566,
+ "identity": 3222078006,
+ "template": 41565,
+ "ordinal": 18,
+ "raw_hex": "48c7000036020dc00100000000000000000000003602000014ac8043dbdc08424c6b91432205353f00000000c40435bf00000000000000005da20000540000000000006600000067000003f1000000020000000200000010000007e20000cf75000000000000000400000000000000010000000000000002000000000000000f00000018000007e20000000c0000a43500000000",
+ "raw_sha256": "faf8370f3cd21f597ac82d18edbce4b9076c6e546164be10ff4c67728e0d7bd3",
+ "resource_sha256": "c58f31e0e8875589bb7850bba7a374deff81b993654865b19ffbe88ec222f6a6"
+ },
+ {
+ "playfield": 605,
+ "identity": 3221488221,
+ "template": 41565,
+ "ordinal": 36,
+ "raw_hex": "48c700005d0204c00100000000000000000000005d02000052730c45e0fe1342b04e0d45b64ef4be0000000002fa603f00000000000000005da20000700000000000006600000067000003f1000000020000000200000010000007e20000cf5b000000000000000400000000000000010000000000000002000000000000c79e000003ec0000000000000000000186a1000703ec000001f40000000f00000018000007e20000000c0000a28b00000000",
+ "raw_sha256": "a52b1581f8a8ee9e1ec19ca6b73651bd3670bc74f47e6d6a04d198a6688c34db",
+ "resource_sha256": "b2f8037daec53821592131d34fe040403311af8f42f7e970484ec90e8b833818"
+ }
+ ]
+}