Welcome
Ladies and Gents:

These forums are now closed and registration disabled.

Please join us at our new forum on Proboards. Our hope is that these new forums are more stable, provide more and better features, and allow continuation of the project forums in a safer, more secure, long term environment.

me3explorer.proboards.com

--The ME3Explorer Team

Mass Effect 1,2,3 Interfaces

Technical research related to the structure of Mass Effect game files.

Mass Effect 1,2,3 Interfaces

Postby dybuk » 10 Jan 2016, 12:15

Greetings

This might be the wrong forum, I'm not sure these days. I might end up over Giftfish's knee ;)

I've got a couple of things to talk about. Lessons learnt from the controller mods. So lets start with the interfaces.

Disclaimer: Some of this might all be common knowledege who knows.


Interfaces

All the mass effect games have an overlay of interfaces. These interfaces are essentially adobe flash files. Flash decompilers on the internet are quite mature these days and this makes modding these files relatively easy.

These overlays include things like the player HUD, mini-games, main menu, level up screen, equipment selection, conversation dialogue, achievements, galaxy map, looting dialogs, codex, journal, character creation, load, save ..... the list goes on.

All the mass effect games (to date) operate in this way and they all start in the Coalesced. You'll spot something similar to the following:

HandlerLibrary=(Tag=HUD,HandlerClass="BIOC_Base.BioSFHandler_HUD",PanelResource="GUI_SF_HUD.ME_HUD",UseEdgeAA=true,StrokeStyle=SF_MSS_Normal,CurvePixelError=1);
HandlerLibrary=(Tag=IntroText,HandlerClass="BIOC_Base.BioSFHandler_IntroText",PanelResource="GUI_SF_Utility.IntroText",UseEdgeAA=true,StrokeStyle=SF_MSS_Normal,CurvePixelError=1);
HandlerLibrary=(Tag=Loot,HandlerClass="BIOC_Base.BioSFHandler_Loot",PanelResource="GUI_SF_Loot.Loot",UseEdgeAA=true,StrokeStyle=SF_MSS_Normal,CurvePixelError=1);
HandlerLibrary=(Tag=Map,HandlerClass="BIOC_Base.BioSFHandler_PCAreaMap",PanelResource="GUI_SF_AreaMap.Map",UseEdgeAA=true,StrokeStyle=SF_MSS_Normal,CurvePixelError=6);
HandlerLibrary=(Tag=MenuBrowser,HandlerClass="BIOC_Base.BioSFHandler_PCPauseMenu",PanelResource="GUI_PC_MainWheel.PC_MainWheel",UseEdgeAA=true,StrokeStyle=SF_MSS_Normal,CurvePixelError=1);
HandlerLibrary=(Tag=MessageBox,HandlerClass="BIOC_Base.BioSFHandler_MessageBox",PanelResource="GUI_SF_Utility.WindowPop",UseEdgeAA=true,StrokeStyle=SF_MSS_Normal,CurvePixelError=1);
...

This is from mass effect 1 (mass effect 2 and 3 are sightly different but pretty similar).

The HandlerClass refers to unreal script code that is a middleware between the flash file and the game. The PanelResource is the flash file itself.

The flash files are not dumb interfaces. They are rich interfaces using actionscript for a lot of their tasks. Think of them like heavy javascript web interfaces.

I've been using "JPEX Free Flash Decompiler". I've attached an example of modifying one of these files below with extractions from JPEX.

https://mega.nz/#!N9UHTC6S!Ww3TaoVg_v3X ... 0vdw85gaUA

Probably best viewed by diffing the directories. You should also install JPEX Free Flash Decompiler and view them if you are really interested.

This example change was done because the Xbox pause screen in ME1 didn't have options for going back to the main menu or an exit, so I had to copy/paste the central rotation wheel from the xbox version to the pc version and then transfer the code behind it. I also replaced the Esc prompt with a B button prompt also extracted from the xbox interface.

The JPEX interface makes some of this much easier than the diff might make out.

