[RELz] Oblivion Script Extender (OBSE) 0020

Post » Wed Mar 30, 2011 4:55 am

I'm just after the correct name being displayed. Currently I'm changing all the strings directly (sDayFredas, sDayLoredas , etc.), but as some mods change these values also, it's not very compatible.

Have you tried using SetMenuStringValue to change the name of the day displayed in the SleepWait menu?
I think you should be able to use that command to modify the text associated with sleep_background\game_info_1.
User avatar
Laura
 
Posts: 3456
Joined: Sun Sep 10, 2006 7:11 am

Post » Wed Mar 30, 2011 4:06 am

Have you tried using SetMenuStringValue to change the name of the day displayed in the SleepWait menu?
I think you should be able to use that command to modify the text associated with sleep_background\game_info_1.


I do indeed modify the sleep menu (for other reasons), but I'm guessing it's also used in other locations within the game (if only in other mods). Unless it severely breaks something, I would much more prefer to just set the day using the SetDayOfWeek function and not have to worry about changing strings everywhere. It would also make it compatible with GetDayOfWeek and be a whole lot easier of course.
User avatar
James Shaw
 
Posts: 3399
Joined: Sun Jul 08, 2007 11:23 pm

Post » Wed Mar 30, 2011 1:01 am


We have LoadGame, SaveGame, and OnNewGame events - will those do the trick?



According to the manual, the LoadGame function requires a string? Meaning I would in turn need a commands to get the NAME of the current save game? I think that would be making things harder. I just need some solution. An event that occurs THE MOMENT any game begins, and never again until the NEXT time that happens.
User avatar
Elizabeth Lysons
 
Posts: 3474
Joined: Fri Feb 02, 2007 7:16 am

Post » Wed Mar 30, 2011 1:26 am

According to the manual, the LoadGame function requires a string? Meaning I would in turn need a commands to get the NAME of the current save game? I think that would be making things harder. I just need some solution. An event that occurs THE MOMENT any game begins, and never again until the NEXT time that happens.
The string is not required.
If you specify the name of a savegame, the event only trigger any time you load that savegame.
If you don't specify any argument, the event will trigger any time you load a savegame, no matter the name.

You can also use "GetGameLoaded" inside a gamemode block:
It return true only the first time it's called after a load/new game
Any next call will return false until you load a savegame (also the same savegame) or start a new game.
Begin GameMode	If (GetGameLoaded)		;DO WHATEVER YOU WANT: RUN ONCE AFTER A LOAD/NEW GAME	EndIfEnd
There is also "GetGameRestarted": it act similar to GetGameLoaded. It return true the first time it's called after you run Oblivion. Any next call will return false until you exit and run again Oblivion.
User avatar
Pumpkin
 
Posts: 3440
Joined: Sun Jun 25, 2006 10:23 am

Post » Wed Mar 30, 2011 2:44 am

Huh? Wow really? So OBSE CAN DO IT!?

:twirl:

But, I am not sure what you mean by asking me about "get the game to load an animation from disk"
I need the function to work on vanilla animations as well as custom ones.

Like this:

if me.isattacking && CheckOnce == 0
set CheckOnce to 1
set Var to me.GetDurationOfCurrentAnamation
messageboxex"%N attack animation will run for %.2f seconds."Me Var
endif



We have access to this info for loaded animations, some of which we've already decoded. We can get the game to load an animation from disk as well - do you expect to need that, or will you be working with animations that are already in use?

User avatar
Oceavision
 
Posts: 3414
Joined: Thu May 03, 2007 10:52 am

Post » Wed Mar 30, 2011 10:38 am

hey am I doing this right?

;;;;;;;;;; Health check not including magic health buffs or drainslet tmpFloat := me.GetTotalAENonAbilityMagnitude FOHElet tmpfloat -= me.GetTotalAENonAbilityMagnitude DRHEset CurHealth to ( me.getav health - tmpfloat )if Helathlog > CurHealth   messagebox"health damage from physical attack"endif;;;;;;;;;; Health log not including magic health buffs or drainslet tmpFloat := me.GetTotalAENonAbilityMagnitude FOHElet tmpfloat -= me.GetTotalAENonAbilityMagnitude DRHEset healthlog to ( me.getav health - tmpfloat )


