Freeciv
Register
(continue...)
Tag: Visual edit
(error, these effects are not tile-based)
Tag: Source edit
(16 intermediate revisions by 2 users not shown)
Line 20: Line 20:
   
 
:The text in the brackets is the entry name, which just has to be unique, but is otherwise not used.
 
:The text in the brackets is the entry name, which just has to be unique, but is otherwise not used.
: '''reqs''' is a [[requirements]] vector:
 
 
:The '''name''' field tells Freeciv which '''Effect Type''' you are defining. The value is the effect's value, which depends on which effect it is. The reqs table contain a list of requirements for this effect being in effect. You need to satisfy '''all''' requirements listed here for this effect to take effect in the game.
 
:The '''name''' field tells Freeciv which '''Effect Type''' you are defining. The value is the effect's value, which depends on which effect it is. The reqs table contain a list of requirements for this effect being in effect. You need to satisfy '''all''' requirements listed here for this effect to take effect in the game.
   
:The '''value''' field is the integer ''amount'' parameter for many effects (must be in the range -32767 to 32767; some do not handle negative numbers well).
+
:The '''value''' field is the integer ''amount'' parameter for many effects (must be in the range -32767 to 32767; some do not handle negative numbers well). When an effect of a specific type is tested, all values bound to requirements matching the case are summed up (exceptions are spaceship parts effects).
   
 
:The '''reqs''' table consists of sets of '''Requirement Type''', '''Requirement''', and '''Requirement Range'''.
 
:The '''reqs''' table consists of sets of '''Requirement Type''', '''Requirement''', and '''Requirement Range'''.
Line 56: Line 55:
   
 
:Survives
 
:Survives
:A requirement may have a '''survives''' field, and if this is 'TRUE', the effect survives destruction (wonders only).
+
:A requirement may have a '''survives''' field, and if this is 'TRUE', the effect survives destruction (mostly used with wonders, see limitations below).
   
 
<pre>
 
<pre>
Line 70: Line 69:
 
===Effect Types===
 
===Effect Types===
 
{| style="margin: auto;" cellpadding="4"
 
{| style="margin: auto;" cellpadding="4"
|- bgcolor="#e0f0f0"
+
|- bgcolor="#9bc3d1"
 
! rowspan="2" bgcolor="#9bc3d1" |Effect Type
 
! rowspan="2" bgcolor="#9bc3d1" |Effect Type
 
! rowspan="2" width="20%" bgcolor="#9bc3d1" |When affects game
 
! rowspan="2" width="20%" bgcolor="#9bc3d1" |When affects game
 
! colspan="4" |Factors that may be considered in reqs
 
! colspan="4" |Factors that may be considered in reqs
 
! rowspan="2" width="75%" bgcolor="#9bc3d1" |Explanation
 
! rowspan="2" width="75%" bgcolor="#9bc3d1" |Explanation
  +
|- bgcolor="#9bc3d1"
|-
 
!Player
+
!Player [/ Other player]
 
!City
 
!City
 
!Tile
 
!Tile
Line 155: Line 154:
 
|'''Defend_Bonus'''
 
|'''Defend_Bonus'''
 
| align="left" |When a unit defends
 
| align="left" |When a unit defends
|Unit owner
+
|Defending unit owner
|City on the tile (if present)
+
|Defended city (if present)
|Unit tile
+
|Target tile
|Unit type
+
|Attacking unit type
 
| align="left" |Increases defensive bonuses of units. Any unit requirements on this effect will be applied to the _attacking_ unit. The defensive bonus is ignored by attackers with "IgWall" flag (up to 2.5). Attackers with "BadWallAttacker" flag will have their firepower set to 1.
 
| align="left" |Increases defensive bonuses of units. Any unit requirements on this effect will be applied to the _attacking_ unit. The defensive bonus is ignored by attackers with "IgWall" flag (up to 2.5). Attackers with "BadWallAttacker" flag will have their firepower set to 1.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
Line 278: Line 277:
 
| rowspan="6" |City
 
| rowspan="6" |City
 
| rowspan="6" |City tile
 
| rowspan="6" |City tile
| rowspan="6" |-
+
| rowspan="6" | -
 
| align="left" |Make ''amount'' unhappy citizens content. Applied ''before'' martial law and unit penalties.
 
| align="left" |Make ''amount'' unhappy citizens content. Applied ''before'' martial law and unit penalties.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
Line 294: Line 293:
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Martial_Law_Max'''
 
|'''Martial_Law_Max'''
| align="left" |The maximum ''amount'' of units that will give martial law in city.
+
| align="left" |The maximum ''amount'' of units that will give martial law in city. Zero value means no limit.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Max_Rates'''
 
|'''Max_Rates'''
Line 352: Line 351:
 
| align="left" |City is nuke proof. Since 2.6, specifies the percentage chance of deflecting a nuke.
 
| align="left" |City is nuke proof. Since 2.6, specifies the percentage chance of deflecting a nuke.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
|'''Output_Add_Tile'''
+
|'''Output_Bonus'''
 
| rowspan="7" align="left" |Phase end, in city processing order
 
| rowspan="7" align="left" |Phase end, in city processing order
 
| rowspan="7" |City owner
 
| rowspan="7" |City owner
 
| rowspan="7" |Any city
 
| rowspan="7" |Any city
| rowspan="7" |Each worked tile
+
| rowspan="2" | <!-- -->-
 
| rowspan="7" |Output type
 
| rowspan="7" |Output type
| align="left" |Add ''amount'' to each worked tile.
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Output_Bonus'''
 
 
| align="left" |City production is increased by ''amount'' percent.
 
| align="left" |City production is increased by ''amount'' percent.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Output_Bonus_2'''
 
|'''Output_Bonus_2'''
 
| align="left" |City production is increased by ''amount'' percent after Output_Bonus, so is multiplicative with it.
 
| align="left" |City production is increased by ''amount'' percent after Output_Bonus, so is multiplicative with it.
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|'''Output_Add_Tile'''
  +
| rowspan="5" |Each worked tile
  +
| align="left" |Add ''amount'' to each worked tile.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Output_Inc_Tile'''
 
|'''Output_Inc_Tile'''
Line 382: Line 382:
 
| rowspan="3" |City owner
 
| rowspan="3" |City owner
 
| rowspan="3" |Each city
 
| rowspan="3" |Each city
| rowspan="3" |-
+
| rowspan="3" | -
 
| rowspan="3" |Output type
 
| rowspan="3" |Output type
 
| align="left" |Base ''amount'' in percentage that each city has in waste. Waste can be used with any output type, use an ''OutputType'' requirement to specify which.
 
| align="left" |Base ''amount'' in percentage that each city has in waste. Waste can be used with any output type, use an ''OutputType'' requirement to specify which.
Line 396: Line 396:
 
| rowspan="2" |City owner
 
| rowspan="2" |City owner
 
| rowspan="2" |Each city
 
| rowspan="2" |Each city
| rowspan="2" |-
+
| rowspan="2" | -
| rowspan="2" |-
+
| rowspan="2" | -
 
| align="left" |Increases pollution caused by each unit of population by ''amount'' percent (adds to baseline of 100%, i.e. 1 pollution per citizen).
 
| align="left" |Increases pollution caused by each unit of population by ''amount'' percent (adds to baseline of 100%, i.e. 1 pollution per citizen).
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
Line 414: Line 414:
 
| rowspan="2" align="left" |Phase end, after all players are processed
 
| rowspan="2" align="left" |Phase end, after all players are processed
 
| rowspan="2" |Player
 
| rowspan="2" |Player
| rowspan="2" |-
+
| rowspan="2" | -
| rowspan="2" |-
+
| rowspan="2" | -
| rowspan="2" |-
+
| rowspan="2" | -
 
| align="left" |Immediately make all cities known (with their tiles).
 
| align="left" |Immediately make all cities known (with their tiles).
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
Line 427: Line 427:
 
| rowspan="2" |City
 
| rowspan="2" |City
 
| rowspan="2" |City tile
 
