Modding the GUI

Post » Tue May 15, 2012 12:59 am

Silverglade asked me to come over and share. I don't think I've stumbled across anything new here, as I mostly followed directions from a League of Legends forum: http://na.leagueoflegends.com/board/showthread.php?t=515500

This is extremely tedious, as you can't just publish straight out of Flash yet; the compiler differs from what Bethesda used, so there's a lot missing.

Here's what I've done with the mod that was mentioned:

  • Unpacked the "Skyrim - Interface.bsa" file
  • Copy out the hudmenu.gfx file, rename it to .swf, and used the hex editor in Notepad++ to edit the first three characters to "CWS".
  • Decompile the swf with Trillix or similar. This is only to identify sprites and scripts so far - you won't be recompiling.
  • Pore through the assets and determine which ones you want to alter. Note their shape numbers.
  • Using SWiX, open the .swf file and manually remove the shapes in question
  • I also edited the sprite that controls the fade in/fade out of the indicator text (hidden/detected) so that it remained at A=0 throughout the whole tween.
  • Save in SWiX, hex edit the first three characters back to "CFX", and rename the file back to .gfx.

Now, most of what I did here was remove things and change the alpha of a text field. Nothing huge. Altering graphics may require you to make changes within Flash, FlashDevelop, Trillix, or some other Flash editor, publish, then locate the draw instructions for your published .swf in SWiX and use the new draw instructions to replace the draw instructions in the original .gfx file.


In order to start adding your own scripting, I imagine the process is something like this:

  • Make your code adjustments in Flash, FlashDevelop, Trillix, etc. and publish with the CLIK framework in your classpath as a Flash Player 10 movie in AS2.0
  • Use FLASM on the altered file to get the assembly for your changes
  • Use FLASM on the original file to get something to compare it to
  • Use a diff tool to compare the instructions between the two .flm files that FLASM generated
  • Carefully copy over your changes from the newly published file to the "original" file
  • Re-assemble into .swf using FLASM

Note that I haven't successfully tried the FLASM route yet, but it sounds like it ought to work. It's not a terribly exciting way to mod things...
User avatar
Céline Rémy
 
Posts: 3443
Joined: Sat Apr 07, 2007 12:45 am

Post » Tue May 15, 2012 2:14 am

Currently nothing disables awarding achievements. New Vegas set a flag if you typed something in to the console, but this flag doesn't exist in Skyrim, and the code for awarding achievements does not have any checks in it (other than making sure Steam is initialized properly and etc).
Are you certain? Because so far I have no achievements registered; I can only assume it's because of my tendency to fiddle about with the console. I guess it could be something else, dunno what though.
User avatar
Elisabete Gaspar
 
Posts: 3558
Joined: Thu Aug 31, 2006 1:15 pm

Post » Tue May 15, 2012 12:20 pm

Actually, not quite. This was true in New Vegas, but it is not true [consistently at least] for Skyrim.
Currently nothing disables awarding achievements. New Vegas set a flag if you typed something in to the console, but this flag doesn't exist in Skyrim
Ah ok. Thanks for letting me know that. I didn't even know about the console = no achievements thing because I never played FO, but it was being discussed in another thread as if Skyrim had it too.
User avatar
neen
 
Posts: 3517
Joined: Sun Nov 26, 2006 1:19 pm

Post » Mon May 14, 2012 11:51 pm

@Casiotone:
Thanks for your post.

This should make DarN feel right at home. Back to XML :)
User avatar
Jamie Lee
 
Posts: 3415
Joined: Sun Jun 17, 2007 9:15 am

Post » Tue May 15, 2012 10:03 am

Are you certain? Because so far I have no achievements registered; I can only assume it's because of my tendency to fiddle about with the console. I guess it could be something else, dunno what though.
I've used multiple console commands so far. kill, set timescale, fov, tdt, tm and I think I might've used tcl as well. I'm still getting achievements. So it's probably something else :P Maybe you're just not noticing the popup?
User avatar
Shannon Lockwood
 
Posts: 3373
Joined: Wed Aug 08, 2007 12:38 pm

Post » Tue May 15, 2012 5:20 am

Are you certain? Because so far I have no achievements registered; I can only assume it's because of my tendency to fiddle about with the console. I guess it could be something else, dunno what though.
If you run TESV.exe directly, you won't get achievements. It must be run via SkyrimLauncher.exe or the Steam UI to work.
User avatar
Poetic Vice
 
