[relz] Wrye Bash -- Thread #33

Post » Fri May 27, 2011 9:23 pm

Is the TES4View shortcut intended to run TES4Edit?


If you see it there, yes you can run it.
It will only appear if Tes4Edit is installed in the ...\Oblivion directory. (Same for Tes4Gecko)
If you right click on the file header, you can check Tes4Edit Expert.
This will remove the "Are you sure?" dialog box when making chnges with Tes4Edit.
User avatar
Chloe Yarnall
 
Posts: 3461
Joined: Sun Oct 08, 2006 3:26 am

Post » Fri May 27, 2011 3:12 pm

Bish and/or Command Prompt/Dos question: I can't seem to get Bish to work. I've got Python in Program Files so I'm using the line "C:\Program Files\Python25\Pythonw.exe" Bish.py csFunctions. That line neither prints out "No program or command of that name" nor anything... so I have no idea if Bish is stalling, if Python never runs, etc.
User avatar
Kate Schofield
 
Posts: 3556
Joined: Mon Sep 18, 2006 11:58 am

Post » Fri May 27, 2011 7:55 am

@Vargr
Reference archive invalidation in OBMM; The option I use is in Utilities / Archive invalidation / select BSA alteration

Alteration; cool. I tend to have it of Redirection, as far as I recall.

In Wrye bash, after you have finished everything else (load order/rebuild), go to the saves tab, then left click on your save to be updated. On the right is a list of masters needed for that save, if you right click in that list you will get a prompt pops up, click on Okay, now you will notice under the masters list the save button is no longer ghosted, click it and your save is updated to the current masters list and should cause less problems playing from that point onwards (although its not guaranteed to work, sometimes changes to mods requires a complete game restart, but more often than not this little procedure helps these days)

Thanks.
User avatar
Dina Boudreau
 
Posts: 3410
Joined: Thu Jan 04, 2007 10:59 pm

Post » Fri May 27, 2011 2:47 pm

PS Where exactly within the Python file folder does the comtypes stuff go?

not sure whate spybot would be saying anything about...
I'd suggest dling the exe version of https://sourceforge.net/projects/comtypes/files/comtypes/0.6.1/comtypes-0.6.1.win32.exe/download instead.
Bash seems to uninstall BOSS.exe on exit or something. Almost every time I load the installer tab, I have to reinstall it from my BOSS package. The only other thing I noticed was the finickiness and somewhat lagging ctrl+arrow functionality in the Installers Tab. I was really happy once I discovered it though. Thanks! :)

I'm running Python 2.6 and the Comtypes thing.
- Tomlong75210

with python 2.6, comtypes for me, I've never had that (and I would expect that if it could occur that I'd find it since today I've hmm closed and opened (at up to 3 copies at once) at least 50 instances of Bash... doing a bunch of coding today)
Is the TES4View shortcut intended to run TES4Edit?

Some of the TES4Edit/view/trans names/icons and link were reversed up a while ago... can't recall when I fixed them.
However it is set to use the default install path of TES4Edit (TES4Edit.exe)... and the -trans/-view commands don't work on that(edit is loaded instead), so personally I use (ie renamed it to) TES4View.exe, and changed the TES4EDIT path in my personal copy of the ini (that setting is in version 276+)
If you see it there, yes you can run it.

yep that's the case with all the links down at the bottom there - they use a if file.exists() call
It will only appear if Tes4Edit is installed in the ...\Oblivion directory. (Same for Tes4Gecko)

unless of course you set it in your ini to be somewhere else... then it can be anywhere... I personally have my external tools in oblivion/tools.
Bish and/or Command Prompt/Dos question: I can't seem to get Bish to work. I've got Python in Program Files so I'm using the line "C:\Program Files\Python25\Pythonw.exe" Bish.py csFunctions. That line neither prints out "No program or command of that name" nor anything... so I have no idea if Bish is stalling, if Python never runs, etc.

easy... you need to call python.exe rather than pythonw.exe (and I'm assuming that that is with cmd prompt cd'd to the mopy dir... else it would have to be fullpathto/mopy/bish.py) (never checke that particular command but done many others in bish)
I haven't started using BAIN yet so sorry cant help on that one. BAIN looks very interesting, but to be honest every time I start reading about it I fall asleep (sorry Wrye). It looks like it gives a lot more control/functions over how a mod is installed, but I still like the scripted installs of OBMM which safeguard against mods overwriting the same files. Must get my head around BAIN one of these days though, and it would be better if more people took it up as a standard. But that was the same with OBMM, modders had to get their heads around using it before it started taking off.

you actually have much greater control of overwrite in BAIN than OBMM... one of my favoured personal reasons that I use it.
For Wrye Bash and Python, I have gone back to v275 and the Python 01 installer, it was mentioned earlier in this thread that there were some comments/errors, I think it was Pacificmorrowind said he was going to re-do or try to get up the installers for 276. But having seen other topics he comments on I think this has developed into more bug tracking/overhauling... bit of a perfectionist and very much appreciated for it. The fact that he left 276 up on tesnexus suggests to me 276 is good to go with the old python setup installer, and that the new python setup is the cause of the recent problems, but just in case that was left in limbo and also needs an update I just went for the old setup.

