I haven't posted in a while, but I just wanted to give an update for future reference and to ask a new, hopefully simpler, question.
After a lot of tracing through code, I found that the game simply wasn't loading item data from the right spot. It loaded the trainer's name, Pokemon, sprite...