Posts: 3440
Joined: Wed Oct 31, 2007 8:19 pm

Post » Tue May 15, 2012 12:15 pm

I've used multiple console commands so far. kill, set timescale, fov, tdt, tm and I think I might've used tcl as well. I'm still getting achievements. So it's probably something else :P Maybe you're just not noticing the popup?
No, they're not appearing on my Steam stats either.

If you run TESV.exe directly, you won't get achievements. It must be run via SkyrimLauncher.exe or the Steam UI to work.
I'm just running the launcher as normal. Anyway, before I drag this thread too far off-topic, I'll go looking for an answer elsewhere if it bothers me too much!
User avatar
nath
 
Posts: 3463
Joined: Mon Jan 22, 2007 5:34 am

Post » Tue May 15, 2012 2:19 am

Hey all. One of three UI devs here. Silverglade and DarN have been in touch with me via PM and have asked me to keep an eye on this thread and subsequent ones in order to answer any questions you guys might have. I've been reticient to do this in the past for a few reasons:

1. I can't really guarantee my constant presence due to (you guessed it) work constraints. Any time I get to check in here and answer things would be on my own limited free time.
2. A lot of questions that get posed I either can't answer, or don't know the answer to and don't have the time/resources to find out.
3. Tasty devs can attract trolls and flame wars. Constructive and even destructive criticisms don't really bother me, but I don't want to derail what can be a very productive series of threads.

So, as long as all that's out there and known, I'm comfortable answering stuff where and when I can. My main goal here is to clear up any mysteries you guys run into modding the UI. I definitely won't be getting into discussions about the past, present, or future state of the Skyrim UI; that's for you guys to hash out. I'm just here to help. :)


I can edit this visually too - no more imagining the outcome while staring at 1000's of lines of XML code.
Yeah, I know, right?!?


When you press 'r' to craft, a 'confirm' screen comes up. This would be much more painless if it was possible to keybind 'yes' and 'no'.
Yes/No message boxes should already be keybound to 'Y' and 'N', if that helps in the meanwhile. At least, I think that's still the case. I put that in a while ago...
User avatar
Darren
 
Posts: 3354
Joined: Wed Jun 06, 2007 2:33 pm

Post » Tue May 15, 2012 10:06 am

Hey all. One of three UI devs here. Silverglade and DarN have been in touch with me via PM and have asked me to keep an eye on this thread and subsequent ones in order to answer any questions you guys might have. I've been reticient to do this in the past for a few reasons:

1. I can't really guarantee my constant presence due to (you guessed it) work constraints. Any time I get to check in here and answer things would be on my own limited free time.
2. A lot of questions that get posed I either can't answer, or don't know the answer to and don't have the time/resources to find out.
3. Tasty devs can attract trolls and flame wars. Constructive and even destructive criticisms don't really bother me, but I don't want to derail what can be a very productive series of threads.

So, as long as all that's out there and known, I'm comfortable answering stuff where and when I can. My main goal here is to clear up any mysteries you guys run into modding the UI. I definitely won't be getting into discussions about the past, present, or future state of the Skyrim UI; that's for you guys to hash out. I'm just here to help. :)



Yeah, I know, right?!?



Yes/No message boxes should already be keybound to 'Y' and 'N', if that helps in the meanwhile. At least, I think that's still the case. I put that in a while ago...

Can you comment on whether or not the source .fla files will be available in the Creation kit? Re-publishing these decompiled SWFs has so far forced us to mod via fairly low level routes, but being able to publish from Flash itself would do wonders.
User avatar
ILy- Forver
 
Posts: 3459
Joined: Sun Feb 04, 2007 3:18 am

Post » Tue May 15, 2012 1:10 am

Can you comment on whether or not the source .fla files will be available in the Creation kit? Re-publishing these decompiled SWFs has so far forced us to mod via fairly low level routes, but being able to publish from Flash itself would do wonders.
I can answer that; they won't be. He fought for us though, and I even sent him information from Adobe stating that they were fine with developers releasing FLAs (even if they contain Scaleform info). Ultimately, it was decided they would not to release the FLAs.
User avatar
Dj Matty P
 
Posts: 3398
Joined: Sat Jun 09, 2007 12:31 am

Post » Tue May 15, 2012 10:50 am

Socrates200X, I really appreciate your willingness to come and give of your some of your free time and expertise. By doing so you be saving us many hours of frustration and with that of course a few headaches.
User avatar
Tyrone Haywood
 
