Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] (PR#9590) Cleanup of empire size and unhappiness
Home

[Freeciv-Dev] (PR#9590) Cleanup of empire size and unhappiness

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#9590) Cleanup of empire size and unhappiness
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 13 Oct 2004 10:36:18 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9590 >

Currently, we two rather obscure government ruleset options
empire_size_inc and empire_size_mod, and two server options cityfactor and
angrycitizen. The attached patch combined the three first into one
government ruleset option unhappy_factor, and moves angrycitizen into the
city ruleset.

It also introduces increasing unhappiness for very large empires in
default ruleset, as you now get one unhappy starting citizen for each
unhappy_factor number of cities you have in total. The civ2 ruleset has
had this for some time now.

So this patch makes game balance better (harder to run insane horizontal
expansion, or ICS) and it makes it easier to write modpacks.

We need to make a cities.ruleset for civ1 ruleset directory before commit,
with angry_citizens set to zero, before commit. Currently both civ1 and
civ2 ruleset directories lack this file, and grab it from default instead.

  - Per

Index: client/citydlg_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/citydlg_common.c,v
retrieving revision 1.49
diff -u -r1.49 citydlg_common.c
--- client/citydlg_common.c     29 Sep 2004 02:24:18 -0000      1.49
+++ client/citydlg_common.c     13 Oct 2004 17:25:56 -0000
@@ -19,6 +19,7 @@
 
 #include "city.h"
 #include "fcintl.h"
+#include "government.h"
 #include "log.h"
 #include "support.h"
 
@@ -37,6 +38,22 @@
 static int citydlg_width, citydlg_height;
 
 /**************************************************************************
+  Generate info for the happiness dialog.
+**************************************************************************/
+void calculate_happiness(struct player *pplayer, int *cities, 
+                         int *content, int *penalty)
+{
+  struct government *g = get_gov_pplayer(pplayer);
+
+  *cities = city_list_size(&pplayer->cities);
+  *content = game.unhappysize;
+  *penalty = 0;
+  if (g->unhappy_factor > 0) {
+    *penalty += *cities / g->unhappy_factor;
+  }
+}
+
+/**************************************************************************
   Return the width of the city dialog canvas.
 **************************************************************************/
 int get_citydlg_canvas_width(void)
Index: client/citydlg_common.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/citydlg_common.h,v
retrieving revision 1.27
diff -u -r1.27 citydlg_common.h
--- client/citydlg_common.h     29 Sep 2004 02:24:18 -0000      1.27
+++ client/citydlg_common.h     13 Oct 2004 17:25:56 -0000
@@ -39,6 +39,9 @@
 int get_citydlg_canvas_height(void);
 void generate_citydlg_dimensions(void);
 
+void calculate_happiness(struct player *pplayer, int *cities,
+                         int *content, int *penalty);
+
 bool city_to_canvas_pos(int *canvas_x, int *canvas_y,
                        int city_x, int city_y);
 bool canvas_to_city_pos(int *city_x, int *city_y,
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.408
diff -u -r1.408 packhand.c
--- client/packhand.c   1 Oct 2004 17:40:27 -0000       1.408
+++ client/packhand.c   13 Oct 2004 17:25:56 -0000
@@ -2334,8 +2334,7 @@
   gov->civil_war         = p->civil_war;
   gov->martial_law_max   = p->martial_law_max;
   gov->martial_law_per   = p->martial_law_per;
-  gov->empire_size_mod   = p->empire_size_mod;
-  gov->empire_size_inc   = p->empire_size_inc;
+  gov->unhappy_factor    = p->unhappy_factor;
   gov->rapture_size      = p->rapture_size;
   
   gov->unit_happy_cost_factor  = p->unit_happy_cost_factor;
Index: client/gui-gtk-2.0/happiness.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/happiness.c,v
retrieving revision 1.15
diff -u -r1.15 happiness.c
--- client/gui-gtk-2.0/happiness.c      16 Jul 2004 19:37:57 -0000      1.15
+++ client/gui-gtk-2.0/happiness.c      13 Oct 2004 17:25:56 -0000
@@ -217,32 +217,13 @@
 
   struct city *pcity = pdialog->pcity;
   struct player *pplayer = &game.players[pcity->owner];
-  struct government *g = get_gov_pcity(pcity);
-  int cities = city_list_size(&pplayer->cities);
-  int content = game.unhappysize;
-  int basis = game.cityfactor + g->empire_size_mod;
-  int step = g->empire_size_inc;
-  int excess = cities - basis;
-  int penalty = 0;
-
-  if (excess > 0) {
-    if (step > 0)
-      penalty = 1 + (excess - 1) / step;
-    else
-      penalty = 1;
-  } else {
-    excess = 0;
-    penalty = 0;
-  }
+  int penalty, content, cities;
 
-  my_snprintf(bptr, nleft,
-             _("Cities: %d total, %d over threshold of %d cities.\n"),
-             cities, excess, basis);
-  bptr = end_of_strn(bptr, &nleft);
+  calculate_happiness(pplayer, &cities, &content, &penalty);
 
   my_snprintf(bptr, nleft, _("%d content before penalty with "), content);
   bptr = end_of_strn(bptr, &nleft);
-  my_snprintf(bptr, nleft, _("%d additional unhappy citizens."), penalty);
+  my_snprintf(bptr, nleft, _("%d unhappy due to size of empire."), penalty);
   bptr = end_of_strn(bptr, &nleft);
 
   gtk_label_set_text(GTK_LABEL(pdialog->hlabels[CITIES]), buf);
Index: common/capstr.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/capstr.c,v
retrieving revision 1.191
diff -u -r1.191 capstr.c
--- common/capstr.c     4 Oct 2004 19:35:14 -0000       1.191
+++ common/capstr.c     13 Oct 2004 17:25:57 -0000
@@ -82,7 +82,7 @@
  *     as long as possible.  We want to maintain network compatibility with
  *     the stable branch for as long as possible.
  */
-#define CAPABILITY "+2.0"
+#define CAPABILITY "+2.0 unhappyfactor"
 
 void init_our_capability(void)
 {
Index: common/city.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/city.c,v
retrieving revision 1.250
diff -u -r1.250 city.c
--- common/city.c       8 Oct 2004 05:11:50 -0000       1.250
+++ common/city.c       13 Oct 2004 17:25:57 -0000
@@ -1542,23 +1542,21 @@
 }
 
 /**************************************************************************
-  Give base number of content citizens in any city owner by pplayer.
+  Give base number of content citizens in any city owner by pplayer.  We
+  reduce the number of content citizens for each ruleset value 
+  unhappy_factor number of total cities we have.  This is a game mechanic
+  meant to punish horizontal expansion (infinite city sprawl).
 **************************************************************************/
 static int content_citizens(struct player *pplayer)
 {
   int cities = city_list_size(&pplayer->cities);
   int content = game.unhappysize;
-  int basis = game.cityfactor + get_gov_pplayer(pplayer)->empire_size_mod;
-  int step = get_gov_pplayer(pplayer)->empire_size_inc;
+  int step = get_gov_pplayer(pplayer)->unhappy_factor;
 
-  if (cities > basis) {
-    content--;
-    if (step != 0) {
-      /* the first penalty is at (basis + 1) cities;
-         the next is at (basis + step + 1), _not_ (basis + step) */
-      content -= (cities - basis - 1) / step;
-    }
+  if (step > 0) {
+    content -= cities / step;
   }
+
   return content;
 }
 
Index: common/game.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/game.c,v
retrieving revision 1.187
diff -u -r1.187 game.c
--- common/game.c       29 Sep 2004 02:24:22 -0000      1.187
+++ common/game.c       13 Oct 2004 17:25:57 -0000
@@ -222,7 +222,6 @@
   game.conquercost = GAME_DEFAULT_CONQUERCOST;
   sz_strlcpy(game.start_units, GAME_DEFAULT_START_UNITS);
   game.dispersion  = GAME_DEFAULT_DISPERSION;
-  game.cityfactor  = GAME_DEFAULT_CITYFACTOR;
   game.citymindist = GAME_DEFAULT_CITYMINDIST;
   game.civilwarsize= GAME_DEFAULT_CIVILWARSIZE;
   game.contactturns= GAME_DEFAULT_CONTACTTURNS;
Index: common/game.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/game.h,v
retrieving revision 1.153
diff -u -r1.153 game.h
--- common/game.h       13 Oct 2004 15:47:42 -0000      1.153
+++ common/game.h       13 Oct 2004 17:25:57 -0000
@@ -364,10 +364,6 @@
 #define GAME_MIN_CONQUERCOST         0
 #define GAME_MAX_CONQUERCOST         100
 
-#define GAME_DEFAULT_CITYFACTOR      14
-#define GAME_MIN_CITYFACTOR          6
-#define GAME_MAX_CITYFACTOR          100
-
 #define GAME_DEFAULT_CITYMINDIST     0
 #define GAME_MIN_CITYMINDIST         0 /* if 0, ruleset will overwrite this */
 #define GAME_MAX_CITYMINDIST         5
Index: common/government.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/government.h,v
retrieving revision 1.31
diff -u -r1.31 government.h
--- common/government.h 3 Sep 2004 04:22:37 -0000       1.31
+++ common/government.h 13 Oct 2004 17:25:57 -0000
@@ -86,12 +86,9 @@
                                   enforce martial law */
   int   martial_law_per;        /* number of unhappy citizens made
                                   content by each enforcer unit */
-  int   empire_size_mod;       /* (signed) offset to game.cityfactor to
-                                  give city count when number of naturally
-                                  content citizens is decreased */
-  int   empire_size_inc;       /* if non-zero, reduce one content citizen for
-                                  every empire_size_inc cities once #cities
-                                  exceeds game.cityfactor + empire_size_mod */
+  int   unhappy_factor;         /* players get one unhappy citizen for each 
+                                   unhappy_factor number of cities they have. 
+                                   Set to zero to disable this game mechanic. 
*/
   int   rapture_size;          /* minimum city size for rapture; if 255,
                                   rapture is (practically) impossible */
 
Index: common/packets.def
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.def,v
retrieving revision 1.55
diff -u -r1.55 packets.def
--- common/packets.def  25 Sep 2004 22:18:41 -0000      1.55
+++ common/packets.def  13 Oct 2004 17:25:57 -0000
@@ -342,7 +342,7 @@
 
   UINT32 globalwarming, heating, nuclearwinter, cooling;
 
-  UINT8 cityfactor;
+  UINT8 cityfactor; remove-cap(unhappyfactor)
   UINT8 diplcost, freecost, conquercost;
   UINT8 unhappysize;
   UINT8 angrycitizen;
@@ -1019,8 +1019,9 @@
   UINT8 civil_war;
   UINT8 martial_law_max;
   UINT8 martial_law_per;
-  SINT8 empire_size_mod;
-  UINT8 empire_size_inc;
+  UINT8 unhappy_factor; add-cap(unhappy_factor)
+  SINT8 empire_size_mod; remove-cap(unhappy_factor)
+  UINT8 empire_size_inc; remove-cap(unhappy_factor)
   UINT8 rapture_size;
       
   UINT8 unit_happy_cost_factor;
Index: data/civ1/governments.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/civ1/governments.ruleset,v
retrieving revision 1.21
diff -u -r1.21 governments.ruleset
--- data/civ1/governments.ruleset       20 Aug 2004 20:13:17 -0000      1.21
+++ data/civ1/governments.ruleset       13 Oct 2004 17:25:57 -0000
@@ -54,11 +54,8 @@
 ;                   enforcer unit
 ; max_single_rate  = maximum which can be allocated to single one of
 ;                   taxation/luxuries/science
-; empire_size_mod  = signed modifier added to cityfactor to determine
-;                   empire size when base unhappiness is increased
-; empire_size_inc  = if non-zero, reduce one content citizen for
-;                   every empire_size_inc cities once #cities
-;                   exceeds (cityfactor + empire_size_mod)
+; unhappy_factor   = for each unhappy_factor number of cities you have,
+;                    one more citizen in each city becomes unhappy
 ; civil_war_chance = percentage change of civil war when capital is captured
 ;                   (and player has enough cities etc)
 ; rapture_size     = a happy city will celebrate when its size is
@@ -118,8 +115,7 @@
 max_single_rate  = 100  ; rates are irrelevant under Anarchy; use 100
                        ; to avoid unnecessary changes during revolution
 civil_war_chance = 90
-empire_size_mod  = -5
-empire_size_inc  = 0
+unhappy_factor   = 9
 rapture_size     = 3
 
 unit_unhappy_factor = 0
@@ -192,8 +188,7 @@
 martial_law_per  = 1
 max_single_rate  = 100
 civil_war_chance = 80
-empire_size_mod  = -4
-empire_size_inc  = 0
+unhappy_factor   = 10
 rapture_size     = 3
 
 unit_unhappy_factor = 0 
@@ -265,8 +260,7 @@
 martial_law_per  = 1
 max_single_rate  = 100
 civil_war_chance = 70
-empire_size_mod  = -3
-empire_size_inc  = 0
+unhappy_factor   = 11
 rapture_size     = 3
 
 unit_unhappy_factor = 0
@@ -336,8 +330,7 @@
 martial_law_per  = 1
 max_single_rate  = 100
 civil_war_chance = 50
-empire_size_mod  = -2
-empire_size_inc  = 0
+unhappy_factor   = 12
 rapture_size     = 3
 
 unit_unhappy_factor = 0
@@ -415,8 +408,7 @@
 martial_law_per  = 0
 max_single_rate  = 100
 civil_war_chance = 40
-empire_size_mod  = -1
-empire_size_inc  = 0
+unhappy_factor   = 13
 rapture_size     = 3
 
 unit_unhappy_factor = 1
@@ -497,8 +489,7 @@
 martial_law_per  = 0
 max_single_rate  = 100
 civil_war_chance = 30
-empire_size_mod  = 0
-empire_size_inc  = 0
+unhappy_factor   = 0 ; unlimited
 rapture_size     = 3
 
 unit_unhappy_factor = 2
Index: data/civ2/governments.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/civ2/governments.ruleset,v
retrieving revision 1.29
diff -u -r1.29 governments.ruleset
--- data/civ2/governments.ruleset       20 Aug 2004 20:13:18 -0000      1.29
+++ data/civ2/governments.ruleset       13 Oct 2004 17:25:57 -0000
@@ -52,11 +52,8 @@
 ;                   enforcer unit
 ; max_single_rate  = maximum which can be allocated to single one of
 ;                   taxation/luxuries/science
-; empire_size_mod  = signed modifier added to cityfactor to determine
-;                   empire size when base unhappiness is increased
-; empire_size_inc  = if non-zero, reduce one content citizen for
-;                   every empire_size_inc cities once #cities
-;                   exceeds (cityfactor + empire_size_mod)
+; unhappy_factor   = for each unhappy_factor number of cities you have,
+;                    one more citizen in each city becomes unhappy
 ; civil_war_chance = percentage change of civil war when capital is captured
 ;                   (and player has enough cities etc)
 ; rapture_size     = a happy city will celebrate when its size is
@@ -115,8 +112,7 @@
 max_single_rate  = 100  ; rates are irrelevant under Anarchy; use 100
                        ; to avoid unnecessary changes during revolution
 civil_war_chance = 90
-empire_size_mod  = -6
-empire_size_inc  = 6
+unhappy_factor   = 8
 rapture_size     = 3
 
 unit_unhappy_factor = 0
@@ -189,8 +185,7 @@
 martial_law_per  = 1
 max_single_rate  = 60
 civil_war_chance = 80
-empire_size_mod  = -6
-empire_size_inc  = 6
+unhappy_factor   = 8
 rapture_size     = 3
 
 unit_unhappy_factor = 0 
@@ -264,8 +259,7 @@
 martial_law_per  = 1
 max_single_rate  = 70
 civil_war_chance = 70
-empire_size_mod  = -3
-empire_size_inc  = 9
+unhappy_factor   = 10
 rapture_size     = 3
 
 unit_unhappy_factor = 0
@@ -338,8 +332,7 @@
 martial_law_per  = 2
 max_single_rate  = 80
 civil_war_chance = 50
-empire_size_mod  = 127 ; unlimited
-empire_size_inc  = 0
+unhappy_factor   = 0 ; unlimited
 rapture_size     = 3
 
 unit_unhappy_factor = 0
@@ -420,8 +413,7 @@
 martial_law_per  = 0
 max_single_rate  = 80
 civil_war_chance = 60
-empire_size_mod  = 0
-empire_size_inc  = 12
+unhappy_factor   = 12
 rapture_size     = 3
 
 unit_unhappy_factor = 0
@@ -504,8 +496,7 @@
 martial_law_per  = 0
 max_single_rate  = 80
 civil_war_chance = 40
-empire_size_mod  = 0
-empire_size_inc  = 12
+unhappy_factor   = 12
 rapture_size     = 3
 
 unit_unhappy_factor = 1
@@ -590,8 +581,7 @@
 martial_law_per  = 0
 max_single_rate  = 100
 civil_war_chance = 30
-empire_size_mod  = 3
-empire_size_inc  = 15
+unhappy_factor   = 15
 rapture_size     = 3
 
 unit_unhappy_factor = 2
Index: data/default/cities.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/default/cities.ruleset,v
retrieving revision 1.11
diff -u -r1.11 cities.ruleset
--- data/default/cities.ruleset 9 Jun 2004 04:39:13 -0000       1.11
+++ data/default/cities.ruleset 13 Oct 2004 17:25:57 -0000
@@ -37,6 +37,7 @@
 
 [parameters]
 add_to_size_limit  = 8         ; cities >= this cannot be added to.
+angry_citizens = 1              ; set to zero to disable angry citizens
 
 ;
 ; City styles define the way cities are drawn
Index: data/default/governments.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/default/governments.ruleset,v
retrieving revision 1.24
diff -u -r1.24 governments.ruleset
--- data/default/governments.ruleset    20 Aug 2004 20:13:18 -0000      1.24
+++ data/default/governments.ruleset    13 Oct 2004 17:25:57 -0000
@@ -53,11 +53,8 @@
 ;                   enforcer unit
 ; max_single_rate  = maximum which can be allocated to single one of
 ;                   taxation/luxuries/science
-; empire_size_mod  = signed modifier added to cityfactor to determine
-;                   empire size when base unhappiness is increased
-; empire_size_inc  = if non-zero, reduce one content citizen for
-;                   every empire_size_inc cities once #cities
-;                   exceeds (cityfactor + empire_size_mod)
+; unhappy_factor   = for each unhappy_factor number of cities you have,
+;                    one more citizen in each city becomes unhappy
 ; civil_war_chance = percentage change of civil war when capital is captured
 ;                   (and player has enough cities etc)
 ; rapture_size     = a happy city will celebrate when its size is
@@ -116,8 +113,7 @@
 max_single_rate  = 100  ; rates are irrelevant under Anarchy; use 100
                        ; to avoid unnecessary changes during revolution
 civil_war_chance = 90
-empire_size_mod  = -5
-empire_size_inc  = 0
+unhappy_factor   = 9
 rapture_size     = 3
 
 unit_unhappy_factor = 0
@@ -190,8 +186,7 @@
 martial_law_per  = 1
 max_single_rate  = 60
 civil_war_chance = 80
-empire_size_mod  = -4
-empire_size_inc  = 0
+unhappy_factor   = 10
 rapture_size     = 3
 
 unit_unhappy_factor = 0 
@@ -265,8 +260,7 @@
 martial_law_per  = 1
 max_single_rate  = 70
 civil_war_chance = 70
-empire_size_mod  = -3
-empire_size_inc  = 0
+unhappy_factor   = 11
 rapture_size     = 3
 
 unit_unhappy_factor = 0
@@ -339,8 +333,7 @@
 martial_law_per  = 2
 max_single_rate  = 80
 civil_war_chance = 50
-empire_size_mod  = -2
-empire_size_inc  = 0
+unhappy_factor   = 0 ; unlimited
 rapture_size     = 3
 
 unit_unhappy_factor = 0
@@ -421,8 +414,7 @@
 martial_law_per  = 0
 max_single_rate  = 80
 civil_war_chance = 40
-empire_size_mod  = -1
-empire_size_inc  = 0
+unhappy_factor   = 13
 rapture_size     = 3
 
 unit_unhappy_factor = 1
@@ -506,8 +498,7 @@
 martial_law_per  = 0
 max_single_rate  = 100
 civil_war_chance = 30
-empire_size_mod  = 0
-empire_size_inc  = 0
+unhappy_factor   = 16
 rapture_size     = 3
 
 unit_unhappy_factor = 2
Index: server/gamehand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/gamehand.c,v
retrieving revision 1.144
diff -u -r1.144 gamehand.c
--- server/gamehand.c   10 Oct 2004 20:02:02 -0000      1.144
+++ server/gamehand.c   13 Oct 2004 17:25:58 -0000
@@ -337,7 +337,6 @@
   ginfo.diplcost = game.diplcost;
   ginfo.freecost = game.freecost;
   ginfo.conquercost = game.conquercost;
-  ginfo.cityfactor = game.cityfactor;
   for (i = 0; i < A_LAST /*game.num_tech_types */ ; i++)
     ginfo.global_advances[i] = game.global_advances[i];
   for (i = 0; i < B_LAST /*game.num_impr_types */ ; i++)
Index: server/ruleset.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/ruleset.c,v
retrieving revision 1.196
diff -u -r1.196 ruleset.c
--- server/ruleset.c    25 Sep 2004 22:18:42 -0000      1.196
+++ server/ruleset.c    13 Oct 2004 17:25:58 -0000
@@ -1809,9 +1809,8 @@
     g->martial_law_per = secfile_lookup_int(file, "%s.martial_law_per", 
sec[i]);
     g->max_rate = secfile_lookup_int(file, "%s.max_single_rate", sec[i]);
     g->civil_war = secfile_lookup_int(file, "%s.civil_war_chance", sec[i]);
-    g->empire_size_mod = secfile_lookup_int(file, "%s.empire_size_mod", 
sec[i]);
-    g->empire_size_inc =
-      secfile_lookup_int_default(file, 0, "%s.empire_size_inc", sec[i]);
+    g->unhappy_factor = secfile_lookup_int_default(file, 14,
+                                                   "%s.unhappy_factor", 
sec[i]);
     g->rapture_size = secfile_lookup_int(file, "%s.rapture_size", sec[i]);
     
     g->free_happy
@@ -2584,6 +2583,11 @@
   game.add_to_size_limit =
     secfile_lookup_int_default(file, 9, "parameters.add_to_size_limit");
 
+  /* Angry citizens */
+  game.angrycitizen = 
+    secfile_lookup_bool_default(file, GAME_DEFAULT_ANGRYCITIZEN,
+                                "parameters.angry_citizens");
+
   /* City Styles ... */
 
   styles = secfile_get_secnames_prefix(file, "citystyle_", &nval);
@@ -2760,7 +2764,7 @@
   game.slow_invasions = 
     secfile_lookup_bool_default(&file, GAME_DEFAULT_SLOW_INVASIONS,
                                 "global_unit_options.slow_invasions");
-  
+
   /* Load global initial items. */
   lookup_tech_list(&file, "options", "global_init_techs",
                   game.rgame.global_init_techs, filename);
@@ -3004,8 +3008,7 @@
     gov.civil_war        = g->civil_war;
     gov.martial_law_max  = g->martial_law_max;
     gov.martial_law_per  = g->martial_law_per;
-    gov.empire_size_mod  = g->empire_size_mod;
-    gov.empire_size_inc  = g->empire_size_inc;
+    gov.unhappy_factor   = g->unhappy_factor;
     gov.rapture_size     = g->rapture_size;
     
     gov.unit_happy_cost_factor  = g->unit_happy_cost_factor;
Index: server/savegame.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/savegame.c,v
retrieving revision 1.198
diff -u -r1.198 savegame.c
--- server/savegame.c   11 Oct 2004 16:37:08 -0000      1.198
+++ server/savegame.c   13 Oct 2004 17:25:58 -0000
@@ -3105,7 +3105,6 @@
     game.angrycitizen  = secfile_lookup_bool_default(file, FALSE, 
"game.angrycitizen");
 
     if (game.version >= 10100) {
-      game.cityfactor  = secfile_lookup_int(file, "game.cityfactor");
       game.diplcost    = secfile_lookup_int(file, "game.diplcost");
       game.freecost    = secfile_lookup_int(file, "game.freecost");
       game.conquercost = secfile_lookup_int(file, "game.conquercost");
@@ -3625,7 +3624,6 @@
   secfile_insert_int(file, game.fulltradesize, "game.fulltradesize");
   secfile_insert_int(file, game.unhappysize, "game.unhappysize");
   secfile_insert_bool(file, game.angrycitizen, "game.angrycitizen");
-  secfile_insert_int(file, game.cityfactor, "game.cityfactor");
   secfile_insert_int(file, game.citymindist, "game.citymindist");
   secfile_insert_int(file, game.civilwarsize, "game.civilwarsize");
   secfile_insert_int(file, game.contactturns, "game.contactturns");
Index: server/settings.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/settings.c,v
retrieving revision 1.8
diff -u -r1.8 settings.c
--- server/settings.c   10 Oct 2004 20:02:02 -0000      1.8
+++ server/settings.c   13 Oct 2004 17:25:59 -0000
@@ -566,25 +566,6 @@
          GAME_MIN_UNHAPPYSIZE, GAME_MAX_UNHAPPYSIZE,
          GAME_DEFAULT_UNHAPPYSIZE)
 
-  GEN_BOOL("angrycitizen", game.angrycitizen,
-          SSET_RULES, SSET_SOCIOLOGY, SSET_SITUATIONAL, SSET_TO_CLIENT,
-         N_("Whether angry citizens are enabled"),
-         N_("Introduces angry citizens like in civilization II. Angry "
-            "citizens have to become unhappy before any other class "
-            "of citizens may be considered. See also unhappysize, "
-            "cityfactor and governments."), NULL, 
-         GAME_DEFAULT_ANGRYCITIZEN)
-
-  GEN_INT("cityfactor", game.cityfactor,
-         SSET_RULES, SSET_SOCIOLOGY, SSET_RARE, SSET_TO_CLIENT,
-         N_("Number of cities for higher unhappiness"),
-         N_("When the number of cities a player owns is greater than "
-            "cityfactor, one extra citizen is unhappy before other "
-            "adjustments; see also unhappysize. This assumes a "
-            "Democracy; for other governments the effect occurs at "
-            "smaller numbers of cities."), NULL, 
-         GAME_MIN_CITYFACTOR, GAME_MAX_CITYFACTOR, GAME_DEFAULT_CITYFACTOR)
-
   GEN_INT("citymindist", game.citymindist,
          SSET_RULES, SSET_SOCIOLOGY, SSET_SITUATIONAL, SSET_TO_CLIENT,
          N_("Minimum distance between cities"),

[Prev in Thread] Current Thread [Next in Thread]