It is true that the number at the beginning is just part of the name of the savegame. That's why it is the ASCII representation of the number, not the actual number.
Convert the number to hex (for example 1197 decimal = 4ad hex). There are many online converters than can do this for you. Search for that hex number in the file. If there is only one occurrence of that number in the file, it's the amount of gold. If there is more than one occurrence you will have to experiment to figure out which one is the correct one (the smaller the current amount of gold, the more likely it is that by chance there will be more than one occurrence, so you should at least do a little gold collecting to begin with
). It is more work than just editing that number to increase the number of digits available, so it might be a good idea to get at least 256 gold to start (Hex 100), and then edit the number to Hex FFF (4095 gold). Then you can collect more gold, and save the file, and it will have 4 digits in hex. Then you can edit the file again and make it Hex FFFF (65535 gold).
Bear in mind that once you have edited that number it will not show in the name of the savegame. However, if you load the game and have edited it correctly then it will show the increased amount of gold on your items page. If you then save the game the name will be changed to show the increased amount.
Now I am going to feel guilty for the rest of the day for posting how to do this
. I hope nobody abuses it and cheats their way up the high score list.
Level:68, XP:5672461, PV:497, FQ:62
HP:220, AC:247, AD:46-58, AP:3, ECC:23%, CM:3, BC:171, DR:3
Gold: 222889 | RoLS:1, RoL:1, GoW:1, VSH:1, RoFLS:1
HH:1, WA:1, CS:2, Cl:1, IF:4, Ev:3, Re:2, WP:DA:1, WP:1S:1, AP:L:1, FS:DW:2, S:DW:1