Created
July 14, 2010 02:25
-
-
Save valda/474912 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8-dos; mode: python -*- | |
import bosh | |
from bolt import GPath | |
bosh.initDirs() | |
bosh.initSettings(readOnly=True) | |
bosh.oblivionIni = bosh.OblivionIni() | |
bosh.modInfos = bosh.ModInfos() | |
bosh.modInfos.refresh() | |
fileInfo = bosh.ModInfo('.', GPath('Lovers with PK.esp')) | |
loadFactory = bosh.LoadFactory(True,*bosh.MreRecord.type_class.values()) | |
modFile = bosh.ModFile(fileInfo,loadFactory) | |
modFile.load(True) | |
maxId = 0 | |
for type in bosh.MreRecord.type_class.keys(): | |
try: | |
for record in getattr(modFile, type).records: | |
maxId = max(maxId, record.fid) | |
print '%08X %s %s max:%08X' % (record.fid,type,record.eid,maxId) | |
except: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment