If you want to retrieve information for something from the database, as opposed to the runtime version replace: $game_actors with $data_actors. That should do the trick. I didn't look through the script itself though, since you seem to have a grasp of which part to change to get your result. However if you do need further help, please let me know!
Good luck!