Posts: 3472
Joined: Sun Apr 29, 2007 7:10 am

Post » Mon May 14, 2012 9:57 pm

Hey all. One of three UI devs here. Silverglade and DarN have been in touch with me via PM and have asked me to keep an eye on this thread and subsequent ones in order to answer any questions you guys might have. I've been reticient to do this in the past for a few reasons: ...


Nice to see you here and thanks for chiming in!
thanks for coming out to talk to us lowly peasants :)

thanks in advance for any info you can give the others about this.
User avatar
Natasha Callaghan
 
Posts: 3523
Joined: Sat Dec 09, 2006 7:44 pm

Post » Tue May 15, 2012 4:04 am

My pleasure. :)

Now if I could just get these to compile without spewing errors all over. I got the CLIK stuff, but it still complains. :banghead:

You need to make sure the order of your classpaths match the order in which the intrinsic classes are overwritten. In the CS Actionscript 2.0 preferences, the classpaths should look like this:
.
C:\UDK\UDK-2011-10\Development\Flash\CLIK\ <- replace this with yours
$(LocalData)/Classes

This means the compiler will first use the intrinsic classes in Flash, then the ones by ScaleForm, then the ones by Bethesda from the .swf file.

If you get errors about System.capabilities.numControllers, go into the respective .as files and replace System.capabilities.numControllers with the number 1.
User avatar
Noraima Vega
 
Posts: 3467
Joined: Wed Jun 06, 2007 7:28 am

Post » Mon May 14, 2012 10:56 pm

I can answer that; they won't be. He fought for us though, and I even sent him information from Adobe stating that they were fine with developers releasing FLAs (even if they contain Scaleform info). Ultimately, it was decided they would not to release the FLAs.
That's unfortunately true. No current plans to release the source FLAs.

You need to make sure the order of your classpaths match the order in which the intrinsic classes are overwritten. In the CS Actionscript 2.0 preferences, the classpaths should look like this:
.
C:\UDK\UDK-2011-10\Development\Flash\CLIK\ <- replace this with yours
$(LocalData)/Classes

This means the compiler will first use the intrinsic classes in Flash, then the ones by ScaleForm, then the ones by Bethesda from the .swf file.
True. We do the exact same thing with our CLIK classpaths. Man, am I sure glad the CLIK files are readily available. Makes things a whole lot easier. =P
User avatar
Greg Cavaliere
 
Posts: 3514
Joined: Thu Nov 01, 2007 6:31 am

Post » Mon May 14, 2012 10:18 pm

i like to see in a ui mod is ,

some nordic style text?
mouse scroll bars and close boxes
some sort buttons at the top, to sort by damage, weight, value, etc
some kind of equpped list or figure to show that my character is fully equipped.
the hot keys on the quick fav list needs to sorted to the top with the rest below
items need to separated in the storage. chests, drawers, etc

good luck with this mod. im still having loads of fun with the way it is.

the architecture and the water effects are amazing. this game is truly a piece of art. :tops:
User avatar
Carlitos Avila
 
Posts: 3438
Joined: Fri Sep 21, 2007 3:05 pm

Post » Tue May 15, 2012 1:12 pm

socrates200X:

Very nice to see a dev on the forums, and thank you for helping out! I for one am perfectly satisfied with the UI (I'm used to Planescape:Torment), appalled by ActionScript 2.0, but intrigued by the new modding possibilities ScaleForm provides. I've got some techie questions:

1. Bethesda (or ScaleForm) apparently overrode the intrinsic System class to include various game info. Is the System.as file available in any way by extraction from the interface .swf's, or is it ScaleForm proprietary?

2. If I edit fontconfig.txt to match the format from the UDK ScaleForm, (add the [FontConfig] label), I can generate a gfxfontlib.swf that uses the game fonts by copying in their libraries to my working folder. The .swf looks fine when I launch it with the ScaleForm launcher, but ingame the font is replaced with the system default. Is there a way to circumvent this? Do I have to embed the fonts rather than use gfxfontlib?

3. I use the CS 5.5. If I decompile a .swf, load the generated .fla file, save it as a new .fla file (CS4 format, Flash player 10.2, no text remapping), the resulting .fla file is nearly twice as large as the original. Do I have to get the CS4 in order to save projects properly?

Anyway, I'll go back to playing the game now.
User avatar
Samantha Jane Adams
 
Posts: 3433
Joined: Mon Dec 04, 2006 4:00 pm

Post » Tue May 15, 2012 4:08 am

1. Bethesda (or ScaleForm) apparently overrode the intrinsic System class to include various game info. Is the System.as file available in any way by extraction from the interface .swf's, or is it ScaleForm proprietary?
It's Scaleform proprietary, but http://www.scaleform.com/documents/gfx_3.3_extensions.pdf.
User avatar
Quick Draw III
 
Posts: 3372
Joined: Sat Oct 20, 2007 6:27 am

Post » Mon May 14, 2012 10:39 pm

Wow, good work here by all involved (and all that while I was sleeping! :)). Though I can't believe Bethesda used the Futura typeface. That's a font for the "middle of the 20th century" or "retro-future" design style. :D
User avatar
ILy- Forver
 