| rowspan="2" |City tile
| rowspan="2" |-
+
| rowspan="2" | -
 
| align="left" |Increase maximum size of a city by ''amount''.
 
| align="left" |Increase maximum size of a city by ''amount''.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
Line 451: Line 451:
 
|'''Spy_Resistant'''
 
|'''Spy_Resistant'''
 
| align="left" |Whenever a diplomatic attack is performed on a tile with a diplomatic defender
 
| align="left" |Whenever a diplomatic attack is performed on a tile with a diplomatic defender
|Owner of the targrted tile (if present)
+
|Owner of the targeted tile (if present)
 
|City on the tile (if present)
 
|City on the tile (if present)
 
|Targeted tile
 
|Targeted tile
Line 475: Line 475:
 
|'''Trade_Revenue_Bonus'''
 
|'''Trade_Revenue_Bonus'''
 
| align="left" |When a caravan arrives into a city
 
| align="left" |When a caravan arrives into a city
|Owner of target city / other: owner of caravan's original city
+
|Owner of target city / Owner of caravan's original city
 
|Target city
 
|Target city
 
|Target city tile
 
|Target city tile
Line 561: Line 561:
 
| align="left" |Increases the chance of units of this type becoming veteran after combat by ''amount'' percent.
 
| align="left" |Increases the chance of units of this type becoming veteran after combat by ''amount'' percent.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
| align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
+
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
| align="center" bgcolor="#9bc3d1" |'''Value Range'''<br />{{info}} '''New in 2.1'''
+
| colspan="5" align="center" bgcolor="#9bc3d1" |{{info}} '''New in 2.1'''
  +
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Explanation'''
|
 
  +
|- bgcolor="#9bc3d1"
|
 
  +
|'''When affects game'''
|
 
  +
|'''Player [ / Other player]'''
|
 
  +
|'''City'''
| align="center" bgcolor="#9bc3d1" |'''Explanation'''
 
  +
|'''Tile'''
  +
|'''Other factors'''
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Visible_Walls'''
 
|'''Visible_Walls'''
Line 578: Line 580:
 
{{info}} New in 2.6: Exact amount tells wall set to draw
 
{{info}} New in 2.6: Exact amount tells wall set to draw
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
| align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
+
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
| align="center" bgcolor="#9bc3d1" |'''Value Range'''<br />{{info}} '''New in 2.2'''
+
| colspan="5" align="center" bgcolor="#9bc3d1" |{{info}} '''New in 2.2'''
  +
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Explanation'''
|
 
  +
|- bgcolor="#9bc3d1"
|
 
  +
|'''When affects game'''
|
 
  +
|'''Player [ / Other player]'''
|
 
  +
|'''City'''
| align="center" bgcolor="#9bc3d1" |'''Explanation'''
 
  +
|'''Tile'''
  +
|'''Other factors'''
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''City_Unhappy_Size'''
 
|'''City_Unhappy_Size'''
 
| rowspan="2" align="left" |Whenever a city happiness is updated
 
| rowspan="2" align="left" |Whenever a city happiness is updated
 
| rowspan="2" |City owner
 
| rowspan="2" |City owner
| rowspan="2" |-
+
| rowspan="2" | -
| rowspan="2" |-
+
| rowspan="2" | -
| rowspan="2" |-
+
| rowspan="2" | -
 
| align="left" |Each citizen after ''amount'' of citizens are unhappy instead of content.
 
| align="left" |Each citizen after ''amount'' of citizens are unhappy instead of content.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
Line 598: Line 602:
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Health_Pct'''
 
|'''Health_Pct'''
| align="left" |Phase end, when ilness may strike a city
+
| align="left" |Phase end, when illness may strike a city
 
|City owner
 
|City owner
 
|City
 
|City
 
|City tile
 
|City tile
 
|<nowiki>-</nowiki>
 
|<nowiki>-</nowiki>
| align="left" |Reduces possibility of illness (plague) in a city by amount percent. This has no effect in rulesets which do not have plague enabled.
+
| align="left" |Reduces probaility of illness (plague) in a city by amount percent. This has no effect in rulesets which do not have plague enabled.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Migration_Pct'''
 
|'''Migration_Pct'''
Line 653: Line 657:
 
| align="left" |Increases unit upgrade cost by ''amount'' percent. This effect works at player level. You cannot adjust upgrade costs for certain unit type or for units upgraded in certain city.
 
| align="left" |Increases unit upgrade cost by ''amount'' percent. This effect works at player level. You cannot adjust upgrade costs for certain unit type or for units upgraded in certain city.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
| align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
+
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
| align="center" bgcolor="#9bc3d1" |'''Value Range'''<br />{{info}} '''New in 2.3'''
+
| colspan="5" align="center" bgcolor="#9bc3d1" |{{info}} '''New in 2.3'''
  +
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Explanation'''
|
 
  +
|- bgcolor="#9bc3d1"
|
 
  +
|'''When affects game'''
|
 
  +
|'''Player [ / Other player]'''
|
 
  +
|'''City'''
| align="center" bgcolor="#9bc3d1" |'''Explanation'''
 
  +
|'''Tile'''
  +
|'''Other factors'''
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''City_Build_Slots'''
 
|'''City_Build_Slots'''
Line 685: Line 691:
 
| align="left" |If this value is greater than 0, the tech upkeep is reduced by this value. For tech upkeep style '''Basic''' this is total reduction, for tech upkeep style '''Cities''' (new in 2.6) this is applied to every city.
 
| align="left" |If this value is greater than 0, the tech upkeep is reduced by this value. For tech upkeep style '''Basic''' this is total reduction, for tech upkeep style '''Cities''' (new in 2.6) this is applied to every city.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
| align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
+
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
| align="center" bgcolor="#9bc3d1" |'''Value Range'''<br />{{info}} '''New in 2.4'''
+
| colspan="5" align="center" bgcolor="#9bc3d1" |{{info}} '''New in 2.4'''
  +
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Explanation'''
|
 
  +
|- bgcolor="#9bc3d1"
|
 
  +
|'''When affects game'''
|
 
  +
|'''Player [ / Other player]'''
|
 
  +
|'''City'''
| align="center" bgcolor="#9bc3d1" |'''Explanation'''
 
  +
|'''Tile'''
  +
|'''Other factors'''
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''City_Image'''
 
|'''City_Image'''
  +
| align="left" |No game value. Sent by server, if not (-100), deduced by client.
| align="left" |
 
  +
|City owner
|
 
  +
|City
|
 
  +
|City tile
|
 
  +
|<nowiki>-</nowiki>
|
 
 
| align="left" |The index for the city image of the given city style. Allows to align the city image with the city radii.
 
| align="left" |The index for the city image of the given city style. Allows to align the city image with the city radii.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
|'''Irrig_Possible'''
+
|'''Irrig_Possible'''<br />{{info}} Replaced with action enabler in version 3.1
| align="left" |
+
| align="left" |When a unit tries to apply the activity
  +
|Unit owner
|
 
  +
|Tile city (if present)
|
 
  +
|Tile
|
 
  +
|Unit, unit type
|
 
 
| align="left" |If value of this effect > 0, target tile can be irrigated. In addition to requirements of this effect, there's still hardcoded requirement that unit doing the irrigation has "Settlers" flag, and terrain.ruleset controls which terrain types can be irrigated at all.
 
| align="left" |If value of this effect > 0, target tile can be irrigated. In addition to requirements of this effect, there's still hardcoded requirement that unit doing the irrigation has "Settlers" flag, and terrain.ruleset controls which terrain types can be irrigated at all.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
| align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
+
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
| align="center" bgcolor="#9bc3d1" |'''Value Range'''<br />{{info}} '''New in 2.5'''
+
| colspan="5" align="center" bgcolor="#9bc3d1" |{{info}} '''New in 2.5'''
  +
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Explanation'''
|
 
  +
|- bgcolor="#9bc3d1"
|
 
  +
|'''When affects game'''
|
 
  +
|'''Player [ / Other player]'''
|
 
  +
|'''City'''
| align="center" bgcolor="#9bc3d1" |'''Explanation'''
 
  +
|'''Tile'''
  +
|'''Other factors'''
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Enemy_Citizen_Unhappy_Pct'''
 
