Connectivity and resources
Posted: Sun Jul 14, 2019 5:58 pm
Connecting to strategic resources (henceforth luxuries included) and to other cities is a central topic of Civ3 that was enough good to be includet into consequent commercial games. Here are ideas how to bring it into Freeciv.
1. In terrain.ruleset, to the [resource_*] sections we append "strategic" boolean option. Maybe we want to get some "Fuel" from just "Woods" terrain, then we put into the "extra" property some really never generated extra just for graphics and name, and fill a table sources={"terrain", "extra"} (may work independent for real extras). Ability to collect resources from an owned tile not occupied by a hostile unit is enabled by "Tile_Resource_Amount" effect that can get resource extra in "Extra" requirement; effect value of each present resource (probably we don't put too much of them in one place) appears there, you should append extra visibility_reqs to block invisible ones' effects. We can also generate a resource in cities by "City_Resource_Amount" effect , something like Civ4 "Great Hits" that are produced just by a wonder in a city. Maybe in future development we'll add a way to put random numbers on such tiles that signify how reach or poor is this specific mine.
2. Some unit types get "CityConnector" role. The connectors are virtual units (I don't like the idea of Civ5 traders that creep the map automatically and you have to guard these dumb robots) that are used to find the path from a city that fits their build reqs to a resource tile or another city, in commercial games ownership of tiles and cities on the way is ignored for this purpose. A city can manage all possible types of connectors in one turn but each one path observes only one, without ability to load in a boat and then continue by a continent. If the path is found, tiles are connected. Airport connection may be checked by ability to airlift such units between cities (but without further movement), airlift counters ignored. Cities of the same player that are connected one to another into a connected graph form a connectivity cluster and can use any unit of the stategic resources connected to any of them. Maybe we should furtherly think of a way to prohibit transporting certain resources by certain connectors (e.g. coal by planes).
3. There is a requirement range "Connected" that tests for resources in the cluster of the target city and allows to introduce various effects. We can use it also for goods (but can't we drop them with this system?) and wonders requirements, e.g. we can reduce corruption for cities connected to our capital. A unit or a building may either require a resource for being built (then one resource enables any number of them, Civ3 style) or consume it (a unit of the resource is no longer available to the cluster until the unit or building exists, and it is destroyed or weakened if the source is lost). Some Civ4 buildings can consume resources optionally and convert a unit of them to some output each turn.
4. Connection clusters of different players may trade to foreign one by a treaty if a city tile of one is in connected area of the another, thus a unit or more of the resource disappears at one side and appears on the another (in Civ3 treaties enabled trade agreements only between clusters of capitals).
1. In terrain.ruleset, to the [resource_*] sections we append "strategic" boolean option. Maybe we want to get some "Fuel" from just "Woods" terrain, then we put into the "extra" property some really never generated extra just for graphics and name, and fill a table sources={"terrain", "extra"} (may work independent for real extras). Ability to collect resources from an owned tile not occupied by a hostile unit is enabled by "Tile_Resource_Amount" effect that can get resource extra in "Extra" requirement; effect value of each present resource (probably we don't put too much of them in one place) appears there, you should append extra visibility_reqs to block invisible ones' effects. We can also generate a resource in cities by "City_Resource_Amount" effect , something like Civ4 "Great Hits" that are produced just by a wonder in a city. Maybe in future development we'll add a way to put random numbers on such tiles that signify how reach or poor is this specific mine.
2. Some unit types get "CityConnector" role. The connectors are virtual units (I don't like the idea of Civ5 traders that creep the map automatically and you have to guard these dumb robots) that are used to find the path from a city that fits their build reqs to a resource tile or another city, in commercial games ownership of tiles and cities on the way is ignored for this purpose. A city can manage all possible types of connectors in one turn but each one path observes only one, without ability to load in a boat and then continue by a continent. If the path is found, tiles are connected. Airport connection may be checked by ability to airlift such units between cities (but without further movement), airlift counters ignored. Cities of the same player that are connected one to another into a connected graph form a connectivity cluster and can use any unit of the stategic resources connected to any of them. Maybe we should furtherly think of a way to prohibit transporting certain resources by certain connectors (e.g. coal by planes).
3. There is a requirement range "Connected" that tests for resources in the cluster of the target city and allows to introduce various effects. We can use it also for goods (but can't we drop them with this system?) and wonders requirements, e.g. we can reduce corruption for cities connected to our capital. A unit or a building may either require a resource for being built (then one resource enables any number of them, Civ3 style) or consume it (a unit of the resource is no longer available to the cluster until the unit or building exists, and it is destroyed or weakened if the source is lost). Some Civ4 buildings can consume resources optionally and convert a unit of them to some output each turn.
4. Connection clusters of different players may trade to foreign one by a treaty if a city tile of one is in connected area of the another, thus a unit or more of the resource disappears at one side and appears on the another (in Civ3 treaties enabled trade agreements only between clusters of capitals).