Wrye Bash Wizards

Post » Wed Mar 30, 2011 12:50 am

Execution of the wizard seems to seriously slow down when Screenshots are involved, It feels like the extracting of the relevant files and pre-processing of the images is the culprit in the slow-down. I tried re-sizing all of the images in awls once with no .jpg compression for each and a lower resolution for each to fit in the window quicker ... resulted in no difference in execution.


Latest rev changes this so BAIN will extract any image in the archive at the same time it extracts the wizard file.

  • Pro: Since all extraction is done in one go, this will be a huge speedup for solid archives.
  • Pro: SelectOne/SelectMany dialogs will already have their images extracted, so no delays there anymore.
  • Con: No determination is done to see which images to extract. BAIN just pulls all of them, so this will probably slow down overall extraction time from non-solid archives a bit if there are a lot of images that the wizard doesn't use.
  • Con: The initial extraction (which used to be just the wizard.txt) will take a bit longer, since it's extracting more files.


Overall, I think it's the best comprimise.
User avatar
kelly thomson
 
Posts: 3380
Joined: Thu Jun 22, 2006 12:18 pm

Post » Wed Mar 30, 2011 11:41 am

Looks like I need to go back to Python and svn instead of WBSA again :)

Well I need it for Mooo's latest utility too so its about time I switched back - FYI became very attached to WBSA, no problems whatsoever.


Edit: Now using Wrye Python 03a and SVN 896 - http://www.bild.me/bild.php?file=4685930Untitled.jpg - Re-sizeable is working but no image for the choices coming up on the right.

Edit2: Just had this too - http://www.bild.me/bild.php?file=6519407Untitled0.jpg - :) Thank you for adding that, I did not get an error on the load after that, and the column separator was where I left it.
User avatar
tegan fiamengo
 
Posts: 3455
Joined: Mon Jan 29, 2007 9:53 am

Post » Wed Mar 30, 2011 12:54 am

Looks like I need to go back to Python and svn instead of WBSA again :)

Well I need it for Mooo's latest utility too so its about time I switched back - FYI became very attached to WBSA, no problems whatsoever.


Edit: Now using Wrye Python 03a and SVN 896 - http://www.bild.me/bild.php?file=4685930Untitled.jpg - Re-sizeable is working but no image for the choices coming up on the right.

Edit2: Just had this too - http://www.bild.me/bild.php?file=6519407Untitled0.jpg - :) Thank you for adding that, I did not get an error on the load after that, and the column separator was where I left it.

Doh! Left in some testing print's, fixed that. Also I figured out why your wizard isn't showing images, so I'll fix that too.

EDIT: Got the images thing fixed. I failed if the images weren't in the root folder. All better now.
User avatar
Prisca Lacour
 
Posts: 3375
Joined: Thu Mar 15, 2007 9:25 am

Post » Wed Mar 30, 2011 1:46 pm

Lojack needs you to break Wrye Bash!

That's right, I added the 'Back' button into Wizards! I did extensive testing on my end, and I can't figure out how to break it anymore. So now it's time for the brave svn users to try to break it.

So, when you click back, it will go back to the previous page, remembering your previous answers. You can go back as many pages as you want and it will remember all of your answers*. When you click 'Next', if you didn't change your answers, it will also use your same answers as last time for the next page.

*Only time this isn't true: if you go 'Back' all the way to a 'RequireVersions' page, it will forget all of your answers. I was having trouble getting that to work quite right. I'll probably work on it later.
User avatar
Etta Hargrave
 
Posts: 3452
Joined: Fri Sep 01, 2006 1:27 am

Post » Wed Mar 30, 2011 3:57 am

PRIVATE PILE REPORTING SA!

Uhm... No wizard option for those that have them - svn 899 = anti-climix :)
User avatar
Gracie Dugdale
 
Posts: 3397
Joined: Wed Jun 14, 2006 11:02 pm

Post » Wed Mar 30, 2011 12:05 am

PRIVATE PILE REPORTING SA!

Uhm... No wizard option for those that have them - svn 899 = anti-climix :)


Bah, what's going on. I have no problems here...

Could you try one thing for me. In basher.py, up towards the top where it says
try:    import belt    import win32gui    dclicktime = win32gui.GetDoubleClickTime() / 10    renametime = 4 * dclicktime    bEnableWizard = Trueexcept:    bEnableWizard = False    dclicktime = 50    renametime = 4 * dclicktime

