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