|'''Enemy_Citizen_Unhappy_Pct'''
| align="left" |
+
| align="left" |Whenever city happiness is updated
  +
|City owner
|
 
  +
|City
|
 
  +
|City tile
|
 
  +
|<nowiki>-</nowiki>
|
 
 
| align="left" |During war, citizens of enemy nationality are more unhappy. Value of this effect tells how many percents of the enemy citizens in cities get unhappy because of the war.
 
| align="left" |During war, citizens of enemy nationality are more unhappy. Value of this effect tells how many percents of the enemy citizens in cities get unhappy because of the war.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Gov_Center'''
 
|'''Gov_Center'''
  +
| align="left" |When this or any dependent (not having closer GC's) city output is calculated
| align="left" |
 
  +
|City owner
|
 
  +
|City
|
 
  +
|City tile
|
 
  +
|<nowiki>-</nowiki>
|
 
 
| align="left" |City with non-zero effect value is considered Governmental center. Unless corruption is flat for entire nation, it depends on distance to nearest such center. In earlier versions this effect was coupled in to Capital_City effect.
 
| align="left" |City with non-zero effect value is considered Governmental center. Unless corruption is flat for entire nation, it depends on distance to nearest such center. In earlier versions this effect was coupled in to Capital_City effect.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
|'''Irrig_TF_Possible'''
+
|'''Irrig_TF_Possible'''<br />{{info}} Replaced with action enabler in version 3.1
| align="left" |
+
| align="left" |When unit tries to start the activity
  +
|Unit owner
|
 
  +
|Tile city (if present)
|
 
  +
|Tile
|
 
  +
|Unit, unit type
|
 
 
| align="left" |If value of this effect > 0, tile terrain can be changed by irrigating action. In addition to requirements of this effect, terrain.ruleset controls which terrain types can be transformed this way.
 
| align="left" |If value of this effect > 0, tile terrain can be changed by irrigating action. In addition to requirements of this effect, terrain.ruleset controls which terrain types can be transformed this way.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Max_Trade_Routes'''
 
|'''Max_Trade_Routes'''
  +
| align="left" |When a caravan tries to establish a trade route<br/>After a city changes hands
| align="left" |
 
  +
|City owner
|
 
  +
|Dest. city
|
 
  +
|City tile
|
 
  +
|<nowiki>-</nowiki>
|
 
| align="left" |Value of this effect tells how many trade routes city can establish. It affects only attempts to establish new routes, existing routes are not removed if value gets smaller than current number of routes. Maximum value, to which this value is clipped itself, is 5 routes.
+
| align="left" |Value of this effect tells how many trade routes city can establish. It affects only attempts to establish new routes, existing routes are not removed if value gets smaller than current number of routes (but only as long as the city does not change hands). Maximum value, to which this value is clipped itself, is 5 routes.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
|'''Mining_Possible'''
+
|'''Mining_Possible'''<br />{{info}} Replaced with action enabler in version 3.1
| align="left" |
+
| align="left" |When unit tries to start the activity
  +
|Unit owner
|
 
  +
|Tile city (if present)
|
 
  +
|Tile
|
 
  +
|Unit, unit type
|
 
 
| align="left" |If value of this effect > 0, mine can be built to target tile. In addition to requirements of this effect, terrain.ruleset controls which terrain types can have mines at all.
 
| align="left" |If value of this effect > 0, mine can be built to target tile. In addition to requirements of this effect, terrain.ruleset controls which terrain types can have mines at all.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
|'''Mining_TF_Possible'''
+
|'''Mining_TF_Possible'''<br />{{info}} Replaced with action enabler in version 3.1
| align="left" |
+
| align="left" |When unit tries to start the activity
  +
|Unit owner
|
 
  +
|Tile city (if present)
|
 
  +
|Tile
|
 
  +
|Unit, unit type
|
 
 
| align="left" |If value of this effect > 0, tile terrain can be changed by mining action. In addition to requirements of this effect, terrain.ruleset controls which terrain types can be transformed this way.
 
| align="left" |If value of this effect > 0, tile terrain can be changed by mining action. In addition to requirements of this effect, terrain.ruleset controls which terrain types can be transformed this way.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Not_Tech_Source'''
 
|'''Not_Tech_Source'''
| align="left" |
+
| align="left" |When one tries to steal a tech from the player
  +
|Player
|
 
  +
|<nowiki>-</nowiki>
|
 
  +
|<nowiki>-</nowiki>
|
 
  +
|<nowiki>-</nowiki>
|
 
 
| align="left" |Tech cannot be received from this player by any means.
 
| align="left" |Tech cannot be received from this player by any means.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
|'''Transform_Possible'''
+
|'''Transform_Possible'''<br />{{info}} Replaced with action enabler in version 3.1
| align="left" |
+
| align="left" |When unit tries to start the activity
  +
|Unit owner
|
 
  +
|Tile city (if present)
|
 
  +
|Tile
|
 
  +
|Unit, unit type
|
 
 
| align="left" |If value of this effect > 0, target tile can be transformed. In addition to requirements of this effect, terrain.ruleset controls which terrain types can be transformed at all.
 
| align="left" |If value of this effect > 0, target tile can be transformed. In addition to requirements of this effect, terrain.ruleset controls which terrain types can be transformed at all.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
| align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
+
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
| align="center" bgcolor="#9bc3d1" |'''Value Range'''<br />{{info}} '''New in 2.6'''
+
| colspan="5" align="center" bgcolor="#9bc3d1" |{{info}} '''New in 2.6'''
  +
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Explanation'''
|
 
  +
|- bgcolor="#9bc3d1"
|
 
  +
|'''When affects game'''
|
 
  +
|'''Player [ / Other player]'''
|
 
  +
|'''City'''
| align="center" bgcolor="#9bc3d1" |'''Explanation'''
 
  +
|'''Tile'''
  +
|'''Other factors'''
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''History'''
 
|'''History'''
| align="left" |
+
| align="left" |Phase end, just after the stage production may happen
  +
|City owner
|
 
  +
|City
|
 
  +
|City center
|
 
  +
|<nowiki>-</nowiki>
|
 
 
| align="left" |Value of this effect is how much cumulative History-type culture the city is producing.
 
| align="left" |Value of this effect is how much cumulative History-type culture the city is producing.
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|'''Illegal_Action_Move_Cost'''
  +
| align="left" |An action with illegal trial punishment is attempted
  +
|Unit owner / Target player
  +
| -
  +
| -
  +
|Actor unit, unit type, action
  +
| align="left" |Unit attempted the action loses this number of move fragments (all if has less).
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Irrigation_Pct'''
 
|'''Irrigation_Pct'''
| align="left" |
+
| rowspan="2" align="left" |Phase end, for each city of each player
  +
| rowspan="2" |City owner
|
 
  +
| rowspan="2" |City
|
 
  +
| rowspan="2" |Workable tile with extra in question and nonzero output bonus from it
|
 
  +
| rowspan="2" | -
|
 
 
| align="left" |This effect controls how much of the terrain specific irrigation bonus applies.
 
| align="left" |This effect controls how much of the terrain specific irrigation bonus applies.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Mining_Pct'''
 
|'''Mining_Pct'''
| align="left" |
 
|
 
|
 
|
 
|
 
 
| align="left" |This effect controls how much of the terrain specific mining bonus applies.
 
| align="left" |This effect controls how much of the terrain specific mining bonus applies.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''National_History'''
 
|'''National_History'''
| align="left" |
+
| align="left" |Phase end, just after cities are processed
  +
|Player
|
 
  +
|<nowiki>-</nowiki>
|
 
  +
|<nowiki>-</nowiki>
|
 
  +
