The records within the archive contained artifacts and personalities from myths within the D'Arsay culture. The facility scanned the starship and began to use the replicators on board to change parts of the vessel into different mythical settings contained within the records in the archive. These settings were from a drama involving Masaka, a sun goddess, and involved locations such as an aqueduct, a temple, and a swamp.
The archive also altered Data's programming, giving him personalities of key mythical figures, such as a terrified D'Arsay boy, a person named Ihat, an elderly man who portrayed Masaka's father, a victim of Masaka, and Masaka herself. Furthermore, the program turned the internal mechanism of a photon torpedo into snakes and turned engineering into an inferno. Captain Jean-Luc Picard sought to remedy this by playing along in the myth, using the persona of Korgano, another mythical figure, to persuade Masaka, and in turn the archive, to restore Data as well as the Enterprise-D to their normal states.
Background information Edit
According to science consultant André Bormanis, the explanation given in the original script was that the archive was an "advanced Genesis Device" that mistook the Enterprise for a world on which to recreate the ancient society. (Star Trek: The Next Generation Companion)
The archive was the very first model of a space-bound structure in the Star Trek franchise not realized as a physical studio model but rather as a CGI model, one of the first ever seen by the general Star Trek public. Based upon a foot-high sculpture Dan Curry made, Santa Barbara Studios constructed a CGI model. "I considered doing a drawing of the library but finally opted for a 3D approach that allowed me to determine how it would look from different angles. The art director Richard James wanted the architecture to have a hint of Mayan look so I created that by sculpting it from wooden blocks that I cut together in the shop of Image G. Ron Moore flew it up to Santa Barbara Studios and they translated it into the CGI model of the library that is revealed when the comet starts to melt.", Curry revealed. (Cinefantastique, Vol. 25, No.6/Vol. 26, p. 58) The studio also provided the comet and "steam" effects in the episode when the archive was freed from its icy enclosure by the Enterprise-D's phaser fire. Curry has retained the mock-up sculpture as part of his personal collection. ("Departmental Briefing, Year Six: Dan Curry Profile", TNG Season 6 DVD special feature)