Hullo friends,
I've seen a lot of people asking around on forums about whether it is possible to earn all 3 faction companions' perks (Paladin Danse, X6-88, and Deacon) without cutting ties with any of those factions. I pulled it off today, so I thought I'd share how I managed it. Bear in mind two things:
1) some of the choices I am listing as important may not matter... I simply believed they were important based on internet research/speculation
2) some choices that I made may matter, but I did not list them because I thought they were inconsequential.
Also, the 4th faction (the Minutemen) is available no matter who else you partner with, so don't worry about Preston's perk.
Firstly:
Make all three companions available by pursuing the main quest line for each faction. Do NOT proceed past the quests that make the companions available unless specifically listed. Here are the quests that make each one available:
-Deacon: Tradecraft
-XS-88: Mankind Redefined (*careful! read ahead before doing the Battle of Bunker Hill*)
-Danse: Call to Arms
Now, both Deacon and XS-88 will relinquish their perk simply by maximizing their affinity, so you don't have to continue down the main quest line for the Institute or the Railroad.
*HOWEVER*, when attempting to open up XS-88 as a companion, the internets leads me to believe that my choices in Battle of Bunker Hill (an Institute quest) are important to not make the Railroad hate you. I chose to initially say I would execute the synths (though from what I understand, you can also tip off the Railroad or BOS without incident) ignore the battle completely (as each faction thought I was an ally), sprint my way to the fugitive synths, then tell them they were free to go. You must then kill the courser sent as your ally. Here's the key... when you report back to Father on the roof of the CIT ruins, you LIE about it and say you were ambushed. He doesn't really believe you, but basically says he doesn't care at the moment, and you're free to keep pursuing the Institute quest line.
So, once you manage to free up Deacon and XS-88, simply make them love you without continuing the main quest line. Deacon is easy... simply do side quests with him for a while and pick a lot of locks/hack computers. He generally likes it when you help people out, so I maxed him out pretty quickly. Once you hit idolized, you get the perk. There's no personal quest.
XS-88 is the same way, but he's much more of a pain in the radstag. He doesn't care about the Commonwealth's petty side quests, though he does love your select responses in a few of the Institute's side quests (A House Divided and Building a Better Crop are definitely safe to do without angering any other factions... check his wikia for more information). He likes it when you enter power armor or modify weapons. You can enter power armor then sit in a chair for an hour and repeat endlessly, but he doesn't like it that much. I'm not gonna lie, I did that like 60 times to win him over. Also, to be extra painful, he doesn't offer his first friendship dialogue until 500 affinity (every other character is 250), so you'll basically think the game is broken for three hours until he finally decides to mildly approve of you. But rest assured, with no personal quest needed, he'll offer up his perk once you hit 1000 affinity.
Now for Danse, you can use the same power armor trick to maximize his affinity quickly (he also loves it when you modify weapons, and you can quicksave/reload to refresh to rinse and repeat that one). HOWEVER, he needs you to complete a personal quest to reach "Idolized," and that quest (Blind Betrayal) is a part of the main Brotherhood of Steel quest line. I'm not sure if it matters, but I used a lot of charisma-based dialogue options along the way to make sure everyone (aka Dr. Li) did what I asked without raising suspicion in the Institute. During Blind Betrayal, you will be asked to assassinate Danse. Wear some lovely charisma gear, refuse to execute Danse, and when the Elder appears outside of the Listening Post to finish the job, convince him to leave Danse alone. Afterwards, return the Prydwen to finish the quest, which will make Danse available again. HOWEVER, do not continue with the next quest--Tactical Thinking--or you'll instantly make enemies with the Railroad the second you talk to Kells. At this point, Danse will rejoin you as a companion when you visit the Listening Post, and you can continue cheesing him with power armor until he loves you and gives up his perk.
At this point, you should be free to pursue any faction's ending that you feel like. If you are worried about the fact that each faction desires the holotape you took in the Institute to move forward with their quest line... don't be. It doesn't seem to matter. Though if you want to play it safe, I opted for the Minutemen, and then had Sturges make copies of the tape for each faction.
Also, for those of you who may not have known that companion perks existed at all, here are the perks offered by the three faction members:
-Deacon: extra sneak damage and longer stealth boy life
-XS-88: extra energy weapon defense
-Danse: extra damage against super mutants, ghouls, and synths.
Companion perks are earned after maximizing your relationship with a companion. They are permanent, and you don't have to be traveling with that particular companion to keep them active, so once you earn it you can betray whoever the frick you feel like. The reason people have asked specifically about these three companions is that they are the only ones in the game you can lose access to (by betraying that particular faction).
If I've gotten anything wrong or missed anything, feel free to let me know in the comments.
Good luck in the Commonwealth! And don't forget to build a massive base on top of the floating highway in Graygarden, cause yeah.......... you can do that. =)