rms827 Posted May 8, 2015 Share Posted May 8, 2015 OK, I've been going nuts for almost 3 weeks trying to figure out how to do this. What I want to do is add an option to an MCM Menu (WIP) for my Dawnguard Sentries mod. Said option would toggle the Sentries between Essential and Killable. Essential usually works great for players who side with the Dawnguard, but some players want them killable for various reasons. I *think* I've got the MCM Menu creation itself figured out thanks to reviewing past posts here on the Forums. It's the toggle that's driving me nuts I've watched videos on YouTube, tried to study other tutorial sources, even opened up some mods that change characters to or from essential. Video tutorials don't cover much in terms of attaching scripts to NPCs & tend to focus more on objects. Even the vast majority of mods that change this state focus on a few characters and simply go in and edit the flag manually on the base character OR add a line to the Skyrim.ini file that disables all essentials. I found one or two mods that use "allowDeath", but the cluster**** called the CK Wiki has nothing on that, and the KillEssential command could be a tiny bit better explained and sounds like it's more intended for cinematics the way the CK Wiki explains it. The only other way I've thought of to do this is have two complete sets of identical Sentries, one essential and one not, that the MCM Menu could toggle between; enabling one set and disabling the other. There HAS to be an easier way though, right? :down: :mellow: Link to comment Share on other sites More sharing options...
lofgren Posted May 8, 2015 Share Posted May 8, 2015 I would suggest leaving the actors non-essential and then create a quest with aliases pointing to all of them, with the aliases flagged as essential. The MCM option would start or stop the quest. When the quest is running, the actors are essential. When it is stopped, they are not. Link to comment Share on other sites More sharing options...
rms827 Posted May 8, 2015 Author Share Posted May 8, 2015 OK, I literally stumbled across this by shear dumb luck just minutes ago. I probably would have found it sooner but I never saw these "commands" on any list page in the CK Wiki. The option to set an NPC as Essential or Protected via script is insanely easy it turns out: http://www.creationkit.com/SetEssential_-_ActorBase OR http://www.creationkit.com/SetProtected_-_ActorBase The default value for the "command" (or whatever the proper Papyrus term is) is 'True' and the commands would look like so: EmperorBaseActorProperty.SetEssential() - Sets the Emperor as Essential RedShirtbaseActorProperty.SetProtected(False) - Sets 'Red Shirt' as cannon fodder (assuming the essential flag was also cleared) Now we know... And knowing is half the battle :D :D :D Link to comment Share on other sites More sharing options...
Pevey Posted May 9, 2015 Share Posted May 9, 2015 I would still suggest the method lofgren describes above. The reason is to make it more user-proof. If an user uninstalls half-way through a game, using the quest alias approach would drop all the aliases after uninstall and set them back to their default. Perfect uninstall solution. If you use the commands you found to actually change the status from the default, that will persist in the save after uninstall. Link to comment Share on other sites More sharing options...
rms827 Posted May 9, 2015 Author Share Posted May 9, 2015 I intend to Pevey. I figured I would be cleaner, and easier. I just knew there had to be a command to trip those flags though and it drove me nuts that I couldn't find them for so long. Link to comment Share on other sites More sharing options...
Recommended Posts