[RELz] Oblivion Script Extender (OBSE) 0018

Post » Fri Nov 26, 2010 12:06 am

....As an example, Duke Patrick had no idea (until I told him) that of the changes he made to Bows, the gold value got stored, but not the name, damage or health.
Which is most likely due to the vanilla function SetItemValue.
User avatar
Portions
 
Posts: 3499
Joined: Thu Jun 14, 2007 1:47 am

Post » Thu Nov 25, 2010 5:41 pm

Which is most likely due to the vanilla function SetItemValue.

Nope, he used the OBSE function SetGoldValue - but I guess the reason is that the implementation of SetGoldValue calls the same internal functions as SetItemValue.
User avatar
kiss my weasel
 
Posts: 3221
Joined: Tue Feb 20, 2007 9:08 am

Post » Fri Nov 26, 2010 2:12 am

So indeed one has to always pass the rBaseObject to an rVar when passing in a base object (in vanilla scripts "formID" syntax is valid - is it valid in obse ? What about editorIDs ?) ?

Some OBSE functions can operate on a variety of object types but the parameter types Oblivion's scripting system allows are somewhat restrictive. There is no generic "object" parameter type so functions like SetName, which can take any named object, are defined as taking an inventory object. The upshot of this is that you can pass an inventory object to that function directly, but will get a compiler error trying to pass in some other type of object (like an actor) unless it's stored in a ref variable. The vast majority of affected commands use Inventory Object because it's the closest OB has to a "generic object" param type.
Similarly I read that "most functions must be called on a reference variable rather than on a reference" somewhere in the forums - if this is indeed the case I think now is a nice opportunity to update the info - write something like rVariable.doSomething instead of ref.doSomething in the Function Calling Conventions section or in some particular functions syntax as necessary.

I can't think of any situation where the calling ref would be required to be in a reference variable.
The syntax for passing in a particular ref id should be explicitly mentioned (getIsID "00000191" is valid for instance, no ref variable required, while an editor id would also work (and probably also a syntax involving a variable). Is this syntax possible in obse ?)

Scripts should use editorIDs, not integer formIDs. FormIDs are of use in the console; any OBSE command that works from the console will accept them.
More of a question to the OBSE team, how is it possible there are that many string_vars assigned to Oblivion.esm? Wouldn't that only happen if a vanilla script were to create the string itself?

Either (1) a mod edits a vanilla script directly, adding string variable functionality to it, or (2) the OP used the 0018 beta which briefly broke the string ownership system.
The warning was introduced with this release because we had a handful of mods during beta which leaked string var's massively. It's just that - a warning - and doesn't necessarily mean there's actual leakage (it's conceivable a mod really does need > 100 string variables). Basically if someone complains about excessive load times, we can quickly check their obse.log to determine what mod(s) might be contributing to the problem.

@TheMagician: Looks good. I agree with TheNiceOne's suggestion about sv_Construct and MessageBoxEx. I can try to find some time to compile a list of commands which make persistent changes to objects.
User avatar
Lilit Ager
 
Posts: 3444
Joined: Thu Nov 23, 2006 9:06 pm

Post » Fri Nov 26, 2010 6:23 am

Nope, he used the OBSE function SetGoldValue - but I guess the reason is that the implementation of SetGoldValue calls the same internal functions as SetItemValue.
Yes, that's what I ment. ;)
User avatar
Manuela Ribeiro Pereira
 
Posts: 3423
Joined: Fri Nov 17, 2006 10:24 pm

Post » Thu Nov 25, 2010 7:18 pm

Some OBSE functions can operate on a variety of object types but the parameter types Oblivion's scripting system allows are somewhat restrictive. There is no generic "object" parameter type so functions like SetName, which can take any named object, are defined as taking an inventory object. The upshot of this is that you can pass an inventory object to that function directly, but will get a compiler error trying to pass in some other type of object (like an actor) unless it's stored in a ref variable. The vast majority of affected commands use Inventory Object because it's the closest OB has to a "generic object" param type.
As long as this is clear in the function's description (as is in SetName's desrcription) all is clear. Maybe the Function Calling Conventions section should then make clear that :
base = ref.getBaseObjectdoSomething base
is there for those that do not get the difference between a base record and a generic record (reference) - and not because one has to actually serve the base record wrapped in an rVar. If one must use an rVar then the function description must say so (as in SetName) - and if the compiler says so too, :celebrate:

