Changes in what a 3.0 ruleset can do

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Post Reply
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Changes in what a 3.0 ruleset can do

Post 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.
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Changes in what a 3.0 ruleset can do

Post 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.
sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Post 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".
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Changes in what a 3.0 ruleset can do

Post by cazfi »

sveinung wrote: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.
sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Post 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
Last edited by sveinung on Fri Jan 16, 2015 1:49 pm, edited 2 times in total.
sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Post 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
    }
sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Post 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.
The Square Cow
Veteran
Posts: 53
Joined: Wed Nov 19, 2014 5:47 pm

Re: Changes in what a 3.0 ruleset can do

Post by The Square Cow »

How does this intersect with the nocities terrain flag?
sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Post 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.
User avatar
Alien Valkyrie
Elite
Posts: 513
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: Changes in what a 3.0 ruleset can do

Post by Alien Valkyrie »

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?
~ AVL
Post Reply