[RELz] Oblivion Script Extender (OBSE) 0019

Post » Mon Nov 01, 2010 10:58 pm

I don't know of any other methods right now, sorry.


Thank you for the answer. If ToggleSpecialAnim to Player could be used effectively, I was examining using it for battle animation MOD which I am creating now.
At present, about Player, I will treat as function restriction.
And if possible, I expect that near future Update3d will become effective also in Player.
User avatar
Ebou Suso
 
Posts: 3604
Joined: Thu May 03, 2007 5:28 am

Post » Mon Nov 01, 2010 8:57 am

Ok, I finally took a look at the LockPickMenu and how it handles clicks and I have some good results. While the normal virtual function (HandleClick) doesn't exist for the LockPickMenu there is a different, almost equal, virtual function that seems to be used instead. Which is: Unk_02, testing indicates it works pretty much the same as HandleClick.

So if, somewhere in the future, this could be added to ClickMenuButton I, and others too ofcourse, can benefit from button-control for the LockPickMenu. :)

-kyoma
User avatar
Tessa Mullins
 
Posts: 3354
Joined: Mon Oct 22, 2007 5:17 am

Post » Mon Nov 01, 2010 11:26 pm


For some reason I can't get OBSEArrayInterface::GetElement to work. The element always has a kType_Numeric and the value seems to be 1. Here's my full code, cs snippet and console output.

-kyoma


***Attention OBSE developers***

I think I've found the bug. In OBSE's ArrayVar.cpp in the GetElement function on line 1590 there is the line

out = InternalElemToPluginElem(*data, out);

it should be just (as it is in the GetElements function)

InternalElemToPluginElem(*data, out);

That's why you're getting a value of 1 all the time. The out variable is supposed to return (by reference) the element from this function, however it's then being assigned the return value of the function instead, which is always true, hence 1.

I made this change and recompiled OBSE, and your code snippet now works as expected.
User avatar
Guy Pearce
 
Posts: 3499
Joined: Sun May 20, 2007 3:08 pm

Post » Mon Nov 01, 2010 1:47 pm

Another player (semicolon) and I have just discovered another bug with OBSE 19: stolen ingredients don't stack! Very odd and I can't say if it happens with other stolen items, but I stole three swamp tentacles and had three separate stolen swamp tentacles in my inventory instead of a stack of 3. I don't recall it doing this before... Semicolon had the same thing happen with apples. If he switches back to OBSE 18, everything is fine.
User avatar
Cesar Gomez
 
Posts: 3344
Joined: Thu Aug 02, 2007 11:06 am

Post » Mon Nov 01, 2010 7:05 pm

I too have noticed that with stolen ingredients Andalaybay. I was wondering where it was coming from. Indeed you are correct. I had 4 stolen Skyrim Cheese(Cobl) and they did not stack. As soon as I swapped them around in my various ingredient pouches and storage sacks the stolen status was removed, and they stacked afterward.
User avatar
JUan Martinez
 
Posts: 3552
Joined: Tue Oct 16, 2007 7:12 am

Post » Mon Nov 01, 2010 8:03 pm

Quick question. What's the best way to call an obse script command from within an obse plugin?

Edit: Just to clarify, is the OBSECommandTableInterface for calling all obse commands, or is it primarily for calling commands from other obse plugins (or both). It's just I'm only new to digging into obse plugins, and wasn't sure if calling obse commands was possible some other way prior to v19, as, if I've got this right, the OBSECommandTableInterface is new to v19.
User avatar
Assumptah George
 
Posts: 3373
Joined: Wed Sep 13, 2006 9:43 am

Post » Mon Nov 01, 2010 10:25 pm

Quick question. What's the best way to call an obse script command from within an obse plugin?

Edit: Just to clarify, is the OBSECommandTableInterface for calling all obse commands, or is it primarily for calling commands from other obse plugins (or both). It's just I'm only new to digging into obse plugins, and wasn't sure if calling obse commands was possible some other way prior to v19, as, if I've got this right, the OBSECommandTableInterface is new to v19.

OBSECommandTableInterface provides access to all commands, whether defined by the game, OBSE, or a plugin.
And if possible, I expect that near future Update3d will become effective also in Player.

Ok, I've updated it to work when called while the player is in third person view. It does not affect his 1st person skeleton.
Ok, I finally took a look at the LockPickMenu and how it handles clicks and I have some good results. While the normal virtual function (HandleClick) doesn't exist for the LockPickMenu there is a different, almost equal, virtual function that seems to be used instead. Which is: Unk_02, testing indicates it works pretty much the same as HandleClick.

So if, somewhere in the future, this could be added to ClickMenuButton I, and others too ofcourse, can benefit from button-control for the LockPickMenu. :)

Thanks, I'll have to look into the code to determine how the two functions differ.
***Attention OBSE developers***

Yep, that's it. Thanks.
Another player (semicolon) and I have just discovered another bug with OBSE 19: stolen ingredients don't stack! Very odd and I can't say if it happens with other stolen items, but I stole three swamp tentacles and had three separate stolen swamp tentacles in my inventory instead of a stack of 3. I don't recall it doing this before... Semicolon had the same thing happen with apples. If he switches back to OBSE 18, everything is fine.

Ok.
User avatar
asako
 
Posts: 3296
Joined: Wed Oct 04, 2006 7:16 am

Post » Mon Nov 01, 2010 11:34 pm

Ok, I've updated it to work when called while the player is in third person view. It does not affect his 1st person skeleton.


It is wonderful! Many thanks! I am satisfactory if effective in 3PV.
I am looking forward to the next update.
User avatar
Blessed DIVA
 
Posts: 3408
Joined: Thu Jul 13, 2006 12:09 am

Post » Mon Nov 01, 2010 12:36 pm

I suppose there's some issue with updating the first person version? Do meshes of things equipped by the player that are visible in 1st person (gloves/gauntlets, weapons, shields) that get refreshed in third person "revert" when you go back to 1st?
User avatar
RUby DIaz
 
Posts: 3383
Joined: Wed Nov 29, 2006 8:18 am

Post » Mon Nov 01, 2010 8:12 pm

Thanks, I'll have to look into the code to determine how the two functions differ.
Cool thanks, one more question. What exactly is the reserved opcode range for MenuQue? I think it would be 0x25D0 to 0x25FF but I wanna be sure I'm not gonna conflict. :unsure:
User avatar
Jade MacSpade
 
Posts: 3432
Joined: Thu Jul 20, 2006 9:53 pm

Post » Mon Nov 01, 2010 6:47 pm

(ClearHotkey: an error on this http://cs.elderscrolls.com/constwiki/index.php/ClearHotkey: (nothing) ClearHotkeyItem whichHotkey:short)
User avatar
Tamika Jett
 
Posts: 3301
Joined: Wed Jun 06, 2007 3:44 am

Post » Mon Nov 01, 2010 10:26 pm

As always OBSE is spectacular. Thank you. I have a couple of questions and a request:

1. Why is the OBSE dev team not on the front cover of PC & Tech magazines? You guys are awesome! (butter butter butter)

2. Does the OBSE mods list ever get updated anymore? I realize their are probably a googolplex of OBSE mods out there so updating them all into the list is pretty extreme. But what if we submitted OBSE mods to you for the list?

Is it possible to implement a feature for the player that is similar or identical to the function: GetCombatTarget ? It's been a real pain trying to accurately find out the PC's current combat reference(s). If a feature like this does become available, how do we handle multiple references in combat with the Player?

Thanks for everything! :)
User avatar
Jessie Butterfield
 
Posts: 3453
Joined: Wed Jun 21, 2006 5:59 pm

Post » Mon Nov 01, 2010 8:10 pm

I suppose there's some issue with updating the first person version? Do meshes of things equipped by the player that are visible in 1st person (gloves/gauntlets, weapons, shields) that get refreshed in third person "revert" when you go back to 1st?


There is not much point in updating the 1st person View as ToggleSpecialAnim does not effect 1st person at so it never needs to be updated.
User avatar
Cameron Wood
 
Posts: 3384
Joined: Wed Oct 31, 2007 3:01 pm

Post » Mon Nov 01, 2010 9:25 am

Is it possible to implement a feature for the player that is similar or identical to the function: GetCombatTarget ? It's been a real pain trying to accurately find out the PC's current combat reference(s). If a feature like this does become available, how do we handle multiple references in combat with the Player?

I'm no expert on this, but I don't think the player has a combat target. Combat targets are really an AI thing; it only makes sense for non-player actors to have one.

The player does have a well-defined "health bar target" (0x00B3B364) - the actor whose health is shown in the health bar element around the targeting cursor. This might be the closest you can get to knowing who the player is attacking at a given time.
User avatar
Ridhwan Hemsome
 
Posts: 3501
Joined: Sun May 06, 2007 2:13 pm

Post » Mon Nov 01, 2010 12:34 pm

Is it possible to implement a feature for the player that is similar or identical to the function: GetCombatTarget ? It's been a real pain trying to accurately find out the PC's current combat reference(s). If a feature like this does become available, how do we handle multiple references in combat with the Player?

Heh, is OBSE supposed to become psychic and telepathically check who the player is thinking of attacking? :goodjob: Yeah, that one's impossible because it's basically undefined. The CombatTarget for NPCs comes from their artificial intelligence; to get the same thing for the player we'd have to be able to read his or her mind....

Your best bet is to either use GetCrosshairRef to get who they're looking at, or some form of hit detection to keep track of the last person that they hit. Or just affect everyone who considers the player his or her combat target.

There is not much point in updating the 1st person View as ToggleSpecialAnim does not effect 1st person at so it never needs to be updated.

Uhh... yes, there are - if you want to update the meshes that are equipped to the player that are visible in first person. Most notably the weapon, but possibly also important for the shield/gloves/gauntlets.
User avatar
John N
 
Posts: 3458
Joined: Sun Aug 26, 2007 5:11 pm

Post » Mon Nov 01, 2010 10:20 am

Heh, is OBSE supposed to become psychic and telepathically check who the player is thinking of attacking? :goodjob: Yeah, that one's impossible because it's basically undefined. The CombatTarget for NPCs comes from their artificial intelligence; to get the same thing for the player we'd have to be able to read his or her mind....

Your best bet is to either use GetCrosshairRef to get who they're looking at, or some form of hit detection to keep track of the last person that they hit. Or just affect everyone who considers the player his or her combat target.


Hey, I'm not expecting miracles. Just thinking of maybe a function can say like you said get all references of actors in combat with the player at once, then have some way of sorting them out. Maybe by distance closest to the player.

I don't know exactly, like I said I don't expect miracles. I don't expect anything from any modder really. Just curious and willing to poke around to see if some idea could be formulated.

It is in reference to this discussion: http://www.gamesas.com/index.php?/topic/1134319-reqz-conjuration-ai-fix/

Basically we are trying to figure out how to get the actors in combat with the player to attack the player instead of the player's summoned creature. The hard part if trying to do this without the player or actor coming in contact with each other (no hits by either).
User avatar
biiibi
 
Posts: 3384
Joined: Sun Apr 08, 2007 4:39 am

Post » Mon Nov 01, 2010 8:29 am

Uhh... yes, there are - if you want to update the meshes that are equipped to the player that are visible in first person. Most notably the weapon, but possibly also important for the shield/gloves/gauntlets.


Having a problem with unequip/equip ? -> though I do see your point of wanting an all in one command that can update every model at once.
User avatar
Shaylee Shaw
 
Posts: 3457
Joined: Wed Feb 21, 2007 8:55 pm

Post » Mon Nov 01, 2010 9:02 pm

Having a problem with unequip/equip ? -> though I do see your point of wanting an all in one command that can update every model at once.

If you unequip/equip a drawn weapon, the character has to redraw it from its sheathe - not exactly seamless, and a serious problem if mid-combat.
User avatar
Jamie Lee
 
Posts: 3415
Joined: Sun Jun 17, 2007 9:15 am

Post » Mon Nov 01, 2010 8:24 pm

Hi,

I think I have discovered a couple of bugs, or at least one bug and one quirk with OBSEv19.

The most serious first:

In HUD Status Bars, I have the following code that is called if GetGameLoaded returns true:

	RemoveEventHandler "OnHit" HUDfindCurrentEnemy		RunBatchScript "Data\ini\HUD Status Bars.ini"	...		if tnoHSB.trackEnemy		DebugPrint "HSB:Need to track current enemy"		SetEventHandler "OnHit" HUDfindCurrentEnemy object::PlayerRef	endif

The reading of the ini file initates a few functions, one of them detecting if an event handler is neeed, by setting tnoHSB.trackEnemy. Now, as you may see, this script will call RemoveEventHandler once per savegame load, even if SetEventHandler has never been called. From the docs, it seems OK, and ingame it works fine too.

But that's as long as HSB is the only loaded mod that uses event handlers. I got report of freeze if HSB was used with Class Advantages, so I checked out CA and found that it has a GetGameReloaded block that adds 4 or 5 event handlers, all but one of them "OnHit" handlers with no filter at all. And what happens is that if HSB's RemoveEventHandler line is called after CA has added event handlers, the RemoveEventHandler causes instant freeze. E.g.:

Ex 1:
1. Start game and load first savegame
2. CA is initialized and adds its event handlers
3. HSB is initalized and calls RemoveEventHandler, causing instant freeze

Ex 2:
1. Start game and load first savegame
2. HSB is initalized and calls RemoveEventHandler, then adds event handler
3. CA is initialized and adds its event handlers
4. Game works OK
5. A savgeame is loaded
6. HSB's GetGameLoaded is called, thus calling RemoveEventHandler while CA's event handlers are in place - causing instant freeze

I also checked this with Skycaptain and his Deadly Reflex 6 which adds event handlers, and HSB's RemoveEventHandler line causes freeze there too. I of course rewrote the code to add one event handler in the GetGameRestarted block that I never removed, which fixed the problem for me (and next version of HSB), but I guess this can cause more problems in the future.


The second, less serious is GetBarterItem again :) It turns out that when activating a trade, when the quantity menu gets opened, GetBarterItem continues to return correct item if the trade was initiated with the mouse, but starts returning 0 if initiated with the keyboard. I also think (from reports) that it sometimes return 0 when the quantiry menu gets opened even if the mouse is used, but I wasn't able to re-cerate this myself. But I was able to work around it, by using one help variable tht I set to the value of GetBarterItem, but only if GetBarterItem returns a real formId, and use that variable when the quantity menu gets opened. So the function is useful to me, but the documenation should probably say that it cannot be trusted when the quantity menu is open.
User avatar
Dan Endacott
 
Posts: 3419
Joined: Fri Jul 06, 2007 9:12 am

Post » Mon Nov 01, 2010 8:39 pm

Docu-stuff: Sigil Stones are missing their qualities list. I assume it should be Inventory, Named, Magic, Scriptable, Simple?

In particular, I hope they're legitimate members of the Magic quality so far as OBSE's commands are concerned; but I'm uncertain because in other places there's an explicit list which doesn't include them (Alchemy, Enchantment, Ingredient, Spell). Should all the EI-related commands work, or should I be looking out for certain exceptions, or are they just off-limits to the category?
User avatar
Genocidal Cry
 
Posts: 3357
Joined: Fri Jun 22, 2007 10:02 pm

Post » Mon Nov 01, 2010 10:51 am

Docu-stuff: Sigil Stones are missing their qualities list. I assume it should be Inventory, Named, Magic, Scriptable, Simple?

In particular, I hope they're legitimate members of the Magic quality so far as OBSE's commands are concerned; but I'm uncertain because in other places there's an explicit list which doesn't include them (Alchemy, Enchantment, Ingredient, Spell). Should all the EI-related commands work, or should I be looking out for certain exceptions, or are they just off-limits to the category?

Sigil stones are not, in fact, magic items. They are 'misc' items that happen to have a list of magic effects as an extra property. They can't be cast or activated like a true magic item.

Even so, they seem to work with many (all?) of the EI-related commands due to some clever coding behind the scenes.
User avatar
Sakura Haruno
 
Posts: 3446
Joined: Sat Aug 26, 2006 7:23 pm

Post » Mon Nov 01, 2010 9:42 pm

My save games consist of three files:
player.ess
player.obse
player.pluggy

With a clean char save [L1], If I restore only the player.ess, will the other two be recreated successfully? Or will I lose important data?
User avatar
Lil Miss
 
Posts: 3373
Joined: Thu Nov 23, 2006 12:57 pm

Post » Mon Nov 01, 2010 8:58 am

That depends entirely on whether or not any mods you're running have saved things to the .obse or .pluggy file. But worst comes to worst, OBSE and Pluggy will create new, empty co-save files, which can be used from then on.
User avatar
James Shaw
 
Posts: 3399
Joined: Sun Jul 08, 2007 11:23 pm

Post » Mon Nov 01, 2010 8:02 pm

That depends entirely on whether or not any mods you're running have saved things to the .obse or .pluggy file. But worst comes to worst, OBSE and Pluggy will create new, empty co-save files, which can be used from then on.
Ok. Thanks!
User avatar
Josee Leach
 
Posts: 3371
Joined: Tue Dec 26, 2006 10:50 pm

Post » Mon Nov 01, 2010 10:36 am

Even so, they seem to work with many (all?) of the EI-related commands due to some clever coding behind the scenes.

Handy. Do you know off-hand if CopyAllEffectItems is among those? Likewise for your OBME override comands?

I'm guessing effects after the first two would just be ignored. Should probably test that out if nobody knows, though...
User avatar
Suzie Dalziel
 
Posts: 3443
Joined: Thu Jun 15, 2006 8:19 pm

PreviousNext

Return to IV - Oblivion