Lonely child and future history buff Kevin awakens one night to find a knight on horseback exploding through his closet. The next night, following the "pics or it didn't happen" philosophy, he stays up and waits with his camera to capture evidence, only to find a six-pack of steampunk dwarves sneaking their way out of his closet. The dwarves used to work for God, designing trees and shrubs, until they decided they'd rather steal the Supreme Being's map of the universe and use it to travel through time committing robberies.
The Supreme Being comes hot on the heels of the dwarves, forcing them to find an impromptu exit. (Kevin's bedroom wall apparently hides a massive tunnel behind it.) They take Kevin along with them. The tunnel opens into blackness, and they all go tumbling through it...only to land in late 18th-century Italy in the midst of Napoleon's semi-successful conquer-the-world tour.
After confessing to Kevin that they're actually international criminals, the dwarves land themselves a sweet gig as Napoleon's generals, get him drunk, rob him blind, and escape through a nearby time hole that the map conveniently reveals to them. They end up in the Middle Ages, with a giant pile of swag and an airtight alibi: the guy they robbed won't be born for centuries.
Of course, the dwarves promptly lose all the moolah when Robin Hood shows up and gives it out to the poor. Kevin tells them that they're wasting the map on their attempts to get rich when they could be using it to explore the universe.
Unfortunately, Kevin is not the only one with ideas on how the map should be used. From his prison in the Fortress of Ultimate Darkness, Evil plots to steal the map and use it to remake the universe the way he wants it—with lots of machines and accounting ledgers. He plants an idea in the dwarves' heads about the Most Fabulous Object in the World...conveniently located in his fortress.
Meanwhile, the Supreme Being shows up again, and Kevin takes off down another time hole, losing track of the dwarves in the interim. He lands in ancient Greece, in front of a bull-headed man getting ready to take down a helmeted warrior. The warrior takes advantage of the distraction to land a killing blow, then removes his helmet to reveal that he's King Agamemnon—a king who bears a suspicious resemblance to a well-known super spy.
Agamemnon takes Kevin back to his city and spends the next few days and weeks with him before deciding that the boy is super awesome and would make a great son. He announces that Kevin will be his heir at a massive shindig that is infiltrated by the dwarves, who again rip off everything in sight and pull Kevin with them down another time hole.
They land on the deck of a ship in the early 20th century and use their loot to buy first-class accommodations. Kevin and Randall have it out—Kevin really wanted to stay in Greece—but Randall points out that the Most Fabulous Object in the World is close. It's somewhere known as the Time of Legends.
Our heroes are interrupted again by an event of some small significance. It turns out the ship they're on is the Titanic, and Kevin and the dwarves soon find themselves floating in the middle of the Atlantic Ocean after a certain iceberg collision. Evil seizes the opportunity to pull them into the Time of Legends—and into another ocean, where they're landed by an ogre named Winston, who fully intends to eat them. Kevin suggests they trick the ogre and his wife, and dump them overboard. They do, and they set sail for the Fortress of Ultimate Darkness.
Or, they would do that, if the ship wasn't actually just a hat worn by a large and apparently amphibious giant who strides out of the ocean onto the shore, stomping on a seaside house along the way. Once again, Kevin figures out a plan: he inundates the giant's head with a sleeping potion, which allows the band to escape.
Our heroes make their way across the desert before bonking into an invisible barrier, which prompts a new round of squabbling from the dwarves and a hurled skull that shatters the barrier, revealing the Fortress of Ultimate Darkness. In they go...only to be scooped up by Evil, who nabs the map and puts them all into a hanging cage.
Kevin, who took a picture of the map back in the Middle Ages, spots a time hole in the fortress, which gives the band an escape route. Kevin stays behind to steal back the map while the dwarves head through the time hole for help.
An intense game of cat and mouse follows, but Kevin manages to delay Evil long enough for the dwarves to return, complete with a gaggle of knights, cowboys, Greek archers, tanks, and spaceships to take down the bad guy.
Unfortunately, Evil doesn't die so easily. After dispatching the assembled forces and killing one of the dwarves for good measure, he prepares to blast Kevin and his friends into oblivion. But the Supreme Being arrives again, turning Evil into a statue and shattering him.
The dwarves try to apologize for running off with the Supreme Being's map, but he's distracted and grumpy. Apparently, the entire affair was engineered as a test for Evil, and the Supreme Being is happy with the result. He orders the dwarves to clean up the shattered pieces of Evil, then returns to "creation" with them, leaving Kevin behind.
Unfortunately, they miss a small piece of Evil, and it billows smoke into the chamber…
…returning Kevin to his bedroom. His house is ablaze. A fireman—who bears a suspicious resemblance to Agamemnon—crashes down the door and carries the kid to safety, while his parents fret about the toaster. Kevin thinks it's all a dream until he looks in his satchel and finds the pictures he took.
And then, his parents discover the cause of the fire to be the piece of Evil that was left behind. They grab it and immediately explode, leaving Kevin surprised and alone as the fire truck drives away.
We know, weird, huh? This did come from the boys at Monty Python.