[BETA] Oblivion Script Extender (OBSE) 0020

Post » Tue May 03, 2011 9:53 am

If you call return -> end of script not reached -> sv_destruct not called -> co-save expodes.


Ok, I was just making sure there wasn't something I was unaware of..

Well, thanks, this clarified the situation for me, I'll try to remember it, but, years of programming one way, well, it's a hard habit to break.. :)
User avatar
Nick Tyler
 
Posts: 3437
Joined: Thu Aug 30, 2007 8:57 am

Post » Mon May 02, 2011 10:28 pm

scn aaaRecycle; A function for deleting game items.ref Itemlong ItemValuelong FinalValuelong Amountlong PlayerHaslong PayOutBegin Function { Item, Amount }	; Get Item Value	Set ItemValue to ( GetFullGoldValue Item )	Set FinalValue to (ItemValue * aaaAdvancedMagecraftQST.RecycleGoldCost)	; Give 1 Gold For Items Of Value (If Balance Options Reduce Them To 0)	if (ItemValue > 0 && FinalValue =http://forums.bethsoft.com/index.php?/topic/1170916-beta-oblivion-script-extender-obse-0020/= 0 && aaaAdvancedMagecraftQST.RecycleGoldCost != 0)		Set FinalValue to 1	endif	Set PlayerHas to (Player.GetItemCount Item)	if (Amount> PlayerHas)		Set Amount to (PlayerHas)	endif	MessageEx "Recycling: %n - Amount: %0.f" Item Amount	; Remove Items	(It's impossible for no item to reach this function, no if block necessary, there is at least one..)	Set PlayerHas to PlayerHas - Amount	while (Player.GetItemCount Item > PlayerHas)		Player.RemoveItemNS Item 1	loop	; Give Gold (If applicable)  ; I should probably wrap this in an if block...	Set PayOut to (FinalValue * Amount)	Player.AddItem Gold001 PayOut <--- This is the message I refer to above, the gold added message.. I got this, it must have ran to have gotten here..End


You'll note what I did with the while... Now I'm not 100% sure on the workings of RemoveItem (NS, etc), but I doubt Scruggs did any alteration to it's workings, but more of the after effects (spam, sounds, etc). The original non-OBSE Oblivion RemoveItem would also fail to remove multiple items, I've had to do this while loop on numerous mods that asked for items for quests. Even the stock quests that came with Oblivion sometimes wouldn't remove the ingredients required for various quests (well, not all of them anyways). The AddItems all work, but I believe the RemoveItem sends the items to the garbage collection routines and those are probably "packed full of goodness" and too busy to deal with the new ones and just returns (no error, but the items won't vanish). The above loop will ensure they do vanish, as again, I've had to do multiple times, but beforehand had to use Goto's to do it. The while loop here is an identical one to the one I have working now, minus the variables and item.

GuruSR.
User avatar
Christine Pane
 
Posts: 3306
Joined: Mon Apr 23, 2007 2:14 am

Post » Mon May 02, 2011 6:26 pm

You'll note what I did with the while... Now I'm not 100% sure on the workings of RemoveItem (NS, etc), but I doubt Scruggs did any alteration to it's workings, but more of the after effects (spam, sounds, etc). The original non-OBSE Oblivion RemoveItem would also fail to remove multiple items, I've had to do this while loop on numerous mods that asked for items for quests. Even the stock quests that came with Oblivion sometimes wouldn't remove the ingredients required for various quests (well, not all of them anyways). The AddItems all work, but I believe the RemoveItem sends the items to the garbage collection routines and those are probably "packed full of goodness" and too busy to deal with the new ones and just returns (no error, but the items won't vanish). The above loop will ensure they do vanish, as again, I've had to do multiple times, but beforehand had to use Goto's to do it. The while loop here is an identical one to the one I have working now, minus the variables and item.

GuruSR.


Well, I don't think that's the problem I'm having.

The problem I had, was vanilla game objects which should stack, were not.