there is a few bits of deprecated code I missed that i have to fix for usage with python 2.6 - however they are in the very rarely run into list (ie I've managed to find 2 mods that can trigger it)... also mainly harmless (unless there's something I missed)... perfectionist... I resemble that remark :D . 276 works fine for 99.5% of features with python 2.5-2.6... 277 unfortunately isn't going to have that fix in it (that is stuff in an area of the source that I'm not familiar with yet ( don't know all 30k lines of Bash code yet)... and has been a problem since python 2.6 was released... just fairely rare so not seen before (though I've now managed to trigger it with a couple esps from my collection of inactives - makes it easier to fix if I can easily replicate it which I am able to).
There is a few bugs (ie stuff I was testing and forgot to comment out) in 276... and one bug that I haven't yet figured out (the funkyness with the installers skipping/not skipping things... I didn't change anything in that section and it was working fine earlier)... going to have to do some more testing of that.

sorry for the slow responses...I was offline (partying) for the last 4 days! (first time I haven't even loaded gamesas for that long in I think at least a year)
(277 really should be up tomorrow... and it has some really nice new stuff (a slight preview):
- automatic de&re ghosting when launching BOSS (requested by many)
- more external tool links (ISOBL, PS, Blender, etc.)
- hide/unhide and rename installer archives (requested by RiddlingLynx)
- import/export scripts to text files (of course you do have to recompile to use them in game) (requested by Haama)
- a few fixes
- a whole new section to the bashed patch build dialogue

Pacific Morrowind
User avatar
Matthew Barrows
 
Posts: 3388
Joined: Thu Jun 28, 2007 11:24 pm

Post » Fri May 27, 2011 4:45 pm

easy... you need to call python.exe rather than pythonw.exe

Ah - thanks (I'll change that on the CS wiki)
- import/export scripts to text files (of course you do have to recompile to use them in game) (requested by Haama)

And thanks again for that :) (BTW, did you see my comments?)
User avatar
Ronald
 
Posts: 3319
Joined: Sun Aug 05, 2007 12:16 am

Post » Fri May 27, 2011 7:13 am

I'd like another thing that was requested by haama - Co-save content dumping.
User avatar
Katie Louise Ingram
 
Posts: 3437
Joined: Sat Nov 18, 2006 2:10 am

Post » Fri May 27, 2011 7:33 pm

I have spent some time trying to understand WB and BAIN formats. I think I now understand it thanks to the great help from people here and Psymon's fantastic Custom BAIN Projects.

First let me thank Wrye for making this phenomenal tool - it is amazing!

After doing some experimenting, I have come to the conclusion that I really need WB to implement Scripting (as is done in OBMM) :)

Here is some of my reasoning...
  • As soon as things need to be installed based on the presence or absence of other files, scripting is a great way to never have to remember what you read in the original ReadMe files.
  • There are some installations that are very complex and (imho) require scripting to make the installation user friendly or even possible (my Sensual Walks animations and patch mod installers are examples of this).
  • In terms of mod packaging, it is a great way to deal with people new to installing mods, people who don't quite read the documentation properly and modders who may find it difficult to make installation instructions easy to follow (especially if English is not their native language).
Key reason for wanting to use WB Installers rather than continuing with OBMM is simple - the way it deals with restoring what has been overwritten by another installation when you remove it is just tremendous.

Is there any chance that scripting will ever be included in a future version of WB?
User avatar
Jack Moves
 
Posts: 3367
Joined: Wed Jun 27, 2007 7:51 am

Post » Fri May 27, 2011 4:29 pm

not sure whate spybot would be saying anything about...
I'd suggest dling the exe version of https://sourceforge.net/projects/comtypes/files/comtypes/0.6.1/comtypes-0.6.1.win32.exe/download instead.

with python 2.6, comtypes for me, I've never had that (and I would expect that if it could occur that I'd find it since today I've hmm closed and opened (at up to 3 copies at once) at least 50 instances of Bash... doing a bunch of coding today)

Some of the TES4Edit/view/trans names/icons and link were reversed up a while ago... can't recall when I fixed them.
However it is set to use the default install path of TES4Edit (TES4Edit.exe)... and the -trans/-view commands don't work on that(edit is loaded instead), so personally I use (ie renamed it to) TES4View.exe, and changed the TES4EDIT path in my personal copy of the ini (that setting is in version 276+)

yep that's the case with all the links down at the bottom there - they use a if file.exists() call

unless of course you set it in your ini to be somewhere else... then it can be anywhere... I personally have my external tools in oblivion/tools.

easy... you need to call python.exe rather than pythonw.exe (and I'm assuming that that is with cmd prompt cd'd to the mopy dir... else it would have to be fullpathto/mopy/bish.py) (never checke that particular command but done many others in bish)

you actually have much greater control of overwrite in BAIN than OBMM... one of my favoured personal reasons that I use it.

there is a few bits of deprecated code I missed that i have to fix for usage with python 2.6 - however they are in the very rarely run into list (ie I've managed to find 2 mods that can trigger it)... also mainly harmless (unless there's something I missed)... perfectionist... I resemble that remark :D . 276 works fine for 99.5% of features with python 2.5-2.6... 277 unfortunately isn't going to have that fix in it (that is stuff in an area of the source that I'm not familiar with yet ( don't know all 30k lines of Bash code yet)... and has been a problem since python 2.6 was released... just fairely rare so not seen before (though I've now managed to trigger it with a couple esps from my collection of inactives - makes it easier to fix if I can easily replicate it which I am able to).
There is a few bugs (ie stuff I was testing and forgot to comment out) in 276... and one bug that I haven't yet figured out (the funkyness with the installers skipping/not skipping things... I didn't change anything in that section and it was working fine earlier)... going to have to do some more testing of that.