I can't think of any situation where the calling ref would be required to be in a reference variable.
An urban legend then :)
EDIT : there are some functions that require a refVar (as opposed to an editorID which some (99.9%) persistent references have) - but this seems clear from the docs
        (valid:bool) IsFormValid refVar:var

Scripts should use editorIDs, not integer formIDs. FormIDs are of use in the console; any OBSE command that works from the console will accept them.
I know - just curious - the obse functions that can be used from the console do clearly state this in their description, don't they? Would be nice to have them listed someplace.
Thanks indeed for clarifying all this.
I still do wander if there is an isRemoved function (method) - and I believe the docs on isFormValid should be a little more anolytic.
Thanks again :)
User avatar
Juliet
 
Posts: 3440
Joined: Fri Jun 23, 2006 12:49 pm

Post » Thu Nov 25, 2010 11:43 pm

I think I have found a bug that leads to savegame bloat of un-referenced arrays - or I have misunderstood how array cleanup works, which isn't too unlikely :P

Below are a few lines of a Function script:
let ar := GetTileChildren "map_background\map_contents_3_4_5\map_log_window\map_log_window_pane" 1023...ForEach ar <- qd[2] ...Loop

What happens is that the first array that ar refers to (the result of GetTileChildren) does not get destroyed, but gets added to the .obse co-save file for each time this function reaches the "ForEach" line. By adding a "let ar := ar_Null" between the two, the bloat goes away.

Is this intended behaviour, or is it something you need to look at? Is it maybe possible that an array_var that already refers to an array when it gets used on the left side of a ForEach, doesn't get its reference count reduced?

And yes, I use the latest version of OBSE.


Yes, that's what I ment. ;)
OK, I see it now :)
User avatar
Tracey Duncan
 
Posts: 3299
Joined: Wed Apr 18, 2007 9:32 am

Post » Fri Nov 26, 2010 8:37 am

Ex: MessageBoxEx was created in order to allow string_vars in message boxes, and with OBSE18, a string_var can be "converted" to string by using the "$". But MessageBoxEx has another, very important advantage compared to MessageBox - that it can be used to create varying number of buttons. I have messageboxes where the number of buttons is dependent on some variables, and for this MessageBox is no alternative to MessageBoxEx.
Speaking of deprecated functions, isKeyPressed is another one that shouldn't be. To my knowledge, it is the only input function that catches mouse button presses before that game does.
User avatar
KiiSsez jdgaf Benzler
 
Posts: 3546
Joined: Fri Mar 16, 2007 7:10 am

Post » Fri Nov 26, 2010 2:47 am

Is it possible to get a SaveExists function to go along with LoadGameEx? The latter seems to display the "savegame is corrupt" message when the save does not exists. I tried using FileExists but that only works for the Oblivion install folder, not the My Games\Oblivion folder
User avatar
Darlene Delk
 
Posts: 3413
Joined: Mon Aug 27, 2007 3:48 am

Post » Fri Nov 26, 2010 4:36 am

Speaking of deprecated functions, isKeyPressed is another one that shouldn't be. To my knowledge, it is the only input function that catches mouse button presses before that game does.


Adding MessageEx to the list, because it's required for http://www.obse.silverlock.org/obse_command_doc.html#SetMessageSound.
Or is this just an Error in Documentation and a normal Message will be "Iconed" and play a sound?
User avatar
Prisca Lacour
 
Posts: 3375
Joined: Thu Mar 15, 2007 9:25 am

Post » Thu Nov 25, 2010 6:50 pm

Is the page working for everyone? Any suggestions for improvements (other than the ones put forward already re: deprecated functions and functions that make persistent changes)? Would people like the document broken up over several pages or left as it is? How about the navigation? Would people like 'TOC' links every so often for returning to the table of contents at the top?

The consensus appears to be that some of the deprecated functions are still useful, so perhaps the descriptions should provide examples of where they might still be required and areas where they are, in fact, deprecated and should be avoided. In other words, which particular usage is deprecated and which is still allowed. Any functions which are totally deprecated can then be moved to the Deprecated section at the end of the document to prevent them from cluttering up the rest of the document and functions which are only partially deprecated can have deprecation status applied only to specific usage which can be appropriately marked up.

