Changes in what a 3.0 ruleset can do

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
sveinung
Elite
Posts: 491
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Postby sveinung » Thu Aug 13, 2015 1:21 pm

You can now make exceptions to slow_invasions See patch #6212

The ruleset setting slow_invasions makes units lose all their remaining movement point when moving from non native terrain to native terrain. The new unit type flag BeachLander allows you to give some unit types an exception from this rule.

This allows you to create a ruleset where most land units have to spend the rest of the turn on the shore after disembarking from a ship while the Commando unit gets to spend his remaining moves.

sveinung
Elite
Posts: 491
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Postby sveinung » Sun Aug 16, 2015 9:15 am

You can now forbid later attacks when an earlier attack is legal. See patch #6239

In earlier versions of Freeciv the attacks would be tested for in turn. The first legal attack would be performed. Action enabler control has made it possible to let the player choose what attack he wishes to perform.

Don't want to give the player a choice when more than one attack is legal at the same time? Use the new ruleset options force_capture_units, force_bombard and force_explode_nuclear. When they all are set to TRUE you will get the 2.6 rules.

Read the comments explaining the new options in the classic ruleset's game.ruleset to learn the details.

sveinung
Elite
Posts: 491
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Postby sveinung » Tue Aug 18, 2015 2:20 am

New unit action "Destroy City" See patch #6248

You can use this action to permit scorched earth tactics, to allow burning down a defenseless foreign city and to give a special high value unit like the Leader an insanely overpowered attack.

"Destroy City" destroys the target city. There is no battle or other dice roll first. You should therefore never enable it against any foreign target city that still has units defending it unless you aim at overpowered. (Reminder: You can require a certain amount of units at a tile. You can require that the target city is domestic.)

The civilian population of a city that is destroyed disappears.

You can change name the player sees by using the ui_name_destroy_city setting.

Example: A ruleset where a veteran unit with the ruleset defined unit type flag "Loyal" can keep a domestic city out of enemy hands by breaching its heat shield.

Code: Select all

ui_name_destroy_city = _("%sBreach Heat Shield%s")

[actionenabler_breach_heat_shield]
action = "Destroy City"
actor_reqs    =
    { "type",   "name", "range", "present"
      "UnitFlag", "Loyal", "Local", TRUE
      "MinVeteran", 1, "Local", TRUE
      "MinMoveFrags", "1", "Local", TRUE
      "DiplRel", "Is foreign", "Local", FALSE
    }

sveinung
Elite
Posts: 491
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Postby sveinung » Wed Aug 19, 2015 12:34 pm

The found city action can now cause an incident. See bug #23795

The rule that you can't build a city on another player's tile is still hard coded. That means that the only incident it can cause is a global one where everyone gets a casus belli against the city builder.