I want to check for health drop (from a fist/arrow/weapon attack) but not if the health drops because of a health buff timing out
nor from poison or other magic attacks.

If I want to include magic or poison attacks I only need to remove "let tmpfloat -= me.GetTotalAENonAbilityMagnitude DRHE" right?
I am not sure yet if I want to include the magic or poison attacks at this time.
User avatar
Roddy
 
Posts: 3564
Joined: Fri Jun 15, 2007 11:50 pm

Post » Wed Mar 30, 2011 5:52 am

Is it possible to get a SetBaseActorValue-function (or adding the "base"-modifier the AddActorValues-commands have to Get/Set/ModAVMod©)?
Or do we already have such a thing?
*don't want to use SetActorValue ( newValue + ( GetActorValue ) - ( GetBaseActorValue ) ) or sth. equal with GetAVMod*
User avatar
мistrєss
 
Posts: 3168
Joined: Thu Dec 14, 2006 3:13 am

Post » Wed Mar 30, 2011 10:50 am

I'm in the process of tracking down some mods I think have conflicts with OBSE 20. Is there something I can do to test them?
User avatar
STEVI INQUE
 
Posts: 3441
Joined: Thu Nov 02, 2006 8:19 pm

Post » Wed Mar 30, 2011 6:16 am

Is there any difference in behavior in the GetOBSEVersion for Steam versions of Oblivion?
User avatar
Céline Rémy
 
Posts: 3443
Joined: Sat Apr 07, 2007 12:45 am

Post » Tue Mar 29, 2011 9:54 pm

Is there any difference in behavior in the GetOBSEVersion for Steam versions of Oblivion?


No, not as far as I know. My detection script has always worked for the Steam version too. Now if the player forgets to check off the in-game community setting, GetOBSEVersion will fail, but I think that detection script I sent along should take care of that too.
User avatar
Nick Pryce
 
Posts: 3386
Joined: Sat Jul 14, 2007 8:36 pm

Post » Tue Mar 29, 2011 11:46 pm

Hi all,

I've looked through the documentation, and I haven't found a generic Get/SetWeaponPoison function. I'm not looking for Get/SetEquippedWeaponPoison function--I'd like to get the poison on an unequipped inventory reference, and set the poison on a temporary inventory reference. The deprecated function GetCurrentValue looks like it could get the poison for me, but a) I still have no way of setting it that I know of, and B) I'd rather avoid using deprecated functions.

If such functions don't exist, are there any known workaround? Preferably something that can be accomplished within a single frame? Thank you!


[Addendum]

While I'm at it, is there a way to apply poison to a target? I was just going to create a drinkable poison-potion and force feed it to my victim, but since I'm asking anyway, I figure I might as well see if anyone knows a better way.
User avatar
Josh Sabatini
 
Posts: 3445
Joined: Wed Nov 14, 2007 9:47 pm

Post » Wed Mar 30, 2011 12:58 am

Why have you deprecated MessageBoxEX? It has advantages over MessageBox.

Do you plan on removing it entirely from OBSE? I prefer to use it, but if it will be absent from future releases, I need to get more familiar with MessageBox (Which is inferior to MessageBoxEX).
User avatar
John Moore
 
Posts: 3294
Joined: Sun Jun 10, 2007 8:18 am

Post » Tue Mar 29, 2011 10:52 pm

Do you plan on removing it entirely from OBSE? I prefer to use it, but if it will be absent from future releases, I need to get more familiar with MessageBox (Which is inferior to MessageBoxEX).
No function will ever be removed from OBSE. As to why it is deprecated, pretty much all functionality from MessageBoxEx can be reproduced using string(_vars) and $. Not to mention the compiler override which removes the need for temp variables all together.
User avatar
Bethany Watkin
 
Posts: 3445
Joined: Sun Jul 23, 2006 4:13 pm

Post » Tue Mar 29, 2011 11:13 pm

No function will ever be removed from OBSE. As to why it is deprecated, pretty much all functionality from MessageBoxEx can be reproduced using string(_vars) and $. Not to mention the compiler override which removes the need for temp variables all together.


Glad to hear it won't be removed.

What is this compiler override you speak of?
User avatar
Adrian Powers
 
