Freeciv
Advertisement

This document describes how to manually convert freeciv 3.0 compatible ruleset to 3.1 compatible ones.

ruleup[]

The ruleup -utility can be used to do the update (mostly) automatically. Also ruledit does the same update process if one loads 3.0 ruleset to it, and saves it back as 3.1 ruleset. This process does not keep any custom comments, or formatting of the ruleset. It just saves the rules and some standard comments. For ruleset readability, and for not having as mindless rule conversions as ruledit does, you may still want to do the manual update. Rest of this document describes those changes that you need to do.

Freeciv-ruleup

Capability[]

Capability string and format_version of each ruleset file must be updated. For 3.1 rulesets the format version is 20.

[datafile]
options="+Freeciv-3.1-ruleset"
format_version=20

Lua[]

Lua engine has been updated to version 5.4. Any lua scripts must be updated to be compatible with lua-5.4. Differences between lua-5.3 and lua-5.4 are outside the scope of this document, but it's common for scripts written for freeciv not to have anything that would require adjusting.

parser.lua[]

New parser.lua lua script is needed in the ruleset. Empty file by that name is enough when not wanting any new features from it but only to update ruleset with existing functionality.

Unit vision layer[]

Add vision_layer entry for unit types requiring it. You don't need to define it for units on default layer, but only for those units that have had Partial_Invis flag. Remove the flag and set vision_layer="Stealth" for them.

Is Foreign requirement rename[]

Value Is Foreign for DiplRel requirements has been renamed as Foreign. Do that replacement in all requirement vectories.

UnitState OnDomesticTile migration[]

"UnitState" "OnDomesticTile" has been removed. Replace any such requirements with "DiplRelTile", "Foreign" with "present" set the opposite from the old requirement.

Bridge rules[]

Any extra can now require bridge building tech, not only roads. Each extra lists other extras that, if present, make it to require a bridge technology. Road flags RequiresBridge and PreventsOtherRoads are removed as obsolete. For each road that had RequiresBridge add bridged_over list of extras to equivalent extra section. That list should contain all the extras that formerly had PreventsOtherRoads in their road section. Once you've done that, remove the flags from all road sections.

[road_road]
extra = "Road"
...
flags = "RequiresBridge"

[road_rail]
extra = "Railroad"
...
flags = "RequiresBridge"

[road_river]
extra = "River"
...
flags = "PreventsOtherRoads"

[road_canal]
extra = "Canal"
...
flags = "PreventsOtherRoads"

->

[extra_road]
name = _("Road")
...
bridged_over = "River", "Canal"

[extra_rail]
name = _("Railroad")
...
bridged_over = "River", "Canal"

Separating Cultivate and Plant activities[]

Earlier freeciv versions had Irrigate and Mine activities that, depending on terrain, could result in a creation of an extra (Irrigation / Mine) or terrain transformation. In freeciv-3.1 they are used for extra creation only. Their former terrain transformation behaviors are now under new Cultivate and Plant activities.

Make irrigation/mining time and result consistent[]

First you should make sure that your old irrigation/mining time and results are consistent. Any terrain with irrigation_result / mining_result of "no" should also have the relevant _time as zero, and conversely: any terrain with irrigation_time / mining_time as zero should have relevant _result as "no". Earlier versions of freeciv allowed inconsistency there, so that the activity was disallowed if either of the _time or _result fields disabled it. Freeciv-3.1 does not allow that inconsistency, and below sections assume that you already have consistent values there to start with.

Add cultivate_time and plant_time for terrains[]

For each terrain type, you should add cultivate_time and plant_time.

To keep old your old rules:

  • For any terrain where old irrigation/mine activivity resulted in extra creation, set cultivate/plant time to zero
  • For any terrain where old irrigation/mine actitivity resulted in terrain transformation, set cultivate/plant time to what irrigation/mining time used to be, and set irrigation/mining time to zero

Rename irrigation_result and mining_result[]

As irrigation_result and mining_result in the terrain.rulesets of earlier freeciv versions refer to target terrain of the terrain transformation, they have been renamed as cultivate_result and plant_result.

In case the old field had value "yes" - meaning that extra build is allowed, change if to "no" - terrain transformation is not allowed.

Make transform_time and _result consistent[]

Earlier versions of freeciv allowed inconsistency in how transform_time or transform_result prohibited the transformation. If either indicated that transformation is prohibited, it was not allowed. Freeciv-3.1 does not allow inconsistency there. If one of them indicates that the transformation is prohibited, the other have to do so too. For any terrain that has transform_time of 0, set transform_result to "no". For any terrain with transform_result of "no", set transform_time to 0.

Generic Action Enabler changes[]

Local DiplRel requirements[]

Any Action Enabler with a Local DiplRel requirement must now explicitly require also the tile to be claimed. This used to be only implicit.

"CityTile", "Claimed", "Local"

force_* logic to *_blocked_by logic[]

Various actions related force_* fields in the game.ruleset have been removed, as more generic *_blocked_by features have been introduced.

force_trade_route[]

If you used to have force_trade_route enabled (TRUE), list action "Establish Trade Route" in enter_marketplace_blocked_by

enter_marketplace_blocked_by = "Establish Trade Route"

force_capture_units[]

If you used to have force_trade_route enabled (TRUE), list action "Capture Units" in bombard_blocked_by, attack_blocked_by, suicide_attack_blocked_by, and conquer_city_blocked_by

bombard_blocked_by = "Capture Units"
attack_blocked_by = "Capture Units"
suicide_attack_blocked_by = "Capture Units"
conquer_city_blocked_by = "Capture Units"

force_bombard[]

If you used to have force_bombard enabled (TRUE), list action "Bombard" in attack_blocked_by, suicide_attack_blocked_by, conquer_city_blocked_by, explode_nuclear_blocked_by, nuke_city_blocked_by, and nuke_units_blocked_by

attack_blocked_by = "Bombard"
suicide_attack_blocked_by = "Bombard"
conquer_city_blocked_by = "Bombard"
explode_nuclear_blocked_by = "Bombard"
nuke_city_blocked_by = "Bombard"
nuke_units_blocked_by = "Bombard"

force_explode_nuclear[]

If you used to have force_explode_nuclear enabled (TRUE), list actions "Explode Nuclear", "Nuke City" and "Nuke Units" in attack_blocked_by, suicide_attack_blocked_by, and conquer_city_blocked_by'

attack_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units"
suicide_attack_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units"
conquer_city_blocked_by = "Explode Nuclear", "Nuke City", "Nuke Units"

Blocking Conquer City when Attack possible[]

There was no force_* field in freeciv-3.0 to force attack instead of city conquest when there's defenders, but in 3.1 you have to explicitly block City Conquest.

conquer_city_blocked_by = "Attack", "Suicide Attack"

*_post_success_forced_actions[]

In freeciv-3.0, some actions had additional functionality, matching that of some another action, after their main part had succeeded. Some of that is now controlled by *_post_success_forced_actions fields. Those tell to do another action after the main action has succeeded. To match old hardcoded rules, add the following, leaving out actions that your ruleset does not have:

