]> git.pond.sub.org Git - empserver/blob - include/econfig-spec.h
(ANNO_KEEP_DAYS, anno_keep_days): Replace macro ANNO_KEEP_DAYS by
[empserver] / include / econfig-spec.h
1 /*
2  *  Empire - A multi-player, client/server Internet based war game.
3  *  Copyright (C) 1986-2000, Dave Pare, Jeff Bailey, Thomas Ruschak,
4  *                           Ken Stevens, Steve McClure
5  *
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.
10  *
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.
15  *
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
19  *
20  *  ---
21  *
22  *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
23  *  related information and legal notices. It is expected that any future
24  *  projects/authors will amend these files as needed.
25  *
26  *  ---
27  *
28  *  econfig-spec.h: Combined include for optlist.h and emp_config.c
29  */
30
31 #if     defined(EMP_CONFIG_C_OUTPUT)
32
33 #define EMPCFONLYC(fvname, vname, vtype, ctype, num, descr)     \
34         { (fvname), (ctype), &(vname), (num), (descr) },
35 #define EMPCFBOTH(fvname, vname, vtype, ctype, num, descr)      \
36         { (fvname), (ctype), &(vname), (num), (descr) },
37
38 #elif   defined(EMP_CONFIG_H_OUTPUT)
39
40 #define EMPCFONLYC(fvname, vname, vtype, ctype, num, descr)
41 #define EMPCFBOTH(fvname, vname, vtype, ctype, num, descr)      \
42         extern vtype vname;
43
44 #endif  /* EMP_CONFIG_C_OUTPUT || EMP_CONFIG_H_OUTPUT */
45
46 /* things that can be changed */
47 EMPCFONLYC("", emp_config_dummy, int, intset, 0,
48     "\n### Server configuration and information")
49 EMPCFBOTH("data", datadir, s_char *, optstrset, 0,
50     "Directory the data is stored in")
51 EMPCFBOTH("info", infodir, s_char *, optstrset, 0,
52     "Directory the info pages are stored in")
53 EMPCFBOTH("port", loginport, s_char *, optstrset, 0,
54     "TCP/IP port the server will start up on")
55 EMPCFBOTH("privname", privname, s_char *, optstrset, 0,
56     "Name of the deity")
57 EMPCFBOTH("privlog", privlog, s_char *, optstrset, 0,
58     "E-mail of the deity")
59 EMPCFBOTH("WORLD_X", WORLD_X, int, worldxset, 0,
60     "World size X dimension (enforced to be even by subtracting 1 if necessary)")
61 EMPCFBOTH("WORLD_Y", WORLD_Y, int, intset, 0,
62     "World size Y dimension")
63
64 EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Update policy")
65 EMPCFBOTH("update_policy", update_policy, int, intset, 0,
66     "0 - normal, 1 - update_times, 2 - blitz, 3 - demand only")
67 EMPCFBOTH("etu_per_update", etu_per_update, int, intset, 0,
68     "Number of ETUs per update")
69 EMPCFBOTH("s_p_etu", s_p_etu, int, intset, 0,
70     "Seconds per etu, updates will occur every s_p_etu * etu_per_update seconds")
71 EMPCFBOTH("adj_update", adj_update, int, intset, 0,
72     "Move the update forward or backward (in seconds)")
73 EMPCFBOTH("update_window", update_window, int, intset, 0,
74     "Window the update will occur in (in seconds) before and after the update time")
75 EMPCFBOTH("update_times", update_times, s_char *, optstrset, 0,
76     "Times when updates occur under policy #1.  Must coincide with schedule.")
77 EMPCFBOTH("hourslop", hourslop, int, intset, 0,
78     "Number of minutes update check can slip to match update_times")
79 EMPCFBOTH("blitz_time", blitz_time, int, intset, 0,
80     "Number of minutes between updates under policy #2.")
81
82 EMPCFONLYC("", emp_config_dummy, int, intset, 0,
83     "\n\n### Demand update policy")
84 EMPCFBOTH("update_demandpolicy", update_demandpolicy, int, intset, 0,
85     "0 - emp_tm checks, 1 - after setting, 2 - demand updates disabled")
86 EMPCFBOTH("update_wantmin", update_wantmin, int, intset, 0,
87     "number of requests needed for demand update")
88 EMPCFBOTH("update_missed", update_missed, int, intset, 0,
89     "number of demand updates country can miss before veto update")
90 EMPCFBOTH("update_demandtimes", update_demandtimes, s_char *, optstrset, 0,
91     "Times when demand updates can occur.  Ranges CANNOT cross midnight.")
92
93 EMPCFONLYC("", emp_config_dummy, int, intset, 0,
94     "\n\n### Game hours restrictions")
95 EMPCFBOTH("game_days", game_days, s_char *, optstrset, 0,
96     "Days game is up and running (Su Mo Tu We Th Fr Sa)")
97 EMPCFBOTH("game_hours", game_hours, s_char *, optstrset, 0,
98     "Hours game is up and running (6:00-18:00)")
99
100 EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Options\n")
101 EMPCFONLYC("option", emp_config_dummy, option, optionset, 0, NULL)
102 EMPCFONLYC("nooption", emp_config_dummy, nooption, optiondel, 0, NULL)
103
104
105 EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Countries")
106 EMPCFBOTH("btu_build_rate", btu_build_rate, float, floatset, 0,
107     "Rate at which BTUs accumulate (etu * civ * eff * btu_build_rate)")
108 EMPCFBOTH("m_m_p_d", m_m_p_d, int, intset, 0,
109     "Maximum minutes per day a country is allowed to be logged in")
110 EMPCFBOTH("max_btus", max_btus, int, intset, 0,
111     "Maximum number of BTUs a country can have")
112 EMPCFBOTH("max_idle", max_idle, int, intset, 0,
113     "Maximum number of minutes a player can sit idle while logged in")
114 EMPCFBOTH("players_at_00", players_at_00, int, intset, 0,
115     "Players have their coordinate system at deity 0,0 (0 - no, 1 - yes)")
116 EMPCFBOTH("at_least_one_100", at_least_one_100, int, intset, 0,
117     "Initialize new countries with at least one sector with 100 of all resource")
118 EMPCFBOTH("powe_cost", powe_cost, double, doubleset, 0,
119     "Number of BTUs needed to generate a new power report")
120 EMPCFBOTH("war_cost", War_Cost, int, intset, 0,
121     "Cost to declare war (if SLOW_WAR is on)")
122
123 EMPCFONLYC("", emp_config_dummy, int, intset, 0,
124     "\n\n### Technology/Research/Education/Happiness")
125 EMPCFBOTH("easy_tech", easy_tech, float, floatset, 0,
126     "Amount of tech built with no penalty")
127 EMPCFBOTH("hard_tech", hard_tech, float, floatset, 0,
128     "Amount of in-efficiently built tech")
129 EMPCFBOTH("start_tech", start_technology, float, floatset, 0,
130     "Starting technology for new countries")
131 EMPCFBOTH("start_happy", start_happiness, float, floatset, 0,
132     "Starting happiness for new countries")
133 EMPCFBOTH("start_research", start_research, float, floatset, 0,
134     "Starting research for new countries")
135 EMPCFBOTH("start_edu", start_education, float, floatset, 0,
136     "Starting education for new countries")
137 EMPCFBOTH("level_age_rate", level_age_rate, float, floatset, 0,
138     "ETU rate at which tech decays (0 -> no decline)")
139 EMPCFBOTH("tech_log_base", tech_log_base, float, floatset, 0,
140     "Log base to apply to tech breakthroughs above the easy tech level")
141 EMPCFBOTH("ally_factor", ally_factor, float, floatset, 0,
142     "Shared tech with allies (1 / ally_factor)")
143 EMPCFBOTH("edu_avg", edu_avg, float, floatset, 0,
144     "Number of ETUs education is averaged over")
145 EMPCFBOTH("hap_avg", hap_avg, float, floatset, 0,
146     "Number of ETUs happiness is averaged over")
147 EMPCFBOTH("edu_cons", edu_cons, double, doubleset, 0,
148     "Education consumption (1 breakthrough per edu_cons)")
149 EMPCFBOTH("hap_cons", hap_cons, double, doubleset, 0,
150     "Happiness consumption (1 breakthrough per hap_cons)")
151
152 EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Sectors")
153 EMPCFBOTH("startmob", startmob, int, intset, 0,
154     "Starting mobility for sanctuaries")
155 EMPCFBOTH("sect_mob_scale", sect_mob_scale, float, floatset, 0,
156     "Sector mobility accumulation (sect_mob_scale * ETUs per update)")
157 EMPCFBOTH("sect_mob_max", sect_mob_max, int, intset, 0,
158     "Maximum mobility for sectors")
159 EMPCFBOTH("buil_bh", buil_bh, int, intset, 0,
160     "Number of hcms required to build a bridge span")
161 EMPCFBOTH("buil_bc", buil_bc, double, doubleset, 0,
162     "Cash required to build a bridge span")
163 EMPCFBOTH("buil_bt", buil_bt, double, doubleset, 0,
164     "Technology required to build a bridge span")
165 EMPCFBOTH("buil_tower_bh", buil_tower_bh, int, intset, 0,
166     "Number of hcms required to build a bridge tower")
167 EMPCFBOTH("buil_tower_bc", buil_tower_bc, double, doubleset, 0,
168     "Cash required to build a bridge tower")
169 EMPCFBOTH("buil_tower_bt", buil_tower_bt, double, doubleset, 0,
170     "Technology required to build a bridge tower")
171
172 EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Land Units")
173 EMPCFBOTH("land_mob_scale", land_mob_scale, float, floatset, 0,
174     "Land unit mobility accumulation (land_mob_scale * ETUs per update)")
175 EMPCFBOTH("land_grow_scale", land_grow_scale, int, intset, 0,
176     "How fast efficiency grows for land units each update (* ETUs)")
177 EMPCFBOTH("land_mob_max", land_mob_max, int, intset, 0,
178     "Maximum mobility for land units")
179 EMPCFBOTH("money_land", money_land, double, doubleset, 0,
180     "Cost per ETU to maintain land units (percentage of unit price)")
181 EMPCFBOTH("morale_base", morale_base, int, intset, 0,
182     "Base level for setting morale of land units")
183
184 EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Planes")
185 EMPCFBOTH("plane_mob_scale", plane_mob_scale, float, floatset, 0,
186     "Plane mobility accumulation (plane_mob_scale * ETUs per update)")
187 EMPCFBOTH("plane_grow_scale", plane_grow_scale, int, intset, 0,
188     "How fast efficiency grows for planes each update (* ETUs)")
189 EMPCFBOTH("plane_mob_max", plane_mob_max, int, intset, 0,
190     "Maximum mobility for planes")
191 EMPCFBOTH("money_plane", money_plane, double, doubleset, 0,
192     "Cost per ETU to maintain planes (percentage of plane price)")
193
194 EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Ships")
195 EMPCFBOTH("ship_mob_scale", ship_mob_scale, float, floatset, 0,
196     "Ship mobility accumulation (ship_mob_scale * ETUs per update)")
197 EMPCFBOTH("ship_grow_scale", ship_grow_scale, int, intset, 0,
198     "How fast efficiency grows for ships each update (* ETUs)")
199 EMPCFBOTH("ship_mob_max", ship_mob_max, int, intset, 0,
200     "Maximum mobility for ships")
201 EMPCFBOTH("money_ship", money_ship, double, doubleset, 0,
202     "Cost per ETU to maintain ships (percentage of ship price)")
203 EMPCFBOTH("torpedo_damage", torpedo_damage, int, intset, 0,
204     "Torpedo damage (damage is X + 1dX + 1dX)")
205
206 EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Combat/Damage")
207 EMPCFBOTH("fort_max_interdiction_range", fort_max_interdiction_range, int, intset, 0,
208     "Maximum range (in sectors) a fort will try to interdict another country")
209 EMPCFBOTH("land_max_interdiction_range", land_max_interdiction_range, int, intset, 0,
210     "Maximum range (in sectors) a land unit will try to interdict another country")
211 EMPCFBOTH("ship_max_interdiction_range", ship_max_interdiction_range, int, intset, 0,
212     "Maximum range (in sectors) a ship will try to interdict another country")
213 EMPCFBOTH("flakscale", flakscale, double, doubleset, 0,
214     "Scale factor for flak damage")
215 EMPCFBOTH("combat_mob", combat_mob, double, doubleset, 0,
216     "How much mobility do units spend for combat (* casualties/bodies)")
217 EMPCFBOTH("people_damage", people_damage, double, doubleset, 0,
218     "People take this amount of normal damage")
219 EMPCFBOTH("unit_damage", unit_damage, double, doubleset, 0,
220     "Land units take this amount of normal damage")
221 EMPCFBOTH("collateral_dam", collateral_dam, double, doubleset, 0,
222     "Side effect damage amount done to sector")
223 EMPCFBOTH("assault_penalty", assault_penalty, double, doubleset, 0,
224     "Amount of normal attacking efficiency for paratroopers and assaulting")
225 EMPCFBOTH("fire_range_factor", fire_range_factor, float, floatset, 0,
226     "Scale normal firing ranges by this amount")
227 EMPCFBOTH("sect_mob_neg_factor", sect_mob_neg_factor, int, intset, 0,
228     "Amount of negative mobility a sector has after takeover (ETU / x) (MOB_ACCESS)")
229 EMPCFBOTH("mission_mob_cost", mission_mob_cost, double, doubleset, 0,
230     "Cost to put something on a mission (percentage of max mob)")
231
232 EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Populace")
233 EMPCFBOTH("uwbrate", uwbrate, double, doubleset, 0,
234     "Birth rate for uw's")
235 EMPCFBOTH("money_civ", money_civ, double, doubleset, 0,
236     "Money gained from taxes on a civilian in one ETU")
237 EMPCFBOTH("money_mil", money_mil, double, doubleset, 0,
238     "Money gained from taxes on an active soldier in one ETU")
239 EMPCFBOTH("money_res", money_res, double, doubleset, 0,
240     "Money gained from taxes on a soldier on active reserve in one ETU")
241 EMPCFBOTH("money_uw", money_uw, double, doubleset, 0,
242     "Money gained from taxes on an uncompensated worker in one ETU")
243 EMPCFBOTH("babyeat", babyeat, double, doubleset, 0,
244     "Amount of food to mature 1 baby into a civilian")
245 EMPCFBOTH("bankint", bankint, double, doubleset, 0,
246     "Bank dollar gain (per bar per etu)")
247 EMPCFBOTH("eatrate", eatrate, double, doubleset, 0,
248     "Food eating rate for mature people")
249 EMPCFBOTH("fcrate", fcrate, double, doubleset, 0,
250     "Food cultivation rate (* workforce in sector)")
251 EMPCFBOTH("fgrate", fgrate, double, doubleset, 0,
252     "Food growth rate (* fertility of sector)")
253 EMPCFBOTH("obrate", obrate, double, doubleset, 0,
254     "Civilian birth rate")
255 EMPCFBOTH("rollover_avail_max", rollover_avail_max, int, intset, 0,
256     "Maximum avail that can roll over an update")
257
258 EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Nukes")
259 EMPCFBOTH("decay_per_etu", decay_per_etu, double, doubleset, 0,
260     "Decay of fallout per ETU")
261 EMPCFBOTH("fallout_spread", fallout_spread, double, doubleset, 0,
262     "Amount of fallout that leaks into surrounding sectors")
263 EMPCFBOTH("drnuke_const", drnuke_const, float, floatset, 0,
264     "Amount of research to tech needed to build a nuke (if DR_NUKE is on)")
265
266 EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Market/Trade")
267 EMPCFBOTH("MARK_DELAY", MARK_DELAY, int, intset, 0,
268     "Number of seconds commodities stay on the market for bidding")
269 EMPCFBOTH("TRADE_DELAY", TRADE_DELAY, int, intset, 0,
270     "Number of seconds ships, planes, and units stay on the market for bidding")
271 EMPCFBOTH("buytax", buytax, double, doubleset, 0,
272     "Tax (in percentage points) charged to the buyer on market purchases")
273 EMPCFBOTH("tradetax", tradetax, double, doubleset, 0,
274     "Amount of a trade transaction the seller makes (the rest is tax)")
275
276 EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Trade ships")
277 EMPCFBOTH("trade_1_dist", trade_1_dist, int, intset, 0,
278     "Less than this distance no money for cashing in")
279 EMPCFBOTH("trade_2_dist", trade_2_dist, int, intset, 0,
280     "Less than this distance gets trade_1 money for cashing in")
281 EMPCFBOTH("trade_3_dist", trade_3_dist, int, intset, 0,
282     "Less than this distance gets trade_2 money for cashing in (>= gets trade_3")
283 EMPCFBOTH("trade_1", trade_1, float, floatset, 0,
284     "Return per sector on trade_1 distance amount")
285 EMPCFBOTH("trade_2", trade_2, float, floatset, 0,
286     "Return per sector on trade_2 distance amount")
287 EMPCFBOTH("trade_3", trade_3, float, floatset, 0,
288     "Return per sector on trade_3 distance amount")
289 EMPCFBOTH("trade_ally_bonus", trade_ally_bonus, float, floatset, 0,
290     "Bonus you get for cashing in with an ally")
291 EMPCFBOTH("trade_ally_cut", trade_ally_cut, float, floatset, 0,
292     "Bonus your ally gets for you cashing in with them")
293
294 EMPCFONLYC("", emp_config_dummy, int, intset, 0, "\n\n### Misc.")
295 EMPCFBOTH("anno_keep_days", anno_keep_days, int, intset, 7,
296           "How long until announcements expire (<0 means never)")
297 EMPCFBOTH("fuel_mult", fuel_mult, int, intset, 0,
298     "Multiplier for fuel to mobility calculation")
299 EMPCFBOTH("lost_items_timeout", lost_items_timeout, int, intset, 0,
300     "Seconds before a lost item is timed out of the database")
301
302 EMPCFONLYC(NULL, emp_config_dummy, NULL, NULL, 0, NULL)
303
304 #undef  EMPCFONLYC
305 #undef  EMPCFBOTH