Four years later, in Ship in a Bottle, Moriarty makes a second attempt to "get off the Holodeck." After making his miraculous exit from the VR system through sheer will, Moriarty is taken to sick bay. Dr. Beverly Crusher confirms that he is entirely "human" and "real." His "quantum signatures" are not those of a simulation, the Doctor states. Captain Picard exclaims in utter amazement that "according to the laws of physics, this is impossible."
Picard takes Moriarty to the windowed area of Ten-Forward and shows him that they are in a twenty-fourth century starship traveling through Deep Space. What then transpires comes perilously close to a mere replay of Elementary, Dear Data. Professor Moriarty once again takes over the Enterprise-D's main computer and threatens to destroy the ship unless his demands are met. One crucial difference this time is that Moriarty's first stated requirement is that his girlfriend and fellow Holodeck avatar, Countess Regina Barthalomew, played by Stephanie Beacham, be reprogrammed by Starfleet engineers to the superior status of self-aware sentient existence and "full-fledged reality."
Apparently acceding to Moriarty's ultimatum, Data, LaForge, Barclay, and Chief Miles O'Brien, played by Colm Meaney, in a first round, then LaForge, Lt. Worf, and Commander Riker in a second round, work diligently on scientific trials combining two Star Trek technologies of disappearance: the Holodeck and the transporter. The matter synthesis experts hypothesize that a Holo-object might attain real physical substance if the transporter mechanism could lock onto its coordinates and beam it out of virtual reality to a teleportation pad. Transporter-replicator technology will be innovatively employed in the manufacture of life, a deed normally beyond the capabilities of Federation technoscience. The compositional code of organic being has a "quantum level of resolution," as opposed to the "molecular level of resolution" of inanimate objects. Countess Barthalomew is to be "made real" by the supplementary quantum physics technique of "uncoupling the Heisenberg Compensators" and allowing them to "rescramble randomly" to offset phase variance.
All the Enterprise-D officers, with the exception of Picard, Data, and Barclay, are Holodeck characters clandestinely programmed by either Professor Moriarty or Captain Picard. Portable "pattern enhancer" devices are used to strategically simulate the success of the matter intensification procedure for the benefit of the ultimately duped Moriarty and Barthalomew. Lt. Commander Data discerns that Moriarty never "walked off the Holodeck" at all. What the brilliant late nineteenth-century criminal scientist really sashayed off of was a "Holodeck within a Holodeck." After Data's discovery, Picard devises his counter-move of creating a "Holodeck within a Holodeck within a Holodeck."
Professor Moriarty ingeniously programmed a Holo-simulation in which the perceptible wider reality of the Enterprise-D and its viewport images of outer space were a three-dimensional optical illusion. Picard, Data, and Barclay have done nothing else but amble about inside this chimerical universe ever since their visit to the holographic 221B Baker Street study at the beginning of the episode. "None of this is real. It is a simulation," says Data. "We are still on the Holodeck. The transporter itself is a simulation." Data's unearthing of the ruse comes too late to prevent a Moriarty-coded Lt. Commander La Forge Holo-character from prodding Captain Picard into enunciating secret, high-level computer voice authorization codes, which Moriarty then uses to take control of the seemingly "real" Enterprise-D.
In command of what he believes to be the genuine Starfleet vessel, Moriarty tells a Commander William Riker Holodeck avatar to supervise the continuation of the Heisenberg Compensator-uncoupling, Holodeck-Transporter quantum matter materialization tests in the "real world." He negotiates with Riker while holding Picard, Data, and Barclay as hostages and indicating his intention to demolish the starship. The ostensibly triumphant life sciences experiment finds Professor Moriarty and the Countess standing resplendently in "full reality" regalia on the main transporter pad, congratulated by the Riker Holo-character whom the delighted Moriarty takes for real. The simpatico bad guy exuberantly relinquishes control of the ship to Riker in exchange for a shuttlecraft and the First Officer's personal assurance of free run of all Federation space in the galaxy. "Everything's been programmed to operate on voice command," Holo-Riker tells the departing Moriarty and Barthalomew. "You just tell the [shuttlecraft] computer where you want to go." The shuttle bay door rises and the elated couple sees a beautiful view of the stars. "It is a wondrous sight," says the Professor to his companion, "the first of many we are sure to encounter in our travels." He instructs the shuttle's computer to interface with the main computer of the Enterprise-D. He recites his authorization codes, and releases the command function lockouts.
Captain Picard walks into the shuttle bay. "Computer, store program Picard Delta One in Active Memory and discontinue simulation," he says. Commander Riker and Lt. Worf disappear. There is only the empty grid of the Holodeck. "Program stored," says the computer. Picard exits the Holodeck and meets Data and Barclay in an Enterprise-D corridor. "It worked," he tells them. "They believed they were off the Holodeck." He tells the computer to discontinue the Holodeck simulation arranged by Moriarty. The corridor disappears. The trio is again in the Holodeck's empty grid. Barclay clarifies that this is the Holodeck on the "real Enterprise." As they leave, he opens a small door to the right of the main control panel and pulls out a yellow cubic Active Memory module.
With the senior officers assembled in the Observation Lounge, Captain Picard explains how he led Moriarty astray, creating a simulation using the Holodeck within the simulation of the Enterprise-D within the Holodeck of the real Enterprise-D. Moriarty and Barthalomew are still not aware that they have not left the realm of the virtual. "The program is continuing to run even now, inside that Cube," says Picard. Lt. Barclay picks up the piece of electronic hardware and plugs it into a slot in a larger enhancement device that contains enough memory and interactive galactic scenarios to "provide them with experiences for a lifetime." "They will live their lives and never know any difference," concludes Captain Picard.
Picard's riposte maneuver was a trap that he laid for Moriarty after the Captain learned of the initial trick that the Professor had played on the real. What is disclosed at the end of Ship in a Bottle is that all events in the episode have taken place inside virtuality, or up and down the various levels of the multi-tiered VR setup. Poor Moriarty and his smiling lover stood proudly in the transporter room, believing for one bright shining moment that they had escaped the anguished confinement of the unreal. But it was in that very instant that they were "beamed" from the counter-counter-illusion masterminded by Picard, and "bottled" into a tightly segregated virtual environment housed inside a desktop memory cube unit. Just at the moment they thought they had gotten off the Holodeck, they are plunged even more deeply into one of its most cavernous auxiliary storage areas. Moriarty and Barthalomew are given a bounteous terabyte supply of teraflop-speed "realistic scenes" to help them "live out their lives" in a satisfying way. "Who knows," muses Captain Picard. "Our reality may be very much like theirs, and all this might just be an elaborate simulation running inside a little device sitting on someone's table."
Everyone vacates the room except Lt. Barclay. Left alone, he says loudly: "Computer, end program!" Nothing happens.
In a Next Generation episode like Ship in a Bottle, the Holodeck intelligently poses the problem of the end of any clear separation between real and virtual, and the instituting of "reality" by simulation. The confrontation with the self-aware, technology-created Artificial Life-form Moriarty calls into question routine mainstream VR and the self-assured liberal humanist assumption that we definitely know what reality is. There is a serious admission by Star Trek that what we have called "reality" in the modernist era is critically endangered by the advancing technologies of virtual reality. The binary oppositions of compartmentalized analytical thought - between original and copy, mind and body, model and series, real and virtual, reality and information - break down in the era of consummated virtuality in favor of a perpetual Möbius strip which appears at all points to have two sides but really has one. The "science" of information has worked over its "object" of reality to such a degree that the knowledge is no longer "useful," the real is no longer intact, and the two are no longer separable. Our hypermodern cultural scene might be a sealed off computer game sitting on someone's table because it is more and more a self-convincing system - from cosmological theories of the universe to the news media's unverifiable assertions about "events" - with no outside vantage point, and no grounding in independent referents that would save the real.