bribe_unit_post_success_forced_actions = "Transport Embark",
                                         "Transport Disembark",
                                         "Transport Disembark 2",
                                         "Conquer Extras",
                                         "Conquer Extras 2",
                                         "Enter Hut", "Enter Hut 2",
                                         "Frighten Hut", "Frighten Hut 2",
                                         "Unit Move"

attack_post_success_forced_actions = "Conquer City", "Conquer City 2",
                                     "Transport Disembark",
                                     "Transport Disembark 2",
                                     "Conquer Extras", "Conquer Extras 2",
                                     "Enter Hut", "Enter Hut 2",
                                     "Frighten Hut", "Frighten Hut 2",
                                     "Unit Move"

escape_city[]

Ruleset can now define what actions unit may try to escape from the tile when it turns to non-native to it (city on the tile disappears). To recreate old hardcoded rules, use following, with actions not present in your ruleset removed:

escape_city = "Transport Embark", "Enter Hut", "Enter Hut 2",
              "Frighten Hut", "Frighten Hut 2", "Unit Move"

unit_stack_death[]

Ruleset can now define what actions unit with CanEscape flag may try to move out of the tile when the defender dies. To recreate old hardcoded rules, use following, with actions not present in your ruleset removed:

unit_stack_death = "Transport Embark",
                   "Conquer Extras", "Conquer Extras 2",
                   "Enter Hut", "Enter Hut 2",
                   "Frighten Hut", "Frighten Hut 2",
                   "Unit Move"

Convert effects to Action Enablers[]

Some boolean effects have been replaced by Action Enablers.

Transform_Possible effect to Transform_Terrain Enabler[]

Replace any Transform_Possible effect with equivalent Transform_Terrain Action Enabler.

[effect_transform]
type    = "Transform_Possible"
value   = 1
reqs    =
    { "type", "name", "range"
      "Tech", "Fusion Power", "Player"
      "UnitFlag", "Transform", "Local"
    }

->

[actionenabler_transform_terrain]
action        = "Transform Terrain"
actor_reqs    =
    { "type",          "name",         "range"
      "Tech",          "Fusion Power", "Player"
      "UnitFlag",      "Transform",    "Local"
      "UnitFlag",      "Settlers",     "Local"
    }

Irrig_Possible effect to Build Irrigation Enabler[]

Replace any Irrig_Possible effect with equivalent Build Irrigation Action Enabler. Add explicit requirement of Settlers unit, and that target tile can be irrigated, to them.

[effect_irrigate_src_irrigation]
type    = "Irrig_Possible"
value   = 1
reqs    =
    { "type", "name", "range"
      "Extra", "Irrigation", "CAdjacent"
    }

->

[actionenabler_irrigate_src_irrigation]
action        = "Build Irrigation"
actor_reqs    =
    { "type",          "name",         "range"
      "UnitFlag",      "Settlers",     "Local"
    }
target_reqs    =
    { "type",         "name",        "range"
      "Extra",        "Irrigation",  "CAdjacent"
      "TerrainAlter", "CanIrrigate", "Local"
    }

Mining_Possible effect to Build Mine Enabler[]

Replace any Mining_Possible effect with equivalent Build Mine Action Enabler. Add explicit requirement of Settlers unit, and that target tile can be mined, to them.

[effect_mining]
type    = "Mining_Possible"
value   = 1
reqs    =
    { "type", "name", "range", "present"
      "TerrainFlag", "Oil", "Local", FALSE
    }

->

[actionenabler_mining]
action        = "Build Mine"
actor_reqs    =
    { "type",          "name",         "range"
      "UnitFlag",      "Settlers",     "Local"
    }
target_reqs    =
    { "type",         "name",    "range", "present"
      "TerrainFlag",  "Oil",     "Local", FALSE
      "TerrainAlter", "CanMine", "Local", TRUE
    }

Irrig_TF_Possible effect to Cultivate Enabler[]

Replace any Irrig_TF_Possible effect with equivalent Cultivate Action Enabler. Add explicit requirement of Settlers unit to them.

[effect_irrig_tf]
type    = "Irrig_TF_Possible"
value   = 1

->

[actionenabler_cultivate]
action        = "Cultivate"
actor_reqs    =
    { "type",          "name",         "range", "present"
      "UnitFlag",      "Settlers",     "Local", TRUE
    }

Mining_TF_Possible effect to Plant Enabler[]

Replace any Mining_TF_Possible effect with equivalent Plant Action Enabler. Add explicit requirement of Settlers unit to them.

[effect_mining_tf]
type    = "Mining_TF_Possible"
value   = 1

->

[actionenabler_plant]
action        = "Plant"
actor_reqs    =
    { "type",          "name",         "range", "present"
      "UnitFlag",      "Settlers",     "Local", TRUE
    }

New action enablers[]

Suicide Attack action enabler[]

Missiles' attack of unit getting used in attack has been split to action enabler of its own. The Missile unit class flag is gone. For keeping missiles to work as they used to, add back Missile as a user unit class flag, exclude them from any existing attack related action enablers by present=FALSE requirements, and add a new Suicide Attack action enabler for them.

[actionenabler_explode_missile]
action = "Suicide Attack"
actor_reqs    =
    { "type",          "name",    "range", "present"
      "UnitFlag",      "NonMil",  "Local", FALSE
      "UnitClassFlag", "Missile", "Local", TRUE
      "MinMoveFrags",  "1",       "Local", TRUE
      "DiplRel",       "War",     "Local", TRUE
    }

Pillage action enabler[]

Add new action enabler for Pillaging and add back the CanPillage unit class flag as a user unit class flag to keep it functioning like it used to.

[actionenabler_pillage]
action        = "Pillage"
actor_reqs    =
    { "type",          "name",         "range"
      "UnitClassFlag", "CanPillage",   "Local"
    }

Fortify action enabler[]

Add new action enablers for Fortifying to keep it functioning like it used to.

[actionenabler_fortify_terrain]
action        = "Fortify"
actor_reqs    =
    { "type",          "name",         "range", "present"
      "UnitClassFlag", "CanFortify",   "Local", TRUE
      "UnitFlag",      "Cant_Fortify", "Local", FALSE
      "TerrainFlag",   "NoFortify",    "Local", FALSE
      "Activity",      "Fortified",    "Local", FALSE
    }

[actionenabler_fortify_city]
action        = "Fortify"
actor_reqs    =
    { "type",          "name",         "range", "present"
      "UnitClassFlag", "CanFortify",   "Local", TRUE
      "UnitFlag",      "Cant_Fortify", "Local", FALSE
      "CityTile",      "Center",       "Local", TRUE
      "Activity",      "Fortified",    "Local", FALSE
    }