Posts: 3368
Joined: Fri Oct 26, 2007 4:44 pm

Post » Tue Mar 29, 2011 11:24 pm

What is this compiler override you speak of?
http://obse.silverlock.org/obse_command_doc.html#Compiler_Override
User avatar
Amiee Kent
 
Posts: 3447
Joined: Thu Jun 15, 2006 2:25 pm

Post » Wed Mar 30, 2011 5:09 am

Ah, interesting.
User avatar
Lynette Wilson
 
Posts: 3424
Joined: Fri Jul 14, 2006 4:20 pm

Post » Tue Mar 29, 2011 9:12 pm

Question:

Can I use ModNthEffectItemDuration on a spell?
User avatar
Flash
 
Posts: 3541
Joined: Fri Oct 13, 2006 3:24 pm

Post » Tue Mar 29, 2011 9:57 pm

No function will ever be removed from OBSE. As to why it is deprecated, pretty much all functionality from MessageBoxEx can be reproduced using string(_vars) and $. Not to mention the compiler override which removes the need for temp variables all together.

Can one format numbers without using one of the format specifier commands? That was always my issue with the choice to mark the old, format-specifier-using functions deprecated...
User avatar
suzan
 
Posts: 3329
Joined: Mon Jul 17, 2006 5:32 pm

Post » Wed Mar 30, 2011 4:46 am

Can one format numbers without using one of the format specifier commands? That was always my issue with the choice to mark the old, format-specifier-using functions deprecated...
IIRC, use sv_Construct. Then again, sv_Construct is deprecated.
User avatar
Anthony Santillan
 
Posts: 3461
Joined: Sun Jul 01, 2007 6:42 am

Post » Wed Mar 30, 2011 6:45 am

Does GetArmor Type return 1 if wearing ALL heavy armor, and 0 if wearing ALL light armor? Or does one need to specify each individual slot?
User avatar
Floor Punch
 
Posts: 3568
Joined: Tue May 29, 2007 7:18 am

Post » Wed Mar 30, 2011 1:16 am

I've got a question for the "OBSE Gurus"

My mod Dynamic Leveled Lists can end up making a 10MB backup array if people have a lot of mods. I'm planning to cut down on that to reduce savetime, buut:

As of now, with my 10MB OBSE array setup, I experience what seem to be random freezeups.

They aren't associated with the DLL scripts running. There's only one that runs every 30 seconds, and it only does a few checks for stuff like if the game restarted, the player leveled up, etc. I also double checked and did some testing that proves the freezeups don't always align with when my script runs.

So, DLL seems to introduce freezeups of a few seconds even when there is no script running.

My hypothesis is this:
There is some other (OBSE?) process that might be doing "inventory" work on the OBSE data? If that's the case, then perhaps DLL is causing indirect freezeups as that process chokes on my 10MB array.

Is there any such OBSE process? Or anything similar that may be having issue with the fact that the OBSE portion of the save has 10MB of data? (other than the extended save/load times)

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

Anyway, I wanted to give you guys the information and see if you had any clues as to what may be causing these freezeups that come at random intervals.

Thanks in advance! 8)
User avatar
Johanna Van Drunick
 
Posts: 3437
Joined: Tue Jun 20, 2006 11:40 am

Post » Wed Mar 30, 2011 10:44 am

Where are the developers?
User avatar
Syaza Ramali
 
Posts: 3466
Joined: Wed Jan 24, 2007 10:46 am

Post » Tue Mar 29, 2011 11:12 pm

Does "GetEquippedObject" return if it's heavy or light armor, or just the equipment ID?

EDIT:

No, it returns the ObjectID.

I found a function that returns the slot type.
User avatar
rae.x
 
Posts: 3326
Joined: Wed Jun 14, 2006 2:13 pm

Post » Wed Mar 30, 2011 5:44 am

Where are the developers?

Hi!
But, I am not sure what you mean by asking me about "get the game to load an animation from disk"

