How to update a ruleset from 2.3 to 2.4

To update a ruleset from 2.3 to 2.4 you must do miscellaneous simple changes.
==Needed Updates==
The following instructions describe what you must modify to make your ruleset run with a 2.4 server.
===General===
* Set ruleset format of every file to options = "+Freeciv-2.4-ruleset".
* Terrain colors (used for the minimap etc) now come from the terrain.ruleset file, rather than the tileset on the client side. Add the colors as RGB (red/green/blue) values:
 color.r = 0
 color.g = 0
 color.b = 200
* Similarly, player colors now come from the game.ruleset using a table (playercolors.colorlist). They are also defined as RGB (red/green/blue) values:
 colorlist =
 { "r", "g", "b"
 255, 0, 0
 }
:You also need to specify a 'background' color.
* You should specify a default government for the ruleset (especially if you want to use the standard nations, which no longer do). In nations.ruleset:
 [compatibility]
 default_government = "Despotism"
* It's almost certainly a good idea to set up "City_Image" effects so that cities of different sizes continue to have different graphics. Previously, the relationship between tile size and image was defined in the tileset; now it's defined by the ruleset and can be more flexible. A simple example, in effects.ruleset, which gives different images for city size 1-3, 4-7, and 8 upwards:
 [effect_city_image_1]
 name = "City_Image"
 value = 1
 reqs =
 { "type", "name", "range"
 "MinSize", "4", "City"
 }
 
 [effect_city_image_2]
 name = "City_Image"
 value = 1
 reqs =
 { "type", "name", "range"
 "MinSize", "8", "City"
 }
==Possibly needed updates==
You should consider whether each of the following apply to your ruleset; without attention, these changes could break the behaviour of some (in some cases, most) existing rulesets.
* The setting min_dist_bw_cities has been removed in favour of the server option citymindist. If your game.ruleset set this, you need to add or edit your [settings] section. For example, remove:
 min_dist_bw_cities = 1
:and add:
 [settings]
 set =
 { "name", "value", "lock"
 "citymindist", 1, FALSE
 }
* If you used per-unit veteran levels, you can now fill in all the properties (including raise_chance and work_raise_chance), and indeed will need to in order to stop the server complaining, even if you want the same values as the game-wide veteran system.
* A new effect "Irrig_Possible" determines where irrigation can happen, so that it's no longer hardcoded to being near oceans/rivers/other irrigation. So if you want the old behaviour you must add this effect (of course you can take the opportunity to be more flexible).
* (late change) Veteran levels' effect on diplomat/spy combat, and on spies' chance of escape, now comes directly from power_fact in the veteran system, rather than being a fixed calculation based on veteran level -- see and . You may want to add custom veteran levels for your diplomatic units, as your normal power_fact is likely to be too powerful for diplomatic combat (usually a bonus of no more than 20% is advisable for diplomatic effects).
===Effects===
There's an effect of buildings like the Statue of Liberty where Has_Senate is rendered powerless -- it does not block declaration of war.
In 2.3, this behaviour was tied to the "Any_Government" effect. As of 2.4, it's moved to the "No_Anarchy" effect, because that's more logical. ()
(Mentioned here for completeness; in most rulesets these two effects are used together, so it makes no difference, but perhaps someone is using just one of them. If so, there's no way of recreating the exact same behaviour you had before.)
==Features==
The following information describes what features have been added since Freeciv 2.3.
===General===
* The cities.ruleset field now contains a section citizen with the configuration for the citizens.
* There are two new tech_cost_styles, 3 and 4. See default/game.ruleset for details.
===Units===
* As noted above, the veteran system has been generalised, so that you can set all the parameters on a per-unit basis (previously the raise_change/work_raise_chance settings were ruleset-wide). This means that you can now more usefully have different numbers of veteran levels in the default and per-unit veteran systems (previously this didn't work very well). See Workers/Engineers in the experimental ruleset for an example. Also, the maximum number of veteran levels has been increased from 10 to 20.
* Recursive transports are supported (up to depth 5).
* It's no longer mandatory to specify a "move_type" for unit classes -- if you don't, the server infers it from native terrain/special types.
===Effects===
* New requirement range "CAdjacent", like Adjacent but only for cardinally-adjacent tiles.
* "CityTile" now supports Adjacent and CAdjacent ranges.
Category:Editing rulesets