sorry for the slow responses...I was offline (partying) for the last 4 days! (first time I haven't even loaded gamesas for that long in I think at least a year)
(277 really should be up tomorrow... and it has some really nice new stuff (a slight preview):
- automatic de&re ghosting when launching BOSS (requested by many)
- more external tool links (ISOBL, PS, Blender, etc.)
- hide/unhide and rename installer archives (requested by RiddlingLynx)
- import/export scripts to text files (of course you do have to recompile to use them in game) (requested by Haama)
- a few fixes
- a whole new section to the bashed patch build dialogue

Pacific Morrowind

I wasn't aware that there was a Bash INI, haha. I also keep two copies of the executable, so I can use the same fix as you I guess. I also never thought to put TES4Gecko in the Oblivion folder, might as well do that when I get home today. A third of my quick launch menu used to be full of Oblivion-specific links. Now, I have only 5 shortcuts to various places in on my Oblivion-dedicated HDD (partition) on my desktop and about 4 quick launch shorcuts (soon to be 3.)

Thank you for the reply!
- Tomlong75210
User avatar
Ian White
 
Posts: 3476
Joined: Thu Jul 19, 2007 8:08 pm

Post » Fri May 27, 2011 2:33 pm

I'd like another thing that was requested by haama - Co-save content dumping.

Actually, PacificMorrowind, Raziel, if you want Badhair has given me the code for this - I've tested it and it works perfectly. Let me add the latest Pluggy version info to it and I'll upload the code to the Feature Request.
User avatar
Gwen
 
Posts: 3367
Joined: Sun Apr 01, 2007 3:34 am

Post » Fri May 27, 2011 7:47 am

Actually, PacificMorrowind, Raziel, if you want Badhair has given me the code for this - I've tested it and it works perfectly. Let me add the latest Pluggy version info to it and I'll upload the code to the Feature Request.
:celebrate:

By the way, does OBSE (excluding plugins) store anything besides strings and arrays in it's co-save ?
User avatar
JAY
 
Posts: 3433
Joined: Fri Sep 14, 2007 6:17 am

Post » Fri May 27, 2011 2:04 pm

After doing some experimenting, I have come to the conclusion that I really need WB to implement Scripting (as is done in OBMM) :)


I'd like to second this, but understand it may not be in the cards for awhile. There are cases where a scripted install is definitely much easier to manage. With scripted installation ability, BAIN would be the one-stop shop for mod installs.
User avatar
Isaiah Burdeau
 
Posts: 3431
Joined: Mon Nov 26, 2007 9:58 am

Post » Fri May 27, 2011 8:16 am


Is there any chance that scripting will ever be included in a future version of WB?

I'd like to second this, but understand it may not be in the cards for awhile. There are cases where a scripted install is definitely much easier to manage. With scripted installation ability, BAIN would be the one-stop shop for mod installs.

er yes, I think that is possibly doable with my skill level... maybe... if not now soon* (My skill level somehow keeps getting higher - at least from an ease of doing what I want to perspective)...however for this I'm not entirely sure what would be desired... could you give me an example to work off (psuedocode or code or textual explanation of an example)?
Actually, PacificMorrowind, Raziel, if you want Badhair has given me the code for this - I've tested it and it works perfectly. Let me add the latest Pluggy version info to it and I'll upload the code to the Feature Request.

oops missed that request (but didn't miss ShadeMe's request for a Import Spell Inventory)... if it is GPL or BSD code definitely please post... easier to input it in a quick wrapper for accessing it from Bash than write from scratch (unless the code is wrapping it in... in which case it is very easy to merge it).
I wasn't aware that there was a Bash INI, haha. I also keep two copies of the executable, so I can use the same fix as you I guess. I also never thought to put TES4Gecko in the Oblivion folder, might as well do that when I get home today. A third of my quick launch menu used to be full of Oblivion-specific links. Now, I have only 5 shortcuts to various places in on my Oblivion-dedicated HDD (partition) on my desktop and about 4 quick launch shorcuts (soon to be 3.)

Thank you for the reply!
- Tomlong75210

yep it is called bash_default.ini ( to use just rename to bash.ini) - however I use only one copy of the tes4edit executable (the view one)... since Bash can call -edit or -trans on it and it will load fine... hate having duplicate files on my computer (space conscious - less than 100gbs free agh). It is really easy to add other launchers; just let me know and I can add them in seconds.
Pacific Morrowind

*'Soon' being a very er ambiguous word
User avatar
no_excuse
 
Posts: 3380
Joined: Sun Jul 16, 2006 3:56 am

Post » Fri May 27, 2011 3:19 pm

how do tag aa mod when boss doesn't say it needs to be for example: I use enhanced water they sat tage water to see it. How do you tag this in bash so it works thanks in advance
User avatar
Danial Zachery
 
Posts: 3451
Joined: Fri Aug 24, 2007 5:41 am

Post » Fri May 27, 2011 11:12 am

how do tag aa mod when boss doesn't say it needs to be for example: I use enhanced water they sat tage water to see it. How do you tag this in bash so it works thanks in advance

select the mod in bash, right click the tags section of its details - the grey/white box at the bottom right - and select the tag(s) you want.
Pacific Morrowind
User avatar
latrina
 
Posts: 3440
Joined: Mon Aug 20, 2007 4:31 pm

Post » Fri May 27, 2011 9:12 pm

select the mod in bash, right click the tags section of its details - the grey/white box at the bottom right - and select the tag(s) you want.
Pacific Morrowind


Thanks Pacific Morrowind You Do great work!!!!!
User avatar
Sabrina Steige
 
Posts: 3396
Joined: Mon Aug 20, 2007 9:51 pm

Post » Fri May 27, 2011 1:33 pm

oops missed that request (but didn't miss ShadeMe's request for a Import Spell Inventory)
oh ... I never realized :hubbahubba: In any case, I scripted around that feature. It isn't as essential now ( to me ).
User avatar
Mr. Allen
 
Posts: 3327
Joined: Fri Oct 05, 2007 8:36 am

Post » Fri May 27, 2011 11:14 am

:celebrate:

By the way, does OBSE (excluding plugins) store anything besides strings and arrays in it's co-save ?

Looks like they also store a list of mods and their (old) load order.

Ack, stupid sinus infection... losing consciousness... OK, Pac, here's the code not as a wrapper (but very much with permission).
For Basher
...After "Save_Stats" sectionclass Save_StatObse(Link):    """Dump .obse records."""    def AppendToMenu(self,menu,window,data):        Link.AppendToMenu(self,menu,window,data)        menuItem = wx.MenuItem(menu,self.id,_('.obse Statistics'))        menu.AppendItem(menuItem)        if len(data) != 1:             menuItem.Enable(False)        else:            fileName = GPath(self.data[0])            fileInfo = self.window.data[fileName]            fileName = fileInfo.getPath().root+'.obse'            menuItem.Enable(fileName.exists())    def Execute(self,event):        fileName = GPath(self.data[0])        fileInfo = self.window.data[fileName]        saveFile = bosh.SaveFile(fileInfo)        progress = balt.Progress(_(".obse"))        try:            saveFile.load(SubProgress(progress,0,0.9))            log = bolt.LogFile(cStringIO.StringIO())            progress(0.9,_("Calculating statistics."))            saveFile.logStatObse(log)            progress.Destroy()            text = log.out.getvalue()            balt.showLog(self.window,text,fileName.s,asDialog=False,fixedFont=False,icons=bashBlue)        finally:            progress.Destroy()...

For Bosh
..After "# Save File" ... "class: Pluggy File" section# Save File -------------------------------------------------------------------class ObseFile:    """Represents a .obse cofile for saves. Used for editing masters list."""    def __init__(self,path):        self.path = path        self.name = path.tail        self.signature = None        self.formatVersion = None        self.obseVersion = None        self.obseMinorVersion = None        self.oblivionVersion = None        self.plugins = None        self.valid = False    def load(self):        """Read file."""        import binascii        size = self.path.size        ins = self.path.open('rb')        buff = ins.read(size)        ins.close()        #--Header        ins = cStringIO.StringIO(buff)        def unpack(format,size):            return struct.unpack(format,ins.read(size))        self.signature = ins.read(4)        if self.signature != 'OBSE':            raise FileError(self.name,'File signature != "OBSE"')        self.formatVersion,self.obseVersion,self.obseMinorVersion,self.oblivionVersion, = unpack('IHHI',12)        # if self.formatVersion < X:        #   raise FileError(self.name,'Unsupported file version: %I' % self.formatVersion)        #--Plugins        numPlugins, = unpack('I',4)        self.plugins = []        for x in range(numPlugins):            opcodeBase,numChunks,pluginLength, = unpack('III',12)            pluginBuff = ins.read(pluginLength)            pluginIns = cStringIO.StringIO(pluginBuff)            chunks = []                        for y in range(numChunks):                chunkType = pluginIns.read(4)                chunkVersion,chunkLength, = struct.unpack('II',pluginIns.read(8))                chunkBuff = pluginIns.read(chunkLength)                chunk = (chunkType, chunkVersion, chunkBuff)                chunks.append(chunk)            pluginIns.close()            plugin = (opcodeBase,chunks)            self.plugins.append(plugin)        #--Done        ins.close()        self.valid = True    def save(self,path=None,mtime=0):        """Saves."""        if not self.valid: raise FileError(self.name,"File not initialized.")        #--Buffer        buff = cStringIO.StringIO()        #--Save        def pack(format,*args):            buff.write(struct.pack(format,*args))        buff.write('OBSE')        pack('=I',self.formatVersion)        pack('=H',self.obseVersion)        pack('=H',self.obseMinorVersion)        pack('=I',self.oblivionVersion)        #--Plugins        pack('=I',len(self.plugins))        for (opcodeBase,chunks) in self.plugins:            pack('=I',opcodeBase)            pack('=I',len(chunks))            pluginLength = 0            pluginLengthPos = buff.tell()            pack('=I',0)            for (chunkType,chunkVersion,chunkBuff) in chunks:                buff.write(chunkType)                pack('=2I',chunkVersion,len(chunkBuff))                buff.write(chunkBuff)                pluginLength += 12 + len(chunkBuff)            buff.seek(pluginLengthPos,0)            pack('=I',pluginLength)            buff.seek(0,2)        #--Save        path = path or self.path        mtime = mtime or path.exists() and path.mtime        text = buff.getvalue()        out = path.open('wb')        out.write(text)        out.close()        path.mtime = mtime    def mapMasters(self,masterMap):        """Update plugin names according to masterMap."""        if not self.valid: raise FileError(self.name,"File not initialized.")        newPlugins = []        for (opcodeBase,chunks) in self.plugins:            newChunks = []            if (opcodeBase == 0x2330):                for (chunkType,chunkVersion,chunkBuff) in chunks:                    chunkTypeNum, = struct.unpack('=I',chunkType)                    if (chunkTypeNum == 1):                        ins = cStringIO.StringIO(chunkBuff)                        def unpack(format,size):                            return struct.unpack(format,ins.read(size))                        buff = cStringIO.StringIO()                        def pack(format,*args):                            buff.write(struct.pack(format,*args))                        while (ins.tell() < len(chunkBuff)):                            espId,modId,modNameLen, = unpack('=BBI',6)                            modName = GPath(ins.read(modNameLen))                            modName = masterMap.get(modName,modName)                            pack('=BBI',espId,modId,len(modName.s))                            buff.write(modName.s.lower())                        ins.close()                        chunkBuff = buff.getvalue()                        buff.close()                    newChunks.append((chunkType,chunkVersion,chunkBuff))            else:                newChunks = chunks            newPlugins.append((opcodeBase,newChunks))        self.plugins = newPlugins    def safeSave(self):        """Save data to file safely."""        self.save(self.path.temp,self.path.mtime)        self.path.untemp()...... Instead of "#--Pluggy File?" section        #--Cosaves        masterMap = dict((x,y) for x,y in zip(oldMasters,self.masters) if x != y)        #--Pluggy File?        pluggyPath = CoSaves.getPaths(path)[0]        if masterMap and pluggyPath.exists():            pluggy = PluggyFile(pluggyPath)            pluggy.load()            pluggy.mapMasters(masterMap)            pluggy.safeSave()        #--OBSE File?        obsePath = CoSaves.getPaths(path)[1]        if masterMap and obsePath.exists():            obse = ObseFile(obsePath)            obse.load()            obse.mapMasters(masterMap)            obse.safeSave()...... After "def logStats(self,log=None):" section    def logStatObse(self,log=None):        """Print stats to log."""        log = log or bolt.Log()        obseFileName = self.fileInfo.getPath().root+'.obse'        obseFile = ObseFile(obseFileName)        obseFile.load()        #--Header        log.setHeader(_('Header'))        log('=' * 80)        log(_('  Format version:   %08X') % (obseFile.formatVersion,))        log(_('  OBSE version:     %u.%u') % (obseFile.obseVersion,obseFile.obseMinorVersion,))        log(_('  Oblivion version: %08X') % (obseFile.oblivionVersion,))        #--Plugins        if obseFile.plugins != None:            for (opcodeBase,chunks) in obseFile.plugins:                log.setHeader(_('Plugin opcode=%08X chunkNum=%u') % (opcodeBase,len(chunks),))                log('=' * 80)                log(_('  Type  Ver   Size'))                log('-' * 80)                espMap = {}                for (chunkType,chunkVersion,chunkBuff) in chunks:                    chunkTypeNum, = struct.unpack('=I',chunkType)                    if (chunkType[0] >= ' ' and chunkType[3] >= ' '):                        log(_('  %4s  %-4u  %08X') % (chunkType,chunkVersion,len(chunkBuff)))                    else:                        log(_('  %04X  %-4u  %08X') % (chunkTypeNum,chunkVersion,len(chunkBuff)))                    ins = cStringIO.StringIO(chunkBuff)                    def unpack(format,size):                        return struct.unpack(format,ins.read(size))                    if (opcodeBase == 0x1400):  # OBSE                        if chunkType == 'RVTS':                            #--OBSE String                            modIndex,stringID,stringLength, = unpack('=BIH',7)                            stringData = http://forums.bethsoft.com/index.php?/topic/1064770-relz-wrye-bash-thread-33/ins.read(stringLength)                            log(_('    Mod :  %02X (%s)') % (modIndex, self.masters[modIndex].s))                            log(_('    ID  :  %u') % stringID)                            log(_('    Data:  %s') % stringData)                        elif chunkType == 'RVRA':                            #--OBSE Array                                                    modIndex,arrayID,keyType,isPacked, = unpack('=BIBB',7)                            log(_('    Mod :  %02X (%s)') % (modIndex, self.masters[modIndex].s))                            log(_('    ID  :  %u') % arrayID)                            if keyType == 1: #Numeric                                if isPacked:                                    log(_('    Type:  Array'))                                else:                                    log(_('    Type:  Map'))                            elif keyType == 3:                                log(_('    Type:  StringMap'))                            else:                                log(_('    Type:  Unknown'))                            if chunkVersion >= 1:                                numRefs, = unpack('=I',4)                                if numRefs > 0:                                    log('    Refs:')                                    for x in range(numRefs):                                        refModID, = unpack('=B',1)                                        log(_('      %02X (%s)') % (refModID, self.masters[refModID].s))                            numElements, = unpack('=I',4)                            log(_('    Size:  %u') % numElements)                            for i in range(numElements):                                if keyType == 1:                                    key, = unpack('=d',8)                                    keyStr = '%d' % key                                elif keyType == 3:                                    keyLen, = unpack('=H',2)                                    key = ins.read(keyLen)                                    keyStr = key                                else:                                    keyStr = 'BAD'                                dataType, = unpack('=B',1)                                if dataType == 1:                                    data, = unpack('=d',8)                                    dataStr = '%d' % data                                elif dataType == 2:                                    data, = unpack('=I',4)                                    dataStr = '%08X' % data                                elif dataType == 3:                                    dataLen, = unpack('=H',2)                                    data = http://forums.bethsoft.com/index.php?/topic/1064770-relz-wrye-bash-thread-33/ins.read(dataLen)                                    dataStr = data                                elif dataType == 4:                                    data, = unpack('=I',4)                                    dataStr = '%u' % data                                log(_('    [%s]:%s = %s') % (keyStr,('BAD','NUM','REF','STR','ARR')[dataType],dataStr))                    elif (opcodeBase == 0x2330):    # Pluggy                        if (chunkTypeNum == 1):                            #--Pluggy TypeESP                            log(_('    Pluggy ESPs'))                            log(_('    EID   ID    Name'))                            while (ins.tell() < len(chunkBuff)):                                espId,modId,modNameLen, = unpack('=BBI',6)                                modName = ins.read(modNameLen)                                log(_('    %02X    %02X    %s') % (espId,modId,modName))                                espMap[modId] = modName # was [espId]                        elif (chunkTypeNum == 2):                            #--Pluggy TypeSTR                            log(_('    Pluggy String'))                            strId,modId,strFlags, = unpack('=IBB',6)                            strData = http://forums.bethsoft.com/index.php?/topic/1064770-relz-wrye-bash-thread-33/ins.read(len(chunkBuff) - ins.tell())                            log(_('      StrID : %u') % (strId,))                            log(_('      ModID : %02X %s') % (modId,espMap[modId] if modId in espMap else 'ERROR',))                            log(_('      Flags : %u') % (strFlags,))                            log(_('      Data  : %s') % (strData,))                        elif (chunkTypeNum == 3):                            #--Pluggy TypeArray                            log(_('    Pluggy Array'))                            arrId,modId,arrFlags,arrSize, = unpack('=IBBI',10)                            log(_('      ArrID : %u') % (arrId,))                            log(_('      ModID : %02X %s') % (modId,espMap[modId] if modId in espMap else 'ERROR',))                            log(_('      Flags : %u') % (arrFlags,))                            log(_('      Size  : %u') % (arrSize,))                            while (ins.tell() < len(chunkBuff)):                                elemIdx,elemType, = unpack('=IB',5)                                elemStr = ins.read(4)                                if (elemType == 0): #--Integer                                    elem, = struct.unpack('=i',elemStr)                                    log(_('        [%u]  INT  %d') % (elemIdx,elem,))                                elif (elemType == 1): #--Ref                                    elem, = struct.unpack('=I',elemStr)                                    log(_('        [%u]  REF  %08X') % (elemIdx,elem,))                                elif (elemType == 2): #--Float                                    elem, = struct.unpack('=f',elemStr)                                    log(_('        [%u]  FLT  %08X') % (elemIdx,elem,))                        elif (chunkTypeNum == 4):                            #--Pluggy TypeName                            log(_('    Pluggy Name'))                            refId, = unpack('=I',4)                            refName = ins.read(len(chunkBuff) - ins.tell())                            newName = ''                            for i in range(len(refName)):                                ch = refName[i] if ((refName[i] >= chr(0x20)) and (refName[i] < chr(0x80))) else '.'                                newName = newName + ch                            log(_('      RefID : %08X') % (refId,))                            log(_('      Name  : %s') % (newName,))                        elif (chunkTypeNum == 5):                            #--Pluggy TypeScr                            log(_('    Pluggy ScreenSize'))                            #UNTESTED - uncomment following line to skip this record type                            #continue                            scrW,scrH, = unpack('=II',8)                            log(_('      Width  : %u') % (scrW,))                            log(_('      Height : %u') % (scrH,))                        elif (chunkTypeNum == 6):                            #--Pluggy TypeHudS                            log(_('    Pluggy HudS'))                            #UNTESTED - uncomment following line to skip this record type                            #continue                            hudSid,modId,hudFlags,hoodRootID,hudShow,hudPosX,hudPosY,hudDepth,hudScaleX,hudScaleY,hudAlpha,hudAlignment,hudAutoScale, = unpack('=IBBBBffhffBBB',29)                            hudFileName = ins.read(len(chunkBuff) - ins.tell())                            log(_('      HudSID : %u') % (hudSid,))                            log(_('      ModID  : %02X %s') % (modId,espMap[modId] if modId in espMap else 'ERROR',))                            log(_('      Flags  : %02X') % (hudFlags,))                            log(_('      RootID : %u') % (hudRootID,))                            log(_('      Show   : %02X') % (hudShow,))                            log(_('      Pos    : %f,%f') % (hudPosX,hudPosY,))                            log(_('      Depth  : %u') % (hudDepth,))                            log(_('      Scale  : %f,%f') % (hudScaleX,hudScaleY,))                            log(_('      Alpha  : %02X') % (hudAlpha,))                            log(_('      Align  : %02X') % (hudAlignment,))                            log(_('      AutoSc : %02X') % (hudAutoScale,))                            log(_('      File   : %s') % (hudFileName,))                        elif (chunkTypeNum == 7):                            #--Pluggy TypeHudT                            log(_('    Pluggy HudT'))                            #UNTESTED - uncomment following line to skip this record type                            #continue                            hudTid,modId,hudFlags,hudShow,hudPosX,hudPosY,hudDepth, = unpack('=IBBBffh',17)                            hudScaleX,hudScaleY,hudAlpha,hudAlignment,hudAutoScale,hudWidth,hudHeight,hudFormat, = unpack('=ffBBBIIB',20)                            hudFontNameLen, = unpack('=I',4)                            hudFontName = ins.read(hudFontNameLen)                            hudFontHeight,hudFontWidth,hudWeight,hudItalic,hudFontR,hudFontG,hudFontB, = ins.read('=IIhBBBB',14)                            hudText = ins.read(len(chunkBuff) - ins.tell())                            log(_('      HudTID : %u') % (hudTid,))                            log(_('      ModID  : %02X %s') % (modId,espMap[modId] if modId in espMap else 'ERROR',))                            log(_('      Flags  : %02X') % (hudFlags,))                            log(_('      Show   : %02X') % (hudShow,))                            log(_('      Pos    : %f,%f') % (hudPosX,hudPosY,))                            log(_('      Depth  : %u') % (hudDepth,))                            log(_('      Scale  : %f,%f') % (hudScaleX,hudScaleY,))                            log(_('      Alpha  : %02X') % (hudAlpha,))                            log(_('      Align  : %02X') % (hudAlignment,))                            log(_('      AutoSc : %02X') % (hudAutoScale,))                            log(_('      Width  : %u') % (hudWidth,))                            log(_('      Height : %u') % (hudHeight,))                            log(_('      Format : %u') % (hudFormat,))                            log(_('      FName  : %s') % (hudFontName,))                            log(_('      FHght  : %u') % (hudFontHeight,))                            log(_('      FWdth  : %u') % (hudFontWidth,))                            log(_('      FWeigh : %u') % (hudWeight,))                            log(_('      FItal  : %u') % (hudItalic,))                            log(_('      FRGB   : %u,%u,%u') % (hudFontR,hudFontG,hudFontB,))                            log(_('      FText  : %s') % (hudText,))                    ins.close()

(There were some other random-ish edits, including a typo fix for "'Failed to find pcName in PC ACRH record.'" which should read "ACHR")

Note that this was a modification of v271 and I haven't tried it with the latest v275. (or any of the revisions for v276... haven't been able to get anything past r76 to load). I'll finish up the .obse section for the latest Pluggy and add in a .pluggy decoder - tomorrow, hopefully my sinuses will be good and dead and unable to complain by then...
User avatar
Rachael Williams
 
