Page 1 of 14

Changes in what a 3.0 ruleset can do

Posted: Thu Jan 01, 2015 11:16 pm
by cazfi
Freeciv-2.6 has been branched to stable branch S2_6. Development of freeciv-3.0 has begun in TRUNK.

This thread is about changes that has been made to the development version of Freeciv that changes what a ruleset can do.

Please keep wishlist items and such away from this thread. This is about listing things that have been implemented already.

Re: Changes in what a 3.0 ruleset can do

Posted: Sat Jan 03, 2015 4:34 pm
by cazfi
Added support for "LandAndSea" barbarian nation type that can, as a single player, act as both Land and Sea barbarian: patch #5521

Ruleset must have either at least one Land and one Sea barbarian, or at least one LandAndSea barbarian.

Re: Changes in what a 3.0 ruleset can do

Posted: Sat Jan 03, 2015 11:04 pm
by sveinung
Not sure if I should post this here since the same change was done in 2.6, but just in case: The HelpWonder unit type flag is no longer hard coded. See patch #5639 and patch #5583

If you wish to continue using it like before define it as a user defined unit type flag in units.ruleset. Then require the unit flag in game.ruleset in the actor_reqs field of each action enabler that enables "Help Wonder".

Re: Changes in what a 3.0 ruleset can do

Posted: Sun Jan 04, 2015 4:23 am
by cazfi
sveinung wrote:[i]Not sure if I should post this here since the same change was done in 2.6

In the future: If it's not a change relative to 2.6 it doesn't belong here.

Re: Changes in what a 3.0 ruleset can do

Posted: Fri Jan 16, 2015 1:00 pm
by sveinung
[quote=sveinung]It is now possible to make an extra type spread without doing Lua programming. See patch #5616[/quote]

This has since been replaced with generic spontaneously appearing extras support. One can make them spreading ones by giving requirement about adjacent extra of the same type for spontaneous appearance.
Now also spontaneous disappearance is supported: patch #6243

Re: Changes in what a 3.0 ruleset can do

Posted: Fri Jan 16, 2015 1:46 pm
by sveinung
Capturing all units at a tile is now controlled by the "Capture Units" action enabler. See patch #5604

The unit type flags "Capturable" and "Capturer" are no longer hard coded. (In the rulesets "alien" and "civ2civ3" they have been added back as user flags using a "Capture Units" action enabler to implement the old rules)

This gives you improved control over the unit capture rules. The rules can now be everything from minor adjustments of the old rules (see the example below) to rules like "a unit that don't have the user defined DesertHard unit type flag can be captured by any unit that has the DesertHard unit type flag if it is on a desert tile".

Example: Adjust the old rules to make it impossible to capture while transported over non native terrain (think warrior in a boat) unless the capturer has the "Marines" unit flag.
Define the unit flags "Capturable" and "Capturer" in units.ruleset. Add the following action enablers to game.rulest (and make sure that no other action enabler enables "Capture Units"):

Code: Select all

[actionenabler_capture_can_exist]
action = "Capture Units"
actor_reqs    =
    { "type",   "name", "range", "present"
      "Unitflag", "Capturer", "Local", TRUE
      "DiplRel", "War", "Local", TRUE
      "MinMoveFrags", "1", "Local", TRUE
      "UnitState", "TransportDependent", "Local", FALSE
    }
target_reqs    =
    { "type",   "name", "range", "present"
      "Unitflag", "Capturable", "Local", TRUE
      "CityTile", "Center", "Local", FALSE
    }

[actionenabler_capture_marines]
action = "Capture Units"
actor_reqs    =
    { "type",   "name", "range", "present"
      "Unitflag", "Capturer", "Local", TRUE
      "Unitflag", "Marines", "Local", TRUE
      "DiplRel", "War", "Local", TRUE
      "MinMoveFrags", "1", "Local", TRUE
    }
target_reqs    =
    { "type",   "name", "range", "present"
      "Unitflag", "Capturable", "Local", TRUE
      "CityTile", "Center", "Local", FALSE
    }

Re: Changes in what a 3.0 ruleset can do

Posted: Sun Mar 22, 2015 1:41 pm
by sveinung
Founding and joining cities is now controlled by the new action enablers "Found City" and "Join City". See patch #5606

This allows you to add additional restrictions on those actions. The only previously hard coded rules that have been moved to the ruleset is that city founders must have the unit type flag "Cities" and that city joiners must have the unit type flag "AddToCity". Those unit type flags are no longer hard coded. You can define them as unit type flags if you still want them.

Re: Changes in what a 3.0 ruleset can do

Posted: Sun Mar 22, 2015 10:00 pm
by The Square Cow
How does this intersect with the nocities terrain flag?

Re: Changes in what a 3.0 ruleset can do

Posted: Sun Mar 22, 2015 11:18 pm
by sveinung
The Square Cow wrote:How does this intersect with the nocities terrain flag?

The rule that the NoCities terrain flag makes founding cities illegal is still hard coded. The patch was already to big. (It is harder to see bugs in a large patch) The NoCities terrain flag may be moved to the ruleset in the future.

Re: Changes in what a 3.0 ruleset can do

Posted: Mon Mar 23, 2015 1:09 pm
by Caedo
sveinung wrote:
The Square Cow wrote:How does this intersect with the nocities terrain flag?

The rule that the NoCities terrain flag makes founding cities illegal is still hard coded. The patch was already to big. (It is harder to see bugs in a large patch) The NoCities terrain flag may be moved to the ruleset in the future.

If I'm not mistaken, the NoCities terrain flag also disables cities being on the tile through other means, such as huts, other lua script or the editor.

Also, somewhat unrelated - what are the special plans as for why this is 3.0 and not 2.7? What bigger things are planned?