bjornk Posted January 17, 2016 Posted January 17, 2016 Description: The two controller objects for the slave collar and the slave bracer get stuck in your inventory as a quest item after you've escaped from Falmer enslavement. Fix: Of course there are other ways to get rid of them, you can use the console or talk to a blacksmith, but good luck finding one in Blackreach. See the source code for more detail. Required Version: 2.0.5 of DA Captured. How to install: Extract into your Data folder or use MO. The actual script files are inside the BSA that comes with the mod and these two files override those. DACapturedCollarBracerScriptFix.7z Source Code: File: dadg_equipablecontrollerscript.pex Event OnEquipped( Actor akWearer ) If ( akWearer == Game.GetPlayer() && akWearer.GetWornForm(EquipableItemSlot) == EquipableItem as Form ) ; Debug.Notification("dadg - Equip-able Item Controller unequipped") ;;;;;; Added by bjornk -> DummyLock.Lock(true) DummyLock.SetLockLevel(LockLevel) Game.DisablePlayerControls() Utility.Wait(0.5) Game.EnablePlayerControls() If ( akWearer.GetItemCount(EquipableItemKey) > 0 ) DummyLock.Lock(false) Else DummyLock.Activate(akWearer) EndIf ;;;;;; <- Added by bjornk Else ; Debug.Trace("dadg - Equip-able Item Controller equipped") If ( akWearer.GetItemCount(EquipableItem) == 0 ) akWearer.AddItem(EquipableItem, 1, true) EndIf akWearer.EquipItem(EquipableItem, true, true) EndIf EndEvent File: qf_dadg_defeatedfalmer_0300ce12.pex Function RemovePlayerCollar() ;;;; Added by bjornk -> BreakPlayerCollar() ;;;; <- Added by bjornk ; thePlayer.AddItem(FalmerCollarKey, 1) OnPlayerBindingRemoved() EndFunction Function RemovePlayerBracer() ;;;; Added by bjornk -> BreakPlayerBracer() ;;;; <- Added by bjornk ; thePlayer.AddItem(FalmerBracerKey, 1) OnPlayerBindingRemoved() EndFunction Function BreakPlayerCollar() If ( thePlayer.GetWornForm(0x00008000) == SlaveCollar as Form ) ; Debug.Notification("Removing Slave Collar...") ; <- Added by bjornk CollarObjectRef.TryToClear() thePlayer.UnequipItem(SlaveCollar, true, true) thePlayer.RemoveItem(SlaveCollar, 1, true) ; <- Added by bjornk thePlayer.RemoveItem(SlaveCollarController, 1) thePlayer.AddItem(BrokenCollar, 1) EndIf EndFunction Function BreakPlayerBracer() If ( thePlayer.GetWornForm(0x20000000) == SlaveBracer as Form ) ; Debug.Notification("Removing Slave Bracer...") ; <- Added by bjornk BracerObjectRef.TryToClear() thePlayer.UnequipItem(SlaveBracer, true, true) thePlayer.RemoveItem(SlaveBracer, 1, true) ; <- Added by bjornk thePlayer.RemoveItem(SlaveBracerController, 1) thePlayer.AddItem(BrokenBracer, 1) EndIf EndFunction RemovePlayerCollar and RemovePlayerBracer functions are called by their respective OnLockStateChanged events so no change was necessary there other than making sure those events actually occur when you fiddle with the controller items in your inventory.PS. Not related to this script fix, but I'd also recommend removing the "Protected" flag from the Falmer master so that it can be killed by other NPCs and things.
bjornk Posted January 18, 2016 Author Posted January 18, 2016 Just updated the code and the scripts, as they sometimes didn't work properly for slave bracers in my game no matter what I did in the code. Anyway, it finally works properly... FYI. SetLockState function triggers an OnLockStateChanged event, this wasn't well documented, and because of this, I've wasted hours to figure out what was wrong with this piece of shit.
Fairawen Posted July 3, 2016 Posted July 3, 2016 Thanks so much for posting this, was looking everywhere for the fix.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.