That function, under every other situation has been rock solid(I've got it taking up to 1,000(this is an arbitrary limit I added, not one of functionality.) items, no problem.). (Now, perhaps, in some strange lingering way it's causing the issue, but, it's hard to say at this point, the issue is sporadic, and very hard to track..)

I'd love to get Scruggs opinion on that issue. (The items not stacking in my inventory issue.. They were fresh from the corpse, glass armors, etc,. I had just loaded, took two steps, got attacked, killed them, took their equipment, boom, issue occurs.. It's sporadic too, I reloaded later, did it again, took the same armor, and it was fine..)

Thanks though, I might try that if the issue persist, or if scruggs can verify it might be causing it.. (I have to be careful with big loops like that, because you can work very quickly with my mod, before that even finishes, you can start new batches, and it will really bog down my UI.. That's why I did the way it is, rather than looping.. And I certainly don't want to tell my users, no, or wait, I like my mod fast and responsive, so you can get in, and get it done.)

----

Just as a test, I cloned 10,000 items, (it is the equiv of that function with AddItemNS), this was done in 10 batches of 1,000, then I recycled them, also in 10 batches, and then collected some items from the game world, they worked as expected. (All items were added, and removed, etc,. Everything stacked, etc,.)
User avatar
Noely Ulloa
 
Posts: 3596
Joined: Tue Jul 04, 2006 1:33 am

Post » Tue May 03, 2011 7:41 am

Terrain slope is on the agenda.
If you want to erase all the arrays of a particular script you'll need to erase them manually. OBSE doesn't keep track of which arrays are in use by which scripts.
I've located code in the editor executable to calculate an object's extents along each axis, I need to translate it into something usable at run-time.


Great! Thank you :smile:
User avatar
Kellymarie Heppell
 
Posts: 3456
Joined: Mon Jul 24, 2006 4:37 am

Post » Tue May 03, 2011 6:27 am

Well, I don't think that's the problem I'm having.

The problem I had, was vanilla game objects which should stack, were not.

That function, under every other situation has been rock solid(I've got it taking up to 1,000(this is an arbitrary limit I added, not one of functionality.) items, no problem.). (Now, perhaps, in some strange lingering way it's causing the issue, but, it's hard to say at this point, the issue is sporadic, and very hard to track..)

I'd love to get Scruggs opinion on that issue. (The items not stacking in my inventory issue.. They were fresh from the corpse, glass armors, etc,. I had just loaded, took two steps, got attacked, killed them, took their equipment, boom, issue occurs.. It's sporadic too, I reloaded later, did it again, took the same armor, and it was fine..)

Thanks though, I might try that if the issue persist, or if scruggs can verify it might be causing it.. (I have to be careful with big loops like that, because you can work very quickly with my mod, before that even finishes, you can start new batches, and it will really bog down my UI.. That's why I did the way it is, rather than looping.. And I certainly don't want to tell my users, no, or wait, I like my mod fast and responsive, so you can get in, and get it done.)

----

Just as a test, I cloned 10,000 items, (it is the equiv of that function with AddItemNS), this was done in 10 batches of 1,000, then I recycled them, also in 10 batches, and then collected some items from the game world, they worked as expected. (All items were added, and removed, etc,. Everything stacked, etc,.)

Was that with the while method? I do know the game has issues with removing a large amount of items at once, I've had to do this in numerous locations to avoid that. But the non-stacking of any game item is most likely due to the stats being different or the health being different. Just because they're the same item, doesn't mean their stats aren't the same. Check their health stats and repair as needed, they should re-stack, but I've seen them still not until you put them into a container and take them back out. As for a while loop as I did there, I've seen it do 10,000 in a fraction of a second, then the engine caught up deleting them within a second or two, but bulk removeitem(NS,etc) item 10000 usually didn't give 100% accurate results. Even 50 caused grief. Some quests in-game and mods were taking 20 items off and sometimes there'd be a few left behind. Doing the while made life a lot easier. You could elaborate the while to do units of 10 if the amount being removed is > 10, but I wouldn't go past 10 much.

GuruSR.
User avatar
ashleigh bryden
 
Posts: 3446
Joined: Thu Jun 29, 2006 5:43 am

Post » Tue May 03, 2011 12:38 am