change right after the except to read
except:    raise    bEnableWizard = False


Then try it again, posting a bugdump.

Also, I'll be travelling for the next few days, so it might be a bit 'til I can get to it.
User avatar
brian adkins
 
Posts: 3452
Joined: Mon Oct 01, 2007 8:51 am

Post » Wed Mar 30, 2011 5:50 am

Wrye Bash will not start with the raise addition, debug log empty

Edit: Just removed the raise again, and Wrye Bash starts.

Edit2: My edit of basher.py was exactly as you instructed, using notepad++, will go back to WBSA until you get back :)
User avatar
Etta Hargrave
 
Posts: 3452
Joined: Fri Sep 01, 2006 1:27 am

Post » Tue Mar 29, 2011 11:50 pm

Found the syntax error (at least as far as Python 2.6.6 was concerned) that was preventing wizards from being enabled. Fixed in svn.
User avatar
Kaley X
 
Posts: 3372
Joined: Wed Jul 05, 2006 5:46 pm

Post » Wed Mar 30, 2011 2:23 am

Latest rev changes this so BAIN will extract any image in the archive at the same time it extracts the wizard file.

  • Pro: Since all extraction is done in one go, this will be a huge speedup for solid archives.
  • Pro: SelectOne/SelectMany dialogs will already have their images extracted, so no delays there anymore.
  • Con: No determination is done to see which images to extract. BAIN just pulls all of them, so this will probably slow down overall extraction time from non-solid archives a bit if there are a lot of images that the wizard doesn't use.
  • Con: The initial extraction (which used to be just the wizard.txt) will take a bit longer, since it's extracting more files.


Overall, I think it's the best comprimise.


In the long run I do think this will be a slowdown, but do as you will... no performance diff yet.
War implemented the wizard images feature I asked for, what about performance there, considering they will already be on your hard drive extracted in the mopy folder.
As far as I know,It will look in your archive first, then if not in the archive, use the default image in the wizard images folder from mopy if not found in the archive.

Note: I tend to archive pics and all in an archive. For the most part.

This shouldn't matter too much for players(normal) users, as they won't be Installing-Uninstalling that often as well, modders & testers do. Or Mooo, who just likes to try and break things....

Anyway, thoughts, comments....
User avatar
Andrew Lang
 
Posts: 3489
Joined: Thu Oct 11, 2007 8:50 pm

Post » Wed Mar 30, 2011 8:48 am

Wrye Python 03a with svn 900 (myk002's syntax error fix) - It works but there's still a minor problem, I broke it :P :celebration: ( okay maybe a little too much gloating :) )

http://www.bild.me/bild.php?file=6859781Untitled.jpg

I must say though from a user viewpoint - Speed of selections on the last run through without trying to break it was remarkably better than usual. And particularly for AWLS with resized wizard larger the screens presentation is better encompassing the whole image as opposed to previously just seeing just four fifths of some images.

Summary:

Resize works - But does not hold its position the next time a wizard is invoked, reverts to a default size.

Speed of execution of wizards is very much improved

Going backwards after getting half way through / then forwards making selections to the end / then backwards quickly (impatient user click click click click click) = Error in the script flagged for AWLS 5.5.2

Edit: Forgot to mention; Double clicking any screenshot in the wizard with the magnifying glass loaded it up successfuly in my associated program (currently Paint.net)
User avatar
Alex Vincent
 
Posts: 3514
Joined: Thu Jun 28, 2007 9:31 pm

Post » Wed Mar 30, 2011 6:05 am

Found the syntax error (at least as far as Python 2.6.6 was concerned) that was preventing wizards from being enabled. Fixed in svn.

Thanks for getting that. I've been using 2.7.1 for a while now, didn't think about lower versions. I guues I should setup 2.6 on a vm or something for testing.


In the long run I do think this will be a slowdown, but do as you will... no performance diff yet.
War implemented the wizard images feature I asked for, what about performance there, considering they will already be on your hard drive extracted in the mopy folder.
As far as I know,It will look in your archive first, then if not in the archive, use the default image in the wizard images folder from mopy if not found in the archive.

Thanks for the feedback. From my testing, I didn't see any significant slowdowns, but I also don't have a low end computer or anything so :shrug: Also, you are correct on the 'Wizard Images' folder search preference.