Posts: 3373
Joined: Tue Aug 01, 2006 6:43 pm

Post » Fri May 27, 2011 8:03 pm

er yes, I think that is possibly doable with my skill level... maybe... if not now soon* (My skill level somehow keeps getting higher - at least from an ease of doing what I want to perspective)...however for this I'm not entirely sure what would be desired... could you give me an example to work off (psuedocode or code or textual explanation of an example)?

Many thanks for responding and your interest - very much appreciated.

My experience with WB and BAIN is extremely limited - only just started :) So my comments rely heavily on my OBMM experiences, but presumably are still relevant.

I think the OBMM script functions seems to do most things required when installing mods - so replicating a lot of what it has would be great. Something it doesn't do and which I would like, is an OMOD (now BAIN) INI file that can be used to store configuration and other information to make it easy to add to a package and have the script use the INI file (and file contents) to generate menus and options without having to change the script.

In OBMM I use the FileName.Extension to achieve this with empty text files (cumbersome but quite effective). I also use folder names to generate select menus - here is a snippet that I cut and paste into my OMODS...
;---> Create a Select Menu from a an OMOD folder structure; Configuration; =============SetVar vFolder "Folder" ;       Name of folder containing sub-folders that will be used as Select Menu itemsSetVar vStitle "SelectTitle" ;  Title text for the Select Menu; Initialise VariablesStringLength vLen "%vFolder%\\" ;        String length of container folder nameSetVar vSelect "Select \"%vStitle%\"" ;  Select statement with titleSetVar vCases "" ;                       Variable to use for building Case statements; Build Select Menu and Case StatementsFor Each DataFolder vSubFolder "%vFolder%" False  RemoveString vSubFolder "%vSubFolder%" 0 %vLen%  SetVar vSelect "%vSelect% \"%vSubFolder%\""  SetVar vCases "%vCases% \    Case %vSubFolder%%NewLine%\      SetVar vSelection \"%vSubFolder%\"%NewLine%\    Break%NewLine%"EndFor; Display Select MenuExecLines %vSelect%%NewLine%%vCases%EndSelect