When the game needs to play an animation, the animation may or may not be loaded in memory at that moment. If it isn't, the game has to load the animation from disk into memory before it can be played. Once an animation has been loaded into memory for the first time, it typically will remain in memory until for one reason or another the game needs to free up some memory for other things.
I guess a better question would have been: do you expect your scripts to be asking for information about an animation only when an actor is playing (or is about to play) that animation? For example, your script detects the player is performing an attack animation, and at that point you want to know the duration of the attack anim.
Or, do you want to be able to ask "what's the duration of attack_onehand.kf" whenever you want, regardless of whether or not it's currently in use by an actor?
Is it possible to get a SetBaseActorValue-function (or adding the "base"-modifier the AddActorValues-commands have to Get/Set/ModAVMod©)?
Or do we already have such a thing?
*don't want to use SetActorValue ( newValue + ( GetActorValue ) - ( GetBaseActorValue ) ) or sth. equal with GetAVMod*

I don't have the code in front of me right now - I need to go back and look at how the actor value modifiers work.
I'm in the process of tracking down some mods I think have conflicts with OBSE 20. Is there something I can do to test them?

First step would be to specify what is causing you to think there's a conflict - what unexpected behavior are you seeing with the mod, and does it appear to go away if you downgrade to 0019 or an 0020 beta?
I've looked through the documentation, and I haven't found a generic Get/SetWeaponPoison function.

You're right - they'd be useful and pretty trivial to add though.
While I'm at it, is there a way to apply poison to a target? I was just going to create a drinkable poison-potion and force feed it to my victim, but since I'm asking anyway, I figure I might as well see if anyone knows a better way.

Drinkable potion ought to work, but I can look into providing a command to do it (or more generally to apply a set of active effects directly to an actor).
Can I use ModNthEffectItemDuration on a spell?

Yes. Maybe the docs could probably use some work to make that clearer (effect item commands work on any type of object with the Magic quality, which includes spells and enchantments, but finding out which objects fit that description is currently not very straightforward).
Does GetArmor Type return 1 if wearing ALL heavy armor, and 0 if wearing ALL light armor? Or does one need to specify each individual slot?

GetArmorType isn't used with an actor. It takes an armor object and returns the type. There are vanilla commands for getting the equipped armor type, or you can use GetEquippedObject in conjunction with GetArmorType to determine the type of armor an actor is wearing.
I've got a question for the "OBSE Gurus"

My mod Dynamic Leveled Lists can end up making a 10MB backup array if people have a lot of mods. I'm planning to cut down on that to reduce savetime, buut:

As of now, with my 10MB OBSE array setup, I experience what seem to be random freezeups.

They aren't associated with the DLL scripts running. There's only one that runs every 30 seconds, and it only does a few checks for stuff like if the game restarted, the player leveled up, etc. I also double checked and did some testing that proves the freezeups don't always align with when my script runs.

So, DLL seems to introduce freezeups of a few seconds even when there is no script running.

My hypothesis is this:
There is some other (OBSE?) process that might be doing "inventory" work on the OBSE data? If that's the case, then perhaps DLL is causing indirect freezeups as that process chokes on my 10MB array.

Is there any such OBSE process? Or anything similar that may be having issue with the fact that the OBSE portion of the save has 10MB of data? (other than the extended save/load times)

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

Anyway, I wanted to give you guys the information and see if you had any clues as to what may be causing these freezeups that come at random intervals.

Thanks in advance! 8)

10MB sounds kind of extreme. Is this a single array containing plain data, or is it a big array containing lots of other arrays?
If you want to provide a link to the version of the mod exhibiting this problem I can take a look.
Does "GetEquippedObject" return if it's heavy or light armor, or just the equipment ID?

GetEquippedObject returns the formID of the item equipped in the specified slot. You can pass the returned item to GetArmorType to determine if it's light or heavy (or neither).
User avatar
Charlotte Henderson
 
Posts: 3337
Joined: Wed Oct 11, 2006 12:37 pm

Post » Wed Mar 30, 2011 11:03 am

GetEquippedObject returns the formID of the item equipped in the specified slot. You can pass the returned item to GetArmorType to determine if it's light or heavy (or neither).


Excellent, scruggsy! That's what I did, but was confused a little by the documentation. It says it returns the ObjectID. But I guess the ObjectID includes if it is heavy or light armor as well.

Thanks. :)
User avatar
Samantha Jane Adams
 
Posts: 3433
Joined: Mon Dec 04, 2006 4:00 pm

PreviousNext

Return to IV - Oblivion