Wrye Python 03a with svn 900 (myk002's syntax error fix) - It works but there's still a minor problem, I broke it :P :celebration: ( okay maybe a little too much gloating :) )

http://www.bild.me/bild.php?file=6859781Untitled.jpg

I must say though from a user viewpoint - Speed of selections on the last run through without trying to break it was remarkably better than usual. And particularly for AWLS with resized wizard larger the screens presentation is better encompassing the whole image as opposed to previously just seeing just four fifths of some images.

Summary:

Resize works - But does not hold its position the next time a wizard is invoked, reverts to a default size.

Speed of execution of wizards is very much improved

Going backwards after getting half way through / then forwards making selections to the end / then backwards quickly (impatient user click click click click click) = Error in the script flagged for AWLS 5.5.2

Edit: Forgot to mention; Double clicking any screenshot in the wizard with the magnifying glass loaded it up successfuly in my associated program (currently Paint.net)

Sounds like there's still some issues with the "Back" button then. Might be some strangeness from clicking excessively, or more likely just a straight up logic error on my part. I can't promise anything for a while, 'cause it looks like I'm going to be stuck in San Diego for ~2 weeks before I get home. So my developing will be done without internet :( , and any committing I make will be without my dev computer :verymad:

I'll look at putting in wizards remembering their last size as well at some point.
User avatar
Eric Hayes
 
Posts: 3392
Joined: Mon Oct 29, 2007 1:57 am

Post » Wed Mar 30, 2011 6:12 am

Thanks for getting that. I've been using 2.7.1 for a while now, didn't think about lower versions. I guues I should setup 2.6 on a vm or something for testing.

Mebbe we should just raise the requirement to 2.7.1? It's been stable for quite some time, and includes some features I'd like to use in BAIT (such as the enhanced unittest module and the faster io module). Also, dictionary comprehensions are nice : )
User avatar
Shelby McDonald
 
Posts: 3497
Joined: Sat Jan 13, 2007 2:29 pm

Post » Wed Mar 30, 2011 12:47 pm

Mebbe we should just raise the requirement to 2.7.1? It's been stable for quite some time, and includes some features I'd like to use in BAIT (such as the enhanced unittest module and the faster io module). Also, dictionary comprehensions are nice : )

It's a fair idea, I'll bring it up with PM and War, see what they think. I've been using 2.7.1 myself for quite sometime now, and haven't had any problems myself. :shrug:
User avatar
Roy Harris
 
Posts: 3463
Joined: Tue Sep 11, 2007 8:58 pm

Post » Wed Mar 30, 2011 4:30 am

Would anyone have need of a couple more functions in the language ...

Goto
Label

I am currently making use of ....

If DataFileExists ("DLCShiveringIsles.esp")	bShiveringIslesInstalled = TrueElse	Return ;== Jumps to finishing page and skips SI selections ==EndIf


Which does the job, but the above two functions could expand possibilities.

I can see it messing with Lojack's head though when it comes to the Back button; so I understand it could be too much of a problem to have especially if there's no foreseable need.
User avatar
Mistress trades Melissa
 
Posts: 3464
Joined: Mon Jun 19, 2006 9:28 pm

Post » Wed Mar 30, 2011 1:39 am

Would anyone have need of a couple more functions in the language ...

Goto
Label

I am currently making use of ....

If DataFileExists ("DLCShiveringIsles.esp")	bShiveringIslesInstalled = TrueElse	Return ;== Jumps to finishing page and skips SI selections ==EndIf


Which does the job, but the above two functions could expand possibilities.

I can see it messing with Lojack's head though when it comes to the Back button; so I understand it could be too much of a problem to have especially if there's no foreseable need.


Umm... GoTo and Label being Functions....hmmmmmm
Explain a bit more as to how they would be applied, please, if you would.

GoTo SectionOfWizard...?
Label What?
User avatar
Kira! :)))
 
Posts: 3496
Joined: Fri Mar 02, 2007 1:07 pm

Post » Tue Mar 29, 2011 11:33 pm

Label MyPlaceInTheScriptToJumpToWhenCalled <--- Can be anything

If Condition = True
Goto MyPlaceInTheScriptToJumpToWhenCalled

The label could be placed anywhere in the script - Earlier or later than the Goto Call - Which is why I think such a function pair would mess with Lojacks back button.