Another scenario I use quite frequently is installing a range of different ESPs which are dependent on the presence of associated ESPs. In addition, I want to install the selected ESP with a standard name so that BOSS doesn't have to deal with a flood of new names and so that the user can easily establish what has been installed rather than interpret complex naming conventions. Here is the snippet I use for this...
;---> Install different ESPs based on the presence of other ESPs; Configuration; =============SetVar vFolder "ESPnames" ;  Name of folder containing sub-folders with dependent ESPs - Sub-Folder names = Dependent ESP nameSetVar vEsuffix "" ;         Suffix to be appended to the Sub-Folder name to derive the ESP file nameSetVar vMerged "Merged" ;    Folder containing merged ESPsSetVar vTname "Target.esp" ; Target name of ESP (ie the name that will be used as the CopyPlugin destination ESP)SetVar vAfter "" ;           Set to the ESP name after which the installed ESP should be loadedSetVar vBefore "" ;          Set to the ESP name before which the installed ESP should be loadedSetVar vDefault False ;      Set to True if vTname is always installed from root directory; Initialise VariablesStringLength vLen "%vFolder%\\" ; String length of container folder nameSetVar vEname "" ;                ESP nameSetVar vEcount 0 ;                Number of ESPs detected; Process foldersFor Each PluginFolder vSubFolder "%vFolder%" False  RemoveString vSubFolder "%vSubFolder%" 0 %vLen%  If DataFileExists "%vSubFolder%.esp"    SetVar vEname "%vEname%%vSubFolder%"    iSet vEcount %vEcount% + 1  EndIfEndFor; Install PluginSelectVar vEcount  Case 0    If Equal %vDefault% True      InstallPlugin "%vTname%" ;  Only default ESP required    Else      Message "No compatibility patches required - Installation aborted" "Fatal Error"      FatalError    EndIf  Break  Case 1    CopyPlugin "%vFolder%\\%vEname%\\%vEname%%vEsuffix%.esp" "%vTname%" ;  Single additional fix required  Break  Default    CopyPlugin "%vMerged%\\%vEname%.esp" "%vTname%" ;  Merged mod required  BreakEndSelect; Load Order ProcessingIfNot Equal "%vAfter%" ""  LoadAfter "%vTname%" "%vAfter%"EndIfIfNot Equal "%vBefore%" ""  LoadBefore "%vTname%" "%vBefore%p"EndIf


