aurreth Posted June 24, 2021 Share Posted June 24, 2021 (edited) I want to alter the Nuka World shock collars so that equipping one on a settler makes them work 24 hours. Basically I'm spawning settlers in my Raider outposts, slapping collars on them, and making them do all the farming. This is controlled in the workshopnpcscript by the boolean bWork24Hours. I'm assuming I need to add a Papyrus script to the collar, but scripting isn't exactly my strong suit so I'm unsure where to start. Can I just add a new script that extends workshopnpcscript, then change that one property to true? That gives me a single line script: Scriptname work24 extends workshopnpcscript With properties the same as workshopnpcscript, and I'm worried it would overwrite other properties besides the one I want to change. Edited June 24, 2021 by aurreth Link to comment Share on other sites More sharing options...
DieFeM Posted June 24, 2021 Share Posted June 24, 2021 (edited) I would try something like this: Scriptname CollarWork24Script extends ObjectReference Event OnEquipped(Actor akActor) workshopnpcscript WorkshopNPC = akActor As workshopnpcscript WorkshopNPC.bWork24Hours = True EndEvent Then you need the unequip event as well. Event OnUnequipped(Actor akActor) workshopnpcscript WorkshopNPC = akActor As workshopnpcscript WorkshopNPC.bWork24Hours = False EndEvent Edited June 24, 2021 by DieFeM Link to comment Share on other sites More sharing options...
aurreth Posted June 24, 2021 Author Share Posted June 24, 2021 I would try something like this: Scriptname CollarWork24Script extends ObjectReference Event OnEquipped(Actor akActor) workshopnpcscript WorkshopNPC = akActor As workshopnpcscript WorkshopNPC.bWork24Hours = True EndEvent Will give that a try, thanks. I assume the collar would have to be unequipped and then re-equipped so that the script takes effect? Link to comment Share on other sites More sharing options...
DieFeM Posted June 24, 2021 Share Posted June 24, 2021 That's right. Link to comment Share on other sites More sharing options...
aurreth Posted June 24, 2021 Author Share Posted June 24, 2021 Yup, works a treat. You do have to remove existing collars from settler inventories, not just toggle "wear" with the T key. Open trade window, take collar back into your inventory, put it back into the settler's, then have them wear it again. I'm assuming the transfer back and forth is to generate a new RefID that points to the scripted collar instead of the vanilla one. Thanks for your help, appreciate it. Link to comment Share on other sites More sharing options...
Recommended Posts