Representing citys populace could be significantly improved by weighting it against food in granary to produce more fluid and nicer population growth. My idea was to tweak the original function, but after a long trial and error with unsatisfactory results I gave up and made my own.
Original Freeciv function:
population = ((citySize*(citySize+1)*5)*1000
population = (100000*GranaryFillPercent*(citySize/10))+((citySize-1)*citySize*6000)+100
GranaryFillPercent = Food in Granary/Granary Size
Comparative population with both functions in different situations:
EDIT: Fixed previously miscalculated table and added +100 into function to prevent population count 0 with City Size 1 and empty granary.
Can you help improve your favourite game? Hardcore C mages, talented artists, and players with any level of experience are welcome!
1 post • Page 1 of 1