2 * Empire - A multi-player, client/server Internet based war game.
3 * Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
4 * Ken Stevens, Steve McClure
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * See files README, COPYING and CREDITS in the root of the source
23 * tree for related information and legal notices. It is expected
24 * that future projects/authors will amend these files as needed.
28 * econfig-spec.h: Combined include for optlist.h and emp_config.c
32 * Preprocessor of MSC C++ 6.0 (VC98) is broken and chokes on empty
33 * macro arguments. Fixed in MSC C++ 7.0. Work around: pass
34 * useless token `unused'.
37 #if defined(EMP_CONFIG_C_OUTPUT)
39 #define EMPCFONLYC(fvname, vname, vtype, ctype, num, descr) \
40 { (fvname), (ctype), &(vname), (num), (descr) },
41 #define EMPCFBOTH(fvname, vname, vtype, ctype, num, descr) \
42 { (fvname), (ctype), &(vname), (num), (descr) },
44 #elif defined(EMP_CONFIG_H_OUTPUT)
46 #define EMPCFONLYC(fvname, vname, vtype, ctype, num, descr)
47 #define EMPCFBOTH(fvname, vname, vtype, ctype, num, descr) \
50 #endif /* EMP_CONFIG_C_OUTPUT || EMP_CONFIG_H_OUTPUT */
52 #define EMPCF_COMMENT(comment) \
53 EMPCFONLYC("", emp_config_dummy, unused , NSC_NOTYPE, 0, (comment))
55 #define EMPCF_OPT(fvname, vname, descr) \
56 EMPCFBOTH((fvname), (vname), int, NSC_INT, KM_OPTION, (descr))
58 /* things that can be changed */
59 EMPCF_COMMENT("\n### Server configuration and information")
60 EMPCFBOTH("data", datadir, char *, NSC_STRING, KM_INTERNAL,
61 "Directory the data is stored in")
62 EMPCFBOTH("info", infodir, char *, NSC_STRING, KM_INTERNAL,
63 "Directory the info pages are stored in")
64 EMPCFBOTH("listen_addr", listen_addr, char *, NSC_STRING, KM_INTERNAL,
65 "Local address the server should listen on. \"\" listens on all.")
66 EMPCFBOTH("port", loginport, char *, NSC_STRING, KM_INTERNAL,
67 "TCP/IP port the server will start up on")
68 EMPCFBOTH("privname", privname, char *, NSC_STRING, 0,
70 EMPCFBOTH("privlog", privlog, char *, NSC_STRING, 0,
71 "E-mail of the deity")
72 EMPCFBOTH("WORLD_X", WORLD_X, int, NSC_INT, 0,
73 "World size X dimension (enforced to be even by subtracting 1 if necessary)")
74 EMPCFBOTH("WORLD_Y", WORLD_Y, int, NSC_INT, 0,
75 "World size Y dimension")
77 EMPCF_COMMENT("\n\n### Update policy")
78 EMPCFBOTH("update_policy", update_policy, int, NSC_INT, 0,
79 "0 - normal, 1 - update_times, 2 - blitz, 3 - demand only")
80 EMPCFBOTH("etu_per_update", etu_per_update, int, NSC_INT, 0,
81 "Number of ETUs per update")
82 EMPCFBOTH("s_p_etu", s_p_etu, int, NSC_INT, 0,
83 "Seconds per etu, updates will occur every s_p_etu * etu_per_update seconds")
84 EMPCFBOTH("adj_update", adj_update, int, NSC_INT, KM_INTERNAL,
85 "Move the update forward or backward (in seconds)")
86 EMPCFBOTH("update_window", update_window, int, NSC_INT, 0,
87 "Window the update will occur in (in seconds) before and after the update time")
88 EMPCFBOTH("update_times", update_times, char *, NSC_STRING, 0,
89 "Times when updates occur under policy #1. Must coincide with schedule.")
90 EMPCFBOTH("hourslop", hourslop, int, NSC_INT, KM_INTERNAL,
91 "Number of minutes update check can slip to match update_times")
92 EMPCFBOTH("blitz_time", blitz_time, int, NSC_INT, 0,
93 "Number of minutes between updates under policy #2.")
94 EMPCFBOTH("pre_update_hook", pre_update_hook, char *, NSC_STRING, 0,
95 "Shell command run right before the update.")
97 EMPCF_COMMENT("\n\n### Demand update policy")
98 EMPCFBOTH("update_demandpolicy", update_demandpolicy, int, NSC_INT, 0,
99 "0 - emp_tm checks, 1 - after setting, 2 - demand updates disabled")
100 EMPCFBOTH("update_wantmin", update_wantmin, int, NSC_INT, 0,
101 "number of requests needed for demand update")
102 EMPCFBOTH("update_missed", update_missed, int, NSC_INT, 0,
103 "number of demand updates country can miss before veto update")
104 EMPCFBOTH("update_demandtimes", update_demandtimes, char *, NSC_STRING, 0,
105 "Times when demand updates can occur. Ranges CANNOT cross midnight.")
107 EMPCF_COMMENT("\n\n### Game hours restrictions")
108 EMPCFBOTH("game_days", game_days, char *, NSC_STRING, 0,
109 "Days game is up and running (Su Mo Tu We Th Fr Sa)")
110 EMPCFBOTH("game_hours", game_hours, char *, NSC_STRING, 0,
111 "Hours game is up and running (6:00-18:00)")
113 EMPCF_COMMENT("\n\n### Options")
114 EMPCF_OPT("ALL_BLEED", opt_ALL_BLEED,
115 "Let tech bleed to everyone, not just allies")
116 EMPCF_OPT("BIG_CITY", opt_BIG_CITY,
117 "Allow 10x civs in 'c' sectors")
118 EMPCF_OPT("BLITZ", opt_BLITZ,
120 EMPCF_OPT("BRIDGETOWERS", opt_BRIDGETOWERS,
121 "Allow bridge towers")
122 EMPCF_OPT("DEFENSE_INFRA", opt_DEFENSE_INFRA,
123 "Allow the improvement of defensive infrastructure")
124 EMPCF_OPT("DEMANDUPDATE", opt_DEMANDUPDATE,
125 "Allow demand updates")
126 EMPCF_OPT("DRNUKE", opt_DRNUKE,
127 "Require research for nuke building")
128 EMPCF_OPT("EASY_BRIDGES", opt_EASY_BRIDGES,
129 "Allow bridge building without bridge heads")
130 EMPCF_OPT("FALLOUT", opt_FALLOUT,
131 "Enable secondary effects caused by radiation")
132 EMPCF_OPT("FUEL", opt_FUEL,
133 "Make ships use fuel to move")
134 EMPCF_OPT("GODNEWS", opt_GODNEWS,
135 "Inform the world when deities give/take away")
136 EMPCF_OPT("GO_RENEW", opt_GO_RENEW,
137 "Make gold and oil renewable resources")
138 EMPCF_OPT("GUINEA_PIGS", opt_GUINEA_PIGS,
139 "Enable experimental stuff not ready for prime time")
140 EMPCF_OPT("HIDDEN", opt_HIDDEN,
141 "Hide information between players")
142 EMPCF_OPT("INTERDICT_ATT", opt_INTERDICT_ATT,
143 "Interdict post-attack move in")
144 EMPCF_OPT("LANDSPIES", opt_LANDSPIES,
145 "Enable the land unit type spies")
146 EMPCF_OPT("LOANS", opt_LOANS,
147 "Allow bailing out of other countries via S&L scandals")
148 EMPCF_OPT("LOSE_CONTACT", opt_LOSE_CONTACT,
149 "Let contact be lost after a few updates")
150 EMPCF_OPT("MARKET", opt_MARKET,
151 "Enable time-based market and trading")
152 EMPCF_OPT("MOB_ACCESS", opt_MOB_ACCESS,
153 "Update mobility in real-time rather than at the update")
154 EMPCF_OPT("NOFOOD", opt_NOFOOD,
155 "Disable food consumption")
156 EMPCF_OPT("NOMOBCOST", opt_NOMOBCOST,
157 "Don't charge mobility for firing from ships")
158 EMPCF_OPT("NO_FORT_FIRE", opt_NO_FORT_FIRE,
159 "Disable fortress fire")
160 EMPCF_OPT("NO_PLAGUE", opt_NO_PLAGUE,
162 EMPCF_OPT("PINPOINTMISSILE", opt_PINPOINTMISSILE,
163 "Enable marine missiles")
164 EMPCF_OPT("RES_POP", opt_RES_POP,
165 "Population is limited by research")
166 EMPCF_OPT("SAIL", opt_SAIL,
167 "Enable sail command")
168 EMPCF_OPT("SHOWPLANE", opt_SHOWPLANE,
169 "Show planes and land units embarked on ships or land units up for trade")
170 EMPCF_OPT("SLOW_WAR", opt_SLOW_WAR,
171 "Declaring war takes time")
172 EMPCF_OPT("SUPER_BARS", opt_SUPER_BARS,
173 "Make bars immune to damage")
174 EMPCF_OPT("TECH_POP", opt_TECH_POP,
175 "Technology costs more as population rises")
176 EMPCF_OPT("TRADESHIPS", opt_TRADESHIPS,
178 EMPCF_OPT("TREATIES", opt_TREATIES,
181 EMPCF_COMMENT("\n\n### Countries")
182 EMPCFBOTH("btu_build_rate", btu_build_rate, float, NSC_FLOAT, 0,
183 "Rate at which BTUs accumulate (etu * civ * eff * btu_build_rate)")
184 EMPCFBOTH("m_m_p_d", m_m_p_d, int, NSC_INT, 0,
185 "Maximum minutes per day a country is allowed to be logged in")
186 EMPCFBOTH("max_btus", max_btus, int, NSC_INT, 0,
187 "Maximum number of BTUs a country can have")
188 EMPCFBOTH("max_idle", max_idle, int, NSC_INT, 0,
189 "Maximum number of minutes a player can sit idle while logged in")
190 EMPCFBOTH("players_at_00", players_at_00, int, NSC_INT, 0,
191 "Players have their coordinate system at deity 0,0 (0 - no, 1 - yes)")
192 EMPCFBOTH("at_least_one_100", at_least_one_100, int, NSC_INT, KM_INTERNAL,
193 "Initialize new countries with at least one sector with 100 of all resource")
194 EMPCFBOTH("start_cash", start_cash, long, NSC_LONG, 0,
195 "Starting cash for new countries")
196 EMPCFBOTH("powe_cost", powe_cost, double, NSC_DOUBLE, 0,
197 "Number of BTUs needed to generate a new power report")
198 EMPCFBOTH("war_cost", War_Cost, int, NSC_INT, 0,
199 "Cost to declare war (if SLOW_WAR is on)")
201 EMPCF_COMMENT("\n\n### Technology/Research/Education/Happiness")
202 EMPCFBOTH("easy_tech", easy_tech, float, NSC_FLOAT, 0,
203 "Amount of tech built with no penalty")
204 EMPCFBOTH("start_tech", start_technology, float, NSC_FLOAT, KM_INTERNAL,
205 "Starting technology for new countries")
206 EMPCFBOTH("start_happy", start_happiness, float, NSC_FLOAT, KM_INTERNAL,
207 "Starting happiness for new countries")
208 EMPCFBOTH("start_research", start_research, float, NSC_FLOAT, KM_INTERNAL,
209 "Starting research for new countries")
210 EMPCFBOTH("start_edu", start_education, float, NSC_FLOAT, KM_INTERNAL,
211 "Starting education for new countries")
212 EMPCFBOTH("level_age_rate", level_age_rate, float, NSC_FLOAT, 0,
213 "ETU rate at which tech decays (0 -> no decline)")
214 EMPCFBOTH("tech_log_base", tech_log_base, float, NSC_FLOAT, 0,
215 "Log base to apply to tech breakthroughs above the easy tech level")
216 EMPCFBOTH("ally_factor", ally_factor, float, NSC_FLOAT, 0,
217 "Shared tech with allies (1 / ally_factor)")
218 EMPCFBOTH("edu_avg", edu_avg, float, NSC_FLOAT, 0,
219 "Number of ETUs education is averaged over")
220 EMPCFBOTH("hap_avg", hap_avg, float, NSC_FLOAT, 0,
221 "Number of ETUs happiness is averaged over")
222 EMPCFBOTH("edu_cons", edu_cons, double, NSC_DOUBLE, 0,
223 "Education consumption (1 breakthrough per edu_cons)")
224 EMPCFBOTH("hap_cons", hap_cons, double, NSC_DOUBLE, 0,
225 "Happiness consumption (1 breakthrough per hap_cons)")
227 EMPCF_COMMENT("\n\n### Sectors")
228 EMPCFBOTH("startmob", startmob, int, NSC_INT, KM_INTERNAL,
229 "Starting mobility for sanctuaries")
230 EMPCFBOTH("sect_mob_scale", sect_mob_scale, float, NSC_FLOAT, 0,
231 "Sector mobility accumulation (sect_mob_scale * ETUs per update)")
232 EMPCFBOTH("sect_mob_max", sect_mob_max, int, NSC_INT, 0,
233 "Maximum mobility for sectors")
234 EMPCFBOTH("buil_bh", buil_bh, int, NSC_INT, 0,
235 "Number of hcms required to build a bridge span")
236 EMPCFBOTH("buil_bc", buil_bc, double, NSC_DOUBLE, 0,
237 "Cash required to build a bridge span")
238 EMPCFBOTH("buil_bt", buil_bt, double, NSC_DOUBLE, 0,
239 "Technology required to build a bridge span")
240 EMPCFBOTH("buil_tower_bh", buil_tower_bh, int, NSC_INT, 0,
241 "Number of hcms required to build a bridge tower")
242 EMPCFBOTH("buil_tower_bc", buil_tower_bc, double, NSC_DOUBLE, 0,
243 "Cash required to build a bridge tower")
244 EMPCFBOTH("buil_tower_bt", buil_tower_bt, double, NSC_DOUBLE, 0,
245 "Technology required to build a bridge tower")
247 EMPCF_COMMENT("\n\n### Land Units")
248 EMPCFBOTH("land_mob_scale", land_mob_scale, float, NSC_FLOAT, 0,
249 "Land unit mobility accumulation (land_mob_scale * ETUs per update)")
250 EMPCFBOTH("land_grow_scale", land_grow_scale, float, NSC_FLOAT, 0,
251 "How fast efficiency grows for land units each update (* ETUs)")
252 EMPCFBOTH("land_mob_max", land_mob_max, int, NSC_INT, 0,
253 "Maximum mobility for land units")
254 EMPCFBOTH("money_land", money_land, double, NSC_DOUBLE, 0,
255 "Cost per ETU to maintain land units (percentage of unit price)")
256 EMPCFBOTH("morale_base", morale_base, int, NSC_INT, KM_INTERNAL,
257 "Base level for setting morale of land units")
259 EMPCF_COMMENT("\n\n### Planes")
260 EMPCFBOTH("plane_mob_scale", plane_mob_scale, float, NSC_FLOAT, 0,
261 "Plane mobility accumulation (plane_mob_scale * ETUs per update)")
262 EMPCFBOTH("plane_grow_scale", plane_grow_scale, float, NSC_FLOAT, 0,
263 "How fast efficiency grows for planes each update (* ETUs)")
264 EMPCFBOTH("plane_mob_max", plane_mob_max, int, NSC_INT, 0,
265 "Maximum mobility for planes")
266 EMPCFBOTH("money_plane", money_plane, double, NSC_DOUBLE, 0,
267 "Cost per ETU to maintain planes (percentage of plane price)")
269 EMPCF_COMMENT("\n\n### Ships")
270 EMPCFBOTH("ship_mob_scale", ship_mob_scale, float, NSC_FLOAT, 0,
271 "Ship mobility accumulation (ship_mob_scale * ETUs per update)")
272 EMPCFBOTH("ship_grow_scale", ship_grow_scale, float, NSC_FLOAT, 0,
273 "How fast efficiency grows for ships each update (* ETUs)")
274 EMPCFBOTH("ship_mob_max", ship_mob_max, int, NSC_INT, 0,
275 "Maximum mobility for ships")
276 EMPCFBOTH("money_ship", money_ship, double, NSC_DOUBLE, 0,
277 "Cost per ETU to maintain ships (percentage of ship price)")
278 EMPCFBOTH("torpedo_damage", torpedo_damage, int, NSC_INT, 0,
279 "Torpedo damage (damage is X + 1dX + 1dX)")
281 EMPCF_COMMENT("\n\n### Combat/Damage")
282 EMPCFBOTH("fort_max_interdiction_range", fort_max_interdiction_range, int, NSC_INT, 0,
283 "Maximum range (in sectors) a fort will try to interdict another country")
284 EMPCFBOTH("land_max_interdiction_range", land_max_interdiction_range, int, NSC_INT, 0,
285 "Maximum range (in sectors) a land unit will try to interdict another country")
286 EMPCFBOTH("ship_max_interdiction_range", ship_max_interdiction_range, int, NSC_INT, 0,
287 "Maximum range (in sectors) a ship will try to interdict another country")
288 EMPCFBOTH("flakscale", flakscale, float, NSC_FLOAT, 0,
289 "Scale factor for flak damage")
290 EMPCFBOTH("combat_mob", combat_mob, double, NSC_DOUBLE, 0,
291 "How much mobility do units spend for combat (* casualties/bodies)")
292 EMPCFBOTH("people_damage", people_damage, double, NSC_DOUBLE, 0,
293 "People take this amount of normal damage")
294 EMPCFBOTH("unit_damage", unit_damage, double, NSC_DOUBLE, 0,
295 "Land units take this amount of normal damage")
296 EMPCFBOTH("collateral_dam", collateral_dam, double, NSC_DOUBLE, 0,
297 "Side effect damage amount done to sector")
298 EMPCFBOTH("assault_penalty", assault_penalty, double, NSC_DOUBLE, 0,
299 "Amount of normal attacking efficiency for paratroopers and assaulting")
300 EMPCFBOTH("fire_range_factor", fire_range_factor, float, NSC_FLOAT, 0,
301 "Scale normal firing ranges by this amount")
302 EMPCFBOTH("sect_mob_neg_factor", sect_mob_neg_factor, int, NSC_INT, 0,
303 "Amount of negative mobility a sector has after takeover (ETU / x) (MOB_ACCESS)")
304 EMPCFBOTH("mission_mob_cost", mission_mob_cost, double, NSC_DOUBLE, 0,
305 "Cost to put something on a mission (percentage of max mob)")
307 EMPCF_COMMENT("\n\n### Populace")
308 EMPCFBOTH("uwbrate", uwbrate, double, NSC_DOUBLE, 0,
309 "Birth rate for uw's")
310 EMPCFBOTH("money_civ", money_civ, double, NSC_DOUBLE, 0,
311 "Money gained from taxes on a civilian in one ETU")
312 EMPCFBOTH("money_mil", money_mil, double, NSC_DOUBLE, 0,
313 "Money gained from taxes on an active soldier in one ETU")
314 EMPCFBOTH("money_res", money_res, double, NSC_DOUBLE, 0,
315 "Money gained from taxes on a soldier on active reserve in one ETU")
316 EMPCFBOTH("money_uw", money_uw, double, NSC_DOUBLE, 0,
317 "Money gained from taxes on an uncompensated worker in one ETU")
318 EMPCFBOTH("babyeat", babyeat, double, NSC_DOUBLE, 0,
319 "Amount of food to mature 1 baby into a civilian")
320 EMPCFBOTH("bankint", bankint, double, NSC_DOUBLE, 0,
321 "Bank dollar gain (per bar per etu)")
322 EMPCFBOTH("eatrate", eatrate, double, NSC_DOUBLE, 0,
323 "Food eating rate for mature people")
324 EMPCFBOTH("fcrate", fcrate, double, NSC_DOUBLE, 0,
325 "Food cultivation rate (* workforce in sector)")
326 EMPCFBOTH("fgrate", fgrate, double, NSC_DOUBLE, 0,
327 "Food growth rate (* fertility of sector)")
328 EMPCFBOTH("obrate", obrate, double, NSC_DOUBLE, 0,
329 "Civilian birth rate")
330 EMPCFBOTH("rollover_avail_max", rollover_avail_max, int, NSC_INT, 0,
331 "Maximum avail that can roll over an update")
333 EMPCF_COMMENT("\n\n### Nukes")
334 EMPCFBOTH("decay_per_etu", decay_per_etu, double, NSC_DOUBLE, 0,
335 "Decay of fallout per ETU")
336 EMPCFBOTH("fallout_spread", fallout_spread, double, NSC_DOUBLE, 0,
337 "Amount of fallout that leaks into surrounding sectors")
338 EMPCFBOTH("drnuke_const", drnuke_const, float, NSC_FLOAT, 0,
339 "Amount of research to tech needed to build a nuke (if DRNUKE is on)")
341 EMPCF_COMMENT("\n\n### Market/Trade")
342 EMPCFBOTH("MARK_DELAY", MARK_DELAY, int, NSC_INT, 0,
343 "Number of seconds commodities stay on the market for bidding")
344 EMPCFBOTH("TRADE_DELAY", TRADE_DELAY, int, NSC_INT, 0,
345 "Number of seconds ships, planes, and units stay on the market for bidding")
346 EMPCFBOTH("buytax", buytax, double, NSC_DOUBLE, 0,
347 "Tax (in percentage points) charged to the buyer on market purchases")
348 EMPCFBOTH("tradetax", tradetax, double, NSC_DOUBLE, 0,
349 "Amount of a trade transaction the seller makes (the rest is tax)")
351 EMPCF_COMMENT("\n\n### Trade ships")
352 EMPCFBOTH("trade_1_dist", trade_1_dist, int, NSC_INT, 0,
353 "Less than this distance no money for cashing in")
354 EMPCFBOTH("trade_2_dist", trade_2_dist, int, NSC_INT, 0,
355 "Less than this distance gets trade_1 money for cashing in")
356 EMPCFBOTH("trade_3_dist", trade_3_dist, int, NSC_INT, 0,
357 "Less than this distance gets trade_2 money for cashing in (>= gets trade_3")
358 EMPCFBOTH("trade_1", trade_1, float, NSC_FLOAT, 0,
359 "Return per sector on trade_1 distance amount")
360 EMPCFBOTH("trade_2", trade_2, float, NSC_FLOAT, 0,
361 "Return per sector on trade_2 distance amount")
362 EMPCFBOTH("trade_3", trade_3, float, NSC_FLOAT, 0,
363 "Return per sector on trade_3 distance amount")
364 EMPCFBOTH("trade_ally_bonus", trade_ally_bonus, float, NSC_FLOAT, 0,
365 "Bonus you get for cashing in with an ally")
366 EMPCFBOTH("trade_ally_cut", trade_ally_cut, float, NSC_FLOAT, 0,
367 "Bonus your ally gets for you cashing in with them")
369 EMPCF_COMMENT("\n\n### Misc.")
370 EMPCFBOTH("anno_keep_days", anno_keep_days, int, NSC_INT, KM_INTERNAL,
371 "How long until announcements expire (<0 means never)")
372 EMPCFBOTH("news_keep_days", news_keep_days, int, NSC_INT, KM_INTERNAL,
373 "How long until news expire")
374 EMPCFBOTH("fuel_mult", fuel_mult, int, NSC_INT, 0,
375 "Multiplier for fuel to mobility calculation")
376 EMPCFBOTH("lost_items_timeout", lost_items_timeout, int, NSC_INT, KM_INTERNAL,
377 "Seconds before a lost item is timed out of the database")
379 EMPCFONLYC(NULL, emp_config_dummy, NULL, NSC_NOTYPE, 0, NULL)