I have no immediate use for it, but just remembered something similar in the days of editing AmigaDOS batch files.
User avatar
Niisha
 
Posts: 3393
Joined: Fri Sep 15, 2006 2:54 am

Post » Wed Mar 30, 2011 1:51 am

Yeah, that logic sorta messes with my brain....

here's the line I use
Ughhh. Eyelids getting heavy. Need to study python more....

A brain twister it is... Who where when why who

make a wish...
User avatar
Chris Cross Cabaret Man
 
Posts: 3301
Joined: Tue Jun 19, 2007 11:33 pm

Post » Wed Mar 30, 2011 3:51 am

Labels/Goto: yeah, that could cause problems with the back button, if used to jump backwards. I tend to hate Goto/Label commands, as they are pretty hacky and smack of old school BASIC and such. Using functions or loops are a much better alternative if available. So I get working on the ability to define user functions.

@Arthmoor: for detecting active plugins, my draft is this:
GetEspmState(espmName)returns:-2: File does not exist (taking into account ghosting)-1: Espm is not active, but is imported 0: Espm is not active+1: Espm is active+2: Espm is merged

The question I have is, do those return values make sense? I could move imported to +1, and change active and merged to +2/+3. I want it so you can do things like
If GetEspmState('mymode.esp') > 1  Note "My mod is active!"Else  Note "My mod isn't installed correctly :("EndIf

User avatar
Chase McAbee
 
Posts: 3315
Joined: Sat Sep 08, 2007 5:59 am

Post » Wed Mar 30, 2011 9:12 am

@Arthmoor: for detecting active plugins, my draft is this:
GetEspmState(espmName)returns:-2: File does not exist (taking into account ghosting)-1: Espm is not active, but is imported 0: Espm is not active+1: Espm is active+2: Espm is merged

After thinking about it some more, it made more sense to do it like this:
GetEspmState(espmName)returns:-1: File does not exist (taking into account ghosting) 0: Espm is not active+1: Espm is not active, but is imported+2: Espm is active+3: Espm is merged

