38 lines
1.9 KiB
Python
38 lines
1.9 KiB
Python
"""#82 (2026-11-26): on the character-creation screen the High Elf female's head was cut off at the top. ChrModel 20
|
|
(race 10 female) still carries Blizzard's Blood Elf framing (CustomizeScale 1.2, no lift). The Turtle High Elf HD body is
|
|
the Skyborne body (same bounding box, same skeleton FDID), and Blizzard framed that body in Skyborne ChrModels 218/219
|
|
(scale 1.0, offset z 0.08).
|
|
|
|
Rule: for each ChrModel of a Turtle race that reuses a native ID (9 Goblin, 10 High Elf), when another ChrModel with the
|
|
same SkeletonFileDataID belongs to a playable race whose body replaced it (here Skyborne), copy that model's creation
|
|
camera fields (CustomizeOffset, CustomizeScale, CustomizeFacing, CameraDistanceOffset, BarberShop*). Pairs are taken from
|
|
ChrRaceXChrModel + the HD body map below; Goblin keeps its native framing (no replacement body).
|
|
|
|
Usage: he_creation_camera.py <ChrModel.dump> <rows.json>"""
|
|
import json, sys
|
|
|
|
# Turtle race ChrModel -> ChrModel whose body the HD race model uses (ops/content-sdrace / #52 Skyborne body map).
|
|
BODY = {19: 218, 20: 219}
|
|
FIELDS = ('CustomizeOffset', 'CustomizeScale', 'CustomizeFacing', 'CameraDistanceOffset', 'BarberShopCameraOffsetScale',
|
|
'BarberShopCameraRotationFacing', 'BarberShopCameraRotationOffset')
|
|
|
|
|
|
def main(dump, out):
|
|
rows = {}
|
|
for line in open(dump):
|
|
f = line.rstrip('\n').split('\t'); d = dict(x.split('=', 1) for x in f[1:] if '=' in x); rows[int(d['ID'])] = d
|
|
res = []
|
|
for dst, src in BODY.items():
|
|
a, b = rows[dst], rows[src]
|
|
assert a['SkeletonFileDataID'] == b['SkeletonFileDataID'], (dst, src)
|
|
r = {'ID': dst}
|
|
for k in FIELDS:
|
|
v = b[k]
|
|
r[k] = [float(x) for x in v.split(',')] if ',' in v else float(v)
|
|
if a[k] != v: print(dst, k, a[k], '->', v, file=sys.stderr)
|
|
res.append(r)
|
|
json.dump(res, open(out, 'w'), indent=1)
|
|
|
|
|
|
if __name__ == '__main__': main(*sys.argv[1:3])
|