1 The effects.ruleset file contains all effects in play in a Freeciv scenario.
2 They have the following form (this is perhaps the most complicated example I
9 { "type", "name", "range"
10 "Building", "Factory", "City"
11 "Building", "Hydro Plant", "City"
12 "OutputType", "Shield", "Local"
15 { "type", "name", "range"
16 "Building", "Hoover Dam", "Player"
17 "Building", "Nuclear Plant", "City"
20 The text in the brackets is the entry name, which just has to be unique, but
21 is otherwise not used. The name field tells Freeciv which effect you are
22 defining. The value is the effect's value, which depends on which effect it
23 is. The reqs table contain a list of requirements for this effect being in
24 effect. You need to satisfy all requirements listed here for this effect to
25 take effect in the game. Lastly there is the nreqs table which is the
26 opposite of the reqs field, these are conditions which prevent the effect from
27 taking place. Any one of the nreq conditions will prevent the effect from
30 Value is integral amount parameter for many effects (must be in the range
33 Requirement range may be one of: "None", "Local",
34 "CAdjacent" (Cardinally Adjacent), "Adjacent", "City",
35 "Continent", "Player", "World". Some requirement types may only work at
36 certain ranges; this is not yet documented. In particular, at present,
37 "Continent" effects can affect only cities and units in cities.
39 A requirement may have a 'survives' field, and if this 'TRUE', the effect
40 survives destruction (wonders only, at world or player range only).
42 A requirement may have a 'negated' field, and if this is 'TRUE', the
43 requirement is negated. If this is 'FALSE', the requirement is not negated.
46 Requirement types and supported ranges
47 ======================================
50 TechFlag: World, Player
52 Building: World, Player, Continent, City, Local
53 Special: Local, Adjacent, CAdjacent, City
54 Base: Local, Adjacent, CAdjacent, City
55 Road: Local, Adjacent, CAdjacent, City
56 Terrain: Local, Adjacent, CAdjacent, City
57 Resource: Local, Adjacent, CAdjacent, City
69 TerrainClass: Local, Adjacent, CAdjacent, City
70 TerrainFlag: Local, Adjacent, CAdjacent, City
72 CityTile: Local, Adjacent, CAdjacent
74 MinSize is the minimum size of a city required.
75 AI is ai player difficulty level.
76 TerrainClass is either "Land" or "Oceanic".
77 Only "Center" is supported as CityTile type.
84 Gain any advance known already by amount number of other players. Note
85 that if you have two such effects, they combine into one much worse effect
86 (the number of players required to gain an advance is increased).
89 Allow airlift to/from a city.
92 Allow changing to any form of government regardless of tech prerequisites.
95 The city with this effect is the capital city.
98 The city with this effect is governmental center. Corruption and
99 waste depends on distance to nearest such city.
102 Allows the production of nuclear weapons.
105 Allows the production of space components.
108 Specify what outputs a specialist is producing. Should be used with an
109 OutputType requirement.
112 City production is increased by amount percent.
115 City production is increased by amount percent after Output_Bonus, so is
116 multiplicative with it.
119 Add amount to each worked tile.
122 Add amount to each worked tile that already has at least 1 output.
125 Increase tile output by amount percent.
128 Reduce waste by amount percent.
131 Make amount' unhappy citizens content. Applied after martial law and unit
135 Give amount techs immediately.
138 Food left after cities grow or shrink is amount percent of the capacity of
139 the city's foodbox. This also affects the 'aqueductloss' penalty.
142 Like having embassies with all other players.
145 Make amount unhappy citizens content. Applied before martial law and unit
149 Make amount unhappy citizens caused by units outside of a city content.
152 Make amount per unit of unhappy citizens caused by units outside of a city
156 Make amount citizens happy.
158 Enemy_Citizen_Unhappy_Pct
159 There will be one extra unhappy citizen for each value/100 citizens
160 of enemy nationality in the city.
163 No period of anarchy between government changes. (This also neuters
164 the Has_Senate effect.)
170 Increases pollution caused by population by amount percent.
173 Increases pollution caused by shields by amount percent.
176 Reduces possibility of illness (plague) in a city by amount percent.
179 Immediately make all cities known.
182 Immediately make entire map known.
185 Increases revolt cost by amount percent.
188 Increase maximum size of a city by amount.
191 Make the size of a city unlimited.
193 SS_Structural, SS_Component and SS_Module
194 A part of a spaceship; this is a "Local" ranged effect. It (for now)
195 applies to improvements which cannot be built unless "Enable_Space" is felt.
196 Buildings which have this effect should probably not be given any other
200 If a spy specifies a target for sabotage, then she has an AMOUNT percent
201 chance to fail. Also in diplomatic combat defending diplomatic units in cities
202 will get an AMOUNT percent bonus. All Spy_Resistant's are summed before being
206 Add amount movement to units. Use UnitClass' requirement with range of
207 'Local' to give it a specific class of units only.
210 No population lost when a city's defender is lost.
213 Units recover amount extra hitpoints per turn.
216 Upgrade amount obsolete units per turn.
219 Improvements with amount or less upkeep cost become free to upkeep (others
223 If this value is greater than 0, the tech upkeep is reduced by this value.
224 For tech upkeep style "Basic" this is total reduction, for tech upkeep
225 style "Cities" this reduction is applied to every city.
228 No citizens in the city are ever unhappy.
231 Increases the veteran class of newly created units of this type. The
232 total amount determines the veteran class (clipped at the maximum for the
236 Increases the chance of units of this type becoming veteran after combat
240 Units that do not move recover amount percentage of their full hitpoints
243 City_Vision_Radius_Sq
244 Increase city vision radius in squared distance by amount tiles.
246 Unit_Vision_Radius_Sq
247 Increase unit vision radius in squared distance by amount tiles.
250 Increases defensive bonuses of units. Any unit requirements on this effect
251 will be applied to the _attacking_ unit. The defensive bonus is ignored by
252 attackers with "IgWall" flag. Attackers with "BadWallAttacker" flag will have
253 their firepower set to 1.
256 City cannot be incited.
259 Gain amount points of "AI love" with AI(s).
262 Year advances by AMOUNT each turn unless Slow_Down_Timeline causes it
266 Slow down the timeline based on the AMOUNT. If AMOUNT >= 3 the timeline
267 will be max 1 year/turn; with AMOUNT == 2 it is max 2 years/turn;
268 with AMOUNT == 1 it is max 5 years/turn; with AMOUNT <= 0 the timeline is
269 unaffected. The effect will be ignored if game.spacerace isn't set.
272 Base chance in per cent of a nation being split by civil war when its
273 capital is captured is increased by this amount. This percentage is in-
274 creased by 5 for each city in civil disorder and reduced by 5 for each one
278 The maximum number of citizens in each city that are naturally content;
279 in larger cities, new citizens above this limit start out unhappy. (Before
280 Empire_Size_Base/Step are applied.)
283 Once your civilization has more cities than the value of this effect,
284 each city gets one more unhappy citizen. If the sum of this effect and
285 Empire_Size_Step is zero, there is no such penalty.
288 After your civilization reaches Empire_Size_Base size, it gets one more
289 unhappy citizen for each amount of cities it gets above that. Set to zero to
290 disable. You can use Empire_Size_Step even if Empire_Size_Base is zero.
293 The maximum setting for each tax rate is amount.
296 The amount of citizens pacified by each military unit giving martial law.
299 The maximum amount of units that will give martial law in city.
302 Can rapture grow cities.
305 Units cannot be bribed.
307 Revolution_When_Unhappy
308 If a city owned by this player is in revolt for more than two turns,
312 Has a senate that prevents declarations of war in most cases.
315 Partisan units (defined in units.ruleset) may spring up when this player's
319 Make all Make_Content and Force_Content effects instead generate gold.
322 Number of trade routes that city can establish.
323 This is forced on trade route creation only. Existing trade routes
324 are never removed due to reduction of effect value. This is to
325 avoid micro-management, need to create same trade routes again
326 after their max number has been temporarily down.
329 Units with "Fanatics" flag incur no upkeep.
332 Cannot use any diplomacy.
335 Tech cannot be received from this player by any means.
338 Trade revenue is multiplied by pow(2, amount/1000). The amount value is
339 taken from the caravan's home city.
342 Multiply unhappy unit upkeep by amount.
345 Multiply unit upkeep by amount.
347 Unit_Upkeep_Free_Per_City
348 In each city unit upkeep is deducted by this amount. As usual, you can use
349 with OutputType requirement to specify which kind of upkeep this should be.
352 Base amount in percentage that each city has in waste. Waste can be used
353 with any output type, use an OutputType requirement to specify which.
355 Output_Waste_By_Distance
356 For each tile in real distance that a city is from your capital, it gets
357 amount of extra waste.
360 When a tile yields more output than amount, it gets a penalty of -1.
362 Output_Inc_Tile_Celebrate
363 Tiles get amount extra output when city working them is celebrating.
366 Increases unit upgrade cost by amount percent. This effect works at
367 player level. You cannot adjust upgrade costs for certain unit type or
368 for units upgraded in certain city.
371 Positive amount only instructs clients to use wall graphics for city.
374 Factor for research costs.
377 Factor in percent for the conversion of unit shield upkeep to gold upkeep.
378 A value of 200 would transfer 1 shield upkeep to 2 gold upkeep. The range
379 of this effect must be player or world. Note that only units with the
380 "Shield2Gold" flag will be affected by this.
383 If value != 0, city can work target tile.
386 If value > 0, unit can build irrigation to target tile. In addition to
387 requirements given to this effect, unit must also have Settlers flag.
390 If value > 0, unit can build mine to target tile. In addition to
391 requirements given to this effect, terrain type must be one to which mine
395 If value > 0, unit can transform target tile. In addition to requirements
396 given to this effect, terrain type needs to be one that can be transformed.
399 If value > 0, unit can transform target tile terrain to another by irrigating.
400 In addition to requirements given to this effect, terrain must be one that
401 can be transformed by irrigating.
404 If value > 0, unit can transform target tile terrain to another by mining.
405 In addition to requirements given to this effect, terrain must be one that
406 can be transformed by mining.
409 Increase the calculated migration score for the a city by amount in
413 Increase the squared city radius by amount. Currently, this can only
414 usefully have "MinSize", "Building", or "Tech" requirements.
417 Increase the number of units with no population cost a city can build in
418 a turn if there are enough shields.
421 The index for the city image of the given city style.