17 lines
972 B
Python
17 lines
972 B
Python
"""Spawned-object displays missing in the client: resolve Octo model path -> native FDID (m2 or wmo)."""
|
|
from compare import load
|
|
import collections,json
|
|
o=load('dump/GameObjectDisplayInfo.octo.tsv'); n=load('dump/GameObjectDisplayInfo.native.tsv')
|
|
sp={int(a):int(b) for a,b in (l.split('\t') for l in open('ref/go_spawned.txt') if l.strip())}
|
|
m=sorted(d for d in sp if d>0 and d not in n)
|
|
lf={}
|
|
for line in open('/mnt/Games/@project/listfiles/community-listfile.csv',encoding='utf8',errors='replace'):
|
|
a,_,p=line.strip().partition(';'); lf[p]=int(a)
|
|
out=[];st=collections.Counter()
|
|
for d in m:
|
|
p=o[d]['ModelName'].replace('\\','/').lower(); base,ext=p.rsplit('.',1)
|
|
cand=base+('.wmo' if ext=='wmo' else '.m2'); f=lf.get(cand)
|
|
st[(ext,bool(f))]+=1; out.append(dict(display=d,spawns=sp[d],octo_model=p,native_path=cand,fdid=f,sound=o[d].get('Sound')))
|
|
print(st); json.dump(out,open('go_gap.json','w'),indent=0)
|
|
print([x for x in out if not x['fdid']][:12])
|