I Hope this is the type of thing you were asking for and that this helps.
User avatar
Irmacuba
 
Posts: 3531
Joined: Sat Mar 31, 2007 2:54 am

Post » Fri May 27, 2011 12:17 pm

Also a feature request. INAM - Death Item. Would it be possible to add tag support to import this field forward?


Something that I asked about in the previous thread which I don't think ever got a response.
User avatar
BethanyRhain
 
Posts: 3434
Joined: Wed Oct 11, 2006 9:50 am

Post » Fri May 27, 2011 2:07 pm

My beloved Wrye Bash 275 recently keeps crashing when I start the game + OBSE right out of WB, with WB set to "auto-close" first. This was not a problem earlier when my modlist was like 10 mods and 2 extra textures. It has only started now that the modlist has grown to say 50 mods and 20 extra textures.

I'm using WB off a Python 2.6 installation that includes this comtypes thing. Python 26 is installed in C:\Python26.

It's not a big problem, I usually close WB manually anyway before starting OB/OBSE (via OBSELauncher). But is this a known problem? Should I just reinstall WB?


Edit: just clarified my python 2.6 installation
User avatar
patricia kris
 
Posts: 3348
Joined: Tue Feb 13, 2007 5:49 am

Post » Fri May 27, 2011 7:29 pm

