58 lines
4.5 KiB
Python
58 lines
4.5 KiB
Python
"""Drake mount looks (owner 2026-11-24), on content 4983fef7. Client-only: the server keeps its display IDs.
|
|
- CreatureDisplayInfo (1108759): 20875 Black Drake -> Son of Deathwing model 30231 + its skins; 18280 Riding Green/Emerald
|
|
Drake -> Nordrassil Drake 30249; 18281 Riding Red Drake -> Onyxian 30209 with crimson skins (purple accents hue-shifted);
|
|
18279 Bronze Drake (also NPC Alormion) -> Nordrassil with autumn skins (green/teal -> copper/amber). SoundID 0 = model set 508.
|
|
Onyxian/Nordrassil hardcode most skins (TXID), so the recolours are separate model copies on new FDIDs:
|
|
8811029 crimson onyxiamount (CreatureModelData 30321 = copy of 30209), 8811030 autumn Nordrassil incl. $FD1 (CMD 30322 = copy of 30249).
|
|
Textures 8811001 (CDI variation) and 8811006-8811028 (TXID of the copies); originals untouched.
|
|
- Son of Deathwing m2 (2712551): its $FD1 keyed t=1466 on anim 94 (same jaw beat as drake/Onyxian, same 5.33 s anim).
|
|
- Nordrassil m2 (4096364): new $FD1 keyed t=366 on anim 94 (jaw opens 300-500 ms). Set 508 fidget 0 = kit 3525 dragon screech;
|
|
its other fidget slots are empty, so Nordrassil's own $FD3/4/5 stay silent.
|
|
- Onyxian seat (attachment 0) z 2.92 -> 3.00, x kept: rider legs clipped the neck; 0.62/3.30 was far too high (owner).
|
|
Same seat on the crimson copy (inputs/seat.py).
|
|
- New BLP2 DXT5 textures via inputs/recolor.py + blp5.py + build_variants.py."""
|
|
import json, hashlib, struct, sys
|
|
from pathlib import Path
|
|
H = Path(__file__).resolve().parent; sys.path.insert(0, str(H))
|
|
import frozen_store as fs
|
|
md5 = lambda b: hashlib.md5(b).hexdigest(); sha = lambda b: hashlib.sha256(b).hexdigest()
|
|
I = H / 'inputs'
|
|
TABLES = [(1108759, 'dbfilesclient/creaturedisplayinfo.db2', I / 'CreatureDisplayInfo.db2'),
|
|
(2712551, 'creature/encrypted13/encrypted13.m2', I / 'sod-fd1.m2'),
|
|
(4096364, 'creature/drakemountemerald/drakemountemerald.m2', I / 'nord-fd1.m2'),
|
|
(1365368, 'dbfilesclient/creaturemodeldata.db2', I / 'CreatureModelData.db2'),
|
|
(318963, 'creature/dragon/onyxiamount.m2', I / 'onyx-seat.m2')]
|
|
NEW = [(8811001, 'BLP', 'creature/octodrakes/octo_crimson_onyx_var1.blp', I / 'red1.blp')]
|
|
NEW += [(f, 'BLP', f'creature/octodrakes/octo_variant_{f}.blp', I / 'tex' / f'{f}.blp') for f in range(8811006, 8811029)]
|
|
NEW += [(8811029, 'M2', 'creature/octodrakes/octo_crimson_onyxiamount.m2', I / 'onyx-crimson.m2'),
|
|
(8811030, 'M2', 'creature/octodrakes/octo_autumn_nordrassil.m2', I / 'nord-autumn.m2')]
|
|
WHY = 'Drake mount looks: Son of Deathwing / Nordrassil / crimson Onyxian / autumn Nordrassil (owner 2026-11-24)'
|
|
store = fs.Store(); root = store.root; lay = store.layout; assert lay['root_md5'] == fs.ROOT
|
|
patched = bytearray(root); pins = []
|
|
for fid, name, out in TABLES:
|
|
cells = []
|
|
for g in lay['groups']:
|
|
f = 0
|
|
for i, (d,) in enumerate(struct.iter_unpack('<I', memoryview(root)[g['ids_offset']:g['ckeys_offset']])):
|
|
f += d
|
|
if f == fid: cells.append((g, g['ckeys_offset'] + i * 16))
|
|
f += 1
|
|
en = [(g, at) for g, at in cells if g['locale'] & 2 and not g.get('flags1')]; assert len(en) == 1, (fid, len(en))
|
|
g, at = en[0]; ck = root[at:at + 16].hex(); old = store.read(ck)[2]
|
|
new = out.read_bytes(); patched[at:at + 16] = bytes.fromhex(md5(new))
|
|
d = H / 'pins' / str(fid); d.mkdir(parents=True, exist_ok=True)
|
|
(d / 'before.bin').write_bytes(old); (d / 'after.bin').write_bytes(new)
|
|
pin = dict(fdid=fid, table=name, parent_root=fs.ROOT, selected_group={}, original_decoded=dict(file='before.bin', md5=ck, sha256=sha(old)),
|
|
encrypted_original=False, after_decoded=dict(file='after.bin', md5=md5(new), sha256=sha(new)), reason=WHY)
|
|
(d / 'pin.json').write_text(json.dumps(pin, indent=1) + '\n')
|
|
pins.append(dict(file=str(d / 'pin.json'), sha256=sha((d / 'pin.json').read_bytes()), type='wdc_enus'))
|
|
assets = []
|
|
for fid, kind, path, src in NEW:
|
|
raw = src.read_bytes()
|
|
assets.append(dict(file_data_id=fid, path=path, sha256=sha(raw), ckey=md5(raw), kind=kind, file=str(src)))
|
|
art = H / 'pins' / 'new-textures.json'; raw = (json.dumps(dict(type='art', parent_root=fs.ROOT, assets=assets), indent=1) + '\n').encode(); art.write_bytes(raw)
|
|
pins.append(dict(file=str(art), sha256=sha(raw), type='art'))
|
|
(H / 'components.json').write_text(json.dumps(pins, indent=2) + '\n')
|
|
(H / 'selected-root.json').write_text(json.dumps(dict(parent_build=fs.BUILD, parent_root=fs.ROOT, decoded_root_sha256=sha(bytes(patched)), parent_root_sha256=sha(root)), indent=2) + '\n')
|
|
print('pins', len(pins))
|