Hardcoded NoFortify TerrainFlag has gone. If you use it, like in the above action enabler, you need to add it back as user terrain flag in terrain.ruleset. Hardcoded CanFortify Unit class flag, and Cant_Fortify Unit type flag have gone. If you use them, like in the above action enabler, you need to add then back as user flags in units.ruleset.

Road building action enabler[]

Add new action enabler for Road building to keep it functioning like it used to.

[actionenabler_road]
action        = "Build Road"
actor_reqs    =
    { "type",          "name",         "range"
      "UnitFlag",      "Settlers",     "Local"
    }

Base building action enabler[]

Add new action enabler for Base building to keep it functioning like it used to.

[actionenabler_base]
action        = "Build Base"
actor_reqs    =
    { "type",          "name",         "range"
      "UnitFlag",      "Settlers",     "Local"
    }

Pollution and Fallout cleaning[]

Add action enablers for tile cleaning to keep it functioning like it used to.

[actionenabler_clean_pollution]
action        = "Clean Pollution"
actor_reqs    =
    { "type",          "name",         "range", "present"
      "UnitFlag",      "Settlers",     "Local", TRUE
    }

[actionenabler_clean_fallout]
action        = "Clean Fallout"
actor_reqs    =
    { "type",          "name",         "range", "present"
      "UnitFlag",      "Settlers",     "Local", TRUE
    }

Unit Move action enabler[]

Regular move is now action enabler controlled.

Add enabler for it

[actionenabler_regular_move]
action     = "Unit Move"
actor_reqs =
    { "type",         "name",        "range", "present"
      "MinMoveFrags", "1",           "Local", TRUE
      "UnitState",    "Transported", "Local", FALSE
    }

Transport entry and exit action enablers[]

Entering to and exiting from a transport unit is now action enabler controlled. "Transport Board" covers cargo initiated entering of the actor unit to a transport on the same tile. "Transport Embark" covers cargo initiated entering of the actor unit to a transport on an adjacent tile. "Transport Alight" covers cargo initiated unloading of the actor from a transport to the current tile. "Transport Unload" covers transporter initiated unloading of a target unit to the current tile. "Transport Disembark" covers cargo initiated transport exit of the actor unit to an adjacent tile.

To keep the old rules add the following action enablers:

[actionenabler_alight]
action        = "Transport Alight"
actor_reqs    =
    { "type",      "name",          "range"
      "UnitState", "OnLivableTile", "Local"
      "UnitState", "Transported",   "Local"
    }
target_reqs    =
    { "type",      "name",         "range"
      "UnitState", "Transporting", "Local"
    }

[actionenabler_board]
action        = "Transport Board"
actor_reqs    =
    { "type",    "name",       "range", "present"
      "DiplRel", "Armistice",  "Local", FALSE
      "DiplRel", "War",        "Local", FALSE
      "DiplRel", "Cease-fire", "Local", FALSE
      "DiplRel", "Peace",      "Local", FALSE
      "DiplRel", "Never met",  "Local", FALSE
    }

[actionenabler_unload]
action        = "Transport Unload"
actor_reqs    =
    { "type",      "name",         "range"
      "UnitState", "Transporting", "Local"
    }
target_reqs    =
    { "type",      "name",          "range"
      "UnitState", "OnLivableTile", "Local"
      "UnitState", "Transported",   "Local"
    }

[actionenabler_disembark]
action        = "Transport Disembark"
actor_reqs    =
    { "type",         "name",        "range"
      "UnitState",    "Transported", "Local"
      "MinMoveFrags", "1",           "Local"
    }

[actionenabler_embark]
action        = "Transport Embark"
actor_reqs    =
    { "type",         "name",       "range", "present"
      "MinMoveFrags", "1",          "Local", TRUE
      "DiplRel",      "Armistice",  "Local", FALSE
      "DiplRel",      "War",        "Local", FALSE
      "DiplRel",      "Cease-fire", "Local", FALSE
      "DiplRel",      "Peace",      "Local", FALSE
      "DiplRel",      "Never met",  "Local", FALSE
    }

Explode Nuclear, Nuke City and Nuke Units[]

3.0's "Explode Nuclear" could only target the actor unit's current tile except when an adjacent tile could be targeted. An adjacent tile could be targeted if it contained an enemy city or an enemy unit stack. One move fragment was always required to target an adjacent tile.

The new actions "Nuke City" and "Nuke Units" has been split from the "Explode Nuclear" action so the above rules could move to the ruleset.

Go over your action requirements that requires "Explode Nuclear". Make them apply to "Nuke City" and "Nuke Units" too.

Create one "Nuke City" and one "Nuke Units" action enabler for each of your 3.0 "Explode Nuclear" enablers. Require that the actor unit has at least one move fragment and war with the target in both. Require that the target unit stack is outside a city in the "Nuke Units" enabler to avoid duplicate enabled nuke actions.

If your original "Explode Nuclear" enabler looks like

[actionenabler_nuke]
action = "Explode Nuclear"
actor_reqs    =
    { "type",   "name", "range", "present"
      "UnitFlag", "Nuclear", "Local", TRUE
    }

it should become the below enablers, including the original.

[actionenabler_nuke]
action = "Explode Nuclear"
actor_reqs    =
    { "type",   "name", "range", "present"
      "UnitFlag", "Nuclear", "Local", TRUE
    }

[actionenabler_nuke_city]
action = "Nuke City"
actor_reqs =
    { "type",         "name",    "range"
      "UnitFlag",     "Nuclear", "Local"
      "MinMoveFrags", "1",       "Local"
      "DiplRel",      "War",     "Local"
    }

[actionenabler_nuke_units]
action = "Nuke Units"
actor_reqs =
    { "type",         "name",    "range"
      "UnitFlag",     "Nuclear", "Local"
      "MinMoveFrags", "1",       "Local"
      "DiplRel",      "War",     "Local"
    }
target_reqs =
    { "type",     "name",   "range", "present"
      "CityTile", "Center", "Local", FALSE
    }

The min and max distances between actor and target for "Explode Nuclear", "Nuke City" and "Nuke Units" is set with the game.ruleset file's actions section's explode_nuclear_min_range, nuke_city_min_range, nuke_units_min_range, explode_nuclear_max_range, nuke_city_max_range and nuke_units_max_range. To match the old rules they should be set as like this:

explode_nuclear_min_range = 0
explode_nuclear_max_range = 0
nuke_city_min_range = 1
nuke_city_max_range = 1
nuke_units_min_range = 1
nuke_units_max_range = 1

To have Unit Nuke City action enabled requirements to evaluate against the city, and not the tile, like it used to be, set nuke_city_target_kind to "City"

nuke_city_target_kind = "City"

To have these actions to consume the unit, like they used to, set *_consuming_always to TRUE for those of these actions that your ruleset uses:

explode_nuclear_consuming_always = TRUE
nuke_city_consuming_always = TRUE
nuke_units_consuming_always = TRUE

Sabotage City Production (Escape)[]

