(Update to 14-Mar-18 level)
m (Syntax fix)
Line 56: Line 56:
Some boolean effects have been replaced by Action Enablers.
Some boolean effects have been replaced by Action Enablers.
===Transform_Possible effect to Transform_Terrain Enabler==
===Transform_Possible effect to Transform_Terrain Enabler===
Replace any '''Transform_Possible''' effect with equivalent '''Transform_Terrain''' Action Enabler.
Replace any '''Transform_Possible''' effect with equivalent '''Transform_Terrain''' Action Enabler.

Revision as of 02:17, March 14, 2018

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.


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.



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.

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.

extra = "Road"
flags = "RequiresBridge"

extra = "Railroad"
flags = "RequiresBridge"

extra = "River"
flags = "PreventsOtherRoads"

extra = "Canal"
flags = "PreventsOtherRoads"


name = _("Road")
bridged_over = "River", "Canal"

name = _("Railroad")
bridged_over = "River", "Canal"

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.

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


action        = "Transform Terrain"
actor_reqs    =
    { "type",          "name",         "range"
      "Tech",          "Fusion Power", "Player"
      "UnitFlag",      "Transform",    "Local"

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.1
Community content is available under CC-BY-SA unless otherwise noted.