Mostly Harmless
by Douglas Adams
Arthur Dent plans to sightsee across the Galaxy with his girlfriend Fenchurch, but she disappears during a hyperspace jump, a result of being from an unstable sector of the Galaxy. Depressed, Arthur continues to travel the galaxy using semen donations to fund his travels, assured of his safety until he visits Stavromula Beta, having killed an incarnation of Agrajag at some point in the future at said planet. During one trip, he ends up stranded on the homely planet Lamuella, and decides to stay to become a sandwich maker for the local population.
Meanwhile, Ford Prefect has returned to the offices of the Hitchhiker's Guide, and is annoyed to find out the original publishing company, Megadodo Publications, has been taken over by InfiniDim Enterprises, which are run by the Vogons. Fearing for his life, he escapes the building, along the way stealing the yet-unpublished, seemingly sentient Hitchhiker's Guide Mk. II. He goes into hiding after sending the Guide to himself, care of Arthur, for safekeeping.
On Lamuella, Arthur is surprised by the appearance of Trillian with a teenage daughter, Random Dent. Trillian explains that she wanted a child, and used the only human DNA she could find, thus claiming that Arthur is Random's father. She leaves Random with Arthur to allow her to better pursue her career as an intergalactic reporter. Random is frustrated with Arthur and life on Lamuella; when Ford's package to Arthur arrives, she takes it and discovers the Guide. The Guide helps her to escape the planet on Ford's ship after Ford arrives on the planet looking for Arthur. Discovering Random, the Guide, and Ford's ship missing, the two manage to find a way to leave Lamuella and head for Earth, where they suspect Random is also heading to find Trillian. Ford expresses concern at the Guide's manipulation of events, noting its "Unfiltered Perception" and fearing its potence and ultimate objective.
Reporter Tricia McMillan is a version of Trillian living on an alternate Earth who never took Zaphod Beeblebrox's offer to travel in space. She is approached by an extraterrestrial species, the Grebulons, who have created a base of operations on the planet Rupert, a recently discovered tenth planet in the Solar System. However, due to damage to their ship in arriving, they have lost most of their computer core and their memories, with the only salvageable instructions being to observe something interesting with Earth. They ask Tricia's help to adapt astrology charts for Rupert in exchange for allowing her to interview them. Tricia conducts the interview, but the resulting footage looks fake. She is called away from editing the footage to report on a spaceship landing in the middle of London.
As Tricia arrives, Random is leaving the ship. Random yells at Tricia, who she believes to be her mother. Arthur, Ford, and Trillian arrive and help Tricia to calm Random. They remove her from the chaos surrounding the spacecraft and take her to a bar. Trillian tries to warn the group that the Grebulons, having become bored with their mission, are about to destroy the Earth. Random disrupts the discussion by producing a laser gun she took from her ship. Arthur, still believing he cannot die, tries to calm Random, but a distraction causes her to fire the weapon, sending the bar into a panic. Arthur tends to a man hit by the blast, who drops a card with the name of the bar- "Stavro Mueller – Beta". Arthur sees Ford laughing wildly at this turn of events, and experiences a "tremendous feeling of peace".
The Grebulons, having determined that removing Earth from the astrological charts will improve their horoscopes, destroy it. It is revealed that the Vogons designed the Guide Mk. II with the ability to see the potential outcome of any event, enabling it to ensure that every version of the Earth in all realities is destroyed. Its mission complete, the Guide collapses into nothingness.