bientje Posted March 28, 2021 Share Posted March 28, 2021 HI, I'm looking for a way to make my NPC, in this case a horse, unequip all their items when a new AI Package starts, and then when the AI Package ends/moves to the next package, I want to NPC/horse to re-equip their inventory. The horse will only be using 1 default outfit, and the items will always be the same. I tried setting 'Use Sleep Outfit' in the AI Package but it seems unfortunately that function doesn't work in the CK. Can anyone provide any help? I have done some verrry light scripting, but am very noob. Thank you. Link to comment Share on other sites More sharing options...
maxarturo Posted March 30, 2021 Share Posted March 30, 2021 "Sleep Outfit" it's not used in Skyrim. You can do this either by adding a script directly to the packages or by creating a quest to monitor your actor. Papyrus functions needed for this: Event OnPackageEnd(Package akOldPackage) https://www.creationkit.com/index.php?title=OnPackageEnd_-_Actor Event OnPackageStart(Package akNewPackage) https://www.creationkit.com/index.php?title=OnPackageStart_-_Actor * This one will only work on a quest and by having the actor on a Alias. (monitoring the actor) Event OnPackageChange(Package akOldPackage) https://www.creationkit.com/index.php?title=OnPackageChange_-_Actor Have a happy modding. Link to comment Share on other sites More sharing options...
bientje Posted March 31, 2021 Author Share Posted March 31, 2021 Can I not do it through Papyrus Begin and Change fragments so the OnPackageEnd and OnPackageStart events are automated? I'm really looking for some pointers on how to structure my script, because I have no idea and couldn't find any decent explanation. Link to comment Share on other sites More sharing options...
bientje Posted March 31, 2021 Author Share Posted March 31, 2021 Found the answer. Maxarturo's way was too complicatd for me. I didn't understand a thing they said :p Here is the fastest way to do it, all the credits to OldMansBeard who explained is very well in this topic: https://forums.nexusmods.com/index.php?/topic/6591896-conditions-in-ai-packages "(1) in the OnBegin of your AI package, just type a semicolon, click 'compile' and close the package. This will cause a dummy papyrus script to be attached to the package.(2) Re-open the package and you will see it now has a script attached. It will probably have a name starting with PF. Right click and that and open its properties.(3) Add an armor or weapon property (as appropriate), give it name that makes sense to you and assign its value to be the item you want to be equipped.(4) Suppose you called your property 'ThingToEquip'. In the OnBegin space, where you had the semicolon, hit edit. Remove the semicolon and put in the lineakActor.EquipItem(ThingToEquip)(5) Hit compile again and save the package." Poepkat says:Instead of using EquipItem(ThingToEquip) you can set your Outfit as a propery (step 3) and use SetOutfit(OutfitPropertyName) (step 4). Worked like a charm! Link to comment Share on other sites More sharing options...
maxarturo Posted March 31, 2021 Share Posted March 31, 2021 This is exactly what i meant by "You can do this either by adding a script directly to the packages". "mumbo jumbo" it's only when you don't have the required knowledge to comprehend it. Link to comment Share on other sites More sharing options...
bientje Posted April 1, 2021 Author Share Posted April 1, 2021 I don't because I'm a big noob! It's all abrakadabra. You see that the way OMB explained is better for noobs than your explanation, right? But now that I'm more familiar with the basics, I think your suggestion is better because I need to attach the Change Outfit script to multiple horses, so having it all in one script will save time and is more effective.And will I not use OnPackageChange instead of OnPackAgeEnd? It seems more logical. Link to comment Share on other sites More sharing options...
maxarturo Posted April 1, 2021 Share Posted April 1, 2021 I assumed that from "I have done some very light scripting, but am very noob." you were familiar at least with the basics... Link to comment Share on other sites More sharing options...
Recommended Posts