"Targeted Sabotage City" and "Targeted Sabotage City Escape" were able to target a player specified building or the target city's current production. They have been split in a city production target version and a building in city targeted version.

"Targeted Sabotage City" and "Targeted Sabotage City Escape" targets a player selected building in the target city. "Sabotage City Production" and "Sabotage City Production Escape" targets the city's current production.

To keep the old rules start by going over requirement vectors that requires actions. Make sure that they apply to both the building targeted and the production targeted version.

Then go over your action enablers. Copy each "Targeted Sabotage City" and make the copy about "Sabotage City Production". Copy each "Targeted Sabotage City Escape" and make the copy about "Sabotage City Production Escape".

So

[actionenabler_sabotage_city_target]
action = "Targeted Sabotage City Escape"
actor_reqs    =
    { "type",         "name",          "range"
      "DiplRel",      "War",           "Local"
      "UnitFlag",     "Spy",           "Local"
      "UnitState",    "OnLivableTile", "Local"
      "MinMoveFrags", "1",             "Local"
    }

should become

[actionenabler_sabotage_city_target]
action = "Targeted Sabotage City Escape"
actor_reqs    =
    { "type",         "name",          "range"
      "DiplRel",      "War",           "Local"
      "UnitFlag",     "Spy",           "Local"
      "UnitState",    "OnLivableTile", "Local"
      "MinMoveFrags", "1",             "Local"
    }

[actionenabler_sabotage_city_production]
action = "Sabotage City Production Escape"
actor_reqs    =
    { "type",         "name",          "range"
      "DiplRel",      "War",           "Local"
      "UnitFlag",     "Spy",           "Local"
      "UnitState",    "OnLivableTile", "Local"
      "MinMoveFrags", "1",             "Local"
    }

Found City[]

Found City Action Enabler has a new mandatory requirement that the target tile can't have the NoCities terrain flag. Add such a requirement to all enablers of Found City.

"TerrainFlag","NoCities","Local",FALSE

Set found_city_consuming_always to TRUE, to have the Found City to consume the actor like the old hardcoded rule was.

found_city_consuming_always = TRUE

Establish Embassy[]

Establish Embassy Action Enabler has a new mandatory requirement that player must not have the embassy already. Add such a requirement to all enablers of Establish Embassy.

"DiplRel", "Has real embassy", "Local", FALSE

Trade Route Establishing Action Enablers[]

Establish Route and Enter Marketplace Action Enablers have a new mandatory requirement that the unit must have a homecity to act as the other end of the route. Add such a requirement to all those enablers.

"UnitState", "HasHomeCity", "Local", TRUE

Airlift Unit[]

Airlift Unit Action Enabler has a new mandatory requirement that the unit must be in a city. Add such a requirement to all enablers of Airlift Unit.

"CityTile", "Center", "Local", TRUE

Paradrop Unit[]

Paradrop Unit Action Enabler has a new mandatory requirement that player is not at peace with the owner of the target territory. Add such a requirement to all enablers of Paradrop Unit.

"DiplRel", "Peace", "Local", FALSE

Paradrop Unit has also been split to many separate actions, each of which are specific to some situation. The new Action Enablers are Paradrop Unit Conquer, Paradrop Unit Frighten, Paradrop Unit Frighten Conquer, Paradrop Unit Enter, and Paradrop Unit Enter Conquer

Add Action_Success_Actor_Move_Cost effect for each of these new actions for them to have same cost as when they were part of Paradrop Unit.

Add Action Enablers for each of these new actions.

Conquer Extras[]

Conquer Extras is a new Action Enabler for taking control over claimable extras, such as Fortresses in many rulesets. The action used to be hardcoded side-effect of moving on such an extra, but now requires Action Enablers to enable it. To recreate rules similar to old hardcoded ones, when slow_invasions were not enabled, add enablers like:

[actionenabler_claim_extra_war]
action        = "Conquer Extras"
actor_reqs    =
    { "type",         "name",       "range"
      "MinMoveFrags", "1",          "Local"
      "DiplRel",      "War",        "Local"
    }

[actionenabler_claim_extra_unowned]
action        = "Conquer Extras"
actor_reqs    =
    { "type",         "name",         "range", "present"
      "MinMoveFrags", "1",            "Local", TRUE
    }
target_reqs    =
    { "type",         "name",         "range", "present"
      "CityTile",     "Extras Owned", "Local", FALSE
    }

For supporting old slow_invasions rules, you need to use separate "Conquer Extras 2" action for disembarking move to an extra tile.

[actionenabler_claim_extra_war_from_native_tile]
action        = "Conquer Extras"
actor_reqs    =
    { "type",         "name",         "range"
      "MinMoveFrags", "1",            "Local"
      "DiplRel",      "War",          "Local"
      "UnitState",    "OnNativeTile", "Local"
    }

[actionenabler_claim_extra_war_from_native_city]
action        = "Conquer Extras"
actor_reqs    =
    { "type",         "name",       "range"
      "MinMoveFrags", "1",          "Local"
      "DiplRel",      "War",        "Local"
      "CityTile",     "Center",     "Local"
    }

[actionenabler_claim_extra_war_from_non_native]
action        = "Conquer Extras 2"
actor_reqs    =
    { "type",         "name",         "range", "present"
      "MinMoveFrags", "1",            "Local", TRUE
      "DiplRel",      "War",          "Local", TRUE
      "UnitState",    "OnNativeTile", "Local", FALSE
      "CityTile",     "Center",       "Local", FALSE
    }

[actionenabler_claim_extra_unowned_from_native_tile]
action        = "Conquer Extras"
actor_reqs    =
    { "type",         "name",         "range", "present"
      "MinMoveFrags", "1",            "Local", TRUE
      "UnitState",    "OnNativeTile", "Local", TRUE
    }
target_reqs    =
    { "type",         "name",         "range", "present"
      "CityTile",     "Extras Owned", "Local", FALSE
    }

[actionenabler_claim_extra_unowned_from_native_city]
action        = "Conquer Extras"
actor_reqs    =
    { "type",         "name",         "range", "present"
      "MinMoveFrags", "1",            "Local", TRUE
      "CityTile",     "Center",       "Local", TRUE
    }
target_reqs    =
    { "type",         "name",         "range", "present"
      "CityTile",     "Extras Owned", "Local", FALSE
    }

[actionenabler_claim_extra_unowned_from_non_native]
action        = "Conquer Extras 2"
actor_reqs    =
    { "type",         "name",         "range", "present"
      "MinMoveFrags", "1",            "Local", TRUE
      "UnitState",    "OnNativeTile", "Local", FALSE
      "CityTile",     "Center",       "Local", FALSE
    }
target_reqs    =
    { "type",         "name",         "range", "present"
      "CityTile",     "Extras Owned", "Local", FALSE
    }

For slow_invasions you also need to add Action_Success_Actor_Move_Cost effects for entering the extra tile when disembarking.