Was that with the while method? I do know the game has issues with removing a large amount of items at once, I've had to do this in numerous locations to avoid that. But the non-stacking of any game item is most likely due to the stats being different or the health being different. Just because they're the same item, doesn't mean their stats aren't the same. Check their health stats and repair as needed, they should re-stack, but I've seen them still not until you put them into a container and take them back out. As for a while loop as I did there, I've seen it do 10,000 in a fraction of a second, then the engine caught up deleting them within a second or two, but bulk removeitem(NS,etc) item 10000 usually didn't give 100% accurate results. Even 50 caused grief. Some quests in-game and mods were taking 20 items off and sometimes there'd be a few left behind. Doing the while made life a lot easier. You could elaborate the while to do units of 10 if the amount being removed is > 10, but I wouldn't go past 10 much.

GuruSR.


Also, not sure if it relates, but there was a mod that broke the stacking for a bit. Do a search in the mod forums. It got fixed, but when the new version of this mod was first released, things didn't stack anymore. I'm sorry, I can't remember which mod it was now, but searching for "items don't stack" or "stacking broken" or something like that should find the posts. Several of us reported the problem at the time.
User avatar
Mr. Ray
 
Posts: 3459
Joined: Sun Jul 29, 2007 8:08 am

Post » Tue May 03, 2011 8:27 am

I'm looking for a way to read strings from a (ini) file. Runbatchscript doesn't do that. So I was looking into Pluggy. Is this my only choice?

I'm asking because I can't find anything that tells me how to turn pluggy string variables into OBSE. Only a very vague and unclear post in Nexus. Can anyone help me?
User avatar
Leonie Connor
 
Posts: 3434
Joined: Mon Mar 12, 2007 4:18 pm

Post » Tue May 03, 2011 6:29 am

To convert strings from Pluggy to OBSE, use ToOBSE (a Pluggy function)

long psValue 		string_var sText. . .IniReadString psValue psFile psSection psKey psNadaset  sText to ToOBSE  psValue

User avatar
Amie Mccubbing
 
Posts: 3497
Joined: Thu Aug 31, 2006 11:33 pm

Post » Mon May 02, 2011 8:16 pm

I'm looking for a way to read strings from a (ini) file. Runbatchscript doesn't do that. So I was looking into Pluggy. Is this my only choice?

I'm asking because I can't find anything that tells me how to turn pluggy string variables into OBSE. Only a very vague and unclear post in Nexus. Can anyone help me?


Look at HudStatusBars, I believe it's reading strings from the .ini, and using only OBSE.. (I could be mistaken, but that's what it looked like anyways.. I remember seeing sv_Construct used quite a bit in the .ini file...)

ie,..

Set aaaSomeQST.StringVar to sv_Construct "Some text.."

-----------

@Andalaybay, I couldn't find the mod in question, a few pages back, I posted my mod order, along with this issue, see if anything jars your memory.. (Edit: Thanks, if it was OBSE, that wouldn't be the problem, I don't think.)

--

@GuruSR,

Well, I went ahead and tested it, it seems ok, so the while loop must be more efficient than the loop type I was using before.

Thanks for bearing with me, and for the advice on how to handle this.

Edit: KInda funny note, maybe, a few days ago, I was tossing around the idea of using a loop instead, so I actually implemented this code, what I did, was implemented a Loop in Clone, and did Recycle the way we are discussing(for comparison), then, a bunch of stuff came up, a bug in MenuQue, some issues with XML's, etc,. I completely forgot about these changes, so, yup, Clone has been using the loop method for days... Sigh...
User avatar
Natalie Harvey
 
Posts: 3433
Joined: Fri Aug 18, 2006 12:15 pm

Post » Tue May 03, 2011 4:22 am

@fore:

Also the new version of MenuQue has the ability to read strings. Basically you create a custom XML file and MenuQue will grab that and tack it on to the global strings file. Then you can use mqGetMenuGlobalStringValue to read those strings into your mod. Here's the http://cs.elderscrolls.com/constwiki/index.php/Extra_Strings_%28MenuQue%29 with all the details.
User avatar
danni Marchant
 
