Follow-up Comment #1, patch #3906 (project freeciv):
I really like the idea of this patch, but I think there is a lot more that
could be done to make this flexibly work, as follows:
1) Move SINGLE_MOVE to be a ruleset configuration variable (e.g.
game.info.single_move), so that ruleset authors could select the degree to
which they wanted to be able to adjust granularity (for example, with the
suggested patch, there is no means to make a road cost 1/4 of SINGLE_MOVE).
If the default in ruleset.c is set to 3, this has the added advantage that no
adjustments are required for current rulesets (although one may wish to add
comments to make the current rulesets a better source for new ruleset
authors). For the ruleset modification envisioned for this patch, the ruleset
would simply set this value to 30.
2) Change MOVE_COST_IGTER to be an optional unit type parameter, so that
different unit types could have different maximum travel costs: this allows
one to specify some units that can travel as easily over mountains as hills
(utype->move_cost_igter = SINGLE_MOVE*2), but still move faster on plains, or
units that move like there is a road everywhere even in the case where roads
have a move_cost of 2: if stacked over patch #3900, this ought be fairly easy
to implement (pass int igter_move_cost rather than bool igter to
tile_move_cost_ptrs(), with '0' meaning !UTYF_IGTER, add igter_move_cost to
pf_parameter, and set it when filling parameters in pf_tools.c, and pass it in
single_move_cost()). This should default to 1 to reduce ruleset transition
difficulties. Extra points for finding a good name for a unit class
configuration variable to define the default scaling between movement points
and actions (e.g. attacking) for !UCF_TERRAIN_SPEED classes (such nomenclature
being one of the reasons I haven't submitted a patch to do this yet).
Personally, I had planned to submit these as separate tickets, but they are
both relevant to the content of this patch.
A third change that helps ruleset authors adjust granularity would be to
replace movement_cost for terrains with move_cost, so that one could have
terrains that default to less than a single move (e.g. hardpan saltflats which
oughtn't be harder to navigate than roads) without needing to prepopulate the
map with lots of invisible roads on the target terrain (and then deal with the
road coordination movement issues about source and destination discussed in
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list