[effect_action_success_move_cost_conquer_extras_from_non_native]
type    = "Action_Success_Actor_Move_Cost"
value   = 65535
reqs    =
    { "type",      "name",                  "range"
      "Action",    "Conquer Extras 2",      "Local"
      "UnitState", "OnNativeTile",          "Local"
    }


Action enablers for moving to Hut tile[]

Entering a hut is no longer side-effect of a regular move, but action of its own. There's two new actions related to this; "Enter Hut" and "Frighten Hut". Add action enablers for those. You don't need "Frighten Hut" enabler in converting old rules if you have had no unit class with hut_behavior "Frighten".

First example applies if your rules never had slow_invasions enabled.

[actionenabler_hut_enter]
action        = "Enter Hut"
actor_reqs    =
    { "type",         "name",         "range"
      "MinMoveFrags", "1",            "Local"
    }

[actionenabler_frighten_hut]
action        = "Frighten Hut"
actor_reqs    =
    { "type",         "name",         "range"
      "MinMoveFrags", "1",            "Local"
    }

You may need to use "Enter Hut 2" and "Frighten Hut 2" enablers for recreating different rules for a move between native tiles and a disembarking move from a ship to the Hut tile, if you want to recreate old slow_invasions rules.

[actionenabler_hut_enter_from_native_tile]
action        = "Enter Hut"
actor_reqs    =
    { "type",         "name",         "range"
      "MinMoveFrags", "1",            "Local"
      "UnitState",    "OnNativeTile", "Local"
    }

[actionenabler_hut_enter_from_native_city]
action        = "Enter Hut"
actor_reqs    =
    { "type",         "name",        "range"
      "MinMoveFrags", "1",           "Local"
      "CityTile",     "Center",      "Local"
    }

[actionenabler_hut_enter_from_non_native]
action        = "Enter Hut 2"
actor_reqs    =
    { "type",           "name",         "range", "present"
      "MinMoveFrags",   "1",            "Local", TRUE
      "UnitState",      "OnNativeTile", "Local", FALSE
      "CityTile",       "Center",       "Local", FALSE
    }

[actionenabler_hut_from_native_tile]
action        = "Frighten Hut"
actor_reqs    =
    { "type",         "name",         "range"
      "MinMoveFrags", "1",            "Local"
      "UnitState",    "OnNativeTile", "Local"
    }

[actionenabler_hut_frighten_from_native_city]
action        = "Frighten Hut"
actor_reqs    =
    { "type",         "name",        "range"
      "MinMoveFrags", "1",           "Local"
      "CityTile",     "Center",      "Local"
    }

[actionenabler_hut_from_non_native]
action        = "Frighten Hut 2"
actor_reqs    =
    { "type",           "name",         "range", "present"
      "MinMoveFrags",   "1",            "Local", TRUE
      "UnitState",      "OnNativeTile", "Local", FALSE
      "CityTile",       "Center",       "Local", FALSE
    }

For slow_invasions you also need to add Action_Success_Actor_Move_Cost effects for entering the hut when disembarking.

[effect_action_success_move_cost_hut_entry_from_non_native]
type    = "Action_Success_Actor_Move_Cost"
value   = 65535
reqs    =
    { "type",      "name",                  "range", "present"
      "Action",    "Enter Hut 2",           "Local", TRUE
      "UnitState", "OnNativeTile",          "Local", TRUE
    }

[effect_action_success_move_cost_hut_frighten_from_non_native]
type    = "Action_Success_Actor_Move_Cost"
value   = 65535
reqs    =
    { "type",      "name",                  "range", "present"
      "Action",    "Frighten Hut 2",        "Local", TRUE
      "UnitState", "OnNativeTile",          "Local", TRUE
    }

Bombard[]

Formerly internal requirements that bombard target tile either has no city, or that the bombarder is at war with the owner of the tile/city are now obligatory requirement to be listed in the Bombard action enabler. To have exactly the same rules as you used to have, you may need to make two action enablers from each existing Bombard action enabler; one for bombarding a city tile, and one for bombarding tiles without a city. Below example has just the new requirements. Add any requirements you had already.

[actionenabler_bombard_city]
action = "Bombard"
target_reqs    =
    { "type",             "name", "range"
      "DiplRelTileOther", "War",  "Local"
    }

[actionenabler_bombard_no_city]
action = "Bombard"
target_reqs    =
    { "type",     "name",   "range", "present"
      "CityTile", "Center", "Local", FALSE
    }

New in 3.1[]

Some brand new actions that didn't exist in 3.0 have been added. They are completely optional. To keep 3.0 behavior you shouldn't enable them at all.

  • "Surgical Strike Building" - destroy a player specified building.
  • "Surgical Strike Production" - destroy the target city's production.
  • "Spread Plague" - trigger illness in the target city.
  • "Spy Attack" - trigger a diplomatic battle to eliminate tile defenders.
  • "Bombard 2" and "Bombard 3" - perfect copies of "Bombard" for different ruleset defined rules.
  • "User Action 1", "User Action 2" and "User Action 3" - blank actions that should be defined in the ruleset.

Action move cost to the ruleset[]

The new effects Action_Success_Actor_Move_Cost and Action_Success_Target_Move_Cost have been added. Action_Success_Actor_Move_Cost subtracts move fragments from an actor unit after a successfully performed action. Action_Success_Target_Move_Cost does the same for a unit that is the target of an action.

Action_Success_Actor_Move_Cost[]

The actor move fragment price for successful "Establish Embassy", "Investigate City", "Capture Units", "Expel Unit", "Attack", "Bombard" and "Heal Unit" has moved to the ruleset. The old hard coded move fragment cost was 1 for "Establish Embassy" and "Investigate City", a single move for "Capture Units" and "Expel Unit" and all remaining movement for "Bombard" and "Heal Unit". How many move fragments a single move is is defined in move_fragments in terrain.ruleset. 65535 is large enough to make Freeciv know that all remaining movement is gone when reasoning about an action's move cost. Assuming that move_fragments is 3 the below effects brings the old rules back. The "OneAttack" FALSE requirement for the "Attack" move cost effect is needed only in the rulesets that still have "OneAttack" flag:

[effect_action_success_move_cost_embassy]
type    = "Action_Success_Actor_Move_Cost"
value   = 1
reqs    =
    { "type", "name", "range", "present"
      "Action", "Establish Embassy", "Local", TRUE
    }

[effect_action_success_move_cost_investigate]
type    = "Action_Success_Actor_Move_Cost"
value   = 1
reqs    =
    { "type", "name", "range", "present"
      "Action", "Investigate City", "Local", TRUE
    }

[effect_action_success_move_cost_capture]
type    = "Action_Success_Actor_Move_Cost"
value   = 3
reqs    =
    { "type", "name", "range", "present"
      "Action", "Capture Units", "Local", TRUE
    }

[effect_action_success_move_cost_expel]
type    = "Action_Success_Actor_Move_Cost"
value   = 3
reqs    =
    { "type", "name", "range", "present"
      "Action", "Expel Unit", "Local", TRUE
    }

