The Battle for the Castle by Elizabeth Winthrop, 1994.
This is the sequel to The Castle in the Attic.
William is growing up. As William’s twelfth birthday approaches, he feels like he and his best friend, Jason, are growing apart. Actually, what he fears is that Jason is out-growing him. Jason has grown taller than William and much more muscular, thanks to his off-road bike training sessions with his father. William, on the other hand, is still short and feels like a shrimp next to Jason.
In their town, it is traditional for boys to “jump the trains” when they turn twelve. It involves grabbing hold of a ladder on the side of one of the cars as the train reaches a point on the track when it slows down, climbing over the top of the car, and jumping off the other side. It’s a dangerous trick to pull, and parents try to keep the kids from doing it. Still, the boys who don’t do it are considered to be wimps by the others. When Jason and William try, Jason makes it, but William gives up when his hand starts to slip. William is not hurt, but he is embarrassed at his failure.
To show Jason that he’s not just a wimp, William decides to let him in on the secret of the castle in the attic. Mrs. Phillips decided not to drop the magic token into the sea along with Alastor as she said she would (see previous book), and she sends it to William as a birthday present. After William explains to Jason how the token works, he convinces him to become small with him and visit Sir Simon and William’s other friends. When the boys arrive, they are welcomed by Sir Simon, who is about to leave for a tournament. William and Jason agree to help look after Sir Simon’s castle until he returns, along with his friend Dick, Dick’s son Tolliver, and Dick’s niece Gudrin. Sir Simon’s old nurse, Callendar, has died, but before her death, she made a prophecy of death and danger. Almost everyone believes that she was just raving, but Gudrin knows that danger is approaching. A strange ship of skeletons has been seen approaching the town, and bones have been floating down the river. Sir Simon had the ship towed out to see again, and Dick thinks there’s nothing more to fear. However, the ship has returned, and the boys and Gudrin know that something must be done in order to keep Callendar’s prophecy from coming true.
There is an army of rats aboard the ship, led by a giant rat that walks on its back legs like a human. The boys and Gudrin attempt to burn the ship, but the rats escape and begin attacking people across the countryside. When one of these people makes it to the castle to warn everyone, Dick finally believes them that something needs to be done. Most of the people are sent away from the castle, Tolliver is sent to bring Sir Simon back to help, and the others stay to wait out the siege. Although William is scared, he manages to keep his head and come up with a plan that defeats the rats once and for all.
In the end, when the boys return to their own world, William declares that he will never jump the trains because he thinks it’s a crazy stunt. Jason doesn’t mind because, as he says, “there’s more than one way to jump the trains.” William doesn’t need to prove that he’s grown up by performing a crazy stunt because he’s already behaved with courage and maturity while facing real problems and saving the lives of other people.