Learning UI Modding - need a few pointers

Post » Mon Jun 24, 2013 4:44 am

After seeing SkyUI's recent changes to the favorites menu, I decided to try my hand at adding even more functionality to the Favorites Menu.

My final goal is to create an interface that can command your followers, like FONV. Right now, I just want to add a button that makes Lydia jump.

I've spent a few days fiddling with Flash and poking around for tutorials/help threads online, with very slow results. I added a new button to SkyUI's menu (because the script in the default menu is really strange) and I set it to play a sound. Unfortunately, the swf won't compile because I haven't set up an appropriate package directory for all the import statments.

And so, my questions:

- How are you supposed to set up packages for import statements? I know that I can just copy over the imported .as files to where the .fla resides, but wouldn't that cause a lot of bloating in the swf?

- What exactly can the game delegate do? What can it tell the game, and what can the game tell it? Has anyone put together a list of all possible settings and use cases? Can it be called from papyrus to pass info to the UI?

- The addEventListener function wrt Skyrim uses a different parameter signature than normal: type:string, listener:object, weakEventReference:string. What does the type "change" mean? I see it an awful lot - is it just a catch all? Also, is the listener ever not a "this" reference?

Any help is appreciated, not just with what I'm asking about. If you think something you've learned about UI modding can be useful down the line, don't hesitate to blurt it out! :wink:

Thanks!

User avatar
Greg Swan
 
Posts: 3413
Joined: Tue Jun 05, 2007 12:49 am

Post » Mon Jun 24, 2013 1:17 pm

You're probably a little late to the party as far as commanding followers goes, I'm already in the process of doing this:

http://imgur.com/n7Pb9zi wheel

http://imgur.com/SoQg7tO stats panel

http://i.imgur.com/k7MVw.jpg hud widget

Modifying SkyUI components is probably the easiest way to learn. The required GFx components are already included with the SDK.

https://github.com/schlangster/skyui

You can also see Mardoxx' githib which includes properly decompiled vanilla menus and should just be out of the box compilable.

https://github.com/Mardoxx/skyrimui

If you're unable to compile any of these, or they don't work ingame it's probably because you're not using CS4, you can technically get it to work for CS5 but there's some weird stuff you have to do and I've pretty much forgotten what it was anyway as I just went to using CS4.

I'll let you know ahead of time that you cannot create new menus, you can only edit existing menus. There are more advanced methods to hot-swapping the contents of a particular menu and loading your own menu as an external reference, we use a modified MessageBox menu for this. Making the menus actually do things with game information requires SKSE mod events sent back and forth from the both the menu and Papyrus.

My github has some example usages of new menus made by swapping contents: https://github.com/expired6978/skyui

GameDelegate is the Scaleform class for calling native game functions and for doing something when a native game function is called, you cannot create or modify these.

addEventListener is actually not really different I'm not sure where you got the idea that it was. The type is the event name, the listener is usually the this object, and the weakEventReference is the callback name for the function that will be called on the listener.

User avatar
Nitol Ahmed
 
Posts: 3321
Joined: Thu May 03, 2007 7:35 am

Post » Mon Jun 24, 2013 2:48 pm

Oh, cool! That's pretty much what I was thinking of. Much better for someone with experience with the UIs to do this sort of thing -- I was stumped.

User avatar
Courtney Foren
 
Posts: 3418
Joined: Sun Mar 11, 2007 6:49 am


Return to V - Skyrim