Posts: 3459
Joined: Sun Feb 04, 2007 3:18 am

Post » Tue May 15, 2012 6:38 am

I've got a few mods, use the console fairly regularly, and I still get achievements. Amusingly, as I don't care about them in the slightest.
User avatar
Chloe :)
 
Posts: 3386
Joined: Tue Jun 13, 2006 10:00 am

Post » Tue May 15, 2012 1:15 am

can you guys take a look at the gui and see if theres a way to enable hotkeying a favorited item to the left hand?? according to pc gamer it was supposed to be implemented and would be done by holding down shift while assigning a hotkey, but it obviously didn't make it into the retail game, and it causes no end of problems for people who dual wield, if i dual wield and then choose a spell or torch or staff, it doesn't put both weapons away it only puts the offhand one away and then for some reason i can't comprehend it uneqips and unfavorites it so as soon as you use one of those things your dual wield hotkey is gone and to get that second weapon back you have to manually do it from the inventory and refavorite again. I'm guessing if they told pc gamer it was in the game that it does exist but is just disabled, now i don't know if it would be disabled via the gui or the game settings themselves, but the gui route seems the most logical to me, so i thought it couldn't hurt to ask you guys who know what your doing.
User avatar
Rob Smith
 
Posts: 3424
Joined: Wed Oct 03, 2007 5:30 pm

Post » Tue May 15, 2012 11:25 am

can you guys take a look at the gui and see if theres a way to enable hotkeying a favorited item to the left hand?? *blah blah blah*
Hold shift and press the number.
User avatar
Dagan Wilkin
 
Posts: 3352
Joined: Fri Apr 27, 2007 4:20 am

Post » Tue May 15, 2012 1:15 am

http://www.gamesas.com/index.php?/topic/1266556-usage-of-screen-real-estate-in-skyrims-interface/ has gotten some great suggestions for how to fix the UI; hope any UI modders out there might take its contents into consideration. :)
User avatar
Philip Rua
 
Posts: 3348
Joined: Sun May 06, 2007 11:53 am

Post » Tue May 15, 2012 1:13 am

If you run TESV.exe directly, you won't get achievements. It must be run via SkyrimLauncher.exe or the Steam UI to work.
You can fix this by creating steam_appid.txt in the game directory with the contents 72850
User avatar
Tessa Mullins
 
Posts: 3354
Joined: Mon Oct 22, 2007 5:17 am

Post » Mon May 14, 2012 11:27 pm

My request, is to just remove the redundant "HIDDEN" text from the sneak cursor, because when the eye closes and the cursor becomes a flat line, you know that
you're hidden, and to have the word "HIDDEN" appear is just redundant and unnecessary.
User avatar
Nadia Nad
 
Posts: 3391
Joined: Thu Aug 31, 2006 3:17 pm

Post » Mon May 14, 2012 8:53 pm

socrates200x:
The font Skyrim uses are the various Futura condensed versions, right?
Does that mean we have to obtain a license for this font if we want to make a mod with that font or does the bethesda license include consumers using it for mods? Is the font included with the CS or do we have to decrypt it from the Flash files?
Oh and I did some vector mockups of an improved UI (see http://imgur.com/a/hcp6S and http://www.gamesas.com/index.php?/topic/1266556-usage-of-screen-real-estate-in-skyrims-interface/page__st__140__gopid__19271230#entry19271230 for the corresponding post.)
If anybody wants it, I can clean it and upload the vector files so you can prototype some ideas.
User avatar
Roddy
 
Posts: 3564
Joined: Fri Jun 15, 2007 11:50 pm

PreviousNext

Return to V - Skyrim