Jump to content

CrosshairRefEvents script hang fix


Recommended Posts

Posted

CrosshairRefEvents script hang fix

View File

SKSE64 plugin which fixes script hang in e.g. Naked Defeat and Deviously Cursed Loot:

 

Spoiler

When any mod disables the activate/use key via DisablePlayerControls(),

then the game sends an OnCrosshairRefChange Event to every Form which registered for said event.

 

This event keeps being sent for every frame, until the activate/use key is re-enabled.
Which in turn results in some script being seemingly stuck and refusing to execute (such as Naked Defeat or Cursed Loot)

 

This plugin fixes this by no longer sending the OnCrosshairRefChange Event just because the activate/use key has been disabled.

(Now said Event is only sent, when the Crosshair actually changes targets)

 

 

Requires Address Lib.

Tested with Special Edition v1.5.97 and Anniversary Edition v1.6.640

(but "should" be compatibly with anything inbetween aswell *fingers crossed* *no guarantees* *use at your own risk* )

 

source code on GitHub

 

Special thanks to:

alex77r4: for helping me understand this bug a bit better in the Naked Defeat SE forum.

mrowrpurr: for creating the SKSE plugin template

the CommonlibSSE-NG creators/coders (including, but not limited to Ryanpowerof3CharmedBaryon)

the SKSE team

 

(standing on the shoulders of giants)


  • Submitter
  • Submitted
    01/16/2023
  • Category
  • Requires
    Address Library for SKSE Plugins
  • Regular Edition Compatible
    No

 

Posted

I've been having an issue with Naked Defeat where the quest sequence won't progress and seem to hang unless I pause / open console and close it again, is this related to that?

Posted (edited)

I'm using this mod with SE 1.5.97.

 

I just wanted to say that this mod is working very well for me. The hangs with DCL have been eliminated.

 

Thanks so much!

 

 

 

Edited by Herowynne
  • 2 weeks later...
  • 4 weeks later...
Posted

after installing this mod, the cursed loot events from DCL (and events from many other mods) don't start anymore... so I uninstalled it but the error continues (even when starting a new game)... could someone help me to fix it?

Posted
14 hours ago, petterparker09 said:

after installing this mod, the cursed loot events from DCL (and events from many other mods) don't start anymore... so I uninstalled it but the error continues (even when starting a new game)... could someone help me to fix it?


When you begin a new game and rescue Chloe from the Helgen prison, that starts her quest and prevents any DCL cursed loot events from occurring, until you have completed several of the DCL quests in sequence.

  • 2 weeks later...
Posted

So i have this wierd black screen stuck when going into or out of the great lift at aftland or whatever it's called and this file did not change anything I have address library installed but still nothing it's as if i never installed it at all.

  • 9 months later...
Posted (edited)

is there anything I can do from Naked Defeats Script side to avoid this from even happening?

 

Thx for making this fix :D
dunno if this is also an LE issue. 

I ve seen Stack Dumps with "OnCrossHairReference" but never in my own Logs (I m on LE)
But from what I read on how this works I guess the problem is only on LE... 

(EDIT; without having to enable the Use Key of course :P )

Edited by Nymra
  • 7 months later...
Posted
On 12/31/2023 at 8:02 AM, Nymra said:

is there anything I can do from Naked Defeats Script side to avoid this from even happening?

 

Thx for making this fix :D
dunno if this is also an LE issue. 

I ve seen Stack Dumps with "OnCrossHairReference" but never in my own Logs (I m on LE)
But from what I read on how this works I guess the problem is only on LE... 

(EDIT; without having to enable the Use Key of course :P )

 

I've found that this script fix makes NADE perform incredibly better, so honestly I'd just link to it - but the new Deviously Helpless Redux refers to one possible workaround: 

Quote

Replaced DisablePlayerControls with SetPlayerAIDriven not to run into Skyrim’s bug about CrosshairRefEvents script hang

 

I of course don't know if that will have undesirable side effects - the author of that mod may have a better idea.

  • 3 weeks later...
Posted
On 8/4/2024 at 7:04 PM, transfer said:

 

I've found that this script fix makes NADE perform incredibly better, so honestly I'd just link to it - but the new Deviously Helpless Redux refers to one possible workaround: 

 

I of course don't know if that will have undesirable side effects - the author of that mod may have a better idea.

 

SetPlayerAIDriven

 

I used this since day 1 of Naked Defeat, so this seems not to change anything.

Posted
1 hour ago, Nymra said:

 

SetPlayerAIDriven

 

I used this since day 1 of Naked Defeat, so this seems not to change anything.

 

Good to know, scratch that!

  • 2 months later...
  • 2 months later...
  • 5 months later...
  • 5 months later...
Posted

I wonder if this would still work on latest versions of naked defeat. I think Nymra disabled this to prevent the issues that this mod fixes so it might not be needed anymore

Posted (edited)
13 minutes ago, muhavaux33 said:

I wonder if this would still work on latest versions of naked defeat. I think Nymra disabled this to prevent the issues that this mod fixes so it might not be needed anymore

 

this mod is indeed no longer needed for naked defeat, hence it is no longer listed in the requirements. 
As I understand it, I removed the cause of this issue some time after this fix was released. 
But it is still usefull also for other mods and it might be that the crosshair ref is required in the future to be reimplemented, but that would appear in big red letters in the changelog. 

Edited by Nymra

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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