the gold think might be a bunch of random math
but what i was thinking was the amount of gold you made in that path divided by how much you made taht whole time such as going through aoi path
then they make a percent by dividing that by how much you made overall to that point since you started
then multiply that taht with the average of gold you made
but for me it seems to add the cost of the bath + oven or previous game finishing gold amount. cause first time through i made
300 gold (damn bath) then the next game through i gained
600 including the 300 from the headmaster's room.
then the next time i got 13000, 9000 of the bath 1000 for the oven and apperently got my 3000 gold back from the game before.