Code of Hero is the thirty-fifth episode of the Beast Wars TV series.
In a wild valley, a group of primitive hominids forage for food. A gargantuan snake attacks two of their number, and the protohumans are helpless to stop it...
At the Axalon, a haunted Dinobot meditates on his sword... and holds its blade ominously over his chest. But after a long moment of tension and hesitation, he casts it aside with a growl of frustration.
Rhinox has been calculating the path of the Transwarp Wave from the Planet Buster's destruction—it's traveling through time at an accelerated rate, and will reach Cybertron in the "present", thus alerting Cybertron to their location. Optimus fears Megatron has made similar calculations, and the group realizes they need to increase their defenses.
Dinobot, still somber, runs into Rattrap, who nearly goads him into a fight over his turning the Disk over to Megatron. Rattrap stalks off, concluding that he'd thought Dinobot was at least forthright. Dinobot is left to reflect that his past actions cannot be undone... but they "may yet be mitigated". He arms himself and heads off into the wastes.
On aerial recon, Cheetor observes Megatron and Rampage out for a stroll. They drive him off with some damage, but Cheetor calls in the sighting to Dinobot, who promises to follow up.
At his lair, Tarantulas has captured a tasty antelope for his dinner. But as he creeps up to the struggling beast, Dinobot bursts out of the ground, holding him at gunpoint and demanding to know what information is on the Golden Disk. Tarantulas doesn't know—there are no more copies remaining, and Megatron is keeping the Disk on his person at all times. Still holding him at gunpoint, Dinobot uses Tarantulas as his unwilling ride.
The protohumans scatter and panic as Megatron flies overhead and lands. Rampage sneers that the Maximals will soon arrive from Cybertron, and that he anticipates Megatron's imminent demise. Megatron admits that's very likely... but only if history remains as it is.
Megatron explains that the Golden Disk contains images recorded in the future, including one of a nearby mountain. Megatron has Rampage destroy the mountaintop. After a moment, the image on the disk changes to suit the altered reality, to Megatron's delight. Dinobot observes all this with dawning dread: Megatron has the power to change the future.
The valley they are standing above, Megatron explains, spawned the human race. Their interference helped the Autobots win the Great War, thereby allowing the Maximals to rule over the Predacons today. But Megatron has a different history in mind. Summoning the rest of his troops, he orders them to annihilate the valley and its inhabitants. With the protohumans destroyed, the human race will never have existed!
While Dinobot's back is turned, Tarantulas blasts him; Dinobot reciprocates by squashing him under a rock. Dinobot contacts Optimus, who orders him to maintain position, but Dinobot knows there is no time to wait. With his questions answered, Dinobot is ready to face his destiny.
Dinobot moves in to attack the entire Predacon force single-handed. He blasts Inferno and Blackarachnia (stabbing the former for good measure), stomps Waspinator, forces Rampage's cannon to backfire (using Waspinator's head), and pummels Quickstrike (with his bare hands), but loses his weapons, suffers considerable damage, and drains most of his energy supply. His computer warns him that he must enter stasis lock to survive... a command which Dinobot overrides.
Megatron confronts the damaged warrior, gloating over his near-total victory; when Dinobot starts to attack, Megatron reveals a protohuman captive. The hostage is enough to make Dinobot halt; Megatron rebukes him for weakness. But Dinobot is a warrior still. Forging a makeshift hammer from a rock and stick, he knocks the Disk out of Megatron's hand and frees the protohuman. With the last of his energy, he summons one final optic blast, shattering the Disk.
Nearly mad with frustration, Megatron flees as the Maximals arrive. Rattrap gasps in horror at the sight of his comrade, while Cheetor douses the flames of the burning valley. The Maximals gather around the fallen Dinobot, but it is too late to help him. Optimus assures him that he has saved untold lives yet to come. Dinobot exchanges a final round of barbs with Rattrap; he asks them all to tell his story truthfully, both the good and the bad, and allow him to be judged accordingly. "The rest is silence." With that, the proud warrior dies. Rattrap leads the others in a salute as Dinobot's spark leaves his body, with Primal wishing it on to the Matrix, there to join Cybertron's finest.
At the valley, a curious protohuman (presumably the same one Dinobot rescued) finds Dinobot's hammer. He soon figures out how to use it to help gather food... and to fend off predators, such as the giant snake. The protohuman's yell of triumph echoes through the valley; and high above, a brief flicker appears in the void of space.