masternoxx Posted January 26, 2019 Share Posted January 26, 2019 I am trying to set an essential actor as non-essential through a script,It is Ennis and he is part of the quest DA14 "a night to remember"Well I am trying to make him killable after quest stage 85 which is where he gets mad about his goat.So I have successfully done this by setting his base actor to nonessential by removing the checkbox.Then use clearAlias() on him at quest stage 85.The only problem with that is now he can be killed, before the quest starts. So I tried it another way by leaving his base actor essential flag on.then on quest stage 85 I used clearAlias and then setEssential to false.Only problem is this doesn't work, apparently because in order for setEssential (false) to take effect,the character has to "update" (level up).So what good is this command? Especially on an NPC that is a fixed level? You can see this type of thing all the time on all the quests in Skyrim. Its really stupid.for instance riverwood trader they set lucan to killable, once you start the quest he wont be though, and then after he will be. But this is stupid because you can kill him before the quest starts which negates the reason to make him essential in the first place, Making him essential because he is part of a quest. I would like actors like Ennis who are required to advance the quest, to start out the game essential, and be essential until either the quest is done, or their part in the quest is done. And then I want them to be non-essential, because they are no longer needed for a quest. Is there any way to set an actor to non-essential, and then force the actor to update, and therefore be killable. I seen something mentioned about toggling race on creation kit webpage in order to do this but it doesn't give examples. Perhaps there is an SKSE function. Perhaps you can force them to a different level? Thanks for help Link to comment Share on other sites More sharing options...
SeraphimKensai Posted January 27, 2019 Share Posted January 27, 2019 So in my spell pack for SE, I have spells to toggle essential, and protected status on NPCs (hell they can even be redirected to the player to make yourself essential if you really want). I can confirm that the commands work at least when applying them via papyrus (I haven't bothered toggling them via a quest, but I imagine it's fairly straightforward). Link to comment Share on other sites More sharing options...
masternoxx Posted January 27, 2019 Author Share Posted January 27, 2019 (edited) So in my spell pack for SE, I have spells to toggle essential, and protected status on NPCs (hell they can even be redirected to the player to make yourself essential if you really want). I can confirm that the commands work at least when applying them via papyrus (I haven't bothered toggling them via a quest, but I imagine it's fairly straightforward). Can you elaborate on how you made the Actors update, were they leveled actors, I'm sorry I don't have Special Edition.I'm not special =(did you killing him right afterward on an essential actor and it worked? I am going to try a SetRace() command after and see if that will work. Is it just me or when you click quote on this forum, does it post the wrong reply, it posts the one before. But next time it works strangely Edited January 27, 2019 by masternoxx Link to comment Share on other sites More sharing options...
Evangela Posted January 28, 2019 Share Posted January 28, 2019 Bethesda uses this to make Elenwen killable after Season Unending, and she has a static level of 30, so I'm not sure what sorcery is required to get it to work "normally". Link to comment Share on other sites More sharing options...
masternoxx Posted January 29, 2019 Author Share Posted January 29, 2019 (edited) This is some progress, I have looked up the quest MQ302, do you know on what stage they set her non-essential? I would like to see exactly the code, thanks very much. Perhaps I did something wrong when using setessential on Ennis? You're saying that it should work immediately?I had tried the command before and after the clearAlias command, and he still was not killable. da14 stage 85;Set property - actor Ennis;Ennis.GetActorBase().SetEssential(false) ;remove base actor essential flag-NOT WORKINGAlias_DA14Ennis.Clear() ;remove his quest alias;Ennis.GetActorBase().SetEssential(false) Thanks for the help! i have found this thread,https://forums.nexusmods.com/index.php?/topic/1019749-scripting-setessential-command-not-working/and on post 4 botOwned says,"SetEssential and SetProtected are ActorBase script commands, Actor References will not be effected by the change until the Actor either re-levels (if a non temporary), or if it's a temporary actor..."... and that is basically what I read on another website. Edited January 29, 2019 by masternoxx Link to comment Share on other sites More sharing options...
masternoxx Posted January 29, 2019 Author Share Posted January 29, 2019 Bethesda uses this to make Elenwen killable after Season Unending, and she has a static level of 30, so I'm not sure what sorcery is required to get it to work "normally".I could use help see above ^ thanks =) Link to comment Share on other sites More sharing options...
masternoxx Posted January 31, 2019 Author Share Posted January 31, 2019 (edited) So I looked through the quest and I didn't see any code to set her non-essential, so I assume it must be on one of her conversation lines.I'll keep looking but if you know it would save me a lot of time. thanksbump Perhaps it needs to be set as some type of magic effect, and it will take effect immediately? I am saying that because of the spell mod that was mentioned. Edited January 31, 2019 by masternoxx Link to comment Share on other sites More sharing options...
Evangela Posted January 31, 2019 Share Posted January 31, 2019 The stage to make her non essential is set when Season Unending(MQ302) is completed, which is Stage 350. The stage being set is stage 50, but that is then called from stage 40 in the main quest (MQ301). In anycase: ; MQ302 completed SetObjectiveCompleted(25) SetObjectiveDisplayed(30) if MQ302.IsRunning() SetActive(true) MQ302.SetActive(false) endif ; Blades now go directly to kill Paarthurnax dialogue if not there already MQPaarthurnax.SetStage(15) MQDisableClutter.Disable() ; make Elenwen unessential Elenwen.SetEssential(false) Link to comment Share on other sites More sharing options...
masternoxx Posted February 3, 2019 Author Share Posted February 3, 2019 Thank you for the reply.The only difference I see here is that GetActorBase() was not used.(after Elenwen.)Is it that simple?It works immediately? Link to comment Share on other sites More sharing options...
TomTesoro Posted February 3, 2019 Share Posted February 3, 2019 (edited) I used this command many times with success. Make sure you're setting it on an actor base property and not an actor. It's works every time without fail. Edited February 3, 2019 by TomTesoro Link to comment Share on other sites More sharing options...
Recommended Posts