Taking Independence

Taking Independence is a Minutemen main quest and achievement/trophy $$

Detailed walkthrough
Once the Sole Survivor has recruited at least four settlements to the Minutemen cause, this quest can begin. The next time Preston is talked to, he will bring up the idea of retaking the Castle, suggesting that the radio transmitter there would help with communicating with the growing number of allied settlements. Preston will then ask the Sole Survivor if he should assemble a strike force at the Castle. Once the Sole Survivor is ready for the attack, they can answer affirmatively to continue with the quest (Preston will wait for them to come back and call the attack otherwise).

At this point, the Sole Survivor must head to the Castle and meet Preston, who will be waiting in a ruined house with a strike team of three Minutemen. As the Sole Survivor approaches, Preston will talk a little about the fort before asking them to decide on a strike plan. The three Minutemen will offer various potential plans of attack: a direct assault into the courtyard via the breached northwest wall, a pincer through the breach and the main gate to the south, or setting up a firing line outside the northwest breach and drawing the mirelurks out to their guns.

Once the plan of attack has been decided, the Minutemen will move into position. As soon as someone enters the courtyard, mirelurks will begin emerging from the ground and attacking. Some of the mirelurk eggs may also hatch, releasing mirelurk hatchlings to be defeated. The Sole Survivor will need to help the Minutemen eliminate the mirelurks to proceed. Once the courtyard is clear, Preston will point out the mirelurk nests that are all over the Castle, stating that they need to be taken care of to keep the mirelurks from coming back. He will tell any remaining Minutemen to remain in the courtyard and take care of the eggs there while he and the Sole Survivor clear the walls.

From here the Sole Survivor must find the marked mirelurk nests in and around the Castle's walls and destroy all of the eggs. As they clear them out, more eggs will hatch and more mirelurks will emerge. When enough of the eggs are destroyed, the entire fort will shake, and a mirelurk queen will emerge from the lagoon - the "sea monster" that destroyed the Castle in the past. It will make her way through the southwest breach and into the Castle courtyard and begin attacking everything in sight. A missile launcher and a flamer can be found in an armory inside the east corner of the Castle's wall, and may come in handy for defeating the queen.

Once the queen has been killed and the remaining eggs are cleared out, Preston and the remaining Minutemen will gather in the courtyard, where he tells them to be alert for any remaining mirelurks, while he and the Sole Survivor have a look at the radio transmitter in the center of the courtyard. To finish the quest, the Sole Survivor must use the Castle's workshop to power up the radio transmitter. The transmitter requires 10 units of power, or a single large generator. With the transmitter powered up, Preston will express his happiness at the success of the mission as the quest completes.

Approximately three days after the Castle is taken, Ronnie Shaw will arrive and the Minutemen questline continues with Old Guns.

Bugs

 * After defeating the mirelurk queen, Preston may glitch into a wall that the player cannot enter. In order to fix this, one will have to reload to before the glitch happens.
 * After defeating the mirelurk queen, the marker to meet in the courtyard will appear at a far distance. The path there is very treacherous as it contains synths, raiders, super mutants, mirelurks and deathclaws on most paths there. To fix this fast travel to a few different places and it will automatically fix itself.
 * If one encounters the glitch, where the player is required to clear out the remaining egg nests after killing the mirelurk queen, some of the random loot around the fort will have disappeared permanently. Also, a legendary mirelurk that sometimes spawns in one of the fort's rooms may vanish, too.
 * After defeating the queen and clearing out the Fort, Preston Garvey may sit on the wall doing nothing with no speech options. Preston may also walk all the way back to Sanctuary and will continuously say "We need to focus on taking the Castle back". This may be solved by sitting on the chair and wait for 24 hours.
 * The queen may not spawn after killing the mirelurks as she is stuck under the floor. Loading a previous save and re-entering the room may solve this issue.
 * After killing the mirelurk queen the player may be unable to build more than one generator of each type, even if the player has the necessary parts.
 * When the player builds the generators, of any size, one is unable to build them in the courtyard, or on top of the walls. Reloading a save before one built the generators should fix this issue.
 * If one leaves the Castle during this quest, it will be unable to be completed.
 * Sometimes, Preston won't give the player the quest even if one meets the requirements (even if the player captured the castle before). To solve this, just send him away to Sanctuary and meet him there, he will start talking about the Castle.
 * Sometimes, even after killing all enemies within the Castle, one won't be able to activate the workshop because "You need to clear out the enemies at this location". Additionally, the conversation with Preston may be stuck in a similar loop
 * This be fixed by using the command.
 * Another option is to disable mods (especially Unofficial Fallout 4 Patch), then reload to previous save and retake The Castle.
 * One can use the command to finish the quest, but the Castle will remain unbuildable.
 * Sometimes, the transmitter is impossible to power up.