LaceEditing Posted June 19, 2017 Share Posted June 19, 2017 Essentially I want to make a mod that unequips certain armour slots from NPC's when they play an animation. The sleeping animation, and their footwear to be precise; but I have no idea what I'm doing in regards to scripting or how to even apply this to anything. I looked all over for information, and while I have found some tutorials and the like, it doesn't explain what I want specifically. Then there's stuff about having to register animations, and applying spells to magic effects and cloaking the entire cell, and I'm ultimately confused Link to comment Share on other sites More sharing options...
DukePatrick Posted June 19, 2017 Share Posted June 19, 2017 Essentially I want to make a mod that unequips certain armour slots from NPC's when they play an animation. The sleeping animation, and their footwear to be precise; but I have no idea what I'm doing in regards to scripting or how to even apply this to anything. I looked all over for information, and while I have found some tutorials and the like, it doesn't explain what I want specifically. Then there's stuff about having to register animations, and applying spells to magic effects and cloaking the entire cell, and I'm ultimately confused Assuming you know how to start up the CK, just go the the sleep packages and click the boxes on the sleep packages for the actors you want that removes the armor for sleep. At least that was how I did it in Oblivion but Skyrim must have similar check boxes for the sleep package. However if you only want them to remove boots that would need to be scripted. If the beds have some kind of script already on them you could add scripting to it (modify the existing script) to include removing boots via the unequipp function. But it will be tricky because you would need to detect the armor they are wearing on their feet in order to call that in the function. That would require yet another function for detecting the boots.And I believe this is only possible with SKSE: armor boots = ActorRef.GetWornForm(Armor.getMaskForSlot(37) as armor then later you would: ActorRef.UnequipItem(boots) And you would need to do a lot of "checking" in the script such as testing first if the "get boots" function even got any boots at all using: If (Boots as armor)ActorRef.UnequipItem(boots)endif And none of this will work without getting the actor Reference first: Actor ActorRef = ??? Where ??? is many ways to do this, none that are easy unless the existing bed script has this already done. If the bed has an "onactivate" type script function then the actor ref will be done for you. Depends on the Bed script if it indeed has one. You would also need to revers this after they "wake up" as the AI is not smart enough on it's own to put the boots back on after waking up. If the bed has no such script this all can be done as a script on the sleep package, however, I fear this this kind of scripting (and all the above) may not be for beginners. Meaning You likely will not get all this done in a weekend and have it ruining smoothly in your game the following week *. But this would make a great project to work on over the next several weeks or months (with a lot of trial and error) to learn some more advanced scripting. It would depend on how dedicated you are and how much time you can spend on the project. * Unless someone with time on their hands just outright writes the code for you and shows you exactly how to merge it into the game in the CK. That is possible, maybe. Link to comment Share on other sites More sharing options...
LaceEditing Posted June 20, 2017 Author Share Posted June 20, 2017 Essentially I want to make a mod that unequips certain armour slots from NPC's when they play an animation. The sleeping animation, and their footwear to be precise; but I have no idea what I'm doing in regards to scripting or how to even apply this to anything. I looked all over for information, and while I have found some tutorials and the like, it doesn't explain what I want specifically. Then there's stuff about having to register animations, and applying spells to magic effects and cloaking the entire cell, and I'm ultimately confused Assuming you know how to start up the CK, just go the the sleep packages and click the boxes on the sleep packages for the actors you want that removes the armor for sleep. At least that was how I did it in Oblivion but Skyrim must have similar check boxes for the sleep package. However if you only want them to remove boots that would need to be scripted. If the beds have some kind of script already on them you could add scripting to it (modify the existing script) to include removing boots via the unequipp function. But it will be tricky because you would need to detect the armor they are wearing on their feet in order to call that in the function. That would require yet another function for detecting the boots.And I believe this is only possible with SKSE: armor boots = ActorRef.GetWornForm(Armor.getMaskForSlot(37) as armor then later you would: ActorRef.UnequipItem(boots) And you would need to do a lot of "checking" in the script such as testing first if the "get boots" function even got any boots at all using: If (Boots as armor)ActorRef.UnequipItem(boots)endif And none of this will work without getting the actor Reference first: Actor ActorRef = ??? Where ??? is many ways to do this, none that are easy unless the existing bed script has this already done. If the bed has an "onactivate" type script function then the actor ref will be done for you. Depends on the Bed script if it indeed has one. You would also need to revers this after they "wake up" as the AI is not smart enough on it's own to put the boots back on after waking up. If the bed has no such script this all can be done as a script on the sleep package, however, I fear this this kind of scripting (and all the above) may not be for beginners. Meaning You likely will not get all this done in a weekend and have it ruining smoothly in your game the following week *. But this would make a great project to work on over the next several weeks or months (with a lot of trial and error) to learn some more advanced scripting. It would depend on how dedicated you are and how much time you can spend on the project. * Unless someone with time on their hands just outright writes the code for you and shows you exactly how to merge it into the game in the CK. That is possible, maybe. Thank you, this is what I essentially need in terms of having some sort of direction for what I need to do. I've been reading the CK wiki and going through the tutorials a lot, trying to take everything in that I can. I'm glad that the exact process wasn't just given to me, as I'd rather figure it out myself so that I can really familiarise myself with scripting and using the CK as a whole, since I've wanted to get into modding more advanced stuff for years (literally the only mods I've ever made were ones that deleted certain actors from the game or altered the stats on weapons) At this point I've managed to grasp a small bit of what certain words actually mean in terms of what they're telling the scripts to do, and how they reference & extend on other pre-existing scripts; so I think this should be something I could figure out in time Link to comment Share on other sites More sharing options...
Recommended Posts