pepperman35 Posted June 24, 2020 Share Posted June 24, 2020 (edited) Ok. I have created a number of custom NPCs and I would like to assign them to various workshop-related objects within the settlement. So how does one do that within the Ck. I would assume you have to link them to that object or make that object theirs via ownership; but there seems to be something else needed as I have tried both approaches and neither seemed to work. Appreciate your insight. Edited June 24, 2020 by pepperman35 Link to comment Share on other sites More sharing options...
SKKmods Posted June 24, 2020 Share Posted June 24, 2020 Your actors should have WorkshopNPCScript attached. If you look at WorkshopNPCScript and find "Event OnCommandModeGiveCommand" you will see the script call to assign an actor to resource, which is in the WorkshopObjectScript. To force that in an external script use: (ResourceObject as WorkshopObjectScript).ActivatedByWorkshopActor(ThisActor as WorkshopNPCScript) You need to check the logic in WorkshopObjectScript.ActivatedByWorkshopActor to ensure your context meets the condition tests, or write you own handler without the tests. Link to comment Share on other sites More sharing options...
pepperman35 Posted June 24, 2020 Author Share Posted June 24, 2020 Thank you sir, you know you stuff! Link to comment Share on other sites More sharing options...
SKKmods Posted June 24, 2020 Share Posted June 24, 2020 Only because I have recently added some new Workshop Ownership Utilities functions that you may be interested in using in your own testing: (13) Map mark unassigned settlers and resources at the local workshop. (18) Detect issues with local workshop resources (assignment/production) Link to comment Share on other sites More sharing options...
markusm1000 Posted June 24, 2020 Share Posted June 24, 2020 I have created a number of custom NPCs and I would like to assign them to various workshop-related objects within the settlement.Add WorkshopNPCScript. Set first three entries true to get a regular settler, who is comandable and can move and provide. Autofill WorkshopParent entry. Don't forget this! Check if WorkshopParent ist set!!!I would assume you have to link them to that object.Link Actor to Workbench, Keyword WorkshopItemKeyword, Link Actor to his workplace e.g. a plant, Keyword WorkshopLinkWork. Link to comment Share on other sites More sharing options...
pepperman35 Posted June 24, 2020 Author Share Posted June 24, 2020 Markusm, thank you for the infos. Very informative. Link to comment Share on other sites More sharing options...
Moradinsoulforger Posted January 2, 2021 Share Posted January 2, 2021 I'm trying to find or create an auto equip armor script, like the script place on the baton and 10MM pistol on the opening Vault 111 section of the game:Scriptname WeapAutoEquip extends ObjectReference ;Weapon property WeaponToEquip auto const GlobalVariable property WeaponHasAutoEquipped auto constint Property FavoriteSlot = -1 auto const Form WeaponToEquip Event OnInit()WeaponToEquip = self.GetBaseObject()EndEvent ;when the player picks up the weapon, automatically equip the weapon and favorite itEvent OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer);Debug.Trace("**************" + self + "changed container!") if akNewContainer == Game.GetPlayer() if WeaponHasAutoEquipped.GetValue() == 0;set the global so the autoequip only happens the first timeWeaponHasAutoEquipped.SetValue(1) ;autoequippingGame.GetPlayer().EquipItem(WeaponToEquip) ;favoritingGame.GetPlayer().MarkItemAsFavorite(WeaponToEquip, FavoriteSlot) ;wait a second to allow the weapon to assemble in the hand before drawing itUtility.wait(0.5)Game.GetPlayer().DrawWeapon()endifendifEndEvent I have attempted copying the scripts from the 10mm , altering them and applying them to a modified Vault 111 Jumpsuit with slightly improved resistances, but so far, failing. I've only begun working with the creation kit and just feeling my way around. I'm basically only looking to pickup the armor and put it on without to having the Pipboy, or resorting to showinventory, getting the armor id and then player.equipitem <id>. Any advice would be helpful. Link to comment Share on other sites More sharing options...
Recommended Posts