@Scruggsy: Whenever you have the list ready, just pass it along with the text you'd like to appear and I'll update the page. Also, if you want to reconstruct the listings for any deprecated functions you want added back in you can send those along, too. I don't feel competent to write these at this point. If you are happy with the document, of course, you can always just copy the page on truancyfactory and update it directly for silverlock. You'll need a copy of the stylesheet, though.

Edit: Dibs on the claim for making the first web site mod! :D
User avatar
Talitha Kukk
 
Posts: 3477
Joined: Sun Oct 08, 2006 1:14 am

Post » Thu Nov 25, 2010 7:50 pm

Would people like the document broken up over several pages or left as it is? How about the navigation? Would people like 'TOC' links every so often for returning to the table of contents at the top?
My vote : left as it is (and no images, external sheets etc so it saves as a single file). Very handy for checking multiple functions and having it open in one tab. Actually broken up = broken, lol. No toc links, one can always press Home. The more minimal the better.
User avatar
Danial Zachery
 
Posts: 3451
Joined: Fri Aug 24, 2007 5:41 am

Post » Fri Nov 26, 2010 5:00 am

My vote : left as it is (and no images, external sheets etc so it saves as a single file). Very handy for checking multiple functions and having it open in one tab. Actually broken up = broken, lol. No toc links, one can always press Home. The more minimal the better.

Good point about the external style sheet. That can be incorporated into the main document header. Thanks for the feedback.
User avatar
Alexis Estrada
 
Posts: 3507
Joined: Tue Aug 29, 2006 6:22 pm

Post » Thu Nov 25, 2010 6:43 pm

I've encountered a CTD problem when running OBSE 0018.

The problem occurs with the script in MannimarcoRevisited.esp from Mannimarco Revisited that fires when you take the robe off of Mannimarco's body (I believe the script is aMiltKOWRobesAbilityScript). The script causes an animation sequence in which the body rises from the ground and then dissolves.
(Edit: note this mod does not require OBSE).

When running OBSE 18 I consistently get a CTD at the point where the purple smoke appears and the body dissolves.

After trying various things, I first tried running the normal Oblivion.exe rather than the OBSE wrapper/launcher and loaded a save right before taking the robe. I get a warning from COBL about OBSE not running (expected), then take the robe and the animation sequence finishes normally without a CTD.

Next I tried reverting to OBSE 17. I got a warning from COBL about reverting to an older version of OBSE (expected), then take the robe and the animation sequence finishes normally without a CTD.

So it appears this problem is a specific conflict resulting when running OBSE 18.

At the moment I'm just doing various testing with my mod list so this was just a test scenario/game I was running so I don't mind further breaking things if you need me to try something else. :)
User avatar
Ysabelle
 
Posts: 3413
Joined: Sat Jul 08, 2006 5:58 pm

Post » Thu Nov 25, 2010 7:44 pm

So, what's up with this silliness? http://www.tesnexus.com/downloads/file.php?id=31437

edit: All gone now.
User avatar
Ludivine Dupuy
 
Posts: 3418
Joined: Tue Mar 27, 2007 6:51 pm

Post » Thu Nov 25, 2010 9:08 pm

Nevermind. An upload of the 18/6 beta that someone was literally recommending over the final, stable 18 has been removed from TES Nexus.
User avatar
Abi Emily
 
Posts: 3435
Joined: Wed Aug 09, 2006 7:59 am

Post » Thu Nov 25, 2010 8:16 pm

I've encountered a CTD problem when running OBSE 0018.

See what happens when you disable every other mod, but still launch with OBSE 0018.
User avatar
Sweet Blighty
 
Posts: 3423
Joined: Wed Jun 21, 2006 6:39 am

Post » Thu Nov 25, 2010 10:50 pm

See what happens when you disable every other mod, but still launch with OBSE 0018.


OK, so I disabled everything except Oblivion.esm and MannimarcoRevisited.esp then started a new game and used console to go to that location and kill Mannimarco, then took the robe.. Behavior with OBSE 0018 is the same, i.e. it CTDs when that script runs every time. With 0017 it's fine.
User avatar
Czar Kahchi
 
Posts: 3306
Joined: Mon Jul 30, 2007 11:56 am

Post » Fri Nov 26, 2010 2:20 am

Hey scruggy, I recall you making a small OBSE plugin that removed certain ingame messages. I can't seem to find it on TESNexus or anywhere else, is my memory failing me or am I just missing it? Ofcourse if someone else knows what I'm talking about then they can anwser too. ;)

