Jump to content

Deobfuscate the .swf files aka UI modding...a start


Mofakin

Recommended Posts

Pretty sure they're still compiled using CS4. There would be little need for them to update their IDE if the old one worked fine!

 

I had a very quick look last night. MainMenu.swf doesn't like to be overwritten but I have no idea why. I might take a look at it later tonight. My first thoughts are that this is going to be way too much effort to mod than it is worth. Virtually the same setup as Skyrim but using AS3, so slight more flexibility, but the way things are displayed in the game makes what you can do a little more restrictive (screen space).

 

As for key binds, there's stuff going on that makes it (as a side effect) difficult to change what can be remapped. So don't expect anything too soon, and I don't see Bethesda rewriting the input code (and UI to display changes) just to satisfy some people unfortunately. Although you make a good point to those who don't use qwerty which isn't an insignificant number of people!

 

Once I figure out why my graphics card keeps going to 101°C in chargen I'll mess around with the other menus see what I can't break.

 

About CS4: Yeah, the code structure looks like it's CS4, if you compare it to the CS6 language you'll notice it's more similar to CS4. I just made the false assumption AS3 needed at least CS6, which isn't true. Btw. the tool posted some posts back does a pretty well job in unpacking the .swf files, but without source...if they really used CS4, then getting the Adobe source and tween files should be just as easy, as to port them over from Skyrim?

 

However, had to spend the better half of yesterday to turn my dynamic Shure microphone into a shotgun microphone, so I'm able to stream without headphones, so I hadn't much time dealing with the .swf files. It's weekend now, so I will take another glance into the files. Just as I said before, .swf files can be set into protected mode, and I'm pretty sure the MainMenu.swf has this protected mode enabled, hence why you can't edit it? It's also possible the FO4.exe uses some form of "time stamp" to recognize the correct version of MainMenu.swf? Or maybe you're just not allowed to use the MainMenu.swf outside of the .ba2 archives? But then, the CursorMenu.swf was editable...it had no AS scripts inside, so that could be a reason?

 

About redefining keys, while this would be hacky, all I want to try is outcommenting the section where it says "this key is reserved bla bla bla", no matter the bugs it creates. I just want to see if it works at all...bugs can be squished later on.

Link to comment
Share on other sites

  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

I recommend using this tutorial to disassemble and reassemble any of the .swf files. Seems to work perfectly at the moment...however, the edited MainMenu.swf will just not be read by the game. I'm afraid something inside the FO4.exe tells it not to use edited forms of some of the .swf files. This starts to get irritating.

Link to comment
Share on other sites

Ha, sorry for the double post, but this is to important to put it inside a edited post...I've managed to edit the MainMenu.swf, obviously the game would not read the MainMenu.swf unless started a new game. The MainMenu.swf probably only handles the main menu in game, but the intro screen seems to use another MainMenu version? Proof of concept...

 

http://i.imgur.com/3oSuWHZ.jpg

Link to comment
Share on other sites

Good job mofakin. I doubt the game is cherry picking menus to prevent edits. More likely its being published with silent errors, missing runtime dependencies, or something like that. Dont we need the GameWare classes to rebuild menus that depend on them? Probably why stuff like mouse cursor and font movies work without much hassle.

 

 

(I dont have a copy of FO4)

Link to comment
Share on other sites

Well, every day a little progress. Enough for today things not working. I tried multiple hacks just to bypass not being able to rebind the +, ins and numpad keys, but obviously it's more complicated then this.

 

The MainMenu.swf seems to call on a list of keys that are "prohibited" to be rebound. If you press any of those keys, a boolean will get set to false and fire the whole "This key is reserved" nonsense. It's probably easiest to find this list, and remove the affected keys, so you can rebind them at will.

 

Why Bethesda...why are you treating us like players that do not want to rebind keys?!? Screw this whole "we're not allowed to customize the ControlMap.txt at will like in Skyrim"-bullshit...I'm quite pissed right now...-.-

Link to comment
Share on other sites

Hey Mofakin,

 

looking at that swf class, would it not just be easier to hardcode "true" in the first if statement block? That way regardless of what key was pressed an attempt would be made to bind through that code block? Not sure on the ease of this but if you've been able to change the file maybe forcing true could help? Or even removing the if block and its else altogether.. '

 

I'm also curious as to how you got the mainmenu.swf file to be picked up. I have been able to modify this file, but it looks like even in the in-game menu it still finds that reserved string even though it's been removed.

 

Cheers and good luck.

Edited by ThatCanadianGuy
Link to comment
Share on other sites

Hey Mofakin,

 

looking at that swf class, would it not just be easier to hardcode "true" in the first if statement block? That way regardless of what key was pressed an attempt would be made to bind through that code block? Not sure on the ease of this but if you've been able to change the file maybe forcing true could help? Or even removing the if block and its else altogether.. '

 

I'm also curious as to how you got the mainmenu.swf file to be picked up. I have been able to modify this file, but it looks like even in the in-game menu it still finds that reserved string even though it's been removed.

 

Cheers and good luck.

 

I've tried what you proposed, but unfortunately, saving a action script modified file with JPEXS will result in the game crashing. I've tried pretty much everything with asasm tool as well, but it doesn't allow access to the action scripts. I'm afraid we will have to wait for a source. And right now I'm trying to proerly decompile and recompile any of the .swf files, so to make sure we will have access to said source. However, I believe any of SkyUI team modders already have their hand on decompiling those .swf's, and if we're lucky, we're soon going to have access to it.

 

It seems like the intro main menu is accessed from another .swf, so changes will only work when you have started a new game.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...