forked from freeciv/freeciv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.effects
965 lines (786 loc) · 38.2 KB
/
README.effects
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
The effects.ruleset file contains all effects in play in a Freeciv scenario.
They have the following form (this is perhaps the most complicated example I
could find):
[effect_hydro_plant]
type = "Output_Bonus"
value = 25
reqs =
{ "type", "name", "range", "present", "quiet"
"Building", "Factory", "City", TRUE, FALSE
"Building", "Hydro Plant", "City", TRUE, FALSE
"OutputType", "Shield", "Local", TRUE, TRUE
"Building", "Hoover Dam", "Player", FALSE, FALSE
"Building", "Nuclear Plant", "City", FALSE, FALSE
}
The text in the brackets is the entry name, which just has to be unique, but
is otherwise not used. The 'type' tells Freeciv which effect type
is being added. If effect is active, 'value' gets added to the total of
the effect type's current value (i.e. values of individual effect entries
are cumulataive.) What that (total) value is actually used for depends
on effect type. The 'reqs' table contain a list of requirements for
this effect being in active. You need to satisfy all requirements
listed here for this effect to take effect in the game.
Requirements with present = TRUE must be present,
those with present = FALSE must not be present.
Value is integral amount parameter for many effects (must be in the range
-32767 to 32767).
Requirement range may be one of: "None", "Local", "Tile",
"CAdjacent" (Cardinally Adjacent), "Adjacent", "City",
"Continent", "Player", "Allied, "World". Some requirement types may only work at
certain ranges; this is not yet documented. In particular, at present,
"Continent" effects can affect only cities and units in cities.
A requirement may have a 'survives' field, and if this is 'TRUE', the effect
survives destruction. This is supported for only a few conditions and
ranges: wonders (at world or player range), nations, and advances
(both at world range only).
A requirement may have a 'present' field, and if this is 'FALSE',
the requirement is negated (the condition must not be true for the req to be
met).
A requirement may have a 'quiet' field, and if this is 'TRUE', the help
system does not try to autogenerate text about that requirement. This
can be used if the help system's text is unclear or misleading, or if
you want to describe the requirement in your own words. The 'quiet'
field has no effect on the game rules.
A requirement vector may have any number of requirements (in theory;
in practice whatever it's part of won't fit in a network packet anymore
beyond a few hundred requirements).
Requirement types and supported ranges
======================================
Tech: World, Alliance, Team, Player, Local
TechFlag: World, Alliance, Team, Player, Local
MinTechs: World, Player
MinCities: Player
Achievement: World, Alliance, Team, Player
Counter: City
Gov: Player
Building: World, Alliance, Team, Player, Continent, Traderoute, City,
Tile, Local
BuildingFlag: Local, Tile, City
BuildingGenus: Local
Site: World, Alliance, Team, Player, Continent, Traderoute, City,
Tile, Local
Extra: Local, Tile, Adjacent, CAdjacent, Traderoute, City
RoadFlag: Local, Tile, Adjacent, CAdjacent, Traderoute, City
ExtraFlag: Local, Tile, Adjacent, CAdjacent, Traderoute, City
Terrain: Tile, Adjacent, CAdjacent, Traderoute, City
Good: City
UnitType: Local, Tile, CAdjacent, Adjacent
UnitTypeFlag: Local, Tile, CAdjacent, Adjacent
UnitClass: Local, Tile, CAdjacent, Adjacent
UnitClassFlag: Local, Tile, CAdjacent, Adjacent
Nation: World, Alliance, Team, Player
NationGroup: World, Alliance, Team, Player
Nationality: Traderoute, City
PlayerFlag: Player
PlayerState: Player
OriginalOwner: City
DiplRel: World, Alliance, Team, Player, Local
DiplRelTile: Alliance, Team, Player, Local
DiplRelTileOther:Local
DiplRelUnitAny: Alliance, Team, Player, Local
DiplRelUnitAnyOther: Local
Action: Local
OutputType: Local
Specialist: Local
MinYear: World
MinCalFrag: World
Topology: World
Wrap: World
ServerSetting: World
Age (of unit): Local
Age (of city): City
Age (of player): Player
FormAge: Local
MinSize: Traderoute, City
MinCulture: World, Alliance, Team, Player, Traderoute, City
MinForeignPct: Traderoute, City
AI: Player
MaxUnitsOnTile: Tile, Adjacent, CAdjacent
TerrainClass: Tile, Adjacent, CAdjacent, Traderoute, City
TerrainFlag: Tile, Adjacent, CAdjacent, Traderoute, City
TerrainAlter: Tile
MinLatitude: Tile, Adjacent, CAdjacent, World
MaxLatitude: Tile, Adjacent, CAdjacent, World
CityTile: Tile, Adjacent, CAdjacent
CityStatus: Traderoute, City
Style: Player
UnitState: Local
Activity: Local
MinMoveFrags: Local
MinVeteran: Local
MinHitPoints: Local
TileRel: Tile, Adjacent, CAdjacent
MaxDistanceSq: Tile
MaxRegionTiles: Continent, Adjacent, CAdjacent
Site is like Building, except that the requirement is fulfilled even after
the building is obsoleted.
MinSize is the minimum size of a city required.
AI is ai player difficulty level.
TerrainClass is either "Land" or "Oceanic".
TerrainAlter is "CanIrrigate", "CanMine", "CanRoad", "CanBase", or "CanPlace"
CityTile is "Center" (city center), "Claimed" (tile owned by any player),
"Extras Owned" (extra on tile owned), "Worked" (worked by any city),
"Same Continent" (as the city center) or "Bordering TClass Region" (if the city
is a port, it's a tile of the nearby ocean but not of its continent).
MinLatitude and MaxLatitude are numbers from -1000 (south pole) to 1000
(north pole).
TileRel is about the relation to a specific other tile; currently only available
for action enablers (see also README.actions) and a select few effects. It is
one of "Same Terrain Class" (on or adjacent to the same terrain class as the
other tile, depending on range), "Same Region" (on or adjacent to the same
continent/ocean as the other tile), "Only Other Region" (only adjacent to tiles
of its own or the other tile's continent/ocean, not a third one; not available
at Tile range), or "Region Surrounded" (on or adjacent to a lake/island
touching only the other tile's continent/ocean).
MaxDistanceSq is about the (squared) distance between two tiles; currently
only available for action enablers (see also README.actions) and a select
few effects.
MaxRegionTiles is about the number of tiles of the same continent or ocean as
the target tile in the given range (including the tile itself). At "Continent"
range this is just the full continent/ocean size.
CityStatus is "OwnedByOriginal", "Transferred", "Starved",
"Disorder", or "Celebration"
The difference between "OwnedByOriginal" and "Transferred" is that
former is fulfilled also for liberated cities.
DiplRel is a diplomatic relationship.
MaxUnitsOnTile is about the number of units present on a tile.
UnitState is "Transported", "Transporting", "OnNativeTile", "OnLivableTile",
"InNativeExtra", "MovedThisTurn" or "HasHomeCity".
Activity is "Idle", "Pollution", "Mine", "Irrigate", "Fortified",
"Pillage", "Transform", "Fortifying", "Fallout", "Clean",
"Base", "Road", "Convert", "Cultivate", or "Plant".
MinMoveFrags is the minimum move fragments the unit must have left.
MinCalFrag is the minimum sub-year division the calendar must have reached,
if enabled (see [calendar].fragments in game.ruleset).
Nationality is fulfilled by any citizens of the given nationality
present in the city.
OriginalOwner is the city founding nation
ServerSetting is if a Boolean server setting is enabled. The setting must be
visible to all players and affect the game rules.
FormAge is time since latest unit upgrade of conversion.
PlayerState is one of "Barbarian",
or "HasCapital" (true if player had capital at the beginning of the turn)
PlayerFlag is one of
"AI" - Player is AI controlled
"ScenarioReserved" - Player is not meant for human players
"FirstCity" - Player has had their first city built or otherwise acquired
Effect types
============
Action_Odds_Pct
Modifies the odds of an action being successful. Some actions have a
risk: the actor may get caught before they can perform it. This effect
modifies the actor's odds. A positive value helps them. A negative
value makes it more probable that they will get caught. When evaluating
requirements for this effect, player is the acting player.
See also Action_Resist_Pct.
Currently supports the actions
"Incite City", "Incite City Escape", "Steal Gold",
"Steal Gold Escape", "Steal Maps", "Steal Maps Escape", "Suitcase Nuke",
"Suitcase Nuke Escape", "Sabotage City", "Sabotage City Escape",
"Targeted Sabotage City", "Targeted Sabotage City Escape",
"Sabotage City Production", "Sabotage City Production Escape",
"Surgical Strike Building", "Surgical Strike Production",
"Steal Tech", "Steal Tech Escape Expected", "Targeted Steal Tech",
"Targeted Steal Tech Escape Expected", "Spread Plague", "Poison City" and
"Poison City Escape".
Action_Resist_Pct
Reduces the odds of action against the player to be successful.
The difference to negative Action_Odds_Pct effect is that when evaluating
requirements for this effect, player is the target player of the action.
Supported for the same actions as Action_Odds_Pct (applied at the same time)
Action_Success_Actor_Move_Cost
The number of move fragments lost when a unit successfully performs an
action. Evaluated and done after the action is successfully completed. Added
on top of any movement fragments the action itself subtracts.
Action_Success_Target_Move_Cost
The number of move fragments subtracted from a unit when someone
successfully performs an action on it. Evaluated and done after the action
is successfully completed. Added on top of any movement fragments the
action itself subtracts. Only supported for actions that targets an
individual unit. (See doc/README.actions)
Activity_Time
Value > 0 overrides the usual rules of how long it takes to finish an activity.
With current implementation this can even finish an already started activity
that has been running as long as the current effect value indicates.
Airlift
Allow airlift to/from a city. The value tells how many units per
turn can be airlifted, unless server setting 'airlifttingstyle' sets
the number unlimited for either source or destination city. If airlifts
are set to unlimited, they are enabled by any positive value of this
effect.
Any_Government
Allow changing to any form of government regardless of tech prerequisites.
Attack_Bonus
Increases offensive bonuses of units. Unit requirements on this effect are
the attacking unit itself. Can be limited to only apply to some actions
via an Action requirement.
Border_Strength_Pct
Percentage bonus to a border strength of the border source on
target city or tile.
Border_Vision
Give vision on all tiles within the player's borders. Happens during
turn change.
Does nothing unless the borders setting is set to "Enabled". You can
lock it if border vision rules are important to your ruleset.
Building_Build_Cost_Pct
Percentage added to building building cost, in shields.
This also affects buy cost, as it changes amount of shields to buy.
This affects value of the already built buildings, when calculating
city incite cost or city migration score.
Building_Buy_Cost_Pct
Percentage added to building buy cost.
The cost is calculated for the amount of shields needed.
Note that Building_Build_Cost_Pct can change that amount of shields.
Building_Saboteur_Resistant
If a spy specifies a target for sabotage, then she has an AMOUNT
percent chance to fail.
Capital_City
The city with positive value is a capital city. Player's city with highest
Capital_City value (or random among those with equal positive value) is
the primary capital. Cities with lesser positive value are secondary
capitals.
Casus_Belli_Caught
Checked when a player is caught trying to do an action. Will cause an
incident with the intended victim player if the value is 1 or higher. The
incident gives the intended victim a casus belli against the actor player.
A value of 1000 or higher is international outrage. International outrage
gives every other player a casus belli against the actor.
This effect is supported only for following actions:
Poison City, Poison City Escape, Spread Plague, Sabotage Unit
Sabotage Unit Escape, Bribe Unit, Spy Attack, Steal Tech,
Steal Tech Escape Expected, Targeted Steal Tech,
Targeted Steal Tech Escape Expected, Incite City, Incite City Escape,
Sabotage City, Sabotage City Escape, Targeted Sabotage City,
Targeted Sabotage City Escape, Sabotage City Production,
Sabotage City Production Escape, Steal Gold, Steal Gold Escape,
Steal Maps, Steal Maps Escape, Suitcase Nuke, Suitcase Nuke Escape,
Explode Nuclear, Nuke City, Nuke Units,
Paradrop Unit, Paradrop Unit Conquer, Paradrop Unit Frighten,
Paradrop Unit Frighten Conquer, Paradrop Unit Enter,
Paradrop Unit Enter Conquer,
Casus_Belli_Complete
Checked when a player completes an action that takes several turns
against another player. Will cause an incident with the intended victim
player if the value is 1 or higher. The incident gives the intended victim
a casus belli against the actor player. A value of 1000 or higher is
international outrage. International outrage gives every other player a
casus belli against the actor.
"Pillage" is the only action currently supported.
Casus_Belli_Success
Checked when a player does an action to another player. Will cause an
incident with the intended victim player if the value is 1 or higher. The
incident gives the intended victim a casus belli against the actor player.
A value of 1000 or higher is international outrage. International outrage
gives every other player a casus belli against the actor.
This effect is supported only for the same actions as Casus_Belli_Caught,
and following actions that always success:
Investigate City, Investigate City Spend Unit,
Establish Embassy, Establish Embassy Stay,
Capture Units, Wipe Units, Expel Unit, Conquer Extras, Heal Unit,
Found City, Join City, Bombard, Bombard Lethal, Destroy City,
Attack, Suicide Attack, Conquer City, Unit Move, Help Wonder,
Disband Unit Recover, Establish Trade Route, Enter Marketplace,
Pillage, Spy Escape, Surgical Strike Building, Surgical Strike Production
City_Build_Slots
Increase the number of units with no population cost a city can build in
a turn if there are enough shields.
City_Image
The index for the city image of the given city style.
City_Radius_Sq
Increase the squared city radius by amount. Currently, this can only
usefully have "MinSize", "Building", or "Tech" requirements.
City_Unhappy_Size
The maximum number of citizens in each city that are naturally content;
in larger cities, new citizens above this limit start out unhappy. (Before
Empire_Size_Base/Step are applied.)
City_Vision_Radius_Sq
Increase city vision radius in squared distance by amount tiles.
There must be a base effect present in the ruleset;
one with no requirements at all, i.e., always active
Civil_War_Chance
Base chance in per cent 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.
Civil_War_City_Bonus
Reduction of player's civil war chance percentage by each city.
Combat_Rounds
Maximum number of rounds combat lasts. Unit is the attacker. Zero and
negative values mean that combat continues until either side dies.
Conquest_Tech_Pct
Percent chance that a player conquering a city learns a tech from the
former owner.
Culture_Pct
Percent change to culture, both to current performance and to
the accumulating history.
Defend_Bonus
Increases defensive bonuses of units. Any unit requirements on this effect
will be applied to the _attacking_ unit type. Requirements about
properties of a specific unit are ignored.
Attackers with "BadWallAttacker" flag will have their firepower set to
"combat_rules.low_firepower_badwallattacker" from game.ruleset.
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.
Empire_Size_Step
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 if Empire_Size_Base is zero.
Enable_Nuke
Allows the production of nuclear weapons.
Enable_Space
Allows the production of space components.
Enemy_Citizen_Unhappy_Pct
There will be one extra unhappy citizen for each value/100 citizens
of enemy nationality in the city.
Fanatics
Units with "Fanatics" flag incur no upkeep.
Force_Content
Make amount' unhappy citizens content. Applied after martial law and unit
penalties.
Fortify_Defense_Bonus
Percentage defense bonus multiplicative with Defend_Bonus, usually given
to fortified units. Unit requirements on this effect are the defending unit
itself.
Gain_AI_Love
Gain amount points of "AI love" with AI(s).
Give_Imm_Tech
Give amount techs immediately.
Gov_Center
The city with this effect is governmental center. Corruption and
waste depends on distance to nearest such city.
Growth_Food
Food left after cities grow is amount percent of the capacity of
the city's foodbox. This also affects the 'aqueductloss' penalty.
Happiness_To_Gold
Make all Make_Content and Force_Content effects instead generate gold.
Has_Senate
Has a senate that prevents declarations of war in most cases.
Have_Contacts
If value > 0, gives contact to all the other players.
Have_Embassies
If value > 0, gives an embassy with all the other players owner has ever
had contact with.
Heal_Unit_Pct
The amount of the units full health the heal unit action will restore.
Will not "heal" the unit to more than 100% of its health.
Default value: 100%
Health_Pct
Reduces possibility of illness (plague) in a city by amount percent.
History
Value is how much history type (cumulative) culture city produces.
HP_Regen
Units that do not move recover amount percentage of their full hitpoints
per turn.
HP_Regen_2
Like HP_Regen, except that these effects are applied after Min_HP_Pct effect,
and unit's full HP is rounded up to nearest ten. So even if unit's full HP
is less than ten, it would get rounded to ten, and HP_Regen_2 of at least
10% always heals at least one HP.
Illegal_Action_HP_Cost
The number of hit points lost when the player tries to do an action
that turns out to be illegal. Only applied when the player wasn't aware that
the action was illegal and its illegality therefore reveals new information.
Can kill the unit.
If the action always causes the actor unit to end up at the target tile two
consolation prizes are given. An area with the radius of the actor unit's
vision_radius_sq tiles is revealed. The player may also get contact with the
owners of units and cites adjacent to the target tile.
Illegal_Action_Move_Cost
The number of move fragments lost when the player tries to do an action
that turns out to be illegal. Only applied when the player wasn't aware that
the action was illegal and its illegality therefore reveals new information.
Impr_Upkeep_Reduction
Reduce city's total improvement upkeep by the value. The upkeep cannot
go negative, though.
Incite_Cost_Pct
Increases revolt cost by amount percent.
Infra_Points
City increases owner's infra points by value each turn. If overall points
are negative after all cities have been processed, they are set to 0.
Inspire_Partisans
Partisan units (defined in units.ruleset) may spring up when this player's
cities are taken.
Irrigation_Pct
The tile gets value % of its terrain's irrigation_food_incr bonus.
(This is how irrigation-like extras have an effect.)
Make_Content
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.
Maps_Stolen_Pct
The probability (in percent) that the map of a tile is stolen in the
actions "Steal Maps" and "Steal Maps Escape".
DiplRel reqs are unit owner to city owner.
Requirements evaluated against tile or city not supported.
Default value: 100%
Martial_Law_By_Unit
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 the city.
Max_Rates
The maximum setting for each tax rate is amount.
Max_Stolen_Gold_Pm
The upper limit on the permille of the players gold that may be
stolen by a unit doing the "Steal Gold" and the "Steal Gold Escape"
actions. Evaluated against the city stolen from.
Max_Trade_Routes
Number of trade routes that city can establish.
This is forced on trade route creation only. Existing trade routes
are never removed due to reduction of effect value. This is to
avoid micro-management, need to create same trade routes again
after their max number has been temporarily down.
Migration_Pct
Increase the calculated migration score for the a city by amount in
percent.
Min_HP_Pct
The minimum HP (pct from full) units that have not moved during
previous turn will have in the beginning of the new turn,
after the HP_Regen effects have been applied.
Mining_Pct
The tile gets value % of its terrain's mining_shield_incr bonus.
(This is how mine-like extras have an effect.)
Move_Bonus
Add amount movement to units. Use UnitClass' requirement with range of
'Local' to give it a specific class of units only.
No_Anarchy
No period of anarchy between government changes. (This also neuters
the Has_Senate effect.)
National_History
Value is how much history type (cumulative) culture, not tied to any any
specific city, nation produces.
National_Performance
Value is how much performance type culture, not tied to any specific city,
nation produces.
No_Diplomacy
Cannot use any diplomacy.
No_Unhappy
No citizens in the city are ever unhappy.
Not_Tech_Source
Tech cannot be received from this player by any means.
Nuke_Blast_Radius_1_Sq
The size of the radius of the blast area in squared distance from ground
zero in amount tiles.
Nuke_Proof
City is nuke proof.
Output_Add_Tile
Add amount to each worked tile.
Output_Bonus
City production is increased by amount percent.
Output_Bonus_Absolute
City production is increased by amount. Applied after Output_Bonus and
Output_Bonus_2.
Sum of all the active Output_Bonus_Absolute effects cannot cause
production to decrease. Negative values are ignored (considered zero)
Output_Bonus_2
City production is increased by amount percent after Output_Bonus, so is
multiplicative with it.
Output_Inc_Tile
Add amount to each worked tile that already has at least
output_granularity (from game.ruleset) output.
Output_Inc_Tile_Celebrate
Like Output_Inc_Tile, but only applies if city is also celebrating.
Output_Penalty_Tile
When a tile yields more output than amount, it gets a penalty of
-1 x output_granularity (from game.ruleset).
Output_Per_Tile
Increase tile output by amount percent.
Output_Tile_Punish_Pct
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.
Output_Waste
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 nearest
Government Center, it gets amount / 100 of extra waste.
Output_Waste_By_Rel_Distance
City gets extra waste based on distance to nearest Government Center, relative
to world size. The amount of this extra waste is (distance * amount / 100 / max_distance)
Output_Waste_Pct
Reduce waste by amount percent.
Performance
Value is how much performance type culture city produces.
Pollu_Pop_Pct
Increases pollution caused by each unit of population by amount
percent (adds to baseline of 100%, i.e. 1 pollution per citizen).
Pollu_Pop_Pct_2
Increases pollution caused by each unit of population by amount
percent (adds to baseline of 100%, i.e. 1 pollution per citizen).
This factor is applied after Pollu_Pop_Pct, so is multiplicative with it.
Pollu_Prod_Pct
Increases pollution caused by shields by amount percent.
Popcost_Free
Ignore amount points of unit's population cost when shrinking the city that
built it.
Rapture_Grow
Can rapture grow cities.
Retire_Pct
The chance that unit gets retired (removed) when turn changes.
Retirement only happens if there are no enemy units or cities within
a few tiles. (This exists mainly to implement barbarian behavior.)
Reveal_Cities
Immediately make all cities known.
Reveal_Map
Immediately make entire map known.
Revolution_Unhappiness
If value is greater than zero, it tells how many turns citizens
will tolerate city disorder before government falls. If value is
zero, government never falls.
Shield2Gold_Factor
Factor in percent for the conversion of unit shield upkeep to gold upkeep.
A value of 200 would transfer 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.
Shrink_Food
Food left after cities shrink is amount percent of the capacity of
the city's foodbox.
Size_Adj
Increase maximum size of a city by amount.
Size_Unlimit
Make the size of a city unlimited.
Slow_Down_Timeline
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
Specify what outputs a specialist is producing. Should be used with an
OutputType requirement.
Spy_Resistant
In diplomatic combat defending diplomatic units will get an AMOUNT
percent bonus. All Spy_Resistant's are summed before being applied.
SS_Structural, SS_Component and SS_Module
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.
Stealings_Ignore
When determining how difficult it is to steal a tech from enemy, AMOUNT
previous times tech has been stolen from the city is ignored. Negative amount
means that number of times tech has already been stolen from target city does
not affect current attempt at all. With this effect it's possible to allow
diplomats to steal tech multiple times from the same city, or make it easier
for spies.
Surplus_Waste_Pct
Base waste from what otherwise would be the surplus.
Surplus_Waste_Pct_By_Rel_Distance
City gets extra waste based on distance to nearest Government Center, relative
to world size. This is a percentage calculated from what otherwise would
be the surplus. Percentage is (distance * amount / 100 / max_distance)
Tech_Cost_Factor
Factor for research costs.
Tech_Leakage
If value is positive, tech leakage towards the player is enabled.
The amount of leakage is controlled by the game.ruleset setting "tech_leakage",
and can be even zero.
Tech_Parasite
Gain any advance known already by amount number of other teams,
if team_pooled_research is enabled, or amount number of other players
otherwise. 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).
Tech_Parasite_Pct_Max
Like Tech_Parasite, but the amount is a percentage. It's calculated
from the maximum number of players or teams ever in game, i.e.,
dead players do count.
Tech_Upkeep_Free
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" this reduction is applied to every city.
Thiefs_Share_Pm
The permille of the gold stolen by a unit doing the "Steal Gold" and the
"Steal Gold Escape" actions that is lost before it reaches the player
ordering it. Evaluated against the actor unit.
Tile_Claimable
A positive value means national borders can expand to this tile from a
border source (city or base). The border source's tile is used as the
other tile for requirements that depend on two tiles.
Tile_Workable
If value > 0, city can work target tile.
Trade_Revenue_Bonus
One time trade revenue bonus is multiplied by pow(2, amount/1000).
The amount value is taken from the caravan's home city.
Traderoute_Pct
Percentage bonus for trade from trade routes. This bonus applies after
the value of the trade route is already calculated. It affects one end
of the trade route only.
Turn_Fragments
Year fragments advance by AMOUNT each turn.
Turn_Years
Year advances by AMOUNT each turn unless Slow_Down_Timeline causes it
to be less.
Unhappy_Factor
Multiply unhappy unit upkeep by amount.
Unit_Bribe_Cost_Pct
Increases unit bribe cost by amount percent. Requirements are from the
point of view of the target unit, not the briber.
Unit_Build_Cost_Pct
Percentage added to unit building cost, in shields.
This also affects buy cost, as it changes amount of shields to buy.
This affects value of the already built units, when calculating
city incite cost.
This does not affect unit upgrade price. Use Upgrade_Price_Pct for that.
This does not affect the amount of shields unit provides when
Helping Wonder. Use Unit_Shield_Value_Pct for that.
Unit_Buy_Cost_Pct
Percentage added to unit buy cost.
The cost is calculated for the amount of shields needed.
Note that Unit_Build_Cost_Pct can change that amount of shields.
Unit_No_Lose_Pop
No population lost when a city's defender is lost. Can be limited to
only apply to some actions via an Action requirement. Unit requirements are
evaluated against the attacker.
Unit_Recover
Units recover amount extra hitpoints per turn.
Unit_Shield_Value_Pct
Increase the unit's value in shields by amount percent. When this effect
is used to determine how many shields the player gets for the actions
"Disband Unit Recover" and "Help Wonder" it gets access to unit state. When it is
used to influence the gold cost of "Upgrade Unit" it only has access to unit
type.
Unit_Slots
Number of unit slots city can have units in. New units cannot be built,
nor can homecity be changed so that maintained units would use more slots
than this. Single unit does not necessarily use single slot - that's defined
separately for each unit type.
Unit_Upkeep_Free_Per_City
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
Increase unit vision radius in squared distance by amount tiles.
Upgrade_Price_Pct
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.
Upgrade_Unit
Upgrade amount obsolete units per turn.
Upkeep_Factor
Multiply unit upkeep by amount. This is checked at unit type level,
requirements related to individual units do not work.
Upkeep_Free
Improvements with amount or less upkeep cost become free to upkeep (others
are unaffected).
Veteran_Build
Increases the veteran class of newly created units of this type. The
total amount determines the veteran class (clipped at the maximum for the
unit).
Veteran_Combat
Increases the chance of units of this type becoming veteran after combat
by amount percent.
Veteran_Work
Increases the chance of units of this type becoming veteran after finishing
work by amount percent.
Victory
Positive value means that player wins the game.
Visible_Walls
Instruct client to show specific buildings version of the city graphics.
Zero or below are considered normal city graphics.
On the client side:
Tileset format supports up to 7 different wall graphics.
Values above 7 are considered 7.
Values up to 7, but above amount of tileset provided graphics,
cause the default walls graphics to show.
Ruleset defined effects
=======================
The effects User_Effect_1, User_Effect_2, User_Effect_3 and User_Effect_4
are "blank". They have no meaning by them self. The ruleset does everything
they do.
Effects and Lua
===============
Lua has some integration with effects. The effects module allows you to
get an effect type's current value given that it is evaluated against the
entities you specify. Only a subset of the entities a hard coded effect can
be evaluated against is supported. An effect type's value is the sum of the
effects of that type, having requirement vectors fulfilled given the entities
you specified, from effects.ruleset.
Example
-------
Get the value of Tech_Parasite for the player
effects.player_bonus(find.player(0), "Tech_Parasite")
Details about requirement types
===============================
The DiplRel requirement type
----------------------------
Look for the diplomatic relationship "Never met", "War", "Cease-fire",
"Armistice", "Peace", "Alliance", "Team", "Gives shared vision",
"Receives shared vision", "Hosts embassy", "Has embassy",
"Hosts real embassy" (not from an effect), "Has real embassy",
"Has team embassy", "Hosts team embassy",
"Has Casus Belli" (reason for war), "Provided Casus Belli" or "Foreign".
A DiplRel is considered fulfilled for the range
* world if some player in the world has the specified diplomatic
relationship to some other living player.
* player if the player has the specified diplomatic relationship to some
other living player.
* local if the first player has the specified relationship to the second
player. Example: When testing a build requirement for an extra the first
player is the owner of the unit and the second player the owner of the
terrain the extra is built on.
Only the exact relationship required fulfills it. Example: An alliance or
an armistice agreement won't fulfill a "Peace" requirement.
It is possible to create a requirement that in some situations won't have a
player to check. In those cases the requirement will always be considered
unfulfilled. This applies to both present and not present requirements. The
ranges Alliance, Team, Player and Local needs a player. The Local range also
needs the player the first player's relationship is to.
Example: The requirements below are about the relationship to the owner of a
tile. The table shows in what situations a requirement is fulfilled.
Requirement is fulfilled when the tile is
| domestic | unclaimed | foreign
"DiplRel", "Foreign", "Local", TRUE | no | no | yes
"DiplRel", "Foreign", "Local", FALSE | yes | no | no
The DiplRelTile requirement type
--------------------------------
Mostly like the DiplRel requirement type.
The player is the tile owner. The second player is DiplRel's player.
Doesn't have the World requirement range as that would be redundant.
The DiplRelTileOther requirement type
-------------------------------------
Mostly like the DiplRel requirement type.
The player is the tile owner. The second player is DiplRel's second player.
Only works in the Local requirement range as DiplRel and DiplRelTile covers
the rest.
The DiplRelUnitAny requirement type
-----------------------------------
Check if any unit at the tile has the specified diplomatic relationship.
Note that it says any - not each. It being true for one unit is enough.
The player is the owner of a unit at the tile.
The second player is DiplRel's player.
Doesn't have the World requirement range as that would be redundant.
The DiplRelUnitAnyOther requirement type
----------------------------------------
Check if any unit at the tile has the specified diplomatic relationship.
Note that it says any - not each. It being true for one unit is enough.
The player is the owner of a unit at the tile.
The second player is DiplRel's second player.
Only works in the Local requirement range as DiplRel and DiplRelUnitAny
covers the rest.
The MaxUnitsOnTile requirement type
-----------------------------------
Check the number of units present on a tile. Is true if no more than the
specified number of units are present on a single tile.
Hint: By using negation ("not present") it is possible to check if a tile
has more than the given numbers. It is possible to combine a negated and a
non negated requirement to specify a range.
The UnitState requirement type
------------------------------
"Transported" is fulfilled if the unit is transported by another unit.
"Transporting" is fulfilled if the unit is transporting another unit.
"OnNativeTile" is fulfilled if the unit is on a tile with native terrain or
with a native Extra. Doesn't care about details like cities
and safe tiles.
"OnLivableTile" is fulfilled if the unit is on a tile where it can exist
outside of a transport.
"InNativeExtra" is fulfilled if the unit is on a tile with an extra native
to it.
"MovedThisTurn" is fulfilled if the unit has moved this turn.
"HasHomeCity" is fulfilled if the unit has a home city.