Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
KR33PYK1NG opened this issue Sep 4, 2023 · 4 comments
Open

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

KR33PYK1NG opened this issue Sep 4, 2023 · 4 comments

Comments

@KR33PYK1NG
Copy link

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
Copy link
Author

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

@KR33PYK1NG KR33PYK1NG changed the title Recompiling some SFXGame classes breaks the game (LE1) Recompiling some SFXGame classes breaks the game (LE1/LE3) Sep 5, 2023
@KR33PYK1NG
Copy link
Author

  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 added a commit that referenced this issue Sep 5, 2023
…. Locals should not have any flags, and parms should only have parm flags. Part of #396

Optimized getting the binary offset in export data.
@SirCxyrtyx
Copy link
Member

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
Copy link
Author

KR33PYK1NG commented Sep 6, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants