Changelog
1.2
-Added fix for flickering/size changes when using default styles
1.1
-Improved fix for female shield-on-back rescaling. Will always update shield-on-back node, including after reloading a save.
Fresh install of XPMSE 4.7
New Game with ONLY XPMSE and its requirements enabled
WEAPONS FLICKER WHEN EQUIPPED
The permissions for XPMSE ask that we do not reupload/redistribute script files
THEREFORE IT IS UP TO YOU TO FIX YOUR FILES
AllGUD works perfectly without these fixes, this step is entirely optional
This article Includes fixes for XPMSELib, XPMSEWeaponStyleScaleEffect, and RaceMenuPluginWeapons.
Quick and dirty how-to:
(Important: Scripts for Skyrim LE go in 'Data\Scripts\Source\'. Scripts for Skyrim SE go in 'Data\Source\Scripts'. If they do not appear in the CreationKit they are in the wrong place.)
1. Extract the source scripts for skyrim from Scripts.rar in the Data folder of Skyrim.
2. Extract the source scripts from SKSE and overwrite conflicting Skyrim scripts
3. Extract the source scripts from any additional mods that XPMSE has listed as a requirement (NiOverride, Racemenu, FNIS)
4. Extract the source scripts from XPMSE.
5. Make edits by REPLACING the functions in XPMSE's scripts with the code below.
6. Compile scripts using the Creation Kit.
Gameplay -> Papyrus Script Manager -> Right-Click Compile Scripts.
If you require assistance, consult the Creation Kit wiki first to see if you can't find an answer.
IMPORTANT: Article formatting may have added new lines where there should not be new lines. If you have an error for "no viable alternative at input '\\n'" Go to the start of the next line and hit backspace.
Parentheses pairs must start '(' and end ')' on the same line.
PM me if you get this error and I'll try to fix the article formatting again.
XPMSELib.psc fixes for weapon flickering.
This is required. All the time. Even without AllGUD.
When NiOverride.UpdateNodeTransform fires, whatever is attached to that node will briefly flicker. Temporarily moving to another location, and then moving back.
XPMSE will fire this off despite nothing having changed.
This fix checks the current node scale and parent node against the new values, before attempting to update them.
Groovtama's Sage Advice: "Nah those are no fixes, some are changes just to make his own code work, but the changes are not supposed to be there (I have local helper functions for a reason) because it breaks s*** for other modders or just plainly breaks itself with older RM/SKEE versions, or does nothing at all."
Counterpoint: AllGUD does not call upon either of these functions. Any mod that uses these XPMSELib functions will have the 'XPMSE flicker'. Old versions are old versions for a reason.
Find and replace the original functions with these
Function SetNodeScale(Actor akActor, bool isFemale, string nodeName, float value, string modkey) global
If(NiOverride.GetNodeTransformScale(akActor, false, isFemale, nodeName, modkey) != value)
If value != 1.0
NiOverride.AddNodeTransformScale(akActor, false, isFemale, nodeName, modkey, value)
NiOverride.AddNodeTransformScale(akActor, true, isFemale, nodeName, modkey, value)
Else
NiOverride.RemoveNodeTransformScale(akActor, false, isFemale, nodeName, modkey)
NiOverride.RemoveNodeTransformScale(akActor, true, isFemale, nodeName, modkey)
Endif
NiOverride.UpdateNodeTransform(akActor, false, isFemale, nodeName)
NiOverride.UpdateNodeTransform(akActor, true, isFemale, nodeName)
Endif
EndFunction
Function SetNodeParent(Actor akActor, bool isFemale, string nodeName, string newParent) global
If (NiOverride.GetNodeDestination(akActor, false, isFemale, nodeName) != newParent)
If (newParent != "")
NiOverride.SetNodeDestination(akActor, false, isFemale, nodeName, newParent)
NiOverride.SetNodeDestination(akActor, true, isFemale, nodeName, newParent)
Else
NiOverride.RemoveNodeDestination(akActor, false, isFemale, nodeName)
NiOverride.RemoveNodeDestination(akActor, true, isFemale, nodeName)
Endif
NiOverride.UpdateNodeTransform(akActor, false, isFemale, nodeName)
NiOverride.UpdateNodeTransform(akActor, true, isFemale, nodeName)
Endif
EndFunction
XPMSEWeaponStyleScaleScriptEffect.psc fix for flickering/size-changing equipment when using default styles
This is required even when not using AllGUD
This is related to the XPMSELib fixes, as the Restyle effect calls the SetNodeParent function in multiple places. This flicker in particular rears its head because the Restyle typically uses the following pattern in its code:
SetNodeParent(Actor, gender, NiNode, NiNode_Default)
SetNodeParent(Actor, Gender, NiNode, "")
Which obviously causes UpdateNodeTransform to trigger twice. EVERY TIME EQUIPMENT USING A DEFAULT STYLE IS EQUIPPED.
In every location where this pattern is present, comment out the line for
SetNodeParent(Actor, Gender, NiNode, "")
by adding a semi-colon in front of it.Note: This is a new addition and has not been fully tested, when testing it for NiNode_Shield_Back, it successfully stopped flickering for female NPCs, which was most noticeable since it briefly changed the scale as well. If you notice any behavior you think may have been caused by this fix, leave a comment!
XPMSEWeaponStyleScaleScriptEffect.psc fix for female shield-on-back rescaling
This is required for Shield-on-Back mods.
XPMSE's current rescaling code switches the size of the ShieldBack node to two different values. Every. Single. Update. Making it constantly change size between the incorrect scale, and the correct scale.
This fix will change it to ONE value. And also updates the size when the shield isn't equipped in the hand; So shield sizes will be the same before and after loading a game.
Groovtama's Sage Advice: "Like changes in a never used else part will surely help someone, just tell people to delete that line god damn it... XD"
Counterpoint: The problem is that it ISN'T in the else part. The problem is that it's in the main procedure. Why don't you delete the line, Groovtama? Save us all the trouble.
Make changes inside
Function Rescale(bool forceUpdate = false)
1. Add the following lines above the
If diffL
check:
If (!SHIELD_SOLUTION_ALT)
SetNodeScale(ThisActor, Gender, NINODE_SHIELD_BACK, GetNodeScaleBase(ThisActor, Gender, NINODE_LEFT_HAND) * GetNodeScaleHand(ThisActor, Gender, NINODE_LEFT_HAND), PWS_PLUGIN)
Else
SetNodeScale(ThisActor, Gender, NINODE_SHIELD_BACK, defaultSHIELDScale, PWS_PLUGIN)
EndIf
2. And replace the entire
If diffL
block with the following:
If diffL
SetNodeScale(ThisActor, Gender, NINODE_SHIELD, defaultSHIELDScale, PWS_PLUGIN)
SetNodeScale(ThisActor, Gender, NINODE_PRESHIELD, defaultSHIELDScale, PWS_PLUGIN)
If (leftHandType == 1)
SetNodeScale(ThisActor, Gender, NINODE_SHIELD, (1/GetNodeScaleBase(ThisActor, Gender, NINODE_LEFT_HAND)) * (1/GetNodeScaleHand(ThisActor, Gender, NINODE_LEFT_HAND)) * GetNodeScaleRMW(ThisActor, Gender, NINODE_SWORD_LEFT), PWS_PLUGIN)
ElseIf (leftHandType == 2)
SetNodeScale(ThisActor, Gender, NINODE_SHIELD, (1/GetNodeScaleBase(ThisActor, Gender, NINODE_LEFT_HAND)) * (1/GetNodeScaleHand(ThisActor, Gender, NINODE_LEFT_HAND)) * GetNodeScaleRMW(ThisActor, Gender, NINODE_DAGGER_LEFT), PWS_PLUGIN)
ElseIf (leftHandType == 3)
SetNodeScale(ThisActor, Gender, NINODE_SHIELD, (1/GetNodeScaleBase(ThisActor, Gender, NINODE_LEFT_HAND)) * (1/GetNodeScaleHand(ThisActor, Gender, NINODE_LEFT_HAND)) * GetNodeScaleRMW(ThisActor, Gender, NINODE_AXE_LEFT), PWS_PLUGIN)
ElseIf (leftHandType == 4)
SetNodeScale(ThisActor, Gender, NINODE_SHIELD, (1/GetNodeScaleBase(ThisActor, Gender, NINODE_LEFT_HAND)) * (1/GetNodeScaleHand(ThisActor, Gender, NINODE_LEFT_HAND)) * GetNodeScaleRMW(ThisActor, Gender, NINODE_MACE_LEFT), PWS_PLUGIN)
ElseIf (leftHandType == 5) || (leftHandType == 6)
SetNodeScale(ThisActor, Gender, NINODE_SHIELD, (1/GetNodeScaleBase(ThisActor, Gender, NINODE_LEFT_HAND)) * (1/GetNodeScaleHand(ThisActor, Gender, NINODE_LEFT_HAND)) * (GetNodeScaleRM(ThisActor, Gender, NINODE_WEAPON_BACK)) * (GetNodeScaleRMW(ThisActor, Gender, NINODE_WEAPON_BACK)), PWS_PLUGIN)
ElseIf (leftHandType == 7) || (leftHandType == 12)
SetNodeScale(ThisActor, Gender, NINODE_SHIELD, (1/GetNodeScaleBase(ThisActor, Gender, NINODE_LEFT_HAND)) * (1/GetNodeScaleHand(ThisActor, Gender, NINODE_LEFT_HAND)), PWS_PLUGIN)
ElseIf (leftHandType == 8)
SetNodeScale(ThisActor, Gender, NINODE_SHIELD, (1/GetNodeScaleBase(ThisActor, Gender, NINODE_LEFT_HAND)) * (1/GetNodeScaleHand(ThisActor, Gender, NINODE_LEFT_HAND)) * GetNodeScaleRMW(ThisActor, Gender, NINODE_STAFF_LEFT), PWS_PLUGIN)
ElseIf(leftHandType == 10)
If (!SHIELD_SOLUTION_ALT)
SetNodeScale(ThisActor, Gender, NINODE_SHIELD, GetNodeScaleRMW(ThisActor, Gender, NINODE_SHIELD_BACK), PWS_PLUGIN)
Else
SetNodeScale(ThisActor, Gender, NINODE_SHIELD, (1/GetNodeScaleBase(ThisActor, Gender, NINODE_LEFT_HAND)) * (1/GetNodeScaleHand(ThisActor, Gender, NINODE_LEFT_HAND)) * GetNodeScaleRMW(ThisActor, Gender, NINODE_SHIELD_BACK), PWS_PLUGIN)
EndIf
EndIf
EndIf
RaceMenuPluginWeapons.psc changes to fix an oversight when updating Right-Hand Weapon scales.
When using ShowRaceMenu to adjust your weapon positions, changing the weapon scale won't immediately update AllGUD's display weapon, because AllGUD uses the WeaponUpdate mod event as a signal to change size, which is triggered by every other transformation except this one.
Function SetNodeScale(Actor akActor, bool isFemale, string nodeName, float value, string modkey = "RMWPlugin")
XPMSELib.SetNodeScale(akActor, isFemale, nodeName, value, modkey)
int handle = ModEvent.Create("XPMSE_WeaponUpdate")
if (handle)
ModEvent.Send(handle)
endIf
EndFunction
31 comments
Bless this community, someone made a bat file that will automatically patch the scripts.
https://www.nexusmods.com/skyrimspecialedition/mods/44252
I write this after 5 hours of trying. My only problem was and is the flickering when changing weapons. I tried everything, the auto patch, doing it manually, fresh installs, etc...
The mod works flawlessly, I just want to get rid of the flickering. I would appreciate it if someone can help me. I think i have all my SKSE, and other mods/scripts sorted and installed properly. I use MO2.
Thanks again for everything!!
I've often had crashes in long playthroughs and had to disable Papyrus logging in the end, because the files became huge due to errors.
And I honestly don't see why I should disable logging just because someone doesn't want to fix buggy scripts.
If only these bugs were genital related, they woulda been fixed in no time.
Can someone be so kind as to send me the new files and tell me where to copy them into!
"Groovtama has declared that "XPMSE development is finsihed, kkthxbye (for real)"
The permissions for XPMSE ask that we do not reupload/redistribute script files
THEREFORE IT IS UP TO YOU TO FIX YOUR FILES
AllGUD works perfectly without these fixes, this step is entirely optional"
on to my real comment: so my understanding of how this works is you just put all the damned source scripts in one folder (so for sse it's Source/scripts i guess LE is scripts/source eff it i tried em in both anyways so I put em all in there). supposedly compiler should work right? I did the simple edits no prob. right click 'compile' just 'FAIL FAIL FAILF AIFLALIFLF AIL FAIL ' thing doesn't even have enough memory sometimes or just can't find a million things in the script(s?) (I have 16 gb mem, 6gb vid mem etc) am I retarded or why is every instruction in every google search written so confusingly like leaving half the explanation out (lol /rant maybe noone speaks english in which case their posts are actually good and who knows what changes between versions of installs). let's explain every mouse click I do. I load CK (for newbs that involves making a stupid bethesda account then editing stupid ini file to allow multiple masters btw that was two separate annoying stories), I click Gameplay Papyrus Script Manager (this is where instruction just stops so i'm purely guessing btw) so I see 15,000 scripts there I search for the 3 scripts I edited I right-click one of them then the options to click are different than all instructions but there's 'New...' 'Open in external editor' 'Compile' (and seven other things). So I guess I click Compile. brings up a window click on the script starts compiling says Fail so ya that's about it. I've given up (I've given up probalby hundreds err dozens of times since started this game but at least this time game still works just can't stop flickering) Next I'll have to try to get a damn third party compiler figure out how to link notepadd++ or who the 'f' knows (sorry for semi-cursing four times sometimes in rare instances there's no substitute to accurately get your point across) I hate asking for handouts if someone wants to send me the script that's fine though someday I'd like to do clean install of what I learned on brother's computer for him as a gift teaching him along the way and I dont' want to teach him something he can't do himself let's face it noone in my life is ever going to play modded skyrim so really it's just me lol thank God. and remember I'm only level 9 out of my 350 mods I'm still testing I can't imagine fixing these last two errors is going to result in a game that works flawlessly I super appreciate ur mod AllGUD thanks for sharing love ya'll and have a nice day!