Re: Correct the rulesets civ1 and civ2
Posted: Mon Jan 21, 2019 3:25 pm
Hydro plants.
Comments in building.ruleset for civ1:and civ2:
Freeciv reqs vectors have little or no facility for disjunction for ruleset files other than in effects.ruleset. This had meant that the criteria for hydro plants in Civ I & II (etc.) could not be implemented in full. Of the two predicates (river & mountain) the fc tradition has been to just use the former.
IT MAY BE 25 YEARS BUT THE WAIT IS OVER:
Add the following two sections to terrain.ruleset:
Remove the following predicate from the section [building_hydro_plant] (in buildings.ruleset) and replace it with: i.e replace "River" with "Hydro".
The river predicate is usually missing from hoover dam (in all rulesets) but I believe the same criteria applies to Civ I (& II) - except for factory - so ADD the hydro predicate to the reqs vector in [building_hoover_dam].
Add the following shell to script.lua:
next ....
Comments in building.ruleset for civ1:
Code: Select all
; Civ1 would allow building Hydro Plant if there`s either River OR Mountains
; but it is not possible to implement with current ruleset format.
Code: Select all
; Civ2 would allow building Hydro Plant if there`s either River OR Mountains
; but it is not possible to implement with current ruleset format.
Freeciv reqs vectors have little or no facility for disjunction for ruleset files other than in effects.ruleset. This had meant that the criteria for hydro plants in Civ I & II (etc.) could not be implemented in full. Of the two predicates (river & mountain) the fc tradition has been to just use the former.
IT MAY BE 25 YEARS BUT THE WAIT IS OVER:
Add the following two sections to terrain.ruleset:
Code: Select all
[extra_hydro]
name = _("Hydro")
category = "Natural"
causes = "Base"
graphic = "None"
activity_gfx = "None"
rmact_gfx = "None"
buildable = FALSE
helptext = _("\
Marks a tile that if next to a city will enable hydro plant \
and Hoover Dam\
")
[base_hydro]
extra = "Hydro"
gui_type = "Other"
Code: Select all
"Extra", "River", "Adjacent"
Code: Select all
"Extra", "Hydro", "Adjacent"
The river predicate is usually missing from hoover dam (in all rulesets) but I believe the same criteria applies to Civ I (& II) - except for factory - so ADD the hydro predicate to the reqs vector in [building_hoover_dam].
Add the following shell to script.lua:
Code: Select all
function whole_map()
for tile
in whole_map_iterate()
do
local tname = tile.terrain:rule_name()
-- insert active code here
end
return false
end
signal.connect("map_generated", "whole_map")