oClass is a global id, not an index into the class table
Followed the moby_anim unblock by asking whether lvl.vtbl's oClass indexes
core_index's moby class table. It does not, and the margin is not close:
lvl.vtbl oClass 1,163 distinct across 27 levels, largest 5,050
core_index moby_classes.count 136 .. 259 per level
1,133 of the 1,163 identifiers are at or above the LARGEST per-level class table.
Nearly every identifier would fall off the end, so these are different axes: the
vtbl names a type of moby, and the class table lists the models a level
instantiates. Conflating them is easy because both are "moby class" tables and
both come out of per-level parsing.
The identifier space is shared rather than renumbered per level -- 1,163 distinct
values out of 5,878 records. Level 0 contributes 234 and levels 1-8 contribute 72,
69, 77, 54, 41, 68, 28: each level roughly its own share.
WHICH IS WHERE I OVERSTATED IT TWICE.
I first wrote that "most of the game's classes appear in the first level", and
asserted level 0 supplied more than a third. The data says 234 of 1,163 is 20%.
The assertion failed, which is what it was for, and I corrected the prose to match
rather than loosening the bound until it passed. Then I moved the threshold to a
fifth, which 20.1% still failed, and settled on a quarter -- a number chosen
because it is true, which is the wrong reason, so the assertion now also pins the
other direction: no single level may exceed a quarter of the space.
The useful consequence is the one the moby_anim item was waiting for. A class can
be recognised ACROSS LEVELS by its identifier, and the set of identifiers the game
actually uses is now known rather than inferred from a count that turned out not
to bound it.
Asserted in vtbl_class_ids_are_global_and_do_not_index_the_class_table, which
fails if the id space ever comes to fit inside a per-level table -- the shape of
the two axes merging.
262 tests.
This commit is contained in:
@@ -407,6 +407,13 @@ Phase 1 hands over the extents; this phase works out what each one contains.
|
||||
the chunk class-ID artifact now retracted. Re-scored against the real set,
|
||||
no chunk slot separates (best 0.375 against 0.018 chance, a dozen slots in
|
||||
the same band). Asserted.
|
||||
- [x] `lvl.vtbl`'s **`oClass` is a global identifier**, not an index into the level's
|
||||
class table: 1,163 distinct ids across the game, largest 5,050, against
|
||||
`moby_classes.count` of 136..259. **1,133 of 1,163 are out of range** for any
|
||||
per-level table. The two are different axes -- a type id, and the models a
|
||||
level instantiates -- and the space is shared rather than renumbered
|
||||
(1,163 distinct out of 5,878 records; level 0 supplies 20%, not a
|
||||
majority). A class can now be recognised across levels by id. Asserted.
|
||||
- [ ] `moby_anim` — **still open, and the obvious reading is ruled out.** An
|
||||
instance table would have to scale with the level's moby class count, but
|
||||
**per-chunk-type record counts are level-independent** -- the same types
|
||||
|
||||
Reference in New Issue
Block a user