At the Battle of Endor, both Emperor Palpatine and Darth Vader were killed seemingly ending the threat posed by the Sith. This allowed the Rebel Alliance to take its first steps into becoming the New Republic. However, one of the many members of the Galactic Empire to had survived the Death Star II's destruction on Endor was the former clone trooper of the Galactic Republic known as X1. With the Emperor dead, he sought to form a new Galactic Empire with himself on the throne and declared himself a Sith Lord. Despite his intentions, X1 lacked the necessary knowledge of the dark side of the Force and thus sought to find knowledge to support him in this endeavor. To that end, he took Imperial forces loyal to him to the planet Vjun in order to reach Bast Castle; a stronghold of Darth Vader's and a possible location for many secrets in the dark arts.
Learning that his brother had survived the battle, his clone twin X2 decided to stop him and journeyed alongside Jedi Master Luke Skywalker to Vjun. They had received intelligence data that suggested X1 had formed his new headquarters at Darth Vader's castle and was being defended by his Imperial forces.
After entering the Vjun system, X2 worked to eliminate the security satellites around the planet in order to prevent Imperial forces from being aware of the enemy presence in the region. Receiving his orders from the Jedi Luke Skywalker, X2 later boarded the orbiting Imperial Star Destroyer which was unaware of the Republic presence. Once he boarded the ship, the former clone trooper battled stormtroopers in order to access the ships database and learn more about what forces were present on the surface of Vjun. Upon slicing the computer terminals, he received the necessary data and later departed the capital ship and headed to the surface of Vjun. Skywalker later informed that the intelligence he had taken from the Imperial warship indicated that X1 had already left the planet, but also indicated that there was a Sith holocron present on Vjun which needed to be retrieved from inside Bast Castle.
However, the Imperial forces were now fully prepared and had TIE/LN starfighters scrambled to protect the installation from harm. Furthermore, stormtroopers were garrisoned as well as mobilized to combat intruders. This necessitated in X2 using his X-wing to first eliminate the enemy fighters and later land at the hangar where he engaged in combat against the defending stormtroopers. While battling Imperial forces, X2 was informed by Skywalker that the data on the Star Destroyer showed that X1 had taken his genetic father Falon Grey's lightsaber and had placed it in Darth Vader's trophy room. Fighting through hordes of Imperial soldiers, X2 managed to enter the trophy room and reclaimed his genetic father's lightsaber that was lost at Dantooine.
He later went to find and retrieve the Sith holocron and just as he entered the inner sanctum, X2 was confronted by security droids left behind by Darth Vader. Fighting of his assailants, X2 was successful in destroying them and later discovered the existence of the holocron within the meditation chamber located deep inside Bast Castle. Upon retrieving it, he was attacked by more Imperial troopers and security droids which forced him to make his way back to the hangar to escape and return to Republic forces. The retrieval of the holocron allowed Luke Skywalker and Republic engineers to decode it in order to find out what X1's objectives were as well as his next destination.