|<nowiki>-</nowiki>
|
 
 
| align="left" |Value of this effect is how much cumulative History-type culture the city is producing in addition to that produced by individual cities.
 
| align="left" |Value of this effect is how much cumulative History-type culture the city is producing in addition to that produced by individual cities.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''National_Performance'''
 
|'''National_Performance'''
  +
| align="left" |When score is calculated, by Lua callbacks, to test "MinCulture" reqs, for achievments
| align="left" |
 
  +
|Player
|
 
  +
|<nowiki>-</nowiki>
|
 
  +
|<nowiki>-</nowiki>
|
 
  +
|<nowiki>-</nowiki>
|
 
 
| align="left" |Value of this effect is how much Performance-type culture the nation is producing in addition to that produced by individual cities.
 
| align="left" |Value of this effect is how much Performance-type culture the nation is producing in addition to that produced by individual cities.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
Line 838: Line 853:
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Performance'''
 
|'''Performance'''
  +
| align="left" |When migration is considered, by Lua callbacks, to test "MinCulture" reqs, for achievments
| align="left" |
 
  +
|City owner
|
 
  +
|City
|
 
  +
|City center
|
 
  +
|<nowiki>-</nowiki>
|
 
 
| align="left" |Value of this effect is how much Performance-type culture the city is producing. Performance is not persistent culture, but affects only
 
| align="left" |Value of this effect is how much Performance-type culture the city is producing. Performance is not persistent culture, but affects only
 
current turn.
 
current turn.
  +
|- valign="top" bgcolor="#e0f0f0"
|-
 
 
|'''Pollu_Pop_Pct2'''
 
|'''Pollu_Pop_Pct2'''
 
|Phase end, in city processing order
 
|Phase end, in city processing order
Line 853: Line 868:
 
|<nowiki>-</nowiki>
 
|<nowiki>-</nowiki>
 
|Multiplicative effect with Pollu_Pop_Pct (i.e., if both 25, result is 125x125/100=156)
 
|Multiplicative effect with Pollu_Pop_Pct (i.e., if both 25, result is 125x125/100=156)
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|'''Retire_Pct'''
  +
| align="left" |Turn start
  +
|Unit owner
  +
|Tile city (if present)
  +
|Unit tile
  +
|Unit, unit type
  +
| align="left" |If there are no enemy units or cities in 3 tiles range (7x7 square), removes the unit with this probability (used for barbarians).
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Revolution_Unhappiness'''
 
|'''Revolution_Unhappiness'''
Line 860: Line 883:
 
|City center
 
|City center
 
|<nowiki>-</nowiki>
 
|<nowiki>-</nowiki>
| align="left" |If a city is in revolt for more than value turns, government falls. <small>(Note: in 3.x it's a city-based effect but AI/advisors rely on it being player-based)</small>
+
| align="left" |If a city is in revolt for more than value turns, government falls. <small>(Note: it's a city-based effect but AI/advisors rely on it being player-based)</small>
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Traderoute_Pct'''
 
|'''Traderoute_Pct'''
Line 879: Line 902:
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Unit_Bribe_Cost_Pct'''
 
|'''Unit_Bribe_Cost_Pct'''
| align="left" |
+
| align="left" |When one tries to bribe a unit
  +
|Target unit owner / Bribing player
|
 
  +
|Target unit home city
|
 
  +
|Unit tile
|
 
  +
|Target unit, unit type
|
 
 
| align="left" |Increases unit bribe cost by ''amount'' percent.
 
| align="left" |Increases unit bribe cost by ''amount'' percent.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Victory'''
 
|'''Victory'''
| align="left" |
+
| align="left" |Between turns
  +
|Each player (order is default but all the qualified win together)
|
 
  +
|<nowiki>-</nowiki>
|
 
  +
|<nowiki>-</nowiki>
|
 
  +
|<nowiki>-</nowiki>
|
 
 
| align="left" |When value of this effect gets positive, player wins the game. In simplest case you'll have just one such effect with value 1 (or any positive value) and thus requirements of that effect are requirements for winning the game.
 
| align="left" |When value of this effect gets positive, player wins the game. In simplest case you'll have just one such effect with value 1 (or any positive value) and thus requirements of that effect are requirements for winning the game.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
| align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
+
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
| align="center" bgcolor="#9bc3d1" |'''Value Range'''
+
| colspan="5" align="center" bgcolor="#9bc3d1" |{{info}} '''New in 3.0'''
  +
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Explanation'''
{{info}} '''New in 3.0'''
 
  +
|- bgcolor="#9bc3d1"
|
 
  +
|'''When affects game'''
|
 
  +
|'''Player [ / Other player]'''
|
 
  +
|'''City'''
|
 
  +
|'''Tile'''
| align="center" bgcolor="#9bc3d1" |'''Explanation'''
 
  +
|'''Other factors'''
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|'''Action_Odds_Pct'''<br />
  +
| align="left" |Almost any possible action (not attack in 3.0)
  +
| Actor player / Target player
  +
| Target city
  +
| -
  +
| Actor unit, unit type, action
  +
| align="left" |Odds of an action (100%, diplchance or 0% basically) are set to
  +
<math>\mathrm{odds}+\frac{\mathrm{odds}\times\mathrm{value}}{100}</math>.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Attack_Bonus'''<br />
 
|'''Attack_Bonus'''<br />
| align="left" |
+
| align="left" |A unit attacks
  +
|Attacker owner
|
 
  +
|Defended city (if present)
|
 
  +
|Target tile
|
 
  +
|Attacking unit type
|
 
 
| align="left" |Increases offensive bonuses of units.
 
| align="left" |Increases offensive bonuses of units.
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|'''Border_Vision'''<br />
  +
| align="left" |Phase very end
  +
|Player
  +
| -
  +
|<nowiki>-</nowiki>
  +
| -
  +
| align="left" |If borders are on, grants to the player vision of everything inside his or her borders.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Building_Buy_Cost_Pct'''<br />
 
|'''Building_Buy_Cost_Pct'''<br />
| align="left" |
+
| align="left" |When one buys a building
  +
|City owner
|
 
  +
|City
|
 
  +
|<nowiki>-</nowiki>
|
 
  +
|Building type
|
 
 
| align="left" |Increases building buy cost by AMOUNT percent.
 
| align="left" |Increases building buy cost by AMOUNT percent.
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|<small style="font-stretch:condensed;">'''Building_Saboteur_Resistant'''</small>
  +
| align="left" |When a hostile unit sabotages an improvement in the city
  +
|City owner
  +
|Target city
  +
|City center
  +
|<nowiki>-</nowiki>
  +
| align="left" |"Spy_Resistant" split for sabotaging a building: the building's "sabotage" property is multiplied on AMOUNT percents.
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|'''Casus_Belli_Caught'''
  +
| align="left" |When a unit is caught at a hostile diplomatic action
  +
| rowspan="2" |Unit owner / Victim player
  +
| rowspan="2" |Target tile city (if present)
  +
| rowspan="2" |Target tile
  +
| rowspan="2" |Actor unit, unit type, action
  +
| align="left" |Diplomatic consequence of an action when the ill-doer is caught before performing it. Value >= 1 gives casus belli to the victim, >= 1000 to everybody.
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|'''Casus_Belli_Success'''
  +
| align="left" |When a unit succeeds in a hostile action
  +
| align="left" |Diplomatic consequence of an action when the unit does its dark business (may perish escaping afterwards). Value >= 1 gives casus belli to the victim, >= 1000 to everybody.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Combat_Rounds'''<br />
 
|'''Combat_Rounds'''<br />
| align="left" |
+
| align="left" |When a unit attacks
  +
|Unit owner
|
 
  +
|Tile city (if present)
|
 
  +
|Unit tile
|
 
  +
|Attacker unit, unit type
|
 
 
| align="left" |Maximum number of rounds combat lasts. Zero or negative value means that combat is always to death.
 
