Skip to content

Instantly share code, notes, and snippets.

@valda
Created October 28, 2010 01:12
Show Gist options
  • Save valda/650393 to your computer and use it in GitHub Desktop.
Save valda/650393 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8-dos; mode: python -*-
import sys
import time
from optparse import OptionParser
import bosh
from bosh import formatInteger,formatDate
from bolt import GPath
# init subsystem
bosh.initDirs()
bosh.initSettings(readOnly=True)
bosh.falloutIni = bosh.FalloutIni()
bosh.modInfos = bosh.ModInfos()
bosh.modInfos.refresh()
# source mod
fileInfo = bosh.ModInfo(bosh.modInfos.dir, GPath('FalloutNV.esm'))
readFactory = bosh.LoadFactory(False,bosh.MreNpc,bosh.MreDial,bosh.MreInfo)
modFile = bosh.ModFile(fileInfo,readFactory)
modFile.load(True)
for dial in modFile.DIAL.records:
print '%08X %s %s' % (dial.fid,dial.recType,dial.eid)
for info in dial.infos:
print ' %08X %s' % (info.fid,info.recType)
for response in info.responses:
print ' %s' % response.responseText
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment