Loding a widget within SkyUI HUD Framework

Post » Thu Sep 26, 2013 10:14 am

Hi all!

I noticed the HUD framework of SkyUI and wanted to give it a try (I know it's in beta state since it is not documented...). It is used by the active effects for some time now so it should be stable enough to play around. But there is one thing I don't get so far: The widget is not loaded for a new game, only when a saved game is loaded the widget shows up.

This is what I did: I created a widget quest like the SKI_ActiveEffectsWidgetInstance (so I set some data like the name on the quest data tab, added a PlayerAlias on the quest alias tab and added a script). The script extends SKI_WidgetBase and overrides GetWidgetSource and GetWidgetType. I also created a .swf file containing the widget itself including the actionscript stuff needed.

Since the widget shows up after loading a game I guess the .swf is correct. So I must have done something wrong for the quest or the papyrus script.

When creating a new game, I can see the following in skse.log:

WidgetLoader.as: loadWidget(a_widgetID = 0, a_widgetSource = skyui/activeeffects.swf)

After loading a savegame I get:

WidgetLoader.as: loadWidget(a_widgetID = 0, a_widgetSource = skyui/activeeffects.swf)WidgetLoader.as: loadWidget(a_widgetID = 1, a_widgetSource = HUDWidgetTest.swf)

Why isn't the second widget loaded for a new game? What am I doing wrong?

Digging through the widget framework code didn't help so far. I guess, the OnWidgetManagerReady event of the base class (SKI_WidgetBase) on my own widget isn't executed (here the widget would be registered for loading). But I have no clue why not since the event should be registered correctly. Could this be a timing issue?

Regards,

Amigo

User avatar
Roy Harris
 
Posts: 3463
Joined: Tue Sep 11, 2007 8:58 pm

Return to V - Skyrim