Make AI less likely to stop building wonder
[freeciv.git] / data / civ1 / game.ruleset
blobd6e60584556727eb64425ba023541fb93372d4db
1 ; Modifying this file:
2 ; You should not modify this file except to make bugfixes or
3 ; for other "maintenance".  If you want to make custom changes,
4 ; you should create a new datadir subdirectory and copy this file
5 ; into that directory, and then modify that copy.  Then use the
6 ; command "rulesetdir <mysubdir>" in the server to have freeciv
7 ; use your new customized file.
9 ; Note that the freeciv AI may not cope well with anything more
10 ; than minor changes.
12 [datafile]
13 description="Civ1-style game rules for Freeciv"
14 options="+Freeciv-2.6-ruleset"
16 ; This section contains meta information for freeciv-ruledit to recreate the ruleset
17 ; file in a form wanted. These have no in-game effect whatsoever
18 [ruledit]
20 ; Which file to read description in from.
21 ;description_file = ""
23 [about]
24 ; Ruleset name
25 name = _("Civ1 ruleset")
27 ; There`s no separate versioning in rulesets part of main freeciv distribution
28 ;version = ""
30 ; Summary of the ruleset
31 summary = _("\
32 You are playing with civ1 style rules. \
33 These rules are much simpler than the Freeciv default rules. \
34 If you know only the default rules, spend some time checking the \
35 differences.\
36 \n\n\
37  * There are fewer technologies, buildings and units.\n\
38  * Units have no hitpoints. If they win a battle, they remain in full health.\n\
41 ; Detailed description
42 ; When updating this, update also desciption_file in [ruledit] section to match
43 ; description = ""
45 [options]
46 global_init_techs=""
47 global_init_buildings="Palace"
49 [civstyle]
50 ; Parameters used to generalize the calculation of city granary size:
51 ;   if city_size <= num_inis:
52 ;     city_granary_size = (granary_food_ini[city_size] * foodbox / 100)
53 ;   if city_size > num_inis;
54 ;     city_granary_size = (granary_food_ini[num_inis] +
55 ;        granary_food_inc * (city_size - num_inis)) * foodbox / 100
56 granary_food_ini = 20
57 granary_food_inc = 10
59 ; City center minimum outputs
60 min_city_center_food    = 0
61 min_city_center_shield  = 0
62 min_city_center_trade   = 0
64 ; Square of initial city radius
65 init_city_radius_sq     = 5
67 ; Square of initially visible radius (true distance).
68 init_vis_radius_sq      = 2
70 ; Number of veteran levels lost when upgrading a unit
71 upgrade_veteran_loss     = 10
73 ; Number of veteran levels lost when auto-upgrading a unit
74 autoupgrade_veteran_loss = 10
76 ; Whether player gets to select which terrain improvement to pillage.
77 pillage_select           = FALSE
79 ; Whether one can steal a tech for which prereqs are not known
80 tech_steal_allow_holes    = TRUE
81 ; Whether one can get a tech for which prereqs are not known via
82 ; diplomatic trading
83 tech_trade_allow_holes    = TRUE
84 ; ...and whether one can lose a tech which is prereq for another known
85 ; tech via trade, if techlost_donor is nonzero
86 tech_trade_loss_allow_holes = TRUE
87 ; Whether one can get a tech for which prereqs are not known via
88 ; parasite effect (Great Library)
89 tech_parasite_allow_holes = TRUE
90 ; Whether one can lose a tech which is prereq for another known tech
91 ; due to negative bulbs, if techlossforgiveness allows loss
92 tech_loss_allow_holes     = TRUE
94 ; Whether civil war is possible at all
95 civil_war_enabled        = TRUE
97 ; Comma separated list of things to happen, in addition to death
98 ; of owner, when gameloss unit dies
99 ; "CivilWar"   - Part of the empire remains, controlled by a new player
100 ; "Barbarians" - Depending on if there`s also "CivilWar", all or part
101 ;                or half of the dead players empire gets under barbarian
102 ;                control.
103 ; "Loot"       - Player who killed the gameloss unit gets loot:
104 ;                Partial map, gold, techs, cities
105 gameloss_style           = ""
107 ; Whether units may safely paradrop to transport on non-native terrain
108 paradrop_to_transport    = FALSE
110 ; Method of paying unit and improvement gold upkeep
111 ; "City" - The player`s total gold must be non-negative after paying upkeep
112 ;          costs associated with each city. If for any city the player`s
113 ;          gold is negative, random buildings in the city are sold off. If
114 ;          the gold is still negative, then supported units with gold upkeep
115 ;          are disbanded.
116 ; "Mixed" - In the first step, the player`s total gold must be non-negative
117 ;           after paying upkeep for all buildings within a city. If for any
118 ;           city the player`s gold is negative, random buildings in the city
119 ;           are sold off.
120 ;           In the second step, gold upkeep for all units is paid in a lump
121 ;           sum. If the player does not have enough gold, random units with
122 ;           gold upkeep are disbanded.
123 ; "Nation" - Gold upkeep for all buildings and units is paid in a lump sum
124 ;            after all cities have been processed. If the player does not
125 ;            have enough gold, random buildings from random cities are sold.
126 ;            If still more gold is needed, then random units with gold
127 ;            upkeep are disbanded.
128 gold_upkeep_style = "City"
130 [illness]
131 ; Whether plagues (illness) are possible
132 illness_on = FALSE
134 ; the base factor for illness (of percent)
135 illness_base_factor = 25
137 ; minimum city size for illness
138 illness_min_size = 3
140 ; factor for how much trading with a plagued city increases our city`s
141 ; chance for plague (in percent)
142 illness_trade_infection = 50
144 ; factor for how much pollution within a city increases its chance for
145 ; plague (in percent)
146 illness_pollution_factor = 50
148 [incite_cost]
149 ; city_incite_cost = total_factor * (city_size) * (base_incite_cost
150 ;                      + (units_cost) * unit_factor
151 ;                      + (improvements_cost) * improvement_factor)
152 ;                    / ((distance to capital) * 100)
153 ; See city_incite_cost() for more details
154 improvement_factor = 1
155 unit_factor = 2
156 total_factor = 100
158 [combat_rules]
159 ; If tired_attack is set to TRUE, units that attack with less than a single
160 ; move point (per move_fragments in terrain.ruleset) will have their attack
161 ; power reduced accordingly. For instance, if move_fragments=3, a unit with
162 ; 2/3 move points will have attack power 2/3 of normal.
163 ; If this is set to FALSE units will attack with full strength even if they
164 ; have only fractional moves left.
165 tired_attack = TRUE
167 [actions]
168 ; If force_trade_route is set to TRUE it is illegal for an actor unit to
169 ; enter the marketplace of a city if it can establish a trade route to it
170 ; in stead.
171 force_trade_route = TRUE
173 ; What each action should be called when showing them to the player.
174 ; The first %s should be before the mnemonic of the action. A Freeciv client
175 ; that supports mnemonics will replace it with the in-band signal that marks
176 ; the following character as a mnemonic in its graphical toolkit.
177 ; The second %s marks where extra details should be inserted.
179 ; /* TRANS: _Poison City (3% chance of success). */
180 ui_name_poison_city = _("%sPoison City%s")
182 ; /* TRANS: _Bribe Enemy Unit (3% chance of success). */
183 ui_name_bribe_unit = _("%sBribe Enemy Unit%s")
185 ; /* TRANS: _Sabotage City (3% chance of success). */
186 ui_name_sabotage_city = _("%sSabotage City%s")
188 ; /* TRANS: Incite a _Revolt (3% chance of success). */
189 ui_name_incite_city = _("Incite a %sRevolt%s")
191 ; /* TRANS: Establish _Embassy (100% chance of success). */
192 ui_name_establish_embassy = _("Establish %sEmbassy%s")
194 ; /* TRANS: Steal _Technology (3% chance of success). */
195 ui_name_steal_tech = _("Steal %sTechnology%s")
197 ; /* TRANS: _Investigate City (100% chance of success). */
198 ui_name_investigate_city = _("%sInvestigate City%s")
200 ; /* TRANS: Establish Trade _Route (100% chance of success). */
201 ui_name_establish_trade_route = _("Establish Trade %sRoute%s")
203 ; /* TRANS: Enter _Marketplace (100% chance of success). */
204 ui_name_enter_marketplace = _("Enter %sMarketplace%s")
206 ; /* TRANS: Help _build Wonder (100% chance of success). */
207 ui_name_help_wonder = _("Help %sbuild Wonder%s")
209 ; Suppress automatic help text generation about what enables and/or
210 ; disables the following actions.
212 ; Can make the help text less redundant when you document it your self.
213 ;quiet_actions = "Targeted Sabotage City", "Targeted Steal Tech"
215 ; /* <-- avoid gettext warnings
217 ; Action enablers:
219 ; action               = the action to enable.
220 ; actor_reqs           = requirements that apply to the actor.
221 ; target_reqs          = requirements that apply to the target.
223 ; README.actions lists the possible actions and their hard coded
224 ; requirements.
226 ; An action enabler is active when its actor_reqs AND its target_reqs are
227 ; satisfied.
229 ; */ <-- avoid gettext warnings
230 [actionenabler_sabotage_city]
231 action = "Sabotage City"
232 actor_reqs    =
233     { "type",   "name", "range"
234       "UnitFlag", "Diplomat", "Local"
235       "DiplRel", "War", "Local"
236       "UnitState", "OnLivableTile", "Local"
237       "MinMoveFrags", "1", "Local"
238     }
240 [actionenabler_establish_embassy]
241 action       = "Establish Embassy"
242 actor_reqs    =
243     { "type",   "name", "range"
244       "UnitFlag", "Diplomat", "Local"
245       "UnitState", "OnLivableTile", "Local"
246       "MinMoveFrags", "1", "Local"
247     }
248 target_reqs  =
249     { "type",   "name", "range", "present"
250       "NationGroup", "Barbarian", "Player", FALSE
251     }
253 [actionenabler_investigate_city]
254 action       = "Investigate City"
255 actor_reqs    =
256     { "type",   "name", "range"
257       "UnitFlag", "Diplomat", "Local"
258       "UnitState", "OnLivableTile", "Local"
259       "MinMoveFrags", "1", "Local"
260     }
262 [actionenabler_steal_tech_random]
263 action = "Steal Tech"
264 actor_reqs    =
265     { "type",   "name", "range"
266       "UnitFlag", "Diplomat", "Local"
267       "UnitState", "OnLivableTile", "Local"
268       "MinMoveFrags", "1", "Local"
269     }
270 target_reqs  =
271     { "type",   "name", "range", "present"
272       "NationGroup", "Barbarian", "Player", FALSE
273     }
275 [actionenabler_incite_city]
276 action = "Incite City"
277 actor_reqs    =
278     { "type",   "name", "range", "present"
279       "UnitFlag", "Diplomat", "Local", TRUE
280       "DiplRel", "Alliance", "Local", FALSE
281       "DiplRel", "Team", "Local", FALSE
282       "UnitState", "OnLivableTile", "Local", TRUE
283       "MinMoveFrags", "1", "Local", TRUE
284     }
285 target_reqs  =
286     { "type",   "name", "range", "present"
287       "Gov", "Democracy", "Player", FALSE
288       "Building", "Palace", "City", FALSE
289     }
291 [actionenabler_bribe_unit]
292 action = "Bribe Unit"
293 actor_reqs    =
294     { "type",   "name", "range", "present"
295       "UnitFlag", "Diplomat", "Local", TRUE
296       "DiplRel", "Alliance", "Local", FALSE
297       "DiplRel", "Team", "Local", FALSE
298       "UnitState", "OnLivableTile", "Local", TRUE
299       "MinMoveFrags", "1", "Local", TRUE
300     }
301 target_reqs    =
302     { "type",   "name", "range", "present"
303       "CityTile", "Center", "Local", FALSE
304       "Gov", "Democracy", "Player", FALSE
305       "MaxUnitsOnTile", "1", "Local", TRUE
306     }
308 [actionenabler_traderoute]
309 action = "Establish Trade Route"
310 actor_reqs    =
311     { "type",   "name", "range", "present"
312       "UnitFlag", "TradeRoute", "Local", TRUE
313     }
315 [actionenabler_marketplace]
316 action = "Enter Marketplace"
317 actor_reqs    =
318     { "type",   "name", "range", "present"
319       "UnitFlag", "TradeRoute", "Local", TRUE
320     }
322 [actionenabler_help_build_wonder]
323 action = "Help Wonder"
324 actor_reqs    =
325     { "type",   "name", "range", "present"
326       "UnitFlag", "HelpWonder", "Local", TRUE
327       "DiplRel", "Is foreign", "Local", FALSE
328     }
330 [borders]
331 ; Base border radius from city.
332 radius_sq_city = 17
334 ; Border radius square increased by this amount / point of city size
335 size_effect    = 1
337 ; Difference between city workable area and area permanently claimed by
338 ; city (these tiles cannot be stolen by stronger border sources).
339 ; 0 means exactly city workable area is immune to border stealing.
340 ; Negative value means outer workable tiles can be stolen; highly negative
341 ; value (more than max city radius_sq) means any workable tile can be stolen.
342 ; If City_Radius_Sq is variable, so is the set of locked tiles; this is
343 ; a squared value, so the radius of the ring of tiles which are workable
344 ; but not locked (or vice versa) varies but the area is constant.
345 radius_sq_city_permanent = 0
347 [research]
348 ; Method of calculating technology costs
349 ;   "Civ I|II"      - Civ (I|II) style. Every new tech add base_tech_cost to
350 ;                     cost of next tech.
351 ;   "Classic"       - Cost of technology is:
352 ;                       base_tech_cost * (1 + reqs) * sqrt(1 + reqs) / 2
353 ;                     where reqs == number of requirement for tech, counted
354 ;                     recursively.
355 ;   "Classic+"      - Cost are read from tech.ruleset. Missing costs are
356 ;                     generated by style "Classic".
357 ;   "Experimental"  - Cost of technology is:
358 ;                       base_tech_cost * (reqs^2 / (1 + sqrt(sqrt(reqs + 1)))
359 ;                                         - 0.5)
360 ;                     where reqs == number of requirement for tech, counted
361 ;                     recursively.
362 ;   "Experimental+" - Cost are read from tech.ruleset. Missing costs are
363 ;                     generated by style "Experimental".
364 tech_cost_style = "Civ I|II"
366 ; Base research cost. Used in tech cost styles where tech cost is generated.
367 ; In other words: used everywhere unless the cost of *all* techs are
368 ; specified and the tech cost style is "Experimental+" or "Classic+".
369 base_tech_cost   = 20
371 ; Technology leak from other civilizations
372 ; "None"           - No reduction of the technology cost.
373 ; "Embassies"      - Technology cost is reduced depending on the number of
374 ;                    players which already know the tech and you have an
375 ;                    embassy with.
376 ; "All Players"    - Technology cost is reduced depending on the number of
377 ;                    all players (human, AI and barbarians) which already
378 ;                    know the tech.
379 ; "Normal Players" - Technology cost is reduced depending on the number of
380 ;                    normal players (human and AI) which already know the
381 ;                    tech.
382 tech_leakage = "None"
384 ; Method of paying tech upkeep
385 ; "None"   - no upkeep
386 ; "Basic"  - upkeep is calculated as:
387 ;     <Cost of technology> / tech_upkeep_divider - tech_upkeep_free
388 ; "Cities" - upkeep is calculated like "Basic", but multiplied by number of cities
389 tech_upkeep_style = "None"
391 ; Method of selecting techs given for free
392 ; "Goal"     - Towards player`s goal, random if no goal
393 ; "Random"   - Random researchable tech
394 ; "Cheapest" - Cheapest researchable tech, random among equal cost ones
395 free_tech_method = "Random"
397 [culture]
398 ; Minimum culture points for cultural domination victory
399 victory_min_points = 1000
401 ; How big lead relative to second best player is needed for victory
402 victory_lead_pct   = 200
404 ; How much each culture point affects the migration
405 ; from/to the city. Each culture point count as this many permilles
406 ; of a migration point.
407 migration_pml = 50
409 [calendar]
410 ; Year 1 instead of 0.
411 skip_year_0 = TRUE
413 ; How many fragments each year has. Value 0 disables year advancement by fragment
414 ; accumulation.
415 fragments = 0
417 ; Calendar fragment names. If name is missing, only a fragment number +1 (so human readable
418 ; numbers begin from 1 and not 0) is shown.
420 ;fragment_name0 = "Jan"
421 ;fragment_name1 = "Feb"
422 ; ...
424 ; What labels are used for positive and negative years.
425 ; /* TRANS: year label (Anno Domini) */
426 positive_label = _("AD")
427 ; /* TRANS: year label (Before Christ) */
428 negative_label = _("BC")
430 ; /* <-- avoid gettext warnings
432 ; Disaster types:
434 ; name                    = translatable name as seen by user
435 ; reqs                    = requirements for disaster to happen (see effects.ruleset
436 ;                           and README.effects for help on requirements)
437 ; frequency               = how likely disaster is to occur
438 ; effects
439 ;   - "DestroyBuilding"   = Random building is destroyed
440 ;   - "ReducePopulation"  = Reduce city size by one unless it's already 1
441 ;   - "ReducePopDestroy"  = Reduce city size by one, possibly destroying the city
442 ;   - "EmptyFoodStock"    = Remove all food from food stock
443 ;   - "EmptyProdStock"    = Destroy current production
444 ;   - "Pollution"         = One tile surrounding city polluted
445 ;   - "Fallout"           = One tile surrounding city polluted with fallout
447 ; */ <-- avoid gettext warnings
449 [disaster_earthquake]
450 name           = _("Earthquake")
451 reqs           =
452     { "type", "name", "range"
453       "Terrain", "Hills", "Adjacent"
454     }
455 frequency      = 10
456 effects        = "DestroyBuilding"
458 [disaster_famine]
459 name           = _("Famine")
460 reqs           =
461     { "type", "name", "range", "present"
462       "Building", "Granary", "City", FALSE
463     }
464 frequency      = 10
465 effects        = "ReducePopulation", "EmptyFoodStock"
467 [disaster_fire]
468 name           = _("Fire")
469 reqs           =
470     { "type", "name", "range", "present"
471       "Building", "Aqueduct", "City", FALSE
472     }
473 frequency      = 10
474 effects        = "DestroyBuilding"
476 [disaster_flood]
477 name           = _("Flood")
478 reqs           =
479     { "type", "name", "range", "present"
480       "Extra", "River", "Adjacent", TRUE
481       "Building", "City Walls", "City", FALSE
482     }
483 frequency      = 10
484 effects        = "ReducePopulation"
486 [disaster_piracy]
487 name           = _("Piracy")
488 reqs           =
489     { "type", "name", "range", "present"
490       "Terrain", "Ocean", "Adjacent", TRUE
491       "Building", "Barracks", "City", FALSE
492       "Building", "Barracks II", "City", FALSE
493       "Building", "Barracks III", "City", FALSE
494     }
495 frequency      = 10
496 effects        = "EmptyFoodStock", "EmptyProdStock"
498 [disaster_plague]
499 name           = _("Plague")
500 reqs          =
501     { "type", "name", "range", "present"
502       "Tech", "Medicine", "Player", FALSE
503       "Building", "Aqueduct", "City", FALSE
504     }
505 frequency      = 10
506 effects        = "ReducePopulation"
508 [disaster_volcano]
509 name           = _("Volcano")
510 reqs           =
511     { "type", "name", "range", "present"
512       "Terrain", "Mountains", "Adjacent", TRUE
513       "Building", "Temple", "City", FALSE
514     }
515 frequency      = 10
516 effects        = "ReducePopulation"
518 ; /* <-- avoid gettext warnings
520 ; Achievement types:
522 ; name                    = translatable name as seen by user
523 ; rule_name               = (optional) name for savegames, rulesets etc; if not
524 ;                           present, 'name' is used. Since the name used in
525 ;                           savegames must not change, use this when renaming a
526 ;                           achievement after a ruleset has been released.
527 ; type                    = What event grants the achievement to player.
528 ;                           See README.achievements for list of these types.
529 ; unique                  = If TRUE, only first one reaching the achievement will
530 ;                           get it. Defaults to TRUE
531 ; value                   = Value to reach. Exact meaning of this depends on
532 ;                           achievement type.
533 ; culture                 = Amount of culture granted to player who gets achievement
534 ;                           granted.
535 ; first_msg               = Message shown to first player gaining the achievement
536 ; cons_msg                = Message shown to consecutive players gaining the achievement
538 ; */ <-- avoid gettext warnings
540 ; No achievements in civ1 ruleset
543 ; Trade settings
545 ; IN = international, IC = intercontinental.
546 ; For each of the trade route types:
547 ; "pct"        - Trade income %. If this is 0, trade route cannot be
548 ;                established at all
549 ; "cancelling" - What to do to previously established traderoutes when they
550 ;                turn illegal
551 ;                "Active"   - Keep them active (although they will only
552 ;                             provide nonzero income if illegal due to
553 ;                             trademindist rather than pct==0)
554 ;                "Inactive" - Keep them inactive
555 ;                "Cancel"   - Cancel them altogether
557 ; TODO: What`s correct "cancelling" behavior for civ1? If you have established
558 ;       traderoute with enemy city nearby and conquer it -> what happens to traderoute
559 ;       between your cities with less than trademindist distance?
561 ; "bonus"      - One-time bonuses granted when traderoute established
562 ;                "None"     - No one-time bonus
563 ;                "Gold"     - Bonus to gold
564 ;                "Science"  - Bonus to research
565 ;                "Both"     - Bonus to gold and research
567 ; TODO: What`s correct "bonus" behavior for civ1? I don`t remember it having one-time
568 ;       bonuses at all, but they have always been present in freeciv.
570 [trade]
571 settings =
572   { "type",       "pct", "cancelling", "bonus"
573     "National",   100,   "Cancel",     "Both"
574     "NationalIC", 200,   "Cancel",     "Both"
575     "IN",         200,   "Cancel",     "Both"
576     "INIC",       400,   "Cancel",     "Both"
577     "Ally",       200,   "Cancel",     "Both"
578     "AllyIC",     400,   "Cancel",     "Both"
579     "Enemy",      200,   "Cancel",     "Both"
580     "EnemyIC",    400,   "Cancel",     "Both"
581     "Team",       200,   "Cancel",     "Both"
582     "TeamIC",     400,   "Cancel",     "Both"
583   }
585 [playercolors]
586 background.r = 86
587 background.g = 86
588 background.b = 86
590 ; Player colors for 32 players are defined below.
591 ; Avoid greens, blues, and white / very pale colors (too easy to confuse
592 ; with terrain).
593 ; Avoid dark colors.
594 colorlist =
595     { "r", "g", "b"
596       255,   0,   0
597       255, 255,   0
598         0, 255, 255
599       138,  43, 226
600       255, 165,   0
601       255,   0, 255
602       173, 216, 230
603         0, 255, 127
604       250, 128, 114
605       124, 252,   0
606       139,   0,   0
607       255, 192, 203
608       211, 211, 211
609       218, 112, 214
610       255,  20, 147
611       100, 149, 237
612       255, 215,   0
613       245, 222, 179
614       255, 255, 128
615       192, 255, 128
616       204, 255,   0
617       255, 211, 140
618       255,  79,   0
619       240, 145, 169
620       255, 219,  88
621       153,  17, 153
622       184, 134,  11
623       255, 102,   0
624       102, 205, 170
625       195,  33,  72
626       168, 153, 230
627       255, 250, 205
628     }
630 [teams]
631 ; freeciv optional team names definition.
633 ; names =
634 ;  _("Team 0"),
635 ; _("Team 1"),
636 ; _("Team 2"),
637 ; _("Team 3"),
638 ; etc...
640 [settings]
641 ; freeciv game  for the civ1 ruleset
643 ; set =
644 ;     { "name", "value", "lock"
645 ;       "bool_set", TRUE, FALSE
646 ;       "int_set", 123, FALSE
647 ;       "str_set", "test", FALSE
648 ;     }
649 set =
650     { "name", "value", "lock"
651       "sciencebox", 50, FALSE
652       "startunits", "c", FALSE
653       "borders", "DISABLED", FALSE
654       "citymindist", 1, FALSE
655       ; Ruleset has no trait ranges, so player choosing EVEN would have
656       ; no effect anyway
657       "traitdistribution", "FIXED", TRUE
658       "plrcolormode", "NATION_ORDER", FALSE
659     }