Well, better late than never. I discovered today that there's already a built in feature to display numbered links to all the pages of a board, so I simply activated it. (And I also changed the number of topics that display on each board's MessageIndex pages (from 25 to 30) so as to cut down on the number of pages on boards like those for this game.)
(The feature also works with topics with lots of pages.)