| align="left" |Maximum number of rounds combat lasts. Zero or negative value means that combat is always to death.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Conquest_Tech_Pct'''<br />
 
|'''Conquest_Tech_Pct'''<br />
  +
| align="left" |A unit has just entered a conquered city (has not yet even risen the new flag!)
| align="left" |
 
  +
|Unit owner
|
 
  +
|Conquered city
|
 
  +
|Unit/city tile
|
 
  +
|Unit, unit type
|
 
 
| align="left" |When a city is conquered, conqueror has a AMOUNT percentage chance to get a tech from the player losing the city.
 
| align="left" |When a city is conquered, conqueror has a AMOUNT percentage chance to get a tech from the player losing the city.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Have_Contacts'''
 
|'''Have_Contacts'''
| align="left" |
+
| align="left" |The very end of the phase
  +
|Player
|
 
  +
|<nowiki>-</nowiki>
|
 
  +
|<nowiki>-</nowiki>
|
 
  +
|<nowiki>-</nowiki>
|
 
 
| align="left" |Provides contact with all the other players.
 
| align="left" |Provides contact with all the other players.
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|<small>'''Output_Waste_By_Rel_Distance'''</small>
  +
| align="left" |Phase end
  +
| City owner
  +
| Each city
  +
| -
  +
| Output type
  +
| align="left" |Works like Output_Waste_By_Distance (additively to it) if the world map's bigger dimension is 50. Otherwise, the waste is scaled relatively to the world's size.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Stealings_Ignore'''
 
|'''Stealings_Ignore'''
| align="left" |
+
| align="left" |When a unit steals a tech from a city
  +
| Unit owner
|
 
  +
| Unit tile city (if present)
|
 
  +
| Unit tile
|
 
  +
| Actor unit, unit type
|
 
 
| align="left" |When determining how difficult it is to steal a tech from enemy, AMOUNT
 
| align="left" |When determining how difficult it is to steal a tech from enemy, AMOUNT
previous times tech has been stolen from the city is ignored.
+
previous times tech has been stolen from the city is ignored. For spies that can possibly escape, the difficulcy of the operation grows exponentially with each unignored stealth; diplomats that can't escape just fail outside of this amount.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
|'''Unit_Buy_Cost_Pct'''<br />
+
|'''Unit_Buy_Cost_Pct'''
| align="left" |
+
| align="left" |When one buys a unit
  +
|City owner
|
 
  +
|City
|
 
  +
|City tile
|
 
  +
|Unit type
|
 
 
| align="left" |Increases unit buy cost by AMOUNT percent.
 
| align="left" |Increases unit buy cost by AMOUNT percent.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
| align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
+
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Effect ''type'''''
| align="center" bgcolor="#9bc3d1" |'''Value Range'''
+
| colspan="5" align="center" bgcolor="#9bc3d1" |{{info}} '''New in 3.1'''
  +
| rowspan="2" align="center" bgcolor="#9bc3d1" |'''Explanation'''
{{info}} '''New in 3.1'''
 
  +
|- bgcolor="#9bc3d1"
|
 
  +
|'''When affects game'''
|
 
  +
|'''Player [ / Other player]'''
|
 
  +
|'''City'''
|
 
  +
|'''Tile'''
| align="center" bgcolor="#9bc3d1" |'''Explanation'''
 
  +
|'''Other factors'''
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|<small style="font-stretch:condensed;">'''Action_Success_Actor_Move_Cost'''</small>
  +
| align="left" |An action is performed (right after "action started..." callback)
  +
|Actor player
  +
|Tile city (if present)
  +
|Unit tile
  +
|Actor unit, unit type, action
  +
| align="left" |Unit loses this number of move fragments (all if has less) for this action. Use "MinMoveFrags" requirement in the action enabler to disable acting on lower mp.
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|<small style="font-stretch:condensed;">'''Action_Success_Target_Move_Cost'''</small>
  +
| align="left" |A unit-on-unit action is performed (right after Lua callback)
  +
|Target unit owner
  +
|Tile city (if present)
  +
|Unit tile
  +
|Target unit, unit type, action
  +
