As most of you probably know already, in this event one of your companions dies. Most people think it is story driven and always the same two, as they don't really compare notes with others, but it is actually always one of your top two highest relationship companions. For me that was either Andreja or Sarah. Since Andreja is my bae, it had to be Sarah, but then after it happened I realized Neil Degrasse Tyson Barrett was still alive and annoying the fuck out of me, so I decided that couldn't stand and he had to die instead. Here is how to determine who might die, and how to change it.
The quest prior to this one has you retrieving two more artifact pieces, and you MUST MUST MUST set the companion levels before you touch the artifact in the Lodge after retrieving them and trigger the next quest, which is where you go to The Eye and do simple maintenance tasks. Even though significant events happen after that point, from replaying it way too many times and having nothing matter, I can fairly confidently say that at the point you touch it and Vladimir asks you to help on the station is when everyone's fate is determined. So follow the instructions below prior to touching it. You can stay at that point in the quest and go off and do all kinds of other stuff to try to raise someone else's level, so just don't touch it until you are ready.
There are non-console command ways to know who are the two at risk, but you won't see it until AFTER you touch the artifact, so make sure you save if you aren't going to use commands. The person that goes to The Eye and has their simple repair task fail and offers to stay behind and fix it is your HIGHEST companion. For me that was Andreja, since we're Klingon-married. The person that accompanies you to steal the next artifact piece from The Scow is SECOND highest.
The highest companion will die on The Eye if you stay and defend the Lodge. The second highest companion will die in the Lodge if you instead immediately go to The Eye.
Now, if you are already too far along to effectively manipulate relationship levels you can use console commands.
In order to check the levels, you can use the following (remember to target the proper NPC first):
GetAV COM_AffinityLevel
GetAV COM_Affinity
(capitalization does not matter)
For later use, to CHANGE those levels you just use
SetAV COM_AffinityLevel
SetAV COM_Affinity
AffinityLevel will return a number from 1 to 3 from what I've seen. 3 is only for the companion that you are banging. 2 is any companion you are ally with, which I believe means you have completed their quest line entirely but are just friends.
Affinity is (from what I can tell) simply a number indicating how many likes/dislikes have accumulated for that companion. There is also one for Anger but from what I can tell that doesn't matter unless their Affinity is zero, so Anger is sort of just like a negative number. Outside of murdering people in the face and not fixing it, I honestly don't know much about Anger so I'm just going to assume everyone has some Affinity and go from there. If you have a bunch of Anger you probably don't care who dies anyway.
AffinityLevel trumps all. Remember that. For me, Andreja had less Affinity than Sarah (because Andreja be crazy and dislikes random shit I do) but her Level was 3 while Sarah's was 2. So Andreja died on The Eye (highest character), and Sarah died in the Lodge (second highest) as predicted.
There are two simple ways to change these levels to pick who dies. If you have a level 3 companion, then bump the person you want to die up to second place. Since (as far as I can tell) you can only have one level 3, everyone else will be 2 or lower, so after you have run around and checked everyone's stats you just use the SetAV commands to bump (or keep, it might already be that) their AffinityLevel to 2 and Affinity to something higher than everyone else. Make sure you actually click on the npc and their name shows up in the console window, as opening and closing the window doesn't change the target, so if you just checked someone else it will still have them on target instead of the person you are looking at and trying to change.
For this option now all you have to do is go to The Eye and save your highest companion, and when you come back the one you just changed to second will be dead in the Lodge.
If you don't have a level 3 companion and everyone is 2 or lower, it is much simpler to just raise the one you want dead to the highest using the same commands, but instead stay and defend the Lodge. Now when you go to The Eye later, the highest companion will be dead like you wanted.
There, now you can kill Barrett like I did. Or one of the girls if you are gay. Or Sam if you are a fucking monster and want Cora running around without a dad anymore!