Mass Effect Legendary Edition

Some of the functions inside the SFXGame.pcc file need to be edited to ensure good interaction of the mod with the rest of the game. All of the edits described below are necessary and could not be applied from the level of a DLC mod. Without them, although the evade itself would still kind of work, its functionally and comfort would be severely impacted, far below the acceptable levels.

All SFXGame edits are mentioned here, with the full path name of edited function, as well as export IDs - you can go to export IDs using the Goto # button in Package Editor's main bar in the Legendary Explorer.

Please note that some basic knowledge of C-family programming languages is expected to apply the changes.
Please also note that in Unreal Script, variable declarations are separated from the rest of code. Therefore, vars declarations and code portions of the presented snippets need to be placed in the correct locations inside the function.



TryAcquireCover command is, by default, very sensitive. It does not consider the player's movement direction, therefore forcing cover acquire even when the player is physically moving away from it. As dash and cover are by default bound to the same key, cover liked to take the priority. This led to unintuitive behavior when the player was glued to cover, even though they clearly wanted to dash away from it.
An SFXGame edit is necessary to lower this sensitivity and let dash take priority in the aforementioned cases.
The Abs comparisons are required for controllers which would fail a simple != 0 comparisons.

BioPlayerController.TryAcquireCover() (OT - 13285; LE - 13990)
Append this code at the start, right after local variable declarations:

    local BioPawn BioCaster;
    local BioPlayerController PC;
    local PlayerInput Input;
    
    BioCaster = BioPawn(Pawn);
    if (BioCaster != None && BioCaster.IsHumanControlled())
    {
        PC = BioPlayerController(BioCaster.Controller);
        if (PC != None)
        {
            Input = PC.PlayerInput;
            if (Input != None)
            {
                if (Input.RawJoyUp < -0.3125)
                {
                    return FALSE;
                }
                else if (Abs(Input.RawJoyUp) < 
0.3125 && Abs(Input.RawJoyRight) > 0.3125)
                {
                    return FALSE;
                }
            }
        }
    }




The evade is initialized by calling "UsePower self AsariDash" console command. The UsePower console command forces Shepard to enter combat state, even if non-combat places like the Normandy. Being forced into combat state in cases like these result in bugged out pawn behavior.
In order to prevent dash from being used in casual places (therefore fix the aforementioned bug), the below code need to be insterted to the BioCheatManager.UsePower() function.
This does not affect casting of other powers, as they use UseAbility(int), rather than UsePower(Name, Name). You'll still enter combat state upon pressing 1.
Please note. This code need to be inserted *after* the oPawn variable is populated (after line 24 in case of the vanilla script).

BioCheatManager.UsePower (OT - 4342; LE - 5270)
Append this code after the oPawn value is assigned:

    if (BioPawn(oPawn).m_oBehavior.m_eCurrentActionState == EActionStateVariable.BIO_ACTION_STATE_EXPLORE)
    {
        return;
    }




None of the traditional ways of giving a power to the player meets all expectations:
Hard-editing SFXCharacterClass files create a big compatibility problem, while making the power a bonus power obtainable by a console command creates an extra step for the end user, which would also need to be repeated each time a player resets their bonus powers (eg. by the Normandy lab). As resetting bonus powers is a reasonably common activity, this would result in an incovenient situation.

The universal solution to both of these issues is adding a code which adds the evade automatically to the character on their power loadout loading. As evade is deeply connected with the entire game's gameplay, I consider it a reasonable edit.

In case of LE, the last line will use single quotes (') instead of double quotes (") like it used to in the OT, as PowerClassName's type has been changed from String (which uses "") to Name (which uses '').

SFXPowerManager.LoadPowers (OT - 10257; LE - 7174)
Append this code at the start, right after local variable declarations:

    if (SFXPawn_Player(MyPawn) != None && PowerList.Find('PowerName', 'AsariDash') == -1)
    {
        PowerList.Add(1);
        PowerList[PowerList.Length - 1].PowerName = 'AsariDash';
        PowerList[PowerList.Length - 1].CurrentRank = 1.0;
        PowerList[PowerList.Length - 1].PowerClassName = 'SFXGameContentDLC_TajfunDash.SFXPower_AsariDash';
    }

Article information

Added on

Edited on

Written by

Tajfun403

0 comments