The unreal handling code for mass effect 1 is found in BIOC_Base.u, in mass effect 2 and 3 its in SFXGame.pcc. I've not been able to find a reliable way to locate the flash files sadly. It usually involves me extracting every file with gildors extract and then locating them that way.

Being able to modify the interfaces easily makes way for mods like being able to add items to the player HUD, tweak the player leveling, add things to the menu, change the way the mini games work, restore the ME1 radar, change the conversation wheel (maybe indicate paragon/renegade effect of choices), change the way galaxy map probing works etc.

Below is my current ME2Controller C# build script. Its far from the nicest (pretty horrible interms of coding really) but it shows how to extract and replace the flash files within the game.

https://mega.nz/#!0xlSiSxC!VKLJV-bKAIXS ... cYuywBDiA8

This might leed on to other discussions about open sourcing mod build scripts and unrealscript modification (maybe).

Obviously there is scope here to include extraction/replacement of the swf files inside the Package editor in ME1|2|3Explorer. Although with the development coming to end maybe another tool could be created.

I could also write guides on my experiences of modifying these files, how calls are made between the unrealscript and actionscript etc. Maybe write a tutorial?

Any thoughts?

Dybuk

dybuk has been thanked by:
User avatar
dybuk
Modder
 
Posts: 292
Joined: 30 Apr 2015, 18:38
Has thanked: 10 time
Have thanks: 127 time

Re: Mass Effect 1,2,3 Interfaces

Postby CreeperLava » 10 Jan 2016, 12:22

Surely a tutorial would be welcomed on the wiki, yes :).
User avatar
CreeperLava
User
 
Posts: 844
Joined: 07 Feb 2015, 21:52
Has thanked: 119 time
Have thanks: 83 time

Re: Mass Effect 1,2,3 Interfaces

Postby dybuk » 10 Jan 2016, 13:23

I guess this post was to see if there was interest and maybe talk about the tooling. What should be done to extract replace the swf files?

Dybuk
User avatar
dybuk
Modder
 
Posts: 292
Joined: 30 Apr 2015, 18:38
Has thanked: 10 time
Have thanks: 127 time

Re: Mass Effect 1,2,3 Interfaces

Postby Heff » 11 Jan 2016, 09:28

As I've said before, nice to see the great progress you've made with the flash/actionscript as well as the interaction with unrealscript.
I can see how a bunch of mods could benifit from being able to mod UI's, and in any case research is never a bad thing!
Heff
Coder
 
Posts: 164
Joined: 23 Feb 2015, 20:02
Has thanked: 93 time
Have thanks: 61 time

Re: Mass Effect 1,2,3 Interfaces

Postby dybuk » 11 Jan 2016, 10:04

The actionscript doesn't have access to any of the games variables. So if you want to pass extra info to it you need to do it via the unrealscript sadly. So mods wanting to add additional info to the UI will most likely need to tweak the unrealscript.

The unrealscript modification might be a different topic for conversation. Not sure. For ME1/ME2 I got ueexplorer *mostly* working without which I wouldn't have been able to do much at all.

Inside the ME2 build script included you can see how I was making changes to it. I wrote a little bit of horrible code which allowed me to substitute the jump addresses for labels. This allows me to add/remove and re-arrange code easier. Still a painful process, but nearly any code change was doable. As I mentioned to you before I never implemented code to add functions/variables/classes, although with your help did "move" some variables between functions. It obviously wasn't as easy as making changes to the actionscript.

For ME3 I never came up with a nice system (not that the ME1/ME2 system was that nice) because of the way the engine switched from bytecode addresses to memory addresses. The unrealscript changes required in ME3 were quite small luckily.

Dybuk
User avatar
dybuk
Modder
 
Posts: 292
Joined: 30 Apr 2015, 18:38
Has thanked: 10 time
Have thanks: 127 time


Return to Technical Research

Who is online

Users browsing this forum: No registered users and 0 guests

suspicion-preferred