| align="left" |Unit loses this number of move fragments (all if has less) for being a target of this action.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Building_Build_Cost_Pct'''<br />
 
|'''Building_Build_Cost_Pct'''<br />
| align="left" |
+
| align="left" |Any time
  +
|City owner
|
 
  +
|City
|
 
  +
|<nowiki>-</nowiki>
|
 
  +
|Building type
|
 
 
| align="left" |Increases building cost of a building.
 
| align="left" |Increases building cost of a building.
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|'''Fortify_Defense_Bonus'''<br />
  +
| align="left" |Any time
  +
|Defending unit's owner
  +
|City in defending unit's tile
  +
|Defending unit's tile
  +
|Defending unit
  +
| align="left" |Gives percentage defense bonus, multiplicative with Defend_Bonus effect
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|'''Max_Stolen_Gold_Pm'''
  +
| rowspan="2" |At "Steal Gold" action
  +
|Target player
  +
|Target city
  +
|Target city center
  +
|<nowiki>-</nowiki>
  +
|Part of target player's treasury a thief may steal from the city at maximal luck, 1000 means all gold
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|'''Thiefs_Share_Pm'''
  +
|Unit owner
  +
|Unit tile city (if present)
  +
|Unit tile
  +
|Actor unit, unit type
  +
|How much of the stolen gold the thief spends on herself, 1000 means all. Calculated before the thief tries to escape.
 
|- valign="top" bgcolor="#e0f0f0"
 
|- valign="top" bgcolor="#e0f0f0"
 
|'''Unit_Build_Cost_Pct'''<br />
 
|'''Unit_Build_Cost_Pct'''<br />
| align="left" |
+
| align="left" |Any time
  +
|City owner
|
 
  +
|City
|
 
  +
|City tile
|
 
  +
|Unit type
|
 
 
| align="left" |Increases building cost of a unit.
 
| align="left" |Increases building cost of a unit.
  +
|- valign="top" bgcolor="#e0f0f0"
  +
|'''Infra_Points'''
  +
| align="left" |Phase end, per city, after the population is updated
  +
|City owner
  +
|City
  +
|City tile
  +
|<nowiki>-</nowiki>
  +
| align="left" |How many infra points a city produces each turn.
 
|}
 
|}
  +
  +
== Multipliers ==
  +
New v.2.6 effect syntax element is '''<code>multiplier</code>''' parameter that says which multiplier should scale the specified effect value if the reqs are active. Multipliers may be defined by a ruleset to be set by a player; changing a multiplier from its defalt value may have additional requirements, and any player's setting takes an effect only at the beginning of phase ending procedure. Example of a multiplier definition you can find in the <tt>governments.ruleset</tt> file of [[Experimental]] ruleset.
   
 
== See also ==
 
== See also ==

Revision as of 14:57, 30 January 2021

Freeciv-modpack

Modpack UI icon

This page partially describes the contents of a ruleset collection. It is intended as developer reference and for people wanting to create/compile alternative rulesets for Freeciv.

The anatomy of an effects ruleset file

/data/classic/effects.ruleset

The effects.ruleset file contains all effects in play in a Freeciv scenario. Typically it contains *include ai_effects.ruleset as cheat sheet for AIs.

They have the following form:

[effect_hydro_plant]
name  = "Output_Bonus"
value = 25
reqs  = {"type", "name", "range"
         "Building", "Factory", "City"
         "Building", "Hydro Plant", "City"
         "OutputType", "Shield", "Local"
        } 
The text in the brackets is the entry name, which just has to be unique, but is otherwise not used.
The name field tells Freeciv which Effect Type you are defining. The value is the effect's value, which depends on which effect it is. The reqs table contain a list of requirements for this effect being in effect. You need to satisfy all requirements listed here for this effect to take effect in the game.
The value field is the integer amount parameter for many effects (must be in the range -32767 to 32767; some do not handle negative numbers well). When an effect of a specific type is tested, all values bound to requirements matching the case are summed up (exceptions are spaceship parts effects).
The reqs table consists of sets of Requirement Type, Requirement, and Requirement Range.
Some requirement types may only work at certain ranges. In particular, at present, "Continent" range effects can affect only cities and units in cities.
2.4 Negation
There is the nreqs table which is the opposite of the reqs table, these are conditions which prevent the effect from taking place. Any one of the nreq conditions will prevent the effect from taking effect.
nreqs  = {"type", "name", "range"
         "Building", "Factory", "City"
        } 
2.5 Negation
A requirement may have a negated field, and if this is 'TRUE', the requirement is negated.
reqs  = {"type", "name", "range", "negated"
         "Building", "Factory", "City", TRUE
        } 
2.6 Negation
The negated field is replaced with present field, defaulting to 'TRUE', but if 'FALSE' requirement must not be fulfilled.
reqs  = {"type", "name", "range", "present"
         "Building", "Factory", "City", FALSE
        } 
Survives
A requirement may have a survives field, and if this is 'TRUE', the effect survives destruction (mostly used with wonders, see limitations below).
[effect_plastics_slowdown]
type    = "Slow_Down_Timeline"
value   = 1
reqs    =
    { "type", "name", "range", "survives"
      "Tech", "Plastics", "World", TRUE
    }

Effect Types

Effect Type When affects game Factors that may be considered in reqs Explanation
Player [/ Other player] City Tile Other
Empire_Size_Mod
 i  Removed in version 2.2.
Once your civilization has more cities than amount + the server setting 'cityfactor', each city gets one more unhappy citizen.
No_Incite
 i  Replaced with the Incite City action in 2.6
City cannot be incited.
Revolution_When_Unhappy
 i  Replaced with Revolution_Unhappiness in 2.6
If a city owned by this player is in revolt for more than two turns, government falls.
Unbribable_Units
 i  Replaced with the Bribe Unit action in 2.6
Units cannot be bribed.
Airlift Phase end Each player Each player's city City center - Allow airlift to/from a city. Starting from 2.2 amount of units can airlift each turn.
Any_Government Any time Any player - - - Allow instant government changes.
Capital_City Any time City owner Any city City center - The city with this effect is the capital city.
City_Vision_Radius_Sq Virtually any time City owner City City center - Increase city vision radius in squared distance by amount tiles.
Civil_War_Chance When a capital is taken (maybe destroyed) and there are free player slots Loser - - - Base chance in percent of a nation being split by civil war when its capital is captured is increased by this amount. This percentage is increased by 5 for each city in civil disorder and reduced by 5 for each one celebrating.
Defend_Bonus When a unit defends Defending unit owner Defended city (if present) Target tile Attacking unit type Increases defensive bonuses of units. Any unit requirements on this effect will be applied to the _attacking_ unit. The defensive bonus is ignored by attackers with "IgWall" flag (up to 2.5). Attackers with "BadWallAttacker" flag will have their firepower set to 1.
Empire_Size_Step Whenever a city happiness is updated City owner - - - After your civilization reaches Empire_Size_Base size, it gets one more unhappy citizen for each amount of cities it gets above that. Set to zero to disable. You can use Empire_Size_Step even though Empire_Size_Base is zero.
Enable_Nuke When production of a unit is changed to or is ready to happen City owner - - - Allows the production of nuclear weapons.
Enable_Space When production of a spaceship part is changed to or is ready to happen City owner - - - Allows the production of space components.
Force_Content Whenever the city happiness is updated City owner Any city City tile - Make amount unhappy citizens content. Applied after martial law and unit penalties.
Gain_AI_Love Phase start Player - - - Gain amount points of "AI love" with AI(s) per turn. Maximal is 1000.
Give_Imm_Tech When a building is finished City owner City - Building built Give amount techs immediately.
Growth_Food Phase end, when processing a city that changes its size, before and after production City owner City City tile - Food left after cities grow or shrink is amount percent of the capacity of the city's foodbox. This also affects the 'aqueductloss' penalty.
Fanatics Phase end Player - - - Units with "Fanatics" flag incur no upkeep.
Happiness_To_Gold Phase end City owner City City tile - Make all Make_Content and Force_Content effects generate also gold in the same amount.
Has_Senate When a player tries to break a treaty Player - - - Has a senate that prevents declarations of war in most cases.
Have_Embassies When a new tech is got known Player learned a tech - - - Like having embassies with all the players one has ever had contact with. In 2.6 and prior provided embassy-like effect with all the players (like having both Have_Contacts and Have_Embassies)
HP_Regen Phase start Unit owner Tile city (if present) Unit tile Unit, unit type Units that do not move recover amount percentage of their full hitpoints per turn.
Incite_Cost_Pct Whenever one tries to incite a city City owner City City tile - Increases revolt cost by amount percent.
Inspire_Partisans Queried by Lua callbacks, P and C supplied by Lua P (former city owner) C (a city) City tile - Partisan units (defined in units.ruleset) may spring up. Partially unhardcoded and may be (more) city-dependent since 2.5.
Make_Content Whenever the city happiness is updated City owner City City tile - Make amount unhappy citizens content. Applied before martial law and unit penalties.
Make_Content_Mil Make amount unhappy citizens caused by units outside of a city content.
Make_Content_Mil_Per Make amount per unit of unhappy citizens caused by units outside of a city content.
Make_Happy Make amount citizens happy.
Martial_Law_Each The amount of citizens pacified by each military unit giving martial law.
Martial_Law_Max The maximum amount of units that will give martial law in city. Zero value means no limit.
Max_Rates When one tries to change taxes Player - - - The maximum setting for each tax rate is amount.
Move_Bonus A lot (phase start, combat, transforming a unit...) Unit owner City on the tile (if present) Unit tile Unit type Add amount movement to units. Use UnitClass' requirement with range of 'Local' to give it a specific class of units only.
No_Anarchy When a player tries to break a treaty Player - - - No period of anarchy between government changes. (This also neuters the Has_Senate effect.)
No_Diplomacy Players make contact, split by CW or try to meet Player - - - Cannot use any diplomacy.
No_Sink_Deep
 i  Removed in version 2.2.
Triremes no longer sink when on dangerous seas.
No_Unhappy Whenever the city happiness is updated City owner City City tile - No citizens in the city are ever unhappy.
Nuke_Proof When a nuclear unit tries to explode near the city City owner City Targeted tile - City is nuke proof. Since 2.6, specifies the percentage chance of deflecting a nuke.
Output_Bonus Phase end, in city processing order City owner Any city - Output type City production is increased by amount percent.
Output_Bonus_2 City production is increased by amount percent after Output_Bonus, so is multiplicative with it.
Output_Add_Tile Each worked tile Add amount to each worked tile.
Output_Inc_Tile Add amount to each worked tile that already has at least 1 output.
Output_Inc_Tile_Celebrate Tiles get amount extra output when city working them is celebrating.
Output_Penalty_Tile When a tile yields more output than amount, it gets a penalty of -1.
Output_Per_Tile Increase tile output by amount percent.
Output_Waste Phase end City owner Each city - Output type Base amount in percentage that each city has in waste. Waste can be used with any output type, use an OutputType requirement to specify which.
Output_Waste_By_Distance For each tile in real distance that a city is from your capital, it gets amount of extra waste.
Output_Waste_Pct Reduce waste by amount percent.
Pollu_Pop_Pct Phase end City owner Each city - - Increases pollution caused by each unit of population by amount percent (adds to baseline of 100%, i.e. 1 pollution per citizen).
Pollu_Prod_Pct Increases pollution caused by shields by amount percent.
Rapture_Grow Phase end City owner City City tile - Can rapture grow cities.
Reveal_Cities Phase end, after all players are processed Player - - - Immediately make all cities known (with their tiles).
Reveal_Map Immediately make entire map known.
Size_Adj Whenever a city tries to grow by food, adding etc. City owner City City tile - Increase maximum size of a city by amount.
Size_Unlimit Make the size of a city unlimited.
Slow_Down_Timeline Between turn end and next turn start - - - - Slow down the timeline based on the AMOUNT. If AMOUNT >= 3 the timeline will be max 1 year/turn; with AMOUNT == 2 it is max 2 years/turn; with AMOUNT == 1 it is max 5 years/turn; with AMOUNT <= 0 the timeline is unaffected. The effect will be ignored if game.spacerace isn't set.
Specialist_Output Phase end City owner Any city - Specialist type, output type Specify what outputs a specialist is producing. Should be used with an OutputType requirement.
Spy_Resistant Whenever a diplomatic attack is performed on a tile with a diplomatic defender Owner of the targeted tile (if present) City on the tile (if present) Targeted tile - If a spy specifies a target for sabotage, then she has an AMOUNT percent chance to fail. Also in diplomatic combat defending diplomatic units in cities will get an AMOUNT percent bonus. All Spy_Resistant's are summed before being applied.
SS_Structural,
SS_Component,
SS_Module
When switching to or producing a building - - - Only a "Building" requirement with any range turns these effects on A part of a spaceship; this is a "Local" ranged effect. It (for now) applies to improvements which cannot be built unless "Enable_Space" is felt. Buildings which have this effect should probably not be given any other effects.
Tech_Parasite Phase end, before processing cities Each player - - - Gain any advance known already by amount number of other players. In 2.3 to 2.5, counts research-sharing teams instead of players, in 2.6.0 probably by accident restored old behaviour. Note that if you have two such effects, they combine into one much worse effect (the number of players required to gain an advance is increased).
Trade_Revenue_Bonus When a caravan arrives into a city Owner of target city / Owner of caravan's original city Target city Target city tile Since 2.6: caravan action ("Establish Trade Route"/"Enter Marketplace") Trade revenue is multiplied by pow(2, amount/1000). The amount value is taken from the caravan's home city.
Unhappy_Factor Whenever a city's happiness is updated City owner - - - Multiply unhappy unit upkeep by amount.
Unit_No_Lose_Pop When a city is attacked or bombarded City owner City City tile - No population lost when a city's defender is lost.
Unit_Recover Phase start Unit owner City on the tile (if present) Unit tile Unit, unit type Units recover amount extra hitpoints per turn.
Unit_Upkeep_Free_Per_City Phase end City owner City - Output type In each city unit upkeep is deducted by this amount. As usual, you can use with OutputType requirement to specify which kind of upkeep this should be.
Unit_Vision_Radius_Sq Virtually any time Unit owner Tile city (if present) Unit tile Unit type Increase unit vision radius in squared distance by amount tiles.
Upgrade_Unit Phase start, before restoring hp/mp Player - - - Upgrade amount obsolete units per turn.
Upkeep_Free Phase end City owner Each city - Each building in the city Improvements with amount or less upkeep cost become free to upkeep (others are unaffected).
Upkeep_Factor Phase end Player - - Output type Multiply unit upkeep by amount.
Veteran_Build When a unit is produced (even consuming last pop from a city) City owner City City tile Unit type New units of this type start with veterancy. In 2.4 and prior, the amount value is ignored, so that you can have multiple Veteran_Build effects, and units will only get 1 free veterancy level. In 2.5 and later, amount specifies the initial veteran level and is cumulative.
Veteran_Combat When a unit may become a combat veteran Unit owner Tile city (if present) Unit tile Unit, unit type Increases the chance of units of this type becoming veteran after combat by amount percent.
Effect type  i  New in 2.1 Explanation
When affects game Player [ / Other player] City Tile Other factors
Visible_Walls When a city packet is sent to a client (no game value). City owner City City tile - Positive amount only instructs clients to use wall graphics for city.

 i  New in 2.6: Exact amount tells wall set to draw

Effect type  i  New in 2.2 Explanation
When affects game Player [ / Other player] City Tile Other factors
City_Unhappy_Size Whenever a city happiness is updated City owner - - - Each citizen after amount of citizens are unhappy instead of content.
Empire_Size_Base Once your civilization has more cities than the value of this effect, each city gets one more unhappy citizen. If the sum of this effect and Empire_Size_Step is zero, there is no such penalty.
Health_Pct Phase end, when illness may strike a city City owner City City tile - Reduces probaility of illness (plague) in a city by amount percent. This has no effect in rulesets which do not have plague enabled.
Migration_Pct Turn end City owner City City center - Increase the calculated migration score for the a city by amount in percent.
Shield2Gold_Factor Phase end Player - - - Factor in percent for the conversion of unit shield upkeep to gold upkeep. A value of 200 would transfor 1 shield upkeep to 2 gold upkeep. The range of this effect must be player or world. Note that only units with the "Shield2Gold" flag will be affected by this.
Tech_Cost_Factor Phase end Player - - - Multiplier for research cost.
Tile_Workable A lot (units move, city size or radius change...) City owner City Tile - If value != 0, city can work target tile.
Turn_Years Between turn end and next turn start - - - - Calendar advances amount years each turn unless Slow_Down_Timeline effects override this.
Upgrade_Price_Pct Player orders to upgrade a unit Player - - - Increases unit upgrade cost by amount percent. This effect works at player level. You cannot adjust upgrade costs for certain unit type or for units upgraded in certain city.
Effect type  i  New in 2.3 Explanation
When affects game Player [ / Other player] City Tile Other factors
City_Build_Slots When a unit is produced City owner City City tile - Increase the number of units with no population cost a city can build in a turn by amount. The required shields must be available.
City_Radius_Sq On virtually any city change City owner City City tile - Increase the squared city radius by amount. (In old versions could only usefully have "MinSize", "Building", or "Tech" requirements)
Tech_Upkeep_Free Phase end, after processing all cities of all players Each player - - - If this value is greater than 0, the tech upkeep is reduced by this value. For tech upkeep style Basic this is total reduction, for tech upkeep style Cities (new in 2.6) this is applied to every city.
Effect type  i  New in 2.4 Explanation
When affects game Player [ / Other player] City Tile Other factors
City_Image No game value. Sent by server, if not (-100), deduced by client. City owner City City tile - The index for the city image of the given city style. Allows to align the city image with the city radii.
Irrig_Possible
 i  Replaced with action enabler in version 3.1
When a unit tries to apply the activity Unit owner Tile city (if present) Tile Unit, unit type If value of this effect > 0, target tile can be irrigated. In addition to requirements of this effect, there's still hardcoded requirement that unit doing the irrigation has "Settlers" flag, and terrain.ruleset controls which terrain types can be irrigated at all.
Effect type  i  New in 2.5 Explanation
When affects game Player [ / Other player] City Tile Other factors
Enemy_Citizen_Unhappy_Pct Whenever city happiness is updated City owner City City tile - During war, citizens of enemy nationality are more unhappy. Value of this effect tells how many percents of the enemy citizens in cities get unhappy because of the war.
Gov_Center When this or any dependent (not having closer GC's) city output is calculated City owner City City tile - City with non-zero effect value is considered Governmental center. Unless corruption is flat for entire nation, it depends on distance to nearest such center. In earlier versions this effect was coupled in to Capital_City effect.
Irrig_TF_Possible
 i  Replaced with action enabler in version 3.1
When unit tries to start the activity Unit owner Tile city (if present) Tile Unit, unit type If value of this effect > 0, tile terrain can be changed by irrigating action. In addition to requirements of this effect, terrain.ruleset controls which terrain types can be transformed this way.
Max_Trade_Routes When a caravan tries to establish a trade route
After a city changes hands
City owner Dest. city City tile - Value of this effect tells how many trade routes city can establish. It affects only attempts to establish new routes, existing routes are not removed if value gets smaller than current number of routes (but only as long as the city does not change hands). Maximum value, to which this value is clipped itself, is 5 routes.
Mining_Possible
 i  Replaced with action enabler in version 3.1
When unit tries to start the activity Unit owner Tile city (if present) Tile Unit, unit type If value of this effect > 0, mine can be built to target tile. In addition to requirements of this effect, terrain.ruleset controls which terrain types can have mines at all.
Mining_TF_Possible
 i  Replaced with action enabler in version 3.1
When unit tries to start the activity Unit owner Tile city (if present) Tile Unit, unit type If value of this effect > 0, tile terrain can be changed by mining action. In addition to requirements of this effect, terrain.ruleset controls which terrain types can be transformed this way.
Not_Tech_Source When one tries to steal a tech from the player Player - - - Tech cannot be received from this player by any means.
Transform_Possible
 i  Replaced with action enabler in version 3.1
When unit tries to start the activity Unit owner Tile city (if present) Tile Unit, unit type If value of this effect > 0, target tile can be transformed. In addition to requirements of this effect, terrain.ruleset controls which terrain types can be transformed at all.
Effect type  i  New in 2.6 Explanation
When affects game Player [ / Other player] City Tile Other factors
History Phase end, just after the stage production may happen City owner City City center - Value of this effect is how much cumulative History-type culture the city is producing.
Illegal_Action_Move_Cost An action with illegal trial punishment is attempted Unit owner / Target player - - Actor unit, unit type, action Unit attempted the action loses this number of move fragments (all if has less).
Irrigation_Pct Phase end, for each city of each player City owner City Workable tile with extra in question and nonzero output bonus from it - This effect controls how much of the terrain specific irrigation bonus applies.
Mining_Pct This effect controls how much of the terrain specific mining bonus applies.
National_History Phase end, just after cities are processed Player - - - Value of this effect is how much cumulative History-type culture the city is producing in addition to that produced by individual cities.
National_Performance When score is calculated, by Lua callbacks, to test "MinCulture" reqs, for achievments Player - - - Value of this effect is how much Performance-type culture the nation is producing in addition to that produced by individual cities.
Output_Tile_Punish_Pct Phase end, in city processing order City owner Any city Each worked tile Output type Reduce the output of a tile by amount percent. The number of units to remove is rounded down. Applied after everything except a city center's minimal output.
Performance When migration is considered, by Lua callbacks, to test "MinCulture" reqs, for achievments City owner City City center - Value of this effect is how much Performance-type culture the city is producing. Performance is not persistent culture, but affects only

current turn.

Pollu_Pop_Pct2 Phase end, in city processing order City owner Any city City center - Multiplicative effect with Pollu_Pop_Pct (i.e., if both 25, result is 125x125/100=156)
Retire_Pct Turn start Unit owner Tile city (if present) Unit tile Unit, unit type If there are no enemy units or cities in 3 tiles range (7x7 square), removes the unit with this probability (used for barbarians).
Revolution_Unhappiness Phase end, after production and city-based upkeep City owner City City center - If a city is in revolt for more than value turns, government falls. (Note: it's a city-based effect but AI/advisors rely on it being player-based)
Traderoute_Pct When city trade production is calculated City owner City City center - Percentage bonus for trade from traderoutes. This bonus applies after the value of the traderoute is already calculated. It affects one end of the traderoute only.
Turn_Fragments Between turn end and next turn start - - - - Calendar advances amount fragments each turn, in addition to years advanced by Turn_Years.
Unit_Bribe_Cost_Pct When one tries to bribe a unit Target unit owner / Bribing player Target unit home city Unit tile Target unit, unit type Increases unit bribe cost by amount percent.
Victory Between turns Each player (order is default but all the qualified win together) - - - When value of this effect gets positive, player wins the game. In simplest case you'll have just one such effect with value 1 (or any positive value) and thus requirements of that effect are requirements for winning the game.
Effect type  i  New in 3.0 Explanation
When affects game Player [ / Other player] City Tile Other factors
Action_Odds_Pct
Almost any possible action (not attack in 3.0) Actor player / Target player Target city - Actor unit, unit type, action Odds of an action (100%, diplchance or 0% basically) are set to

.

Attack_Bonus
A unit attacks Attacker owner Defended city (if present) Target tile Attacking unit type Increases offensive bonuses of units.
Border_Vision
Phase very end Player - - - If borders are on, grants to the player vision of everything inside his or her borders.
Building_Buy_Cost_Pct
When one buys a building City owner City - Building type Increases building buy cost by AMOUNT percent.
Building_Saboteur_Resistant When a hostile unit sabotages an improvement in the city City owner Target city City center - "Spy_Resistant" split for sabotaging a building: the building's "sabotage" property is multiplied on AMOUNT percents.
Casus_Belli_Caught When a unit is caught at a hostile diplomatic action Unit owner / Victim player Target tile city (if present) Target tile Actor unit, unit type, action Diplomatic consequence of an action when the ill-doer is caught before performing it. Value >= 1 gives casus belli to the victim, >= 1000 to everybody.
Casus_Belli_Success When a unit succeeds in a hostile action Diplomatic consequence of an action when the unit does its dark business (may perish escaping afterwards). Value >= 1 gives casus belli to the victim, >= 1000 to everybody.
Combat_Rounds
When a unit attacks Unit owner Tile city (if present) Unit tile Attacker unit, unit type Maximum number of rounds combat lasts. Zero or negative value means that combat is always to death.
Conquest_Tech_Pct
A unit has just entered a conquered city (has not yet even risen the new flag!) Unit owner Conquered city Unit/city tile Unit, unit type When a city is conquered, conqueror has a AMOUNT percentage chance to get a tech from the player losing the city.
Have_Contacts The very end of the phase Player - - - Provides contact with all the other players.
Output_Waste_By_Rel_Distance Phase end City owner Each city - Output type Works like Output_Waste_By_Distance (additively to it) if the world map's bigger dimension is 50. Otherwise, the waste is scaled relatively to the world's size.
Stealings_Ignore When a unit steals a tech from a city Unit owner Unit tile city (if present) Unit tile Actor unit, unit type When determining how difficult it is to steal a tech from enemy, AMOUNT

previous times tech has been stolen from the city is ignored. For spies that can possibly escape, the difficulcy of the operation grows exponentially with each unignored stealth; diplomats that can't escape just fail outside of this amount.

Unit_Buy_Cost_Pct When one buys a unit City owner City City tile Unit type Increases unit buy cost by AMOUNT percent.
Effect type  i  New in 3.1 Explanation
When affects game Player [ / Other player] City Tile Other factors
Action_Success_Actor_Move_Cost An action is performed (right after "action started..." callback) Actor player Tile city (if present) Unit tile Actor unit, unit type, action Unit loses this number of move fragments (all if has less) for this action. Use "MinMoveFrags" requirement in the action enabler to disable acting on lower mp.
Action_Success_Target_Move_Cost A unit-on-unit action is performed (right after Lua callback) Target unit owner Tile city (if present) Unit tile Target unit, unit type, action Unit loses this number of move fragments (all if has less) for being a target of this action.
Building_Build_Cost_Pct
Any time City owner City - Building type Increases building cost of a building.
Fortify_Defense_Bonus
Any time Defending unit's owner City in defending unit's tile Defending unit's tile Defending unit Gives percentage defense bonus, multiplicative with Defend_Bonus effect
Max_Stolen_Gold_Pm At "Steal Gold" action Target player Target city Target city center - Part of target player's treasury a thief may steal from the city at maximal luck, 1000 means all gold
Thiefs_Share_Pm Unit owner Unit tile city (if present) Unit tile Actor unit, unit type How much of the stolen gold the thief spends on herself, 1000 means all. Calculated before the thief tries to escape.
Unit_Build_Cost_Pct
Any time City owner City City tile Unit type Increases building cost of a unit.
Infra_Points Phase end, per city, after the population is updated City owner City City tile - How many infra points a city produces each turn.

Multipliers

New v.2.6 effect syntax element is multiplier parameter that says which multiplier should scale the specified effect value if the reqs are active. Multipliers may be defined by a ruleset to be set by a player; changing a multiplier from its defalt value may have additional requirements, and any player's setting takes an effect only at the beginning of phase ending procedure. Example of a multiplier definition you can find in the governments.ruleset file of Experimental ruleset.

See also

Editing Rulesets
Editing BuildingsEditing CitiesEditing EffectsEditing GameEditing Governments
Editing NationsEditing StylesEditing TechsEditing TerrainEditing Units