Original air date: November 9, 1992
The Enterprise has two days of downtime, so the crew are finding different ways to pass the time. Picard is practicing his recorder, Crusher is directing a play, Geordi is interfacing the ship's systems through Data's brain, and Worf wants to overhaul the ship's defenses. Picard urges Worf to relax a little instead, so the disappointed security chief returns to his quarters, where Alexander is waiting to rope him into a holodeck adventure.
Work and Alexander dress up as a Wild West sheriff and deputy and arrive in the town of Deadwood to bring the bad guy, Eli Hollander, to justice. Worf promptly pummels Eli, but Alexander stops the program and raises the difficulty so it will be a challenge. Worf tries again and gets into a brawl with Eli's goons. He's rescued by Troi posing as mysterious drifter, having been recruited by Alexander because she loves westerns. The trio arrest Eli. Meanwhile, a power surge in Data's positronic brain causes him and Geordi to discontinue their tests. As they walk away, Data twirls his tricorder like a pistol.
Worf, Troi and Alexander are holding Eli in a cell awaiting the arrival of a judge, when Alexander is kidnapped. Around the ship, the computer starts experiencing errors. The script for the play that Crusher is directing gets replaced by Data's poetry. The music that Picard was accompanying gets replaced by Anton Dvorak's The Slavonic Dance, which Data's been analyzing. Food replicators produce nothing but Spot's cat food. Further, Data is starting to act like a Wild West character. Geordi sets to work restoring the damage.
In the Holodeck, Eli's father Frank has kidnapped Alexander, and he looks just like Data. He demands the return of Eli in return for Alexander. It turns out that he has all of Data's physical abilities. When Worf escapes, Frank and his men shoot him, revealing that the security measures are no longer functioning. Worf returns to Troi, and they realize that they're stuck in the simulation. They'll have to finish the story by somehow defeating a superhuman gunslinger.
Worf negotiates a Prisoner Exchange with Frank, but Troi warns him that the villain will always backstab the hero. Further alarming is the fact that more and more characters are turning into Datas. Worf recruits the owner of the local saloon, Annie, to bring him some supplies. Annie is programmed to be his mistress (a likely addition of Lieutenant Barclay, who co-authored the adventure), forcing Worf to endure her advances in return for the favor. Worf uses the items to rig a temporary forcefield, which he wears to the prisoner exchange.
Frank arrives with a full compliment of Data henchmen, who promptly open fire as soon as the exchange is made. The bullets bounce harmlessly off the forcefield, but it burns out after a few seconds. Troi emerges from hiding to hold the henchmen at gunpoint. Frank is out of ammo, but the last of his henchmen tosses him a loaded gun. Worf beats him to the draw and shoots the gun out of his hand. Defeated, Frank gives up, and Worf tells him and his men to leave town and never return.
The day is saved. Troi, Worf and Alexander gather and await the end of the program, but nothing happens. There's one last thing that needs to happen. They return to the saloon, where a Data version of Annie runs down the stairs and embraces Worf, who winces until the program fades away. Back in their quarters, Alexander guesses that Worf won't want to return to the "Ancient West" again, but Worf states that the town of Deadwood will need the protection of a good sheriff and his deputy. The security chief steals away and admires himself in his cowboy hat, practicing his quick-draw and smiling approvingly. The ship flies off into a setting sun.
- Abhorrent Admirer: Worf is annoyed by Annie's advances long before she turns into Data.
- And You Thought It Was a Game: When Worf meets the Data-ized Frank Hollander, he initially thinks Data is playing a part like Troi, until Hollander almost kills him.
- Blasting It Out of Their Hands: Worf shoots Frank Hollander's pistol out of his hand in the climax.
- Blood Knight: Worf lets his inner Klingon out during a Bar Brawl.
- Bounty Hunter: Troi assumes the role of one, named "Durango", as part of the simulation.
- Instead of rehearsing a play, Riker reads part of "Ode to Spot" from "Schisms," three episodes prior.
- Picard plays his flute from "The Inner Light".
- Subtle one: Troi smoking a cigar, a callback to her conversation with Samuel Clemens in "Time's Arrow".
- Data notes that Geordi is growing a beard "again." He was previously seen with an unexplained beard in "The Outcast."
- Chronic Backstabbing Disorder: Discussed. Worf is perfectly willing to trade Eli for Alexander and be done with the program, but Troi warns him that the villain will always backstab the hero, even though in this circumstance there's no cause for it.
- Cliché Storm: Of westerns.
- *Click* Hello: How Troi's character enters the program, when she blasts Eli Hollander's hat off his head with a Winchester carbine.
- The Computer Is a Cheating Bastard: In-universe, the computer glitch gives the holodeck characters not only Data's physical appearance, but also his physical abilities. That means Worf is forced into a showdown with a half-dozen combatants with superhuman strength, reflexes, and eyesight.
- Curb-Stomp Battle: Worf kicks Eli Hollander's ass in their first encounter, since he's stronger and tougher than any human. Alexander immediately pauses the program then resets it with a higher difficulty setting so Worf will have a challenge.
- Deflector Shield: Worf rigs up a personal force field from his communicator and some telegraph parts, which works just long enough to survive the initial showdown.
- Dog Food Diet: Another consequence of Data's link is the replicators produce nothing but cat food.
- Failsafe Failure: Honestly, you would think that by now they would know not to plug so much as somebody's USB flash drive into the ship's computer, much less try hooking Data's brain up! Geordi and the computer are like Wesley and the warp drive — trying to do anything involving it never ends well! Double that when holograms are involved.
- Fan Disservice: Annie Meyers, the busty barmaid, gets Data-ized as well in the end. In-Universe as well, given Worf's distressed reaction.
- Genius Bruiser: The episode is a rare opportunity to show off the fact that Worf is a full-fledged Starfleet officer in addition to a battle-ready Klingon. He's able to rig up a temporary forcefield using only a few scavenged supplies from a Wild West town.
- Genre Savvy: Troi is a big fan of Westerns and knows well enough that Frank Hollander won't keep his word to Worf.
- Gratuitous Spanish: The Mexican stereotype who hangs out with the Hollanders talks like this."You're very funny man, Señor Eli."
- Holodeck Malfunction: The holodeck locks Worf, Troi and Alexander inside of it with its security measures shut off. Even worse, it starts replacing all the characters with Data, complete with his superhuman abilities.
- I Do Not Like Green Eggs and Ham: At the beginning, Worf is certain he's going to hate Alexander's Western program, and even tries to wriggle out of it by coming up with new duties to perform, which fails when Picard tells him to go and use his free time enjoying himself. He starts to warm up to it, though, when he learns the two of them are playing the roles of law enforcement officers, and really starts to get into it when he gets into a fistfight with Eli's henchmen.
- Karma Houdini: The holodeck program ends with Eli and Frank being set free rather than brought to justice. They get the only thing they were after: Eli's freedom. It's unclear if this is the way the story was supposed to end or if it was just one possible ending.
- Magnificent Moustaches of Mexico: The Mexican bandito sports one.
- Me's a Crowd: Data's link to the ship's computer inadvertently changes all the holograms in Alexander's program into Data duplicates.
- Miss Kitty: Referenced by the fact that the local cathouse is owned by "Miss Langford."
- Musicalis Interruptus: At the beginning of the episode, Picard is attempting a clarinet minuet with his Ressikan flute, and gets interrupted thrice by Data and Geordi, Beverly Crusher and Worf.
- No Challenge Equals No Satisfaction: Alexander is upset by how Worf easily beats Eli Hollander, prompting him to raise the difficulty level.
- No-Sell: One of Eli's Mooks hits Worf over the head with a chair and doesn't faze him at all.
- Not So Above It All: At the end of the episode, Worf puts on his cowboy hat, stands in front of the mirror in his quarters, and practices his Quick Draw skills, smiling like a kid.
- Oh, Crap!: When Troi sees the Data-ized Eli Hollander shuffling a card deck rapidly, she realizes that the characters don't just look like Data, they are Data with all his superhuman strengths.
- Prisoner Exchange: Hollander wants to exchange his son for Alexander.
- Riding into the Sunset: The episode ends with the Enterprise flying in the direction of a sun setting over a nearby planet.
- Rule of Three: Picard's flute-playing gets interrupted three times.
- Self-Deprecation: Eli swears to punish whoever drew his "Wanted!" Poster, saying, "I'm ten times uglier than that, ain't I?"
- The Sheriff: Worf's character, with Alexander as his deputy.
- Showdown at High Noon: Okay, not exactly noon, but close enough.
- Stock Footage: The USS Biko is recycled footage of USS Cochrane from "The Drumhead".
- Strike Me Down with All of Your Hatred!: After Worf disarms Frank Hollander, Frank stands there and dares Worf to kill him. After a moment's hesitation, Worf tells him "Do not show your face in this town again."
- "Wanted!" Poster: Eli is introduced shooting at his wanted poster.
- What Do You Mean, It's for Kids?: In-Universe, Worf is shocked by the presence of a bordello with hookers.Worf: You wrote this holodeck program yourself?
Alexander: Well, Mr. Barclay helped a little.
Worf: I must have a little talk with Mister Barclay.
- Woman Scorned: Annie feels this way when Worf doesn't respond to her advances.
- Wrong Genre Savvy: Worf mistakenly assumes that he's in a story where the villains have honor, and Frank Hollander will uphold his end of the fair and honorable agreement they just made. The Genre Savvy Troi has to correct him, and says they should be preparing for the sudden but inevitable betrayal.