Jump to content

[MOD REQUEST] Hold instead of toggle for Hard lock


Recommended Posts

I really wish the Hard lock was not a toggle switch but rather a push and hold input. It would really streamline the flow of combat to not be locked on one enemy when I quickly decide to attack another and I have to either toggle hard lock off or cycle through all nearby targets until I'm locked onto who I'm trying to kill. I would really love if someone could make a mod that only hard locks when I have the input held down and no lock when I release it.

Link to comment
Share on other sites

  • 11 months later...

Hey,

 

It's been almost a year since you've posted this so I don't know if this will reach you, but a couple years ago I devised a way to do exactly what you are describing, I use this method to make cameralock function a hold instead of a toggle, so that I may bind CameraLock to Left Trigger so that holding Block/Parry also holds a camera lock on the highlighted target. It makes combat feel much more graceful and enjoyable to me, especially when fighting several opponents simultaneously.

 

this streamlines combat especially on a controller. it gives you more intuitive control over the dodging, footwork and spacing part of the combat system, as well as situational awareness when engaging multiple opponents. Combined with the mods "Enhanced Targeting" + "Both Hands On Sword" + "E3DodgeSystem Swordplay component" + "E3 Improved Combat Animations" it greatly enriches my experience in the game.

 

This involves replacing some lines in a section in the PlayerInput.ws that oversees the cameralock feature. I am not a modder so I don't know how to make my own mod to do this, so I simply modified the PlayerInput.ws of a mod I have already installed. Any mod that has this could work but I know for a fact that FriendlyHUD has it.

 

Before you do this you may want to make a backup just in case

 

Open ModName/content/scripts/game/player/playerInput.ws

Open the PlayerInput.ws with notepad or a text editor, search for this text - "event OnCbtCameraLock( action : SInputAction )"

 

 

Before any changes it should look like this:

 

event OnCbtCameraLock( action : SInputAction )
{
if( IsPressed(action) )
{
if ( thePlayer.IsThreatened() || thePlayer.IsActorLockedToTarget() )
{
if ( !thePlayer.IsHardLockEnabled() && thePlayer.GetDisplayTarget() && (CActor)( thePlayer.GetDisplayTarget() ) && IsActionAllowed(EIAB_HardLock))
{
if ( thePlayer.bLAxisReleased )
thePlayer.ResetRawPlayerHeading();
thePlayer.HardLockToTarget( true );
}
else
{
thePlayer.HardLockToTarget( false );
}
return true;
}
}
return false;
}

 

Replace all of that with this:

 

event OnCbtCameraLock( action : SInputAction )
{
if( IsReleased(action) )
{
thePlayer.HardLockToTarget( false );
}
if( IsPressed(action) )
{
if ( thePlayer.IsThreatened() || thePlayer.IsActorLockedToTarget() )
{
if( !IsActionAllowed(EIAB_CameraLock))
{
return false;
}
else if ( !thePlayer.IsHardLockEnabled() && thePlayer.GetDisplayTarget() && (CActor)( thePlayer.GetDisplayTarget() ) && IsActionAllowed(EIAB_HardLock))
{
if ( thePlayer.bLAxisReleased )
thePlayer.ResetRawPlayerHeading();
thePlayer.HardLockToTarget( true );
}
else if( IsReleased(action) )
{
thePlayer.HardLockToTarget( false );
}
return true;
}
}
return false;
}
My formatting may be off but if someone can inform me how to format it correctly that would be appreciated
Hope this knowledge helps you because I feel like this feature is good enough that could be included in other major mods, like immersive cam or enhanced targeting for example. Try it and if you like it, spread the knowledge so other people can enjoy. I wish the devs included it as an option but this is how I made it work
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...