Anyone know what controls the essential status of companions? Seems in normal mode that using setessential baseid 0 does not work. I tried in console and through a script so I'm guessing there is something preventing them from being set non-essential in normal mode. Also tried this on a normal NPC. When set to player teammate they are auto set essential, and setting them as not player teammate makes them back to non-essential, but the function setessential still seems not to work.
hm ah.
What you are trying to do must take into account whether or not you are in hardcode mode.
In 'casual' mode, hired followers do not walk around with the essential flag on. Only upon death, when the .exe does the death intercept and makes them 'unconscious', does that essential flag get set. As they lie on the ground, during that unconscious time, they are essential. Then when they recover and get up, the flag gets pulled off by the .exe.
I believe all it takes in order to have the casual-mode death intercept work is for the NPC to have player teammate status. (CompanionREF.setplayerteammate 1).
I have no direct experience with hardcoe but I believe the death intercept is simply not done by the .exe.