Repository navigation
Conversation
world_build --placements placed only CMapData entities. The 540,665 entities of the 1,706 interior archetypes were missing, so buildings had no insides. world_index --interiors-out writes one JSON line per interior archetype: its entities and entity sets in interior space, reached through the archetype's pool-reference lists. It also writes one line per CMloInstanceDef. world_build --interiors composes them into world space. The instance quaternion is the world rotation itself; the interior entities store the inverse, as map entities do. The composed rows then go through the usual LOD, region, model match, instancing and LOD-set steps. --interior-sets default|all|none picks the entity sets; default uses the instance's defaultEntitySets. load_placements, iter_placements and the interior rows now share one row check. The per-entity read in parse_resource moved to _entity_record, so map and interior entities are read the same way. ASSET-127. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested Code read of What I cannot check without the game: that AI-assisted review. |
|
Tested 907961f (Windows 11, Python 3.14). It conflicts with
Two small things:
AI-assisted (Claude Code). |
…ents (BUILD-557) tools/world_archetypes.py reads the archetype structs of CMapTypes resources (CBaseArchetypeDef, CMloArchetypeDef, CTimeArchetypeDef) by member hash, the way world_index.py reads CEntityDef: name, assetName, assetType, bbMin/bbMax, bsCentre/bsRadius, lodDist, flags. It imports world_index and world_census and changes neither, so it does not touch the lines ItsNotRexed#1981 changes. --check-extents rebuilds each fully-defined map's entitiesExtents from the transformed archetype boxes. In levels.rpf 8-9 GiB the conjugated quaternion reproduces 616 of 827 rotated maps (median error 0.16 mm), the stored one 236 (0.63 m), and the extents are computed without the entity scale. docs/world.md: the member table, assetType measured against rpf9_names.py (1 = fragment, 2 = drawable, 3 = drawable-like, no crossover), and the two extents checks. Synthetic tests only, no game data.
Resolve the conflicts with main (ItsNotRexed#1981 was 4,584 commits behind): - world_build.py: keep main's --lod-sets level validation and add the --interiors / --interior-sets checks after it. - world_index.py: keep main's _placement_tables (map_name, entity_index, parent_map_name) on top of this branch's _entity_record helper, and write those keys in EntityRows.row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for catching the conflict, @JRamos1993. It's resolved in c358e2a, a merge of
Tested on Linux with Python 3.12.3, on the merged tree:
|
|
Reviewed c358e2a merged onto main 594f348 on Linux (CPU only): questions Ran (Python 3.13.18, clean merge, 4 files, +898/-105; SPIRV-Tools on PATH):
Findings:
No game files. |
Why
world_build --placementsplaces onlyCMapDataentities. Interiors (MLOs) are stored elsewhere, so every building is an empty shell.docs/world.mdalready counts 961 interior archetype resources with 540,665 entities, but notes that they "need the transform of whatever places them".ASSET-127, claimed in #1745 (comment).
Change
world_index.py --interiors-outwrites one JSON line perCMloArchetypeDefand one perCMloInstanceDef:entitieslist and itsentitySets, each entity in--entities-outrow format, in interior space.defaultEntitySets.world_lights_paths.py, and only references to a completeCEntityDefare kept; any other reference is counted.world_build.py --interiors FILE(repeatable) composes each instance's entities into world space:--lod-levels,--region, the name/key match, instancing and--lod-setsunchanged.--interior-sets default|all|nonepicks which entity sets to place;defaultuses each instance'sdefaultEntitySets.load_placements,iter_placementsand the interior rows now share one row check,_select_placement.parse_resource's per-entity read moved to_entity_record, so map and interior entities are read identically.docs/world.mdInteriors section covers the structs, the two rotation conventions, the measurements and what is not done.The two rotation conventions, measured on the full
levels.rpfentitiesExtentsMin/Maxis the interior's bbox turned and moved by the instance. For the 203 that are turned more than 5° off an axis:Measured
Data: 1.0.2.1,
levels.rpf, Linux,--no-textures. Models come from the city exports used for #1316, plus the 28,980 missing interior resources, which I exported at the pin e293917 (0 failures).Index
--interiors-out(24 windows, with--entities-out)Builds
defaultsets-900,500,-200,1200Checks
0x5page pointer before trying it as a pool reference. Emulating that order on the same resources gives exactly 453,258 and 1,678,915, so the gap has the same cause as the light-count gap in #1648world.jsonGLTFLoader(in Node)Tested
python -I tests/test_world_interiors.py: 13 new tests on synthetic resources. They cover the archetype, entity-set and instance records, an unresolved reference, CLI report-path refusal, the composition against a matrix product, set selection, region and LOD filtering, and builds withgpuandbake. Conjugating the instance rotation makes 3 of them fail.test_world_index,test_world_index_three_streams,test_world_place,test_world_build,test_world_instancing,test_world_json_atomic,test_world_lights_paths,test_world_census,test_restofworld_index,test_bad_input_errors,test_csv_line_endings,test_limit_window,test_ttpf_assetsandtest_tool_stdout_encoding.python -I -m compileall -q make_game.py toolspasses.test_world_nameshas 3 failures on Linux (--outrefusal message vsrepr(path)). They are the same onmain6a6704d without this change.Not done
Nothing was looked at in a browser. Rooms, portals and
groupId/floorIdare not used, so each interior is drawn whole and always, not culled room by room. Interior entities are almost all ORPHAN_HD, so with--lod-setsthey share that band. The instance scale is not applied: 6 instances havescaleZ0.998.AI-assisted (Claude Code). No game data in the PR. The interior rows and chunks were generated from my own copy of the game and stay local.
🤖 Generated with Claude Code