Posts: 3420
Joined: Sat Oct 07, 2006 2:32 am

Post » Mon May 02, 2011 11:02 pm

@Andalaybay, I couldn't find the mod in question, a few pages back, I posted my mod order, along with this issue, see if anything jars your memory..


http://www.gamesas.com/index.php?/topic/1131224-relz-oblivion-script-extender-obse-0019/page__view__findpost__p__16621814 - it was a previous version of OBSE! It was also specific to stolen items...
User avatar
Benito Martinez
 
Posts: 3470
Joined: Thu Aug 30, 2007 6:33 am

Post » Tue May 03, 2011 6:50 am

Anyone know how to do this properly? (It looks correct, yet, it fails, under the condition the name has changed, I verified the NewName string, as being correct.. (Also, am I the only one who no longer has a login anonymous button for this site? Just curious about what's up with that...)

Spoiler

scn aaaRenameref Itemref ItemClonestring_var OldNamestring_var NewNameshort NameChangedshort NameBlankBegin Function { Item, NewName }         MessageEx "NewName: %z" NewName	; Store Current Name	Let OldName := GetName Item        ; Just added this, it works too..	MessageEx "OldName: %z" OldName	; Check If Name Is Blank	Let NameBlank := sv_Compare "%e" NewName	; Check If Name Has Changed	Let NameChanged := sv_Compare OldName NewName	Message "NameBlank: %0.f" NameBlank 	Message "NameChanged: %0.f" NameChanged 		if (NameBlank == -2 && NameChanged == -2)		Set ItemClone to (CloneForm Item)		SetNameEx ItemClone NewName		Call zzzUpdateContainer Player Item ItemClone		Message "Item Renamed!"	endif	; Cleanup Strings	sv_Destruct OldName NewNameEnd;compares a string to a formatted string. ;Performs a case-insensitive comparison by default. ;Returns 0 if the strings are equal, ;1 if the string variable occurs alphabetically before the formatted string, ;-1 if the string variable occurs alphabetically after the formatted string, ;or -2 if the comparison fails.


User avatar
Patrick Gordon
 
Posts: 3366
Joined: Thu May 31, 2007 5:38 am

Post » Mon May 02, 2011 7:58 pm

Well, you're testing specifically for -2. Shouldn't you be testing for anything other than 0? Oblivion can also be really weird about nulls - strictly speaking there aren't any. What is the message for NameBlank and NameChanged printing?
User avatar
Louise Lowe
 
Posts: 3262
Joined: Fri Jul 28, 2006 9:08 am

Post » Tue May 03, 2011 9:40 am

Well, you're testing specifically for -2. Shouldn't you be testing for anything other than 0? Oblivion can also be really weird about nulls - strictly speaking there aren't any. What is the message for NameBlank and NameChanged printing?


Yes, you may be correct, I"m not used to using such a compare function, generally, they would just, return true or false..

It returns various values depending on what path I take(entering no text - same text - different text - for NewName), however, the comparison should have failed resulting in a -2, or else the function is borked.. ?

I'll try testing != 0 as you suggest..

----

Nope, either I'm missing something obvious, or this function is not working properly.. (It return various values based on the input it's given, however none of it's returns are as expected, under any scenario..)
User avatar
Nicola
 
Posts: 3365
Joined: Wed Jul 19, 2006 7:57 am

Post » Mon May 02, 2011 11:31 pm

Yes, you may be correct, I"m not used to using such a compare function, generally, they would just, return true or false..

It returns various values depending on what path I take(entering no text - same text - different text - for NewName), however, the comparison should have failed resulting in a -2, or else the function is borked.. ?

I'll try testing != 0 as you suggest..


Well no. There are shades of inequality with that function, so I would think it would actually be pretty rare that it would return -2. I haven't played with sv_compare much, but from your little summary at the bottom of the script, I would say that sv_compare "abc" "xyz" could return 1!
User avatar
Jordan Fletcher
 
Posts: 3355
Joined: Tue Oct 16, 2007 5:27 am

Post » Tue May 03, 2011 8:44 am

Well no. There are shades of inequality with that function, so I would think it would actually be pretty rare that it would return -2. I haven't played with sv_compare much, but from your little summary at the bottom of the script, I would say that sv_compare "abc" "xyz" could return 1!


ie, Borked.. ?

Color it any way you wish, not working, is not working... It's for doing string comparisons, if it return random useless info, it's no good..

--

Edit: My only thought, is that it can't work properly with two string_var's, it says its for comparing string_var and formatstrings...

Edit2: This has to be the case, I believe I need to use %z to pass in the string_var to the first parameter...
User avatar
Monika
 
Posts: 3469
Joined: Wed Jan 10, 2007 7:50 pm

Post » Tue May 03, 2011 5:33 am

I also wouldn't compare the blank string to the empty string with %e. Once again, you have an expectation of precision that doesn't exist. I suggest instead using sv_length and testing what is returned from that. Now I would also make sure that a string containing several blank spaces, doesn't return a value greater than zero. In normal programming languages it would. 3 spaces is not the same as null. In other languages you would trim all spaces before doing such tests. So try the sv_length function to test for a blank string and make sure you blank string isn't a bunch of spaces. I would stick some printtoconsole commands in there instead of using message...

Edit: No it's not borked at all. You are dealing with C++ under the surface. Blank is not the same as null, which is what you are expecting.
User avatar
Benjamin Holz
 
Posts: 3408
Joined: Fri Oct 19, 2007 9:34 pm

Post » Mon May 02, 2011 11:52 pm

I also wouldn't compare the blank string to the empty string with %e. Once again, you have an expectation of precision that doesn't exist. I suggest instead using sv_length and testing what is returned from that. Now I would also make sure that a string containing several blank spaces, doesn't return a value greater than zero. In normal programming languages it would. 3 spaces is not the same as null. In other languages you would trim all spaces before doing such tests. So try the sv_length function to test for a blank string and make sure you blank string isn't a bunch of spaces. I would stick some printtoconsole commands in there instead of using message...

Edit: No it's not borked at all. You are dealing with C++ under the surface. Blank is not the same as null, which is what you are expecting.


Well, regardless, after passing %z, it's still returning nothing like it should...

Like I said, call it what you want, but it doesn't work as expected. So if someone can tell me, what to tell it, to make it do what I want, please do, otherwise, I have to call it not working,...

Also, I'm not a mind reader, nor do I know the inner workings of OBSE, I can only follow the directions given in the docs, which is what I'm doing, or trying to do, if someone has a problem with my conclusions, perhaps they should clarify the docs a bit..

;compares a string to a formatted string. ;Performs a case-insensitive comparison by default. ;Returns 0 if the strings are equal, ;1 if the string variable occurs alphabetically before the formatted string, ;-1 if the string variable occurs alphabetically after the formatted string, ;or -2 if the comparison fails.


I see no shades, it clearly says, -2 for false, 0 for true..
User avatar
Leah
 
Posts: 3358
Joined: Wed Nov 01, 2006 3:11 pm

Post » Tue May 03, 2011 9:54 am

@Claviticus -- "fails" does not mean "is false." You'll get that condition if, for instance, one of the parameters is not actually a string. Anyway, there have been a few passes on string handling in OBSE, and it's grown more refined; the sv_* commands are mostly obsolete. You can do this in OBSE v0020 with far less hassle and far fewer variables.

Off the top of my head I think this should work:
Spoiler
scn aaaRenameref Itemref ItemClonestring_var NewNameBegin _Function { Item, NewName }	if (NewName)	; variable contains something		if eval ! ( $(NewName) == "" )		; contents are not an empty string			if eval ! ( $(NewName) == (GetName item) )			; new name is not the same as old name				let ItemClone := (CloneForm Item)				SetName ItemClone $(NewName)				Call zzzUpdateContainer Player Item ItemClone			endif		endif	endifEnd

You can add an sv_Destruct for NewName at the end, but personally I'd do it outside the function so it's created and destroyed in the same scope. (Not a technical necessity, but easier to keep track of when maintaining the code later.)

I'm a bit concerned about that CloneForm. If this is only ever called by explicit player action it's probably fine, but if this is an automated function that could happen any arbitrary number of times you've got a potential source of bloat.
User avatar
BaNK.RoLL
 
Posts: 3451
Joined: Sun Nov 18, 2007 3:55 pm

Post » Mon May 02, 2011 7:33 pm

@Claviticus -- "fails" does not mean "is false." You'll get that condition if, for instance, one of the parameters is not actually a string. Anyway, there have been a few passes on string handling in OBSE, and it's grown more refined; the sv_* commands are mostly obsolete. You can do this in OBSE v0020 with far less hassle and far fewer variables.

Off the top of my head I think this should work:
Spoiler
scn aaaRenameref Itemref ItemClonestring_var NewNameBegin _Function { Item, NewName }	if (NewName)	; variable contains something		if eval ! ( $(NewName) == "" )		; contents are not an empty string			if eval ! ( $(NewName) == (GetName item) )			; new name is not the same as old name				let ItemClone := (CloneForm Item)				SetName ItemClone $(NewName)				Call zzzUpdateContainer Player Item ItemClone			endif		endif	endifEnd

You can add an sv_Destruct for NewName at the end, but personally I'd do it outside the function so it's created and destroyed in the same scope. (Not a technical necessity, but easier to keep track of when maintaining the code later.)

I'm a bit concerned about that CloneForm. If this is only ever called by explicit player action it's probably fine, but if this is an automated function that could happen any arbitrary number of times you've got a potential source of bloat.


Thank you Tejon, that is very helpful. :)

And no, this isn't automated, it's a renaming menu, using MenuQue's new feature allowing access to the TextEdit menu..

-------------

Edit: That seemed to do the trick. Thank you very much, I'm going to have to try to figure out the new expression types, because that seemed much more straightforward.

Also, sorry if I came off as offensive earlier, I was just, annoyed, and I'm blunt on my best day, but all bets are off when I start getting mad.. Sorry, it's just how I am.. :(
User avatar
dell
 
Posts: 3452
Joined: Sat Mar 24, 2007 2:58 am

Post » Tue May 03, 2011 8:23 am

It's ok :) I'm not exactly up-to-speed on the new syntax either... I know the docs say many of the sv_ functions are obsolete, but I really wish they had samples of what you are supposed to replace them with :poke:
User avatar
Leilene Nessel
 
Posts: 3428
Joined: Sun Apr 15, 2007 2:11 am

Post » Tue May 03, 2011 8:17 am

Off the top of my head I think this should work:
It looks good to me, though I would rewrite
if eval ! ( $(NewName) == "" )
to
if eval NewName != "" 
as I find the second quite a bit simpler to read

Alternatively, this section
	if (NewName)	 ; variable contains something                if eval ! ( $(NewName) == "" )
can be shortended to
	if eval (sv_Length NewName) > 0	; variable contains at least one character

User avatar
Jonathan Windmon
 
Posts: 3410
Joined: Wed Oct 10, 2007 12:23 pm

Post » Mon May 02, 2011 8:50 pm

It's ok :) I'm not exactly up-to-speed on the new syntax either... I know the docs say many of the sv_ functions are obsolete, but I really wish they had samples of what you are supposed to replace them with :poke:


Glad to hear it, I didn't want that to create any kind of issue between us.. :)

It looks good to me, though I would rewrite
if eval ! ( $(NewName) == "" )
to
if eval NewName != "" 
as I find the second quite a bit simpler to read

Alternatively, this section
	if (NewName)	 ; variable contains something                if eval ! ( $(NewName) == "" )
can be shortended to
	if eval (sv_Length NewName) > 0	; variable contains at least one character



Yeah, I'm definitely going to need to practice those a bit, but I can already kind of see how it's working, so hopefully I can get it straight in my head. :)

Thanks for your help everyone, I really do appreciate it.

---

Edit: Quick question..

if eval ! ( $(NewName) == "" )

is this the same..

if eval ! ($NewName == "")

or does it require the brackets to sort itself out(ie, like a typecast).. ? (Just trying to wrap my head around how the syntax works, I guess I could just try... I figured out Linq, and lambda's, so I'm sure I can eventually get it figured..)
User avatar
Rik Douglas
 
Posts: 3385
Joined: Sat Jul 07, 2007 1:40 pm

Post » Tue May 03, 2011 12:35 am

Edit: Quick question..

if eval ! ( $(NewName) == "" )

is this the same..

if eval ! ($NewName == "")

or does it require the brackets to sort itself out.. ? (Just trying to wrap my head around how the syntax works, I guess I could just try... I figured out Linq, and lambda's, so I'm sure I can eventually get it figured..)
If I'm not mistaken, the only use for the brackets there is to make the CSE not give a warning (but the next version of CSE will accept the non-bracket version without a warning anyway, and the CS accepts it without warning). Also, the "$" transfers the string_var to a string, but that is not necessary to do for comparisions - you can compare a string_var with a string directly, e.g. just drop the "$".
User avatar
Amiee Kent
 
Posts: 3447
Joined: Thu Jun 15, 2006 2:25 pm

Post » Tue May 03, 2011 4:26 am

Just wanted to mention, that sporadic inventory issue happened again. (Using the code suggested by GuruSR..)

This time, I had two Daedric swords, I recycled one, and it stayed. Here is the part of interest, it wasn't really there.

When I deleted the second item, both went, it's like my inventory isn't updating properly, the only thing I can think of, is my mod allows you to open the inventory menu up, even while the recycling is still occurring, so it's grabbing some stale inventory state where both items still existed, then updating on the next deletion(and probably any real change, ie, picking something up) to reflect the actual current state. (So I don't think it has anything to do with Add\RemoveItem\NS\Amount, it has to do with the inventory state, and how it get's updated. Though there is the obvious relation, in, that the issue couldn't occur, if you never changed the state of the inventory.)