P.S. Would it be possible to disable the equip/unequip messages for hotkey items? Or was that also part of the formentioned plugin? :unsure:

-kyoma
User avatar
amhain
 
Posts: 3506
Joined: Sun Jan 07, 2007 12:31 pm

Post » Thu Nov 25, 2010 7:49 pm

Hey scruggy, I recall you making a small OBSE plugin that removed certain ingame messages. I can't seem to find it on TESNexus or anywhere else, is my memory failing me or am I just missing it? Ofcourse if someone else knows what I'm talking about then they can anwser too. ;)

P.S. Would it be possible to disable the equip/unequip messages for hotkey items? Or was that also part of the formentioned plugin? :unsure:

-kyoma
Expanded hotkeys and spell delete (my all times favourite "meta-mod") - had an Expanded hotkeys brief equip message.esp bundled with it.
:shrug:
User avatar
daniel royle
 
Posts: 3439
Joined: Thu May 17, 2007 8:44 am

Post » Fri Nov 26, 2010 9:55 am

Hey scruggy, I recall you making a small OBSE plugin that removed certain ingame messages. I can't seem to find it on TESNexus or anywhere else, is my memory failing me or am I just missing it? Ofcourse if someone else knows what I'm talking about then they can anwser too. ;)

P.S. Would it be possible to disable the equip/unequip messages for hotkey items? Or was that also part of the formentioned plugin? :unsure:

-kyoma
SpamMustDie, 'twas called. It nops out the individual calls to the QueueUIMessage (or patches a few conditional jumps, can't remember) function in the Add/Equip commands (and their alternatives). Assuming hot-key equipping goes through the same channels, it should be handled too.
User avatar
Lakyn Ellery
 
Posts: 3447
Joined: Sat Jan 27, 2007 1:02 pm

Post » Fri Nov 26, 2010 12:25 am

Add sv_construct to non deprecated functions - any other way to do :
		let svVar := sv_construct "%z" svText

cause let svVar := svText would make both vars point to the same string, no ?
User avatar
joannARRGH
 
Posts: 3431
Joined: Mon Mar 05, 2007 6:09 am

Post » Thu Nov 25, 2010 10:02 pm

SpamMustDie, 'twas called. It nops out the individual calls to the QueueUIMessage (or patches a few conditional jumps, can't remember) function in the Add/Equip commands (and their alternatives). Assuming hot-key equipping goes through the same channels, it should be handled too.
Got a download link somewhere?
User avatar
Riky Carrasco
 
Posts: 3429
Joined: Tue Nov 06, 2007 12:17 am

Post » Fri Nov 26, 2010 8:29 am

Add sv_construct to non deprecated functions - any other way to do :
		let svVar := sv_construct "%z" svText

cause let svVar := svText would make both vars point to the same string, no ?


Using
let svVar := $svText

should also result in two different strings.


Anyway, sv_Construct is the easiest way to get the string-version of a number with a specific format, e.g.:
let sv_var := ( sv_Construct "%.04f", fNumber )

User avatar
Devils Cheek
 
Posts: 3561
Joined: Sun Aug 13, 2006 10:24 pm

Post » Thu Nov 25, 2010 7:55 pm

OK, so I disabled everything except Oblivion.esm and MannimarcoRevisited.esp then started a new game and used console to go to that location and kill Mannimarco, then took the robe.. Behavior with OBSE 0018 is the same, i.e. it CTDs when that script runs every time. With 0017 it's fine.

Does this crash happen 100% of the time for you? I tried 30 or so times, and only managed to get it to crash once, somewhere inside NetImmerse. At that point I was running fullscreen, with the 0018 release dll. I also tried a locally compiled copy in both windowed and fullscreen modes, plus a few tries without OBSE. Since the crash happened on the second time I guessed it would keep happening, so I didn't look in to it in detail when I had the chance, unfortunately.

edit: the crash occurred right as the body disappeared, fwiw
User avatar
TRIsha FEnnesse
 
Posts: 3369
Joined: Sun Feb 04, 2007 5:59 am

Post » Thu Nov 25, 2010 11:21 pm

The "MannimarcoRevisited.esp" (the esp with chargen bug fix) has a script error - script: aaMannimarcoFixScript too much "endif"
Don't know if this is the reason for the ctd.
User avatar
xx_Jess_xx
 
Posts: 3371
Joined: Thu Nov 30, 2006 12:01 pm

PreviousNext

Return to IV - Oblivion