[effect_action_success_attack_normal]
type    = "Action_Success_Actor_Move_Cost"
value   = 3
reqs    =
    { "type",     "name",      "range", "present"
      "Action",   "Attack",    "Local", TRUE
      "UnitFlag", "OneAttack", "Local", FALSE
    }

[effect_action_success_move_cost_bombard]
type    = "Action_Success_Actor_Move_Cost"
value   = 65535
reqs    =
    { "type", "name", "range", "present"
      "Action", "Bombard", "Local", TRUE
    }

[effect_action_success_move_cost_heal_unit]
type    = "Action_Success_Actor_Move_Cost"
value   = 65535
reqs    =
    { "type", "name", "range", "present"
      "Action", "Heal Unit", "Local", TRUE
    }

Action_Success_Target_Move_Cost[]

The actor move fragment price for successful "Expel Unit" has moved to the ruleset. It took all remaining move fragments. Assuming that move_fragments is 3 the below effects brings the old rules back:

[effect_action_success_move_cost_expelled]
type    = "Action_Success_Target_Move_Cost"
value   = 65535
reqs    =
    { "type", "name", "range", "present"
      "Action", "Expel Unit", "Local", TRUE
    }

Slow Invasions migration[]

The game.ruleset setting global_unit_options.slow_invasions, as well as unit type flag BeachLander has been retired, as the same thing can now be achieved with effects. If you had slow_invasions disabled, you only need to remove the setting; the default behavior is correct for you.

If you had slow_invasions enabled you will need to use Transport Disembark 2 and Conquer City 2 as actions specific to moving from a non-native terrain (from a transport), and define Action_Success_Actor_Move_Cost effects affecting them. Effects could look like:

[effect_action_success_move_cost_from_non_native]
type    = "Action_Success_Actor_Move_Cost"
value   = 65535
reqs    =
    { "type",          "name",                  "range"
      "Action",        "Transport Disembark 2", "Local"
      "UnitState",     "OnNativeTile",          "Local"
      "UnitClassFlag", "TerrainSpeed",          "Local"
    }

[effect_action_success_conquer_cost_from_non_native]
type    = "Action_Success_Actor_Move_Cost"
value   = 65535
reqs    =
    { "type",          "name",           "range"
      "Action",        "Conquer City 2", "Local"
      "UnitState",     "OnNativeTile",   "Local"
      "UnitClassFlag", "TerrainSpeed",   "Local"
    }

Action Enablers for Transport Disembark and Conquer City should have a

"UnitState", "OnLivableTile", "Local"

requirements, and the Transport Disembark 2 and Conquer City 2 the opposite

"UnitState", "OnLivableTile", "Local", FALSE

requirements.

See also sections about new "Enter Hut", "Frighten Hut", and "Conquer Extras" to see how they should be adjusted for slow_invasion rules.

Auto attack[]

The auto_attack section in game.ruleset has gained attack_actions, a list of actions that will be tried during an auto attack. It can remove or change the order of the old auto attack actions "Capture Units", "Bombard", "Attack" and "Suicide Attack". The old actions must be added in their old order to keep auto attack working as before.

The auto_attack section's will_never unit flag list has been replaced by the new requirement vector if_attacker. The if_attacker requirement vector must be true for a unit before it even considers to auto attack. This is the opposite of will_never, that contained unit type flags of units the never would consider to auto attack. So add each unit flag from your old will_never as not present UnitFlag requirements. The old hardcoded war requirement and the MinMoveFrags requirement has moved to if_attacker and therefore needs to be added too.

Assuming that your old auto_attack.will_never only contained the Nuclear unit type flag adding the following should keep your ruleset working as it used to:

[auto_attack]
; An auto attack may be triggered when another unit moves to an adjacent
; tile and the autoattack server setting is enabled. The following details
; are ruleset controlled.
;   attack_actions - the actions to try during an auto attack in the order
;                    they should be tried.
;   if_attacker    - this requirement vector must be true before a unit even
;                    considers to auto attack.

attack_actions= "Capture Units", "Bombard", "Attack", "Suicide Attack"

if_attacker =
    { "type",         "name",    "range", "present"
      "DiplRel",      "War",     "Local", TRUE
      "MinMoveFrags", "1",       "Local", TRUE
      ; Not a good idea to nuke our own area.
      "UnitFlag",     "Nuclear", "Local", FALSE
    }

Actions blocking regular move[]

Some of the things that are separate actions in 3.1 used to be side-effects of a unit move in earlier versions. In that sense the rule in the old versions was that one cannot do regular move without triggering these actions. In 3.1 user would have the option to do regular move instead of the action. To force user to do the action instead of going by regular move in such situations, one have to list those actions in game.ruleset actions.move_blocked_by. To have rules like in 3.0 one should have those actions of the following that the ruleset uses (some of them make sense only in slow_invasions rulesets):

move_blocked_by = "Transport Disembark", "Transport Disembark 2", "Conquer Extras", "Conquer Extras 2", "Enter Hut", "Enter Hut 2", "Frighten Hut", "Frighten Hut 2"

Fortified effect to the ruleset[]

The defense bonus of the Fortified unit activity is now granted by the effect Fortify_Defense_Bonus. To keep the old rules - fortify bonus when fortified and fortify bonus when in a city for units that can fortify - add the following to effects.ruleset.

[effect_fortified]
type    = "Fortify_Defense_Bonus"
value   = 50
reqs    =
    { "type", "name", "range"
      "Activity", "Fortified", "Local"
    }

[effect_city_fortified]
type    = "Fortify_Defense_Bonus"
value   = 50
reqs    =
    { "type",          "name",         "range", "present"
      "CityTile",      "Center",       "Local", TRUE
      "Activity",      "Fortified",    "Local", FALSE
      "UnitClassFlag", "CanFortify",   "Local", TRUE
      "UnitFlag",      "Cant_Fortify", "Local", FALSE
    }

Production value of Recycled and Upgraded Units to ruleset[]

Hardcoded modification to production value of Recycled and Upgraded Units is gone. To replicate old hardcoded value of 50%, add following effects:

[effect_unit_shield_value_recycle]
type    = "Unit_Shield_Value_Pct"
value   = -50
reqs    =
    { "type",   "name",         "range"
      "Action", "Recycle Unit", "Local"
    }

[effect_unit_shield_value_in_upgrade_price_calc]
type    = "Unit_Shield_Value_Pct"
value   = -50
reqs    =
    { "type",   "name",         "range"
      "Action", "Upgrade Unit", "Local"
    }

More configurable map theft[]

If you use one of the actions "Steal Maps" or "Steal Maps Escape" you will have to configure what it does. In the actions section of game.ruleset the new variable steal_maps_reveals_all_cities has shown up. It determines if all the victim's city tiles will be revealed to the thief when successfully performing the action. To get the Freeciv 3.0 behavior set it to TRUE.

steal_maps_reveals_all_cities = TRUE

