00001 /* 00002 * Empire - A multi-player, client/server Internet based war game. 00003 * Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak, 00004 * Ken Stevens, Steve McClure 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 * --- 00021 * 00022 * See files README, COPYING and CREDITS in the root of the source 00023 * tree for related information and legal notices. It is expected 00024 * that future projects/authors will amend these files as needed. 00025 * 00026 * --- 00027 * 00028 * constants.c: Global constants 00029 * 00030 * Known contributors to this file: 00031 * Ken Stevens, 1995 00032 * Steve McClure, 1996 00033 */ 00034 00035 #include <config.h> 00036 00037 #include "optlist.h" 00038 00039 /* Name of the deity */ 00040 char *privname = "Deity forgot to edit econfig"; 00041 /* E-mail of the deity */ 00042 char *privlog = "careless@invalid"; 00043 /* Divine hosts and networks */ 00044 char *privip = "127.0.0.1 ::1 ::ffff:127.0.0.1"; 00045 00046 char *disabled_commands = ""; 00047 00048 int keep_journal = 0; /* journal log file enabled */ 00049 00050 int WORLD_X = 64; /* World size - x */ 00051 int WORLD_Y = 32; /* World size - y */ 00052 00053 int MARK_DELAY = 7200; /* Seconds to bid on commodities */ 00054 int TRADE_DELAY = 7200; /* Seconds to bid on units */ 00055 00056 int m_m_p_d = 1440; /* max mins of play per day (per country) */ 00057 int etu_per_update = 60; /* # of etu's per update */ 00058 int update_window = 0; /* update window adjustment, in seconds */ 00059 int update_demand = UPD_DEMAND_NONE; 00060 int update_wantmin = 1; /* votes required for demand update */ 00061 char *update_demandtimes = ""; /* demand update time ranges */ 00062 char *game_days = ""; /* days game is running */ 00063 char *game_hours = ""; /* hours game is running */ 00064 char *pre_update_hook = ""; 00065 int max_idle = 15; /* session dies after max_idle minutes idle */ 00066 00067 int sect_mob_max = 127; /* sector mobility limits */ 00068 float sect_mob_scale = 1.0; /* accumulation multiplier */ 00069 int land_mob_max = 127; /* land mobility limits */ 00070 float land_mob_scale = 1.0; /* accumulation multiplier */ 00071 int ship_mob_max = 127; /* ship mobility limits */ 00072 float ship_mob_scale = 1.5; /* accumulation multiplier */ 00073 int plane_mob_max = 127; /* plane mobility limits */ 00074 float plane_mob_scale = 1.0; /* accumulation multiplier */ 00075 00076 float fire_range_factor = 1.0; /* Increase/reduce firing ranges */ 00077 00078 int morale_base = 42; /* base for morale */ 00079 00080 /* opt_MOB_ACCESS */ 00081 int sect_mob_neg_factor = 2; /* ETU/neg_factor = negative amount of mobility 00082 a sector has after being taken */ 00083 00084 int anno_keep_days = 7; /* How long until annos expire (<0 never) */ 00085 int news_keep_days = 10; /* How long until news expire (<0 never) */ 00086 int lost_items_timeout = 172800; /* How long before removing from database */ 00087 00088 double combat_mob = 5.0; /* how much mob do units spend for combat? */ 00089 00090 /* if you find that naving is taking too long, try reducing these */ 00091 int fort_max_interdiction_range = 8; 00092 int ship_max_interdiction_range = 8; 00093 int land_max_interdiction_range = 8; 00094 00095 double mission_mob_cost = 0.0; /* Cost is percentage of max mob */ 00096 00097 double unit_damage = 0.30; /* Units take this fraction of normal damage */ 00098 double people_damage = 1.00; /* Civs/mil/uw take this fraction of damage */ 00099 double collateral_dam = 0.10; /* Side effect damage to sector */ 00100 double assault_penalty = 0.50; /* attack factor for para & assault troops */ 00101 00102 /* opt_FUEL */ 00103 int fuel_mult = 10; /* 1 fuel = 10 mob */ 00104 00105 float land_grow_scale = 2.0; /* how fast eff grows for land units (xETUS) */ 00106 float ship_grow_scale = 3.0; /* how fast eff grows for ships (xETUS) */ 00107 float plane_grow_scale = 2.0; /* how fast eff grows for planes (xETUS) */ 00108 00109 double fgrate = 0.0012; /* food growth rate (dt * fert) */ 00110 double fcrate = 0.0013; /* food cultivate rate (dt * workforce) */ 00111 double eatrate = 0.0005; /* food eating rate (dt * people) */ 00112 double babyeat = 0.0060; /* food to mature 1 baby into a civilian */ 00113 00114 double obrate = 0.005; /* other sectors birth rate */ 00115 double uwbrate = 0.0025; /* uncompensated worker birth rate */ 00116 /* values > 0.25 for either will overflow */ 00117 int rollover_avail_max = 0; /* max. avail that can roll over an update */ 00118 00119 /* opt_FALLOUT */ 00120 double decay_per_etu = 0.006; /* This gives a half life of ? etus, 00121 about ? days. 00122 half life in Jt 00123 log(.5) / log(1-decay_per_etu) 00124 Calculate your own if you don't like it. 00125 If you want a specific half life you can 00126 calc it with this formula: 00127 decay_per_etu = 1 - (.5)^(1/etus) 00128 due to the discrete nature of empire 00129 you can not get a precise number 00130 without intensive simulation 00131 (more than 3 digits). */ 00132 double fallout_spread = 0.005; /* fraction of fallout that leaks into 00133 each surrounding sector */ 00134 /* end opt_FALLOUT */ 00135 00136 double bankint = 0.25; /* bank interest rate (dt * bars) */ 00137 00138 /* Note in the taxes below: 00139 tradetax - this is charged to the seller, so it is < 1 (because the seller 00140 gets the (price paid * tradetax) 00141 buytax - this is charged to the buyer, so it is > 1 (because the buyer is 00142 charged (price paid * buytax). 00143 Not perfect, but it works. :) */ 00144 00145 double tradetax = 0.99; /* Tax charged on trade */ 00146 double buytax = 1.0; /* Tax charged on market purchases */ 00147 int startmob = 127; /* Sanctuary starting mobility */ 00148 float flakscale = 1.75f; /* Scale factor for flak damage */ 00149 00150 /* money gained from taxes, paid to military, and reservists */ 00151 double money_civ = 0.0083333; 00152 double money_uw = 0.0017777; 00153 double money_mil = -0.0833333; 00154 double money_res = -0.0083333; 00155 00156 /* pct cost per ETU for maintaining a ship or plane or land unit */ 00157 double money_plane = -0.001; 00158 double money_ship = -0.001; 00159 double money_land = -0.001; 00160 00161 /* edu and hap consumption factors -- hap_cons civs need 1 hap --> hlev++ */ 00162 double hap_cons = 600000.0; 00163 double edu_cons = 600000.0; 00164 00165 /* hap and edu avg mean that the weight on current happiness is 00166 * (cur_hap * hap_avg + hap_prod * etu) / (hap_avg + etu); */ 00167 float hap_avg = 16.0 * 3.0; 00168 float edu_avg = 16.0 * 12.0; 00169 00170 00171 /* tech build limitations. */ 00172 float easy_tech = 1.00; /* amount of tech built with no penality */ 00173 float tech_log_base = 2.0; /* base of log to take of in-efficient tech */ 00174 00175 float ally_factor = 2.0; /* shared tech with allies = 1/factor */ 00176 float level_age_rate = 96.0; /* 1% per 96 etu's; 0 -> no decline */ 00177 00178 00179 int players_at_00 = 0; /* players coord system on deity 0,0? */ 00180 int at_least_one_100 = 1; /* init player with 100/100/100/100 sector? */ 00181 00182 00183 00184 float btu_build_rate = 0.0012; /* etu * civ * eff * btu_build_rate */ 00185 /* 8 * 999 * 100 * 0.0004 = 319 */ 00186 int max_btus = 640; /* maximum # of btu's */ 00187 00188 double buil_bt = 10.0; /* tech level required to build a bridge */ 00189 int buil_bh = 100; /* hcm required to build a bridge */ 00190 double buil_bc = 1000.0; /* cash required to build a bridge */ 00191 00192 double buil_tower_bt = 100.0; /* tech level required to build a tower */ 00193 int buil_tower_bh = 400; /* hcm required to build a bridge tower */ 00194 double buil_tower_bc = 3000.0; /* cash required to build a bridge tower */ 00195 00196 /* opt_SLOW_WAR */ 00197 int War_Cost = 1000; /* Cost to declare war */ 00198 00199 float drnuke_const = 0.0; /* research must be at least drnuke_const*tech */ 00200 /* in order to build a nuke. For example, if 00201 * drnuke_const is .25, you need a 75 res to 00202 * build a nuke that takes 300 tech 00203 */ 00204 /* opt_TRADESHIPS */ 00205 int trade_1_dist = 8; /* less than this gets no money */ 00206 int trade_2_dist = 14; /* less than this gets trade_1 money */ 00207 int trade_3_dist = 25; /* less than this gets trade_2 money */ 00208 float trade_1 = 0.025; /* return on trade_1 distance */ 00209 float trade_2 = 0.035; /* return on trade_2 distance */ 00210 float trade_3 = 0.050; /* return on trade_3 distance */ 00211 float trade_ally_bonus = 0.20; /* 20% bonus for trading with allies */ 00212 float trade_ally_cut = 0.10; /* 10% bonus for ally you trade with */ 00213 /* end opt_TRADESHIPS */ 00214 00215 int torpedo_damage = 40; /* damage is X + 1dX + 1dX, so 40+1d40+1d40 */ 00216 00217 long start_cash = 25000; 00218 00219 /* initial levels */ 00220 float start_education = 0.0; 00221 float start_happiness = 0.0; 00222 float start_technology = 0.0; 00223 float start_research = 0.0;
1.5.2