[Freeciv-Dev] granary size
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I am looking at the code that determines a city's "granary size", the food
necessary to grow, and I fail completely to understand why the code is
written the way it is.
The current code was added in PR#635, "Patch: generalized granary size".
The current granary size is 20 for size 1 cities, and adding 10 for each
subsequent citizen. I would think this could adequately be described by
the following hypothetical ruleset options:
; City granary size is (granary_start + granary_increase * city_size)
granary_start = 10
granary_increase = 10
But instead we have:
; Parameters used to generalize the calculation of city granary size:
; if city_size <= num_inis:
; city_granary_size = (granary_food_ini[city_size] * foodbox)
; if city_size > num_inis;
; city_granary_size = (granary_food_ini[num_inis] * foodbox) +
; (granary_food_inc * (city_size - num_inis)) * foodbox / 100
granary_food_ini = 2
granary_food_inc = 100
Civ1, civ2 and default all use the same ruleset parameters.
I want to try to experiment a little with different granary sizes, but I
find the current ruleset options a little hard to manipulate, so I am
considering rewriting it.
- Per
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] granary size,
Per I. Mathisen <=
|
|