The new effect type Maps_Stolen_Pct modifies the probability - originally 100% - that a tile is revealed on successful map theft. To get about half the map like you did in Freeciv 3.0 set it to -50 - subtracting 50% from 100% ending up with 50%.

[effect_steal_maps_pct]
type	= "Maps_Stolen_Pct"
value	= -50
reqs	=
    { "type", "name", "range", "present"
      "Action", "Steal Maps Escape", "Local", TRUE
    }

Paradropping adjustments[]

paratroopers_mr_req conversion[]

Convert units.ruleset paratroopers_mr_req to a MinMoveFrags requirement of Paradrop Unit action enablers. As the old paratroopers_mr_req value was in full movement points, and the new value in move fragments, you need to multiply the old value with terrain.ruleset move_fragments value. Add requirement to each Paradrop Unit enabler, e.g.

"MinMoveFrags", "3", "Local", TRUE

paratroopers_mr_sub conversion[]

Convert units.ruleset paratroopers_mr_sub. For the typical value of zero, you only need to remove the old paratroopers_mr_sub field. For any other value you need to add an Action_Success_Actor_Move_Cost effect that substracts the movement.

[effect_paradrop_mr_sub]
type  = "Action_Success_Actor_Move_Cost"
value = 1
reqs  =
    { "type",   "name",          "range"
      "Action", "Paradrop Unit", "Local"
    }

New settings in game.ruleset[]

Effects of happiness to Civil War chance[]

Add settings civil_war_bonus_celebrating and civil_war_bonus_unhappy to game.ruleset [civstyle] section. To keep old hardcoded behavior, use values -5 and 5, respectively, for them.

Output granularity[]

Add setting output_granularity to game.ruleset {civstyle] section. Use value 1 to keep old hardcoded behavior.

Nuke effects settings[]

Add settings nuke_pop_loss_pct and nuke_defender_survival_chance_pct to game.ruleset [combat_rules] section. To keep old hardcoded behavior, use values 49 and 0, respectively, for them.

History interest[]

Add setting history_interest_pml to game.ruleset [culture] section. Use value 0 to keep old behavior.

Configurable treaty clauses[]

Add sections for each enabled clause type to game.ruleset. To keep old behavior, enable them all

[clause_advance]
type = "Advance"

[clause_gold]
type = "Gold"

[clause_map]
type = "Map"

[clause_seamap]
type = "Seamap"

[clause_city]
type = "City"

[clause_ceasefire]
type = "Ceasefire"

[clause_peace]
type = "Peace"

[clause_alliance]
type = "Alliance"

[clause_vision]
type = "Vision"

[clause_embassy]
type = "Embassy"

Infrapoints[]

Extra infra cost[]

To completely disallow placing extras via infrapoints, like it used to be, set infracost of every extra type to 0.

Veterancy changes[]

Rename base chance settings[]

Some ruleset settings about veterancy gaining base chance have been renamed in units.ruleset. Replace veteran_raise_chance by veteran_base_raise_chance

Extra removal cause Enter[]

To keep old behavior of hut-type extras, add rmcause Enter for all of them.

AI trait Builder has been added[]

The new AI trait "Builder" has been added. Add the following to nations.ruleset

; Value of trait "builder" defines how much AI wants to build buildings
builder_min = 30
builder_max = 90
builder_default = 50

AI level Handicapped renamed as Restricted[]

Update AI requirements[]

In any requirement vector with a "AI" "Handicapped" requirement should be changed to "AI" "Restricted" requirement.

Update commands in .serv files[]

If you have used command "/handicapped" in a .serv file (or equivalent), change that to "/restricted".

NoAggressive as extra flag[]

Former Base flag NoAggressive is now an Extra flag, available for any extra and not just bases. Move any such flags from base_ -sections to the extra_ -section of the same extra. Change any "BaseFlag" "NoAggressive" -requirements to "ExtraFlag" "NoAggressive" -requirements. As this was the last of the Base flags, things like "BaseFlag" requirement type have been completely removed.

diplchance setting scope[]

Older freeciv versions had diplchance server setting to apply a hardcoded set of diplomatic actions. For other actions there was no chance of failure *on that part of the action evaluation*, i.e., the chance of success was 100%. In 3.1, the list of diplomatic actions subject to diplchance is defined in the game.ruleset. To have it applied on same actions as the old hardcoded behavior was in the previous versions, set diplchance_initial_odds like this, leaving the actions not part of your ruleset out:

diplchance_initial_odds = "Sabotage City", "Sabotage City Escape",
                          "Targeted Sabotage City Escape",
                          "Sabotage City Production Escape",
                          "Steal Tech", "Steal Tech Escape Expected",
                          "Targeted Steal Tech Escape Expected",
                          "Incite City", "Incite City Escape",
                          "Spread Plague", "Suitcase Nuke Escape",
                          "Steal Gold", "Steal Gold Escape",
                          "Steal Maps", "Steal Maps Escape"

Spy escape movement costs[]

Movement cost reduced from the spy when they escape after succesfull mission must now be implemented as Action_Success_Actor_Move_Cost effects. The old hardcoded rule that the escape takes all movement can be achieved by following kind of effects, one for each action that may result in spy escape in the ruleset:

[effect_action_success_steal_tech_escape_expected]
type = "Action_Success_Actor_Move_Cost"
value = 65535
reqs = { "type", "name", "range", "quiet"
         "Action", "Steal Tech Escape Expected", "Local", TRUE
       }

OneAttack retired[]

Unit type flag OneAttack has been removed. If you have any unit types that have it, you need to add it back as a user unit type flag, and add an effect to provide the attack-takes-all-movement functionality.

[effect_action_success_attack_one_attack]
type    = "Action_Success_Actor_Move_Cost"
value   = 65535
reqs    =
    { "type",     "name",      "range", "quiet"
      "Action",   "Attack",    "Local", TRUE
      "UnitFlag", "OneAttack", "Local", TRUE
    }

Amount Heal Unit heals ruleset controlled[]

The amount Heal Unit action heals is now ruleset controlled, via new Heal_Unit_Pct effect. To have rule like the old hardcoded value of 25% healing, add Heal_Unit_Pct effect with value -75 (as the default healing is 100%)

[effect_heal_amount]
type    = "Heal_Unit_Pct"
value   = -75
reqs    =
    { "type", "name", "range", "present"
      "Action", "Heal Unit", "Local", TRUE
    }

Unit class hut_behavior migration[]

Unit class property hut_behavior' has been replaced by a HutFrighten flag. Give HutFighten flag to any unit class that used to have hut_behavior of "Frighten". For unit classes with hut_behavior "Normal" you don't need to add anything. If you hae any unit classes with hut_behavior Nothing, you need to add user unit flag HutNothing and to give that to those unit classes. Then you have to give "Enter Hut" & "Frighten Hut" action enablers requirements that prevent units with incompatible flags from using those actions. For "Enter Hut" you want to prevent both "HutFrighten" and "HutNothing" units (latter only if you have them in the ruleset)

