FANDOM


This document describes how to convert freeciv 3.0 compatible ruleset to development version (one that will become freeciv 3.1) compatible ones. Currently this goes up to compatibility with freeciv master commit 4e44401177, 14-Mar-18.

CapabilityEdit

Capability string of each ruleset file must be changed. Also a new format_version field needs to be added. For 3.1 rulesets the format version is 20.

[datafile]
options="+Freeciv-ruleset-Devel-2017.Jan.02"
format_version=20

parser.luaEdit

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 layerEdit

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.

Bridge rulesEdit

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"

Convert effects to Action EnablersEdit

Some boolean effects have been replaced by Action Enablers.

Transform_Possible effect to Transform_Terrain EnablerEdit

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"
    }


See alsoEdit

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.1