Example: Once "The Shrine to Arne Næss" is build everyone gets a casus belli against any player who founds a new city. (The wonder's rule_name uses "ae" rather than "æ")

Code: Select all

[effect_incident_deep_ecology_casus_belli]
type   = "Casus_Belli_Success"
value   = 1000
reqs   =
    { "type", "name", "range"
      "Action", "Found City", "Local"
      "Building", "The Shrine to Arne Naess", "World"
    }

sveinung
Elite
Posts: 491
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Postby sveinung » Fri Aug 21, 2015 11:03 am

The rule forbidding founding a city on foreign land now lives in the ruleset. See patch #6264

The old hard coded rule was that the player is allowed to found a city at a tile if it is unclaimed OR if he claims it him self. This rule has to be expressed as two action enablers. One has the requirement {"CityTile", "Claimed", "Local", FALSE} in its target reqs, the other has {"DiplRel", "Is foreign", "Local", FALSE} in its actor reqs.

Example: permit a player to found cities on unclaimed land, on land inside his own borders and on land inside the borders of players he is at war with.

Code: Select all

[actionenabler_build_city_pioneer]
action = "Found City"
actor_reqs    =
    { "type",   "name", "range"
      "UnitFlag", "Cities", "Local"
      "UnitState", "OnLivableTile", "Local"
      "MinMoveFrags", "1", "Local"
    }
target_reqs    =
    { "type",   "name", "range", "present"
      "CityTile", "Claimed", "Local", FALSE
    }

[actionenabler_build_city_domestic]
action = "Found City"
actor_reqs    =
    { "type",   "name", "range", "present"
      "UnitFlag", "Cities", "Local", TRUE
      "UnitState", "OnLivableTile", "Local", TRUE
      "MinMoveFrags", "1", "Local", TRUE
      "DiplRel", "Is foreign", "Local", FALSE
    }

[actionenabler_build_city_aggressive]
action = "Found City"
actor_reqs    =
    { "type",   "name", "range", "present"
      "UnitFlag", "Cities", "Local", TRUE
      "UnitState", "OnLivableTile", "Local", TRUE
      "MinMoveFrags", "1", "Local", TRUE
      "DiplRel", "War", "Local", TRUE
    }

sveinung
Elite
Posts: 491
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Postby sveinung » Wed Sep 09, 2015 9:55 am

The new effect Border_Vision gives the player vision on all tiles within his borders. See patch #6331

Changes in Border_Vision takes effect during turn change.

Only useful when the borders setting is set to "Enabled". You can lock it if border vision rules are important to your ruleset.

Example: At the start of the game the player's tiles may be covered by the fog of war. The wonder "Leo the Mathematician's Beacon System" removes it. The tech "Telegraph" removes it.

Code: Select all

[effect_telegraph_border_vision]
type    = "Border_Vision"
value   = 1
reqs   =
    { "type", "name", "range"
      "Tech", "Telegraph", "Player"
    }

[effect_beacon_system_border_vision]
type    = "Border_Vision"
value   = 1
reqs   =
    { "type", "name", "range"
      "Building", "Leo the Mathematician's Beacon System", "Player"
    }

(The wonder is called "Leo the Mathematician's Beacon System" because the name "Byzantine Beacon System" looks bad when someone else build it. It can be built long before the Telegraph tech can be researched)

sveinung
Elite
Posts: 491
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Postby sveinung » Sat Sep 12, 2015 10:03 pm

New unit action "Expel Unit" See patch #5306 (by gm1530, finished by me)

"Expel Unit" sends the target unit back to its owner's capital. It fails if the owner doesn't have a capital.

You can change the name the player sees by using the ui_name_expel_unit setting.

You can now add a rule that permits the player to use a military unit to expel spies and diplomats belonging to a someone he doesn't wish to declare war on.

sveinung
Elite
Posts: 491
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Postby sveinung » Sun Sep 20, 2015 2:07 pm

The UnitState requirement type can now check if a unit is home. See patch #6323

The "UnitState" requirement type now has the new property "OnDomesticTile". It checks if a unit is inside his owner's borders.

You can use it with the "Expel Unit" action enabler to prevent expulsions from happening all over the map. Add a "OnDomesticTile" requirement to the action enabler's actor requirement vector to allow the actor unit to expel another unit when the actor is inside its owner's borders. Note that this won't check the location of the expelled unit. A unit on a tile next to a tile owned by the actor can be expelled by a unit standing on it. Add a not present requirement to the action enabler's target requirement vector to forbid expelling a target unit that is inside its owner's borders. Note that this won't check the location if the unit doing the expulsion. To allow an actor unit that is inside its owner's borders to expel any unit unless the expelled unit is inside its owners borders do both the modifications.

You can't use it to forbid the expulsion of a unit that is inside the borders of an ally. This means that some use cases for unit expulsion, like the ability to expel a defensive military unit, still aren't well supported. Reason: Player A and Player B are allied. Player C has a border with Player B. A unit belonging to Player A stands on Player B's side of the border as a part of a defensive line. Player C uses a unit on Player C's side of the border the expel the unit belonging to Player A that is inside Player B's borders. Player C has now made a hole in the line. He declares war and attacks through the hole made by expulsion.

sveinung
Elite
Posts: 491
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Postby sveinung » Sun Sep 20, 2015 2:45 pm

Building genus in requirement vectors. patch #6341

"BuildingGenus", a new requirement type, allows you to separate great wonders ("GreatWonder"), small wonders ("SmallWonder") and regular buildings ("Improvement") from each other.

It only supports the local range.

sveinung
Elite
Posts: 491
Joined: Wed Feb 20, 2013 4:50 pm

Re: Changes in what a 3.0 ruleset can do

Postby sveinung » Sun Sep 20, 2015 2:49 pm

Increased ruleset control over the "Help Wonder" caravan action See patch #6362, patch #6344 and patch #6357

A city can produce ("build") a unit or a building. The "Help Wonder" caravan action helps a city's production by adding 100% of the unit's shield cost to it. Disbanding a unit only adds 50% of the unit's shield cost to the city production. You now control what city production can benefit from "Help Wonder" on a item by item basis.

The item a city produces is now the local building type or unit type in target city requirement vectors. Say that your ruleset has a wonder that makes its owner win the game. You can now forbid it from receiving help from caravans while allowing other wonders to receive it. See patch #6344

The extra shields "Help Wonder" provides compared to disbanding a unit is only transferred if the new production can receive help from "Help Wonder". Note that the rule is simple. It cares about the ability to receive help, not who it can receive help from. If "Unit A" can help "Wonder A" but not "Wonder B", "Unit B" can help "Wonder B", "Unit A" helps "Wonder A" and the player changes the production from "Wonder A" to "Wonder B" the extra shields will be transferred since "Wonder B" can receive help. It doesn't care that "Wonder B" can't receive help from "Unit A". See patch #6357

The rule that only wonders, great or small, can benefit from "Help Wonder" has been moved to the ruleset. See patch #6362