So unless I hear back before 292 gets release (don't know when), that's what it'll be.
User avatar
Blessed DIVA
 
Posts: 3408
Joined: Thu Jul 13, 2006 12:09 am

Post » Wed Mar 30, 2011 1:13 pm

Update:

- Wizards will now remember their previous size and position
- Added the Exec function. It will execute the string passed to it as if it was lines of a wizard. I had to redo the 'Back' button stuff to make this work right, but it should still work fine (better even)
User avatar
Kaylee Campbell
 
Posts: 3463
Joined: Mon Mar 05, 2007 11:17 am

Post » Wed Mar 30, 2011 2:53 am

Update:

- Wizards will now remember their previous size and position
- Added the Exec function. It will execute the string passed to it as if it was lines of a wizard. I had to redo the 'Back' button stuff to make this work right, but it should still work fine (better even)

Would ya be a gentleman and give a simple working example in code of Exec?

SelectOne "SelectOne: Yes-No Question?", \	"Yes", "Description Yes.", "Wizard Images\\Yes.jpg" \	"No", "Description No.", "Wizard Images\\No.jpg"	Case "Yes"		; Action-No Action	Break	Case "No"		; Action-No Action	BreakEndSelectExec "go where?"

User avatar
Chelsea Head
 
Posts: 3433
Joined: Thu Mar 08, 2007 6:38 am

Post » Wed Mar 30, 2011 6:50 am

Would ya be a gentleman and give a simple working example in code of Exec?


Sure, you could do:
...bHasMyFirstMod = DataFileExists('LojacksAwesomeMod.esp')bHasMySecondMod = DataFileExists('LojacksLegendaryMod.esp')If bHasMyFirstMod or bHasMySecondMod    ; Title    selectstatement = 'SelectMany "Add patch for Lojack\'s mods." '    ; Options    If bHasMyFirstMod        selectstatement += ', "Lojack\'s Awesome Mod patch",  "A compatability patch for Lojack\'s mod, which is awesome.", "" '    EndIf    If bHasMySecondMod        selectstatement += ', "Lojack\'s Legendary Mod patch", "A compatability patch for Lojack\'s mod, which is legend - wait for it - dary!", "" '    EndIf    selectstatement += '\n'    ; Execute selection of options    selectstatement += ' Case "Lojack\'s Awesome Mod patch"\n'    selectstatement += '     SelectEspm("LojacksAwesomeModPatch.esp")\n'    selectstatement += '     Break\n'    selectstatement += ' Case "Lojack\'s Legendary Mod patch"\n'    selectstatement += '     SelectEspm("LojacksLegendaryModPatch.esp")\n'    selectstatement += '     Break\n'    selectstatement += ' EndSelect'    Exec( selectstatement )EndIf...


You don't have to construct you variable the same way I did, I just did it that way in this example for easier to read code. Also, it doen's have to be stored in a variable, you could just pass the raw string to it.
Also, I didn't test this specific example, so I may have a bug in the above code.
User avatar
Emma Copeland
 
Posts: 3383
Joined: Sat Jul 01, 2006 12:37 am

Post » Wed Mar 30, 2011 12:03 pm

Sure, you could do:
Spoiler

...bHasMyFirstMod = DataFileExists('LojacksAwesomeMod.esp')bHasMySecondMod = DataFileExists('LojacksLegendaryMod.esp')If bHasMyFirstMod or bHasMySecondMod    ; Title    selectstatement = 'SelectMany "Add patch for Lojack\'s mods." '    ; Options    If bHasMyFirstMod        selectstatement += ', "Lojack\'s Awesome Mod patch",  "A compatability patch for Lojack\'s mod, which is awesome.", "" '    EndIf    If bHasMySecondMod        selectstatement += ', "Lojack\'s Legendary Mod patch", "A compatability patch for Lojack\'s mod, which is legend - wait for it - dary!", "" '    EndIf    selectstatement += '\n'    ; Execute selection of options    selectstatement += ' Case "Lojack\'s Awesome Mod patch"\n'    selectstatement += '     SelectEspm("LojacksAwesomeModPatch.esp")\n'    selectstatement += '     Break\n'    selectstatement += ' Case "Lojack\'s Legendary Mod patch"\n'    selectstatement += '     SelectEspm("LojacksLegendaryModPatch.esp")\n'    selectstatement += '     Break\n'    selectstatement += ' EndSelect'    Exec( selectstatement )EndIf...


You don't have to construct you variable the same way I did, I just did it that way in this example for easier to read code. Also, it doen's have to be stored in a variable, you could just pass the raw string to it.
Also, I didn't test this specific example, so I may have a bug in the above code.


Yeah, I guess that example should be good enough. You may want to toy a bit around with it for the demo, though.

EDIT: just looked at the 1004 docs...
What if I like icecream?, but for some reason I can't digest milk products properly...errr lactose intolerant? lol
'What 'If'
I always loved those types of comics(either)
User avatar
Bedford White
 
Posts: 3307
Joined: Tue Jun 12, 2007 2:09 am

Post » Wed Mar 30, 2011 1:51 pm

There are some features in OBMM that I find really useful and make me use it for my mods...

  • Ability to retrieve folder names
    OBBM Syntax: For Each DataFolder [RecurseSubfolders] [SearchString]

    Allows you to process the BAIN sub packages without having to hardcode all the folder names. This means I can add new folders without having to change the script and reduces typo issues.

  • Ability to retrieve file names
    OBMM Syntax: For Each DataFile [RecurseSubfolders] [SearchString]

    I use this capability to derive an associated ESP name by manipulating the file name string. For example, if the sub package contains "Better Cities Full Vwalk.esp" I can derive "Better Cities Full.esp" and check if it is installed in order to determine whether the sub package should be activated.


I'm planning on adding:
For var_name in SubPackages
For var_name in Espms

To iterate over the subpackages and esps/esms in the BAIN. Would this work for you Surazal? Right now the Espm one iterates over all Espms in the BAIN, but if you need a version that only iterates over Espms in a subpackage let me know.
User avatar
Becky Palmer
 
Posts: 3387
Joined: Wed Oct 04, 2006 4:43 am

Post » Tue Mar 29, 2011 11:13 pm

I'm planning on adding:

Please do, because if you did that would probably means that you're one step closer to add a new feature in BAIN, which allows us to convert an OBMM script to a BAIN wizard and that would be an incredible achievement imo. :D
User avatar
jessica sonny
 
Posts: 3531
Joined: Thu Nov 02, 2006 6:27 pm

PreviousNext

Return to IV - Oblivion