Changes in what a 3.0 ruleset can do

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Post Reply
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 »

Disbanding a unit in a city to get 50% of its shield cost is now controlled by the "Recycle Unit" action enabler. See patch #6389

"Recycle Unit" can't be done if "Help Wonder" is legal.
Regular disbanding (without getting anything in return) can't be done if "Help Wonder" or "Recycle Unit" is legal.

You should consider how your "Recycle Unit" rules relates to your "Help Wonder" rules. Legal "Recycle Unit" can currently be used to break rules that forbids "Help Wonder". This is done by abusing the mechanism that allows the player to get the "Help Wonder" shields if he changes the production to something that can receive them. (See bug #23911)

Example: Allow recycling a unit unless it is "Undisbandable" or the recycling would benefit a foreign city.

Code: Select all

[actionenabler_recycle_unit]
action = "Recycle Unit"
actor_reqs    =
    { "type",   "name", "range", "present"
      "UnitFlag", "Undisbandable", "Local", FALSE
      "DiplRel", "Is foreign", "Local", FALSE
    }
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 »

New requirement type MinTechs can be used to track how far overall in the techs tree game (range 'World') or player has progressed: patch #6460

The traditional way of having specific "Tech" requirement can sometimes be problematic when player never gets that specific tech but otherwise goes forward in the tree.
The use-case I implemented this for is changing the player citystyle based on number of known techs.
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 »

Disbanding a unit without getting anything in return is now controlled by the "Disband Unit" action enabler. See patch #6573

It still can't be done if "Help Wonder" or "Recycle Unit" is legal.

The game still uses the "Undisbandable" unit type flag to decide how it will try to save from drowning and who it will kill to save the home city.

You can now create a unit type that is undisbandable under certain government types or that becomes disbandable when a certain technology is discovered. You can use this to simulate a powerful bureaucracy that loves certain unit types. Think of battle ships before WWII. Think of aircraft carriers today. Airplanes had existed for a while when WWII broke out. Cruise missiles that can be launched from small boats have existed for a while today. See Millennium Challenge 2002.
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 »

More control over what upkeep failure does. See patch #6632 and patch #6633

When a player fails to pay the food, gold or shield upkeep of a unit it has consequences. The consequences for the unit is now configurable in the missing_unit_upkeep section of cities.ruleset.

Use food_protected, gold_protected and shield_protected to determine what, if any, unit type flags should grant protection against upkeep failure consequences. A citizen may be killed in the place of a protected unit.

Use food_unit_act, gold_unit_act and shield_unit_act to force the unit to try to perform an action as a consequence. You can specify alternative actions in case the first is illegal.

Use food_wipe, gold_wipe and shield_wipe to delete the unit without using an action as a consequence. This will be done after any actions have been tried.

Example 1: Be merciful. Never disband a GameLoss unit. Try various actions that gives a profit. Delete the unit if they all fail.

Code: Select all

[missing_unit_upkeep]
food_protected    = "GameLoss"
food_unit_act     = "Help Wonder", "Join City", "Establish Trade Route",
                    "Enter Marketplace", "Recycle Unit"
food_wipe         = TRUE

gold_protected    = "GameLoss"
gold_unit_act     = "Help Wonder", "Join City", "Establish Trade Route",
                    "Enter Marketplace", "Recycle Unit"
gold_wipe         = TRUE

shield_protected  = "GameLoss"
shield_unit_act   = "Help Wonder", "Join City", "Establish Trade Route",
                    "Enter Marketplace", "Recycle Unit"
shield_wipe       = TRUE
Example 2: Anti mercy. Not paying the upkeep of a GameLoss unit can kill you. Can't pay for the maintenance of your nuke? To bad. Boom! The unit can't disband? Continue in the hope of killing a citizen.

Code: Select all

[missing_unit_upkeep]
food_unit_act     = "Explode Nuclear", "Disband Unit"
food_wipe         = FALSE

gold_unit_act     = "Explode Nuclear", "Disband Unit"
gold_wipe         = FALSE

shield_unit_act   = "Explode Nuclear", "Disband Unit"
shield_wipe       = FALSE
T1000
Posts: 6
Joined: Wed Dec 16, 2015 5:53 pm

Re: Changes in what a 3.0 ruleset can do

Post by T1000 »

What about "best defender" catapult ?
Is there any way to create ruleset where some units will have CONFIGURABLE +/- bonus to attacking cities,
eg. catapult +300% attack when attacking cities,
horses -50% attack.
(citybuster looks unconfigurable)

And madness with best defender ever - catapult - could be solved.
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 »

Changing a unit's home city is now controlled by the "Home City" action enabler. See patch #6801

You can now:
  • create city militia units that can't transfer its upkeep cost to another city by changing home city.
  • permit the player to give away a unit by moving it to an allied city and changing home city.
Since this is an action enabler you can make those abilities depend on wonders, governments, techs etc. You can also make them the default rules by not depending on anything.
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 »

What little I've had time to do for 3.0 ruleset format lately have been about two concepts:
1) Resources as extras (merging resources to extras)
2) (Trade) Goods - trade route has a property that it's about certain Good. As the other new trade route property, direction, this still has no gameplay effect at all but just gets listed in the information of the route
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 »

Upgrading a unit is now controlled by the "Upgrade Unit" action enabler. See patch #6830

The "Upgrade Unit" action enabler controls the players ability to pay gold to have a unit upgraded. Automatic (and free) upgrades are controlled by the "Upgrade_Unit" effect.

You can now completely remove or add additional restrictions to a player's ability to pay gold to have a unit upgraded. Example: No upgrade of any infantry units without Barracks. No upgrade of any ship without Port Facility.
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 »

Paradropping a unit is now controlled by the "Paradrop Unit" action enabler. See patch #6949

This allows new rules like: "Non veteran paratroopers can't land on forest terrain."
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 requirement system can now check if a unit is transporting another unit See patch #6975

To make a requirement vector require that a unit is transporting another add

Code: Select all

"UnitState", "Transporting", "Local"
This allows new rules like "'Innocent Ferry' can't 'Explode Nuclear' while carrying passengers".
Post Reply