re: the variant reading is refuted; HudResource is the in-game screen config
Censused the 32 bundle-less in-game .prt names with the 68 as control: 4 of 32 appear as an element of some 2D bundle, against 58 of 68. Being an element is normal for a part that exists; these are not elements either. Last iteration's 'not adopted' reading is refuted. 28 names are neither a bundle nor an element. They are not unreferenced: a HudResource record inside the 2D paks' own IDXD entries names them -- the in-game screen config, parallel to tables.pak for menus. GP_MAIN_GAME_E2D.pak has 6 IDXD entries; two carry HudResource (24 named fields) beside ArmsStatus, Map, ArmsItem, RangeFinder, Marker, Manuva, Number; two more carry the ObjectiveMarker_*/TutorialMarker_* set. Its values carry subdirectory prefixes -- Hitmark\, Lockon\ -- which my hand-written prefix list never had. So I rebuilt the negative the right way round: harvested every IDXD field value containing a backslash, kept the 60 commonest directories, and re-swept. 241/376 with the hand list; 241 with hand + harvested -- zero new resolutions. After the language\ miss, this is the closure that counts: the prefix list came from the disc, not from me. Still open: whether the 28 are cut features or assembled at runtime from sprites. Nothing static separates those two. Artefact +45 lines / 0 deletions; the other six regenerate byte-identical.
This commit is contained in:
@@ -30,6 +30,8 @@ def main():
|
||||
names = set()
|
||||
ref = collections.defaultdict(set)
|
||||
pref2d, prefall = set(), set()
|
||||
elem2d = collections.defaultdict(set)
|
||||
dirs = collections.Counter()
|
||||
rat = collections.defaultdict(set)
|
||||
for pk in sorted(glob.glob('/work/sylph_extract/**/*.pak', recursive=True)):
|
||||
base = os.path.basename(pk)
|
||||
@@ -45,8 +47,16 @@ def main():
|
||||
pfx = os.path.commonprefix([_stem(x) for x in e]).rstrip('_')
|
||||
if pfx:
|
||||
prefall.add(pfx)
|
||||
if '2D.pak' in base:
|
||||
pref2d.add(pfx)
|
||||
if '2D.pak' in base:
|
||||
if pfx: pref2d.add(pfx)
|
||||
for x in e: elem2d[_stem(x)].add(pfx)
|
||||
if b[:4] == b'IDXD':
|
||||
try: rr = U.parse(b)
|
||||
except Exception: rr = []
|
||||
for r in rr:
|
||||
for t, nm, v in r['fields']:
|
||||
if '\\' in v and v.count('\\') <= 2 and len(v) < 64:
|
||||
dirs[v.rsplit('\\', 1)[0] + '\\'] += 1
|
||||
|
||||
print("# Where `.prt` screen parts live")
|
||||
print("# Regenerate: python3 tools/re-capture/prt_parts.py")
|
||||
@@ -100,6 +110,28 @@ def main():
|
||||
for n in resid:
|
||||
print(" %s" % n)
|
||||
|
||||
have = [n for n in ing if n[:-4] in pref2d or n[:-4] + '_sub' in pref2d]
|
||||
lack = [n for n in ing if n not in have]
|
||||
asel = lambda n: n[:-4] in elem2d or n[:-4] + '_sub' in elem2d
|
||||
print("\n## REFUTED the bundle-less names are NOT variants declared in a parent bundle")
|
||||
print(" in-game names WITHOUT their own bundle (%d): appear as an ELEMENT of some 2D bundle: %d"
|
||||
% (len(lack), sum(1 for n in lack if asel(n))))
|
||||
print(" CONTROL in-game names WITH a bundle (%d): appear as an element: %d"
|
||||
% (len(have), sum(1 for n in have if asel(n))))
|
||||
dangling = sorted(n for n in lack if not asel(n))
|
||||
print(" neither a bundle nor an element -- %d names:" % len(dangling))
|
||||
for n in dangling:
|
||||
print(" %s" % n)
|
||||
|
||||
extra = [d for d, _ in dirs.most_common(60)]
|
||||
print("\n## CONTROL a prefix list harvested from the DATA adds nothing")
|
||||
print(" directory prefixes taken from IDXD path values: %d" % len(extra))
|
||||
for d, c in dirs.most_common(8):
|
||||
print(" %-30s x%d" % (d, c))
|
||||
both = sum(1 for n in names if any(U.name_hash(q + n) in H for q in PRE + extra))
|
||||
print(" .prt resolving with the hand list %d ; with hand+harvested %d (of %d)"
|
||||
% (len(hit), both, len(names)))
|
||||
|
||||
print("\n## `<stem>_sub.rat` sub-bundles inside RATC")
|
||||
print(" distinct _sub.rat names: %d" % len(rat))
|
||||
for k in sorted(rat):
|
||||
|
||||
Reference in New Issue
Block a user