----

Edit: What I suggest, is, having OBSE check for the inventory menu being open, and if it is, basically, refresh the menu with the contents of the underlying array.

I could be wrong here, but it very much seems like this is the issue. (I may create a function which simulates this, by adding removing an item, any time the menu opens, or is open, on a small pulse, like 1 second intervals.. 0 weight invisible item.. Like a token..)

---

Update: I seem to be on to something here, for one, the glitch always occurs with pairs of like items, 2 daedric swords, it just occured with two daedric hammers, etc,. (Before it was pairs of glass boots, pairs of glass shields, etc,..)

Simply adding removing a token, isn't enough to trigger the update, however, what I found is, was moving an effected item to a corpse, as soon as I moved it, the stale entry vanished. So I'm going to try to figure out how to simulate that, from a script. (I guess I could dump the player inventory to a container, then retrieve it..)

---

Update: I was correct. I simply dumped the inventory to a chest when the menu opens, then immediately restore it, it's not a good solution though, this causes your items to be unequipped, etc,.. But that's besides the point, the inventory isn't updating properly under certain circumstances. (And a simple refresh is all it needs.)

I have a save setup now where I can reliably trigger the bug, and fix it..

I got some vids coming your way..

----

Edit: Well, that was an ordeal.. (You'll see in the video, I recycle an item, open the inventory, and it remains, moments later, my fix get's it.. Without my fix, those would remain until I manually changed the inventory, ie, recycling again, or dropping\picking something up.. The fix is triggered by opening the menu..)

http://s42.photobucket.com/albums/e323/SmokeESF/?action=view¤t=Oblivion2011-03-1009-16-01-69.mp4

Here is a version of the video without my fix..

http://s42.photobucket.com/albums/e323/SmokeESF/?action=view¤t=NoFix.mp4

----

I just disabled every single mod, and OBSE plugin that I can..

All that remains are..

Oblivion
Shivering Isles
UOP + UOShivering Patch
Advanced Magecraft

OBSE v20 Beta5
MenuQue v9

And the issue still persist.. I can't say for sure what causes it, I can only make guesses based on what I'm seeing, I will gladly send you my mod if you want it for troubleshooting purposes, I need this issue solved..
User avatar
Lexy Corpsey
 
Posts: 3448
Joined: Tue Jun 27, 2006 12:39 am

PreviousNext

Return to IV - Oblivion