ME3Tweaks / LegendaryExplorer

Editor toolset for Mass Effect Trilogy and Mass Effect Legendary Edition
https://me3tweaks.com
GNU General Public License v3.0
121 stars 29 forks source link

Recompiling some SFXGame classes breaks the game (LE1/LE3) #396

Open KR33PYK1NG opened 10 months ago

KR33PYK1NG commented 10 months ago

Decompiling and recompiling some vanilla classes from SFXGame.pcc (even without any changes) produces unexpected behaviour in LE1. Verbose description for two problematic classes I've encountered:

  1. BioSeqAct_BioToggleCinematicMode (LE1) The game stops responding if you drive into the Geth Armature cutscene on Noveria Mako section. Interestingly, it doesn't crash if you start the cutscene on foot. Removing the call to oBehavior.AbilityEnable(FALSE, 0, 'All'); or wrapping it with if player not in vehicle check mitigates the issue. To reproduce, take vanilla SFXGame.pcc, open this class in Package Editor, click Compile and save, then enter the Geth Armature cutscene while driving Mako. Comparison vanilla<->recompiled: comp1

  2. SFXGameModeConversation (LE1) Issue: The game softlocks after loading any savegame if you load it after finishing Benezia fight on Noveria. While softlocked, the camera is fixed somewere out of bounds, and the player character is marked as dead ("Cannot save while dead" text in menu). Also, you have to click the buttons twice whilst in menu - the first time to gain focus, the second time to actually click. To reproduce, recompile, then kill Benezia and reload after her last words ("No light?.."). Comparison vanilla<->recompiled: 2comp

Version information: Stable 6.3.0.5422 Nightly 6.3.0.5473

KR33PYK1NG commented 10 months ago

Comparison of oBehavior field: 1_2RECOMP 1_2VAN Comparison of ConversationCam field: 1_1RECOMP 1_1VAN

KR33PYK1NG commented 10 months ago
  1. BioPlayerInput (LE3) Recompiling the class causes the game to crash if you try to zoom in (right click) while in any turret section (Rannoch Reaper chase, Palaven base defence, Earth, Thessia...) Comparison vanilla<->recompiled: changed

However, if I use "Restore export data" specifically on PostProcessInput function and restore this export to vanilla state, the turret crash disappears.

More experiments:

  1. Vanilla else if block on line 70: __1
  2. I replaced the block's contents with just !BP.IsInCover call, and it still crashes: __2
  3. If I remove the negation, it doesn't crash (!): __3
SirCxyrtyx commented 10 months ago

Thanks for the detailed report! I've fixed the first issue; BioSeqAct_BioToggleCinematicMode should recompile identically now. The other two problems are quite vexing. I can't figure out why the two properties in SFXGameModeConversation should have the component flag, as my understanding is that for ObjectProperties it should only be set when the class it holds inherits from Component or BioBaseComponent. Clearly I'm missing something. May take me some time to figure out.

KR33PYK1NG commented 10 months ago

Can confirm that issue 1 is fixed. Issue 2: for those two properties in SFXGameModeConversation, if I manually take flags from vanilla and slap them onto recompiled with hex editor, the issue 2 is also fixed (couldn't we just copy vanilla flags for all vanilla properties that are recompiled? I guess there's caveats if it hasn't already been done, but just pitching an idea). Issue 3: it seems different, since the only changed exports upon recompilation are functions, no properties there. I guess another bug also exists in function compilation?

UPD: SFXGameModeBase (LE3) also breaks upon recompilation because some of its functions changed exports, not sure which exactly. The game just won't load into the menu.