Looks like they also store a list of mods and their (old) load order.

Ack, stupid sinus infection... losing consciousness... OK, Pac, here's the code not as a wrapper (but very much with permission).

(There were some other random-ish edits, including a typo fix for "'Failed to find pcName in PC ACRH record.'" which should read "ACHR")

Note that this was a modification of v271 and I haven't tried it with the latest v275. (or any of the revisions for v276... haven't been able to get anything past r76 to load). I'll finish up the .obse section for the latest Pluggy and add in a .pluggy decoder - tomorrow, hopefully my sinuses will be good and dead and unable to complain by then...

nice code! certainly would have taken me ages to write that... the only thing that I couldn't copy and paste there was I had to add one line in the right click link section... rather micro change to say the least... thanks (and to Badhair).
Just doing a couple double checks and then uploading the new version.
(and sorry to hear you have a sinus infection... hope you get better soon)
Pacific Morrowind
User avatar
benjamin corsini
 
Posts: 3411
Joined: Tue Jul 31, 2007 11:32 pm

Post » Fri May 27, 2011 11:56 am

Just downloaded the new release of Wrye Bash: great as usual. Many thanks to Wrye for this wonderful tool, and to PacificMorrowind & Raziel23x for the effort they put in releasing this update. :)
User avatar
Jesus Sanchez
 
