You can use this in single player:
(store_troop_gold,reg1,"trp_player"),
That'll store the player's gold in register one. If you want to display it in a string you can put {reg1} somewhere and it'll display as the gold amount.
You can find all the possible operations in "header_operations.py"
Hope that helps.