"UnitClassFlag", "HutFrighten", "Local", FALSE
"UnitClassFlag", "HutNothing",  "Local", FALSE

For "Frighten Hut" you want to require "HutFrighten" flag, and prevent "HutNothing" (if present in the ruleset)

"UnitClassFlag", "HutFrighten", "Local", TRUE
"UnitClassFlag", "HutNothing",  "Local", FALSE

Airlift without capacity rules migration[]

Whether airliftingstyle server setting indicating unlimited airlifts allows airlift even when the airlift capacity is zero used to be hardcoded so that it was allowed for the Departures but not for Arrivals. Now these are controlled with game.ruleset settings airlift_from_always_enabled and airlift_to_always_enabled. To keep old hardcoded rules, set them like this:

airlift_from_always_enabled = FALSE
airlift_to_always_enabled = TRUE

Small Wonder visibility[]

In previous versions all players always knew all the wonders, small ones included, of all the other players. In freeciv-3.1 this is controlled by a new wonder_visibility.small_wonders game.ruleset setting. To recreated the old rules of all wonders being known, set:

[wonder_visibility]
small_wonders = "Always"

Wonder Upkeep zero[]

Ruleset defined Wonded upkeep has never had any effect - the engine has ignored it, and treated it as zero. Freeciv-3.1 disallows the ruleset to specify non-zero upkeep value for wonders, as that only confuses someone reading the ruleset. Change any upkeep value you've had for wonders to zero.

Combat veterancy gaining rules[]

Two new settings controlling how units gain veterancy have been added to game.ruleset combat_rules section. To have the old hardcoded rules, set:

only_real_fight_makes_veteran = FALSE
combat_odds_scaled_veterancy = FALSE

Damage's effect on bombard rate[]

Whether unit's damage affects its bombard rate is now ruleset controlled. To have the old hardcoded behavior that the bombard rate is not affected by the damage set in game.ruleset combat_rules:

damage_reduces_bombard_rate = FALSE

Firepower1 combat bonus rename[]

Combat bonus Firepower1 has been renamed as LowFirepower to match the fact that the exact firepower value it gives is no longer necesarily 1. Just Replace any Firepower1 combat bonus name with LowFirepower

Nation translation_domain update[]

Freeciv-3.0 converted nations with translation_domain="freeciv" to use translation domain "freeciv-core". Freeciv-3.1 expects the translation_domain setting to match actual translation domain. So change any nation with:

translation_domain = "freeciv"

->

translation_domain = "freeciv-core"

NonNatBombardTgt[]

The new unit class flag NonNatBombardTgt is meant as means to fix some rules about bombardment of nonnative tiles, i.e., what's called "Shore Bombardment" by ships in many rulesets. To have exact rules of freeciv-3.0, give this flag to all unit classes.

Low Firepower values[]

Exact low firepower values are now ruleset controlled. To set them all to 1 like they have been in earlier versions:

low_firepower_badwallattacker = 1
low_firepower_pearl_harbour = 1
low_firepower_combat_bonus = 1
low_firepower_nonnat_bombard = 1

Transported defense type[]

New unit type field tp_defense tells if unit can defend while transported. To recreate the old hardcoded rule that all units can defend transported if they would be able to alight, set that to "Alight" for all units.

tp_defense = "Alight"

Drop city_style citizens_graphic_alt[]

city_style.citizens_graphic and city_style.citizens_graphic_alt are not used at all. The citizens_graphic field will be used in freeciv-3.2, but there's no plans to ever use citizens_graphic_alt so it has been dropped completely. Remove it from all city_styles on styles.ruleset.

min_trade_route_val[]

New game.ruleset trade.min_trade_route_val field can force any active traderoute carrying trade producing good to produce at least given amount of trade. To recreate the old hardcoded rule that the trade can be even zero if that's what the calculation gives, set it to 0.

min_trade_route_val = 0

singlepole requirement[]

Requirement for a singlepole server setting makes sense only in conjunction with correct requirements of alltemperate server setting. Freeciv-3.1 has a stricter sanity checking for this than 3.0 had. If a building's obsolete_by' list has a singlepole requirement, make sure that it has also an alltemperate requirement. If any other requirement lists has a singlepole requirement, make sure that it has also a present = FALSE alltemperate requirement.

Recycle Unit action rename[]

'Recycle Unit action has been renamed as Disband Unit Recover. Replace any mention of Recycle Unit activity with Disband Unit Recover. Also ui_name_recycle_unit has been renamed as ui_name_disband_unit.

Unhardcoded Unit Healing[]

All the following rules require that the unit has not moved at all during the previous turn. That's still hardcoded.

Min_HP_Pct[]

Formerly there was a hardcoded rule that unit heals a minimum of 1/3 of its full HP, if it's in a city. To have that same healing rule, add an effect like:

[effect_city_min_hp]
type    = "Min_HP_Pct"
value   = 33
reqs    =
    { "type",     "name",   "range"
      "CityTile", "Center", "Tile"
    }

HP_Regen_2[]

Formerly there were hardcoded rules that any unit without hp_loss_pct heals 10% (base regeneration) and a fortified unit heals additional 10%. Use HP_Regen_2 effects to recreate these rules. For the base healing rule, you may need to give a user unit class flag for those units that lose HP. On standard rulesets Helicopter flag accurately lists those very units:

[effect_base_regen]
type    = "HP_Regen_2"
value   = 10
reqs    =
    { "type",      "name",       "range", "present"
      "UnitClass", "Helicopter", "Local", FALSE
    }

Effect for healing of fortified units:

[effect_fortified_regen]
type    = "HP_Regen_2"
value   = 10
reqs    =
    { "type",     "name",      "range"
      "Activity", "Fortified", "Local"
    }

Base City_Vision_Radius_Sq effect[]

The game is unusable if there's no active City_Vision_Radius_Sq effect. Freeciv-3.1 requires that the ruleset has a base effect for it, one that has no requirements at all. If you've acieved the same by having set of effects of which one is always active, you need to rearrange them so that you separate the "base" part out of them to a new effect.

Road gui_type[]

Client side mapping between road types and keys to do the connection activities is now controlled by a new gui_type field. Previously this was deducted from the compat_special. Add gui_type to each road section in terrain.ruleset. To have behavior like you used to, use following mapping to set the values:

compat_special = "Road" -> gui_type = "Road"
compat_special = "Railroad" -> gui_type = "Railroad"
compat_special = "River" -> gui_type = "Other"
compat_special = "None" -> gui_type = "Other"
no compat_special -> gui_type = "Other"

See also[]

Editing Rulesets
Editing BuildingsEditing CitiesEditing EffectsEditing GameEditing Governments
Editing NationsEditing StylesEditing TechsEditing TerrainEditing Units
Update from 2.2 to 2.32.3 to 2.42.4 to 2.52.5 to 2.62.6 to 3.03.0 to 3.13.1 to 3.23.2 to 3.3
Advertisement