Posts: 3455
Joined: Sun Oct 21, 2007 11:15 am

Post » Fri May 27, 2011 5:01 pm

Why tesnexus link says that newest version is "Wrye Bash 275 - Self Installer" ? ;)

EDIT: Nevermind i was blind. :facepalm:
User avatar
leni
 
Posts: 3461
Joined: Tue Jul 17, 2007 3:58 pm

Post » Fri May 27, 2011 4:44 pm

Why tesnexus link says that newest version is "Wrye Bash 275 - Self Installer" ? ;)

EDIT: Nevermind i was blind. :facepalm:

Well I must be blind - I see that version says 277, but the File says 275 and is dated November. Is there a 277 version? If I am being blind, please tell me what I am not seeing :)

Thanks
User avatar
Amy Masters
 
Posts: 3277
Joined: Thu Jun 22, 2006 10:26 am

Post » Fri May 27, 2011 3:36 pm

nice code! certainly would have taken me ages to write that... the only thing that I couldn't copy and paste there was I had to add one line in the right click link section... rather micro change to say the least... thanks (and to Badhair).
Just doing a couple double checks and then uploading the new version.
(and sorry to hear you have a sinus infection... hope you get better soon)
Pacific Morrowind

Thanks should really go to badhair for the code. That's exactly how 'e gave it to me (and an even bigger prop on decoding OBSE's plugin info from their web of code). If you haven't uploaded it yet, I do have one thing to add (for now) to decode the latest Pluggy release change
							while (ins.tell() < len(chunkBuff)):								espId,modId,modNameLen, = unpack('=BBI',6)								modName = ins.read(modNameLen)								log(_('	%02X	%02X	%s') % (espId,modId,modName))								espMap[modId] = modName # was [espId]

to
							while (ins.tell() < len(chunkBuff)):								if chunkVersion == 2:									espId,modId, = unpack('=BB', 2)									log(_('	%02X	%02X') % (espId,modId))									espMap[modId] = espId								else: #elif chunkVersion == 1"									espId,modId,modNameLen, = unpack('=BBI',6)									modName = ins.read(modNameLen)									log(_('	%02X	%02X	%s') % (espId,modId,modName))									espMap[modId] = modName # was [espId]

I still need to tack on some stuff to handle unknown versions and ModNames for v2, but that should work for now.
User avatar
JeSsy ArEllano
 
Posts: 3369
Joined: Fri Oct 20, 2006 10:51 am

PreviousNext

Return to IV - Oblivion