00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 #if defined(EMP_CONFIG_C_OUTPUT)
00051
00052 #define EMPCFONLYC(fvname, vname, vtype, ctype, flags, descr) \
00053 { (fvname), (ctype), &(vname), (flags), (descr) },
00054 #define EMPCFBOTH(fvname, vname, vtype, ctype, flags, descr) \
00055 { (fvname), (ctype), &(vname), (flags), (descr) },
00056
00057 #elif defined(EMP_CONFIG_H_OUTPUT)
00058
00059 #define EMPCFONLYC(fvname, vname, vtype, ctype, flags, descr)
00060 #define EMPCFBOTH(fvname, vname, vtype, ctype, flags, descr) \
00061 extern vtype vname;
00062
00063 #endif
00064
00065 #define EMPCF_COMMENT(comment) \
00066 EMPCFONLYC("", emp_config_dummy, unused , NSC_NOTYPE, 0, (comment))
00067
00068 #define EMPCF_OPT(fvname, vname, descr) \
00069 EMPCFBOTH((fvname), (vname), int, NSC_INT, KM_OPTION, (descr))
00070
00071
00072
00073 EMPCF_COMMENT("\n### Server configuration and information")
00074 EMPCFBOTH("custom_tables", custom_tables, char *, NSC_STRING, KM_INTERNAL,
00075 "Custom configuration table files, separated by space")
00076 EMPCFBOTH("data", gamedir, char *, NSC_STRING, KM_INTERNAL,
00077 "Directory where this game's data is stored")
00078 EMPCF_COMMENT("# Note: Use an absolute name here, the interpretation of a relative\n"
00079 "# name may change.")
00080 EMPCFBOTH("info", infodir, char *, NSC_STRING, KM_INTERNAL,
00081 "Directory where info pages are stored, can be shared among games")
00082 EMPCF_COMMENT("# Note: Use an absolute name here, the interpretation of a relative\n"
00083 "# name may change.")
00084 EMPCFBOTH("builtin", builtindir, char *, NSC_STRING, KM_INTERNAL,
00085 "Directory where builtin files are stored")
00086 EMPCF_COMMENT("# Set this to your source tree's src/lib/global to run the server\n"
00087 "# without installing it, else leave it alone.")
00088 EMPCFBOTH("listen_addr", listen_addr, char *, NSC_STRING, KM_INTERNAL,
00089 "Local IP address the server should listen on.")
00090 EMPCF_COMMENT("# \"\" listens on all, localhost just on the loopback interface")
00091 EMPCFBOTH("port", loginport, char *, NSC_STRING, KM_INTERNAL,
00092 "TCP port the server will bind")
00093 EMPCFBOTH("keep_journal", keep_journal, int, NSC_INT, KM_INTERNAL,
00094 "Enable journal log file")
00095 EMPCFBOTH("privname", privname, char *, NSC_STRING, 0,
00096 "Name of the deity")
00097 EMPCFBOTH("privlog", privlog, char *, NSC_STRING, 0,
00098 "E-mail of the deity")
00099 EMPCFBOTH("privip", privip, char *, NSC_STRING, KM_INTERNAL,
00100 "Deities may connect from these IPs or networks, \"\" allows all")
00101 EMPCFBOTH("WORLD_X", WORLD_X, int, NSC_INT, 0,
00102 "World size X dimension (enforced to be even by subtracting 1 if necessary)")
00103 EMPCFBOTH("WORLD_Y", WORLD_Y, int, NSC_INT, 0,
00104 "World size Y dimension")
00105
00106 EMPCF_COMMENT("\n\n### Update policy\n\n"
00107 "# Note: the update schedule is defined in the file schedule in the\n"
00108 "# same directory as this file.")
00109 EMPCFBOTH("etu_per_update", etu_per_update, int, NSC_INT, 0,
00110 "Number of ETUs per update")
00111 EMPCFBOTH("update_window", update_window, int, NSC_INT, 0,
00112 "Time window the update will occur in after the update time, in seconds")
00113 EMPCFBOTH("pre_update_hook", pre_update_hook, char *, NSC_STRING, KM_INTERNAL,
00114 "Shell command run right before the update.")
00115 EMPCFBOTH("update_demand", update_demand, int, NSC_INT, 0,
00116 "Demand update policy")
00117 EMPCF_COMMENT("# 0 - No demand updates\n"
00118 "# 1 - Scheduled updates are demand updates\n"
00119 "# 2 - Demand updates run right after the deciding vote is cast,\n"
00120 "# in addition to (non-demand) scheduled updates\n")
00121 EMPCFBOTH("update_wantmin", update_wantmin, int, NSC_INT, 0,
00122 "Number of votes required for a demand update")
00123 EMPCFBOTH("update_demandtimes", update_demandtimes, char *, NSC_STRING, 0,
00124 "Times when unscheduled demand updates can occur, separated by space.")
00125 EMPCF_COMMENT("# Give time ranges as HOUR:MINUTE-HOUR:MINUTE, e.g. 20:00-24:00\n"
00126 "# Ranges CANNOT cross midnight.")
00127
00128 EMPCF_COMMENT("\n\n### Game hours restrictions")
00129 EMPCFBOTH("game_days", game_days, char *, NSC_STRING, 0,
00130 "Days of week the game is up and running, separated by space")
00131 EMPCF_COMMENT("# Give days as Su Mo Tu We Th Fr Sa.")
00132 EMPCFBOTH("game_hours", game_hours, char *, NSC_STRING, 0,
00133 "Time of day ranges when the game is open, separated by space.")
00134 EMPCF_COMMENT("# Give time ranges as HOUR:MINUTE-HOUR:MINUTE, e.g. 20:00-24:00\n"
00135 "# Ranges CANNOT cross midnight.")
00136
00137 EMPCF_COMMENT("\n\n### Options")
00138 EMPCF_OPT("ALL_BLEED", opt_ALL_BLEED,
00139 "Let tech bleed to everyone, not just allies")
00140 EMPCF_OPT("AUTO_POWER", opt_AUTO_POWER,
00141 "Power report is updated only automatically, at the update")
00142 EMPCF_OPT("BLITZ", opt_BLITZ,
00143 "Enable blitz mode")
00144 EMPCF_OPT("BRIDGETOWERS", opt_BRIDGETOWERS,
00145 "Allow bridge towers")
00146 EMPCF_OPT("EASY_BRIDGES", opt_EASY_BRIDGES,
00147 "Allow bridge building without bridge heads")
00148 EMPCF_OPT("FALLOUT", opt_FALLOUT,
00149 "Enable secondary effects caused by radiation")
00150 EMPCF_OPT("FUEL", opt_FUEL,
00151 "Make ships use fuel to move")
00152 EMPCF_OPT("GODNEWS", opt_GODNEWS,
00153 "Inform the world when deities give/take away")
00154 EMPCF_OPT("GO_RENEW", opt_GO_RENEW,
00155 "Make gold and oil renewable resources")
00156 EMPCF_OPT("GUINEA_PIGS", opt_GUINEA_PIGS,
00157 "Enable experimental stuff not ready for prime time")
00158 EMPCF_OPT("HIDDEN", opt_HIDDEN,
00159 "Hide information between players")
00160 EMPCF_OPT("INTERDICT_ATT", opt_INTERDICT_ATT,
00161 "Interdict post-attack move in")
00162 EMPCF_OPT("LANDSPIES", opt_LANDSPIES,
00163 "Enable the land unit type spies")
00164 EMPCF_OPT("LOANS", opt_LOANS,
00165 "Allow bailing out of other countries via S&L scandals")
00166 EMPCF_OPT("LOSE_CONTACT", opt_LOSE_CONTACT,
00167 "Let contact be lost after a few updates")
00168 EMPCF_OPT("MARKET", opt_MARKET,
00169 "Enable time-based market and trading")
00170 EMPCF_OPT("MOB_ACCESS", opt_MOB_ACCESS,
00171 "Update mobility in real-time rather than at the update")
00172 EMPCF_OPT("NOFOOD", opt_NOFOOD,
00173 "Disable food consumption")
00174 EMPCF_OPT("NOMOBCOST", opt_NOMOBCOST,
00175 "Don't charge mobility for firing from ships")
00176 EMPCF_OPT("NO_FORT_FIRE", opt_NO_FORT_FIRE,
00177 "Disable fortress fire")
00178 EMPCF_OPT("NO_PLAGUE", opt_NO_PLAGUE,
00179 "Disable plague")
00180 EMPCF_OPT("PINPOINTMISSILE", opt_PINPOINTMISSILE,
00181 "Enable marine missiles")
00182 EMPCF_OPT("RES_POP", opt_RES_POP,
00183 "Population is limited by research")
00184 EMPCF_OPT("SAIL", opt_SAIL,
00185 "Enable sail command")
00186 EMPCF_OPT("SHOWPLANE", opt_SHOWPLANE,
00187 "Show planes and land units embarked on ships or land units up for trade")
00188 EMPCF_OPT("SLOW_WAR", opt_SLOW_WAR,
00189 "Declaring war takes time")
00190 EMPCF_OPT("SUPER_BARS", opt_SUPER_BARS,
00191 "Make bars immune to damage")
00192 EMPCF_OPT("TECH_POP", opt_TECH_POP,
00193 "Technology costs more as population rises")
00194 EMPCF_OPT("TRADESHIPS", opt_TRADESHIPS,
00195 "Enable Tradeships")
00196 EMPCF_OPT("TREATIES", opt_TREATIES,
00197 "Allow treaties")
00198
00199 EMPCF_COMMENT("\n\n### Countries")
00200 EMPCFBOTH("btu_build_rate", btu_build_rate, float, NSC_FLOAT, 0,
00201 "Rate at which BTUs accumulate (etu * civ * eff * btu_build_rate)")
00202 EMPCFBOTH("m_m_p_d", m_m_p_d, int, NSC_INT, 0,
00203 "Maximum minutes per day a country is allowed to be logged in")
00204 EMPCFBOTH("max_btus", max_btus, int, NSC_INT, 0,
00205 "Maximum number of BTUs a country can have")
00206 EMPCFBOTH("max_idle", max_idle, int, NSC_INT, 0,
00207 "Maximum number of minutes a player can sit idle while logged in")
00208 EMPCFBOTH("players_at_00", players_at_00, int, NSC_INT, 0,
00209 "Players have their coordinate system at deity 0,0 (0 - no, 1 - yes)")
00210 EMPCFBOTH("at_least_one_100", at_least_one_100, int, NSC_INT, KM_INTERNAL,
00211 "Initialize new countries with at least one sector with 100 of all resource")
00212 EMPCFBOTH("start_cash", start_cash, long, NSC_LONG, KM_INTERNAL,
00213 "Starting cash for new countries")
00214 EMPCFBOTH("war_cost", War_Cost, int, NSC_INT, 0,
00215 "Cost to declare war (if SLOW_WAR is on)")
00216
00217 EMPCF_COMMENT("\n\n### Technology/Research/Education/Happiness")
00218 EMPCFBOTH("easy_tech", easy_tech, float, NSC_FLOAT, 0,
00219 "Amount of tech built with no penalty")
00220 EMPCFBOTH("start_tech", start_technology, float, NSC_FLOAT, KM_INTERNAL,
00221 "Starting technology for new countries")
00222 EMPCFBOTH("start_happy", start_happiness, float, NSC_FLOAT, KM_INTERNAL,
00223 "Starting happiness for new countries")
00224 EMPCFBOTH("start_research", start_research, float, NSC_FLOAT, KM_INTERNAL,
00225 "Starting research for new countries")
00226 EMPCFBOTH("start_edu", start_education, float, NSC_FLOAT, KM_INTERNAL,
00227 "Starting education for new countries")
00228 EMPCFBOTH("level_age_rate", level_age_rate, float, NSC_FLOAT, 0,
00229 "ETU rate at which tech decays (0 -> no decline)")
00230 EMPCFBOTH("tech_log_base", tech_log_base, float, NSC_FLOAT, 0,
00231 "Log base to apply to tech breakthroughs above the easy tech level")
00232 EMPCFBOTH("ally_factor", ally_factor, float, NSC_FLOAT, 0,
00233 "Shared tech with allies (1 / ally_factor)")
00234 EMPCFBOTH("edu_avg", edu_avg, float, NSC_FLOAT, 0,
00235 "Number of ETUs education is averaged over")
00236 EMPCFBOTH("hap_avg", hap_avg, float, NSC_FLOAT, 0,
00237 "Number of ETUs happiness is averaged over")
00238 EMPCFBOTH("edu_cons", edu_cons, double, NSC_DOUBLE, 0,
00239 "Education consumption (1 breakthrough per edu_cons)")
00240 EMPCFBOTH("hap_cons", hap_cons, double, NSC_DOUBLE, 0,
00241 "Happiness consumption (1 breakthrough per hap_cons)")
00242
00243 EMPCF_COMMENT("\n\n### Sectors")
00244 EMPCFBOTH("startmob", startmob, int, NSC_INT, KM_INTERNAL,
00245 "Starting mobility for sanctuaries")
00246 EMPCFBOTH("sect_mob_scale", sect_mob_scale, float, NSC_FLOAT, 0,
00247 "Sector mobility accumulation per ETU")
00248 EMPCFBOTH("sect_mob_max", sect_mob_max, int, NSC_INT, 0,
00249 "Maximum mobility for sectors")
00250 EMPCFBOTH("buil_bh", buil_bh, int, NSC_INT, 0,
00251 "Number of hcms required to build a bridge span")
00252 EMPCFBOTH("buil_bc", buil_bc, double, NSC_DOUBLE, 0,
00253 "Cash required to build a bridge span")
00254 EMPCFBOTH("buil_bt", buil_bt, double, NSC_DOUBLE, 0,
00255 "Technology required to build a bridge span")
00256 EMPCFBOTH("buil_tower_bh", buil_tower_bh, int, NSC_INT, 0,
00257 "Number of hcms required to build a bridge tower")
00258 EMPCFBOTH("buil_tower_bc", buil_tower_bc, double, NSC_DOUBLE, 0,
00259 "Cash required to build a bridge tower")
00260 EMPCFBOTH("buil_tower_bt", buil_tower_bt, double, NSC_DOUBLE, 0,
00261 "Technology required to build a bridge tower")
00262
00263 EMPCF_COMMENT("\n\n### Land Units")
00264 EMPCFBOTH("land_mob_scale", land_mob_scale, float, NSC_FLOAT, 0,
00265 "Land unit mobility accumulation per ETU")
00266 EMPCFBOTH("land_grow_scale", land_grow_scale, float, NSC_FLOAT, 0,
00267 "How fast efficiency grows for land units, per ETU")
00268 EMPCFBOTH("land_mob_max", land_mob_max, int, NSC_INT, 0,
00269 "Maximum mobility for land units")
00270 EMPCFBOTH("money_land", money_land, double, NSC_DOUBLE, 0,
00271 "Cost per ETU to maintain land units (percentage of unit price)")
00272 EMPCFBOTH("morale_base", morale_base, int, NSC_INT, KM_INTERNAL,
00273 "Base level for setting morale of land units")
00274
00275 EMPCF_COMMENT("\n\n### Planes")
00276 EMPCFBOTH("plane_mob_scale", plane_mob_scale, float, NSC_FLOAT, 0,
00277 "Plane mobility accumulation per ETU")
00278 EMPCFBOTH("plane_grow_scale", plane_grow_scale, float, NSC_FLOAT, 0,
00279 "How fast efficiency grows for planes each update, per ETU")
00280 EMPCFBOTH("plane_mob_max", plane_mob_max, int, NSC_INT, 0,
00281 "Maximum mobility for planes")
00282 EMPCFBOTH("money_plane", money_plane, double, NSC_DOUBLE, 0,
00283 "Cost per ETU to maintain planes (percentage of plane price)")
00284
00285 EMPCF_COMMENT("\n\n### Ships")
00286 EMPCFBOTH("ship_mob_scale", ship_mob_scale, float, NSC_FLOAT, 0,
00287 "Ship mobility accumulation per ETU")
00288 EMPCFBOTH("ship_grow_scale", ship_grow_scale, float, NSC_FLOAT, 0,
00289 "How fast efficiency grows for ships each update, per ETU")
00290 EMPCFBOTH("ship_mob_max", ship_mob_max, int, NSC_INT, 0,
00291 "Maximum mobility for ships")
00292 EMPCFBOTH("money_ship", money_ship, double, NSC_DOUBLE, 0,
00293 "Cost per ETU to maintain ships (percentage of ship price)")
00294 EMPCFBOTH("torpedo_damage", torpedo_damage, int, NSC_INT, 0,
00295 "Torpedo damage (damage is X + 1dX + 1dX)")
00296
00297 EMPCF_COMMENT("\n\n### Combat/Damage")
00298 EMPCFBOTH("fort_max_interdiction_range", fort_max_interdiction_range, int, NSC_INT, 0,
00299 "Maximum range (in sectors) a fort will try to interdict another country")
00300 EMPCFBOTH("land_max_interdiction_range", land_max_interdiction_range, int, NSC_INT, 0,
00301 "Maximum range (in sectors) a land unit will try to interdict another country")
00302 EMPCFBOTH("ship_max_interdiction_range", ship_max_interdiction_range, int, NSC_INT, 0,
00303 "Maximum range (in sectors) a ship will try to interdict another country")
00304 EMPCFBOTH("flakscale", flakscale, float, NSC_FLOAT, 0,
00305 "Scale factor for flak damage")
00306 EMPCFBOTH("combat_mob", combat_mob, double, NSC_DOUBLE, 0,
00307 "How much mobility do units spend for combat (* casualties/bodies)")
00308 EMPCFBOTH("people_damage", people_damage, double, NSC_DOUBLE, 0,
00309 "People take this amount of normal damage")
00310 EMPCFBOTH("unit_damage", unit_damage, double, NSC_DOUBLE, 0,
00311 "Land units take this amount of normal damage")
00312 EMPCFBOTH("collateral_dam", collateral_dam, double, NSC_DOUBLE, 0,
00313 "Side effect damage amount done to sector")
00314 EMPCFBOTH("assault_penalty", assault_penalty, double, NSC_DOUBLE, 0,
00315 "Amount of normal attacking efficiency for paratroopers and assaulting")
00316 EMPCFBOTH("fire_range_factor", fire_range_factor, float, NSC_FLOAT, 0,
00317 "Scale normal firing ranges by this amount")
00318 EMPCFBOTH("sect_mob_neg_factor", sect_mob_neg_factor, int, NSC_INT, 0,
00319 "Initial mobility for MOB_ACCESS (etu_per_update / sect_mob_neg_factor)")
00320 EMPCF_COMMENT("# Applies to sector takeover, ship build, plane or land unit build or trade")
00321 EMPCFBOTH("mission_mob_cost", mission_mob_cost, double, NSC_DOUBLE, 0,
00322 "Cost to put something on a mission (percentage of max mob)")
00323
00324 EMPCF_COMMENT("\n\n### Populace")
00325 EMPCFBOTH("uwbrate", uwbrate, double, NSC_DOUBLE, 0,
00326 "Birth rate for uw's")
00327 EMPCFBOTH("money_civ", money_civ, double, NSC_DOUBLE, 0,
00328 "Money gained from taxes on a civilian in one ETU")
00329 EMPCFBOTH("money_mil", money_mil, double, NSC_DOUBLE, 0,
00330 "Money gained from taxes on an active soldier in one ETU")
00331 EMPCFBOTH("money_res", money_res, double, NSC_DOUBLE, 0,
00332 "Money gained from taxes on a soldier on active reserve in one ETU")
00333 EMPCFBOTH("money_uw", money_uw, double, NSC_DOUBLE, 0,
00334 "Money gained from taxes on an uncompensated worker in one ETU")
00335 EMPCFBOTH("babyeat", babyeat, double, NSC_DOUBLE, 0,
00336 "Amount of food to mature 1 baby into a civilian")
00337 EMPCFBOTH("bankint", bankint, double, NSC_DOUBLE, 0,
00338 "Bank dollar gain (per bar per etu)")
00339 EMPCFBOTH("eatrate", eatrate, double, NSC_DOUBLE, 0,
00340 "Food eating rate for mature people")
00341 EMPCFBOTH("fcrate", fcrate, double, NSC_DOUBLE, 0,
00342 "Food cultivation rate (* workforce in sector)")
00343 EMPCFBOTH("fgrate", fgrate, double, NSC_DOUBLE, 0,
00344 "Food growth rate (* fertility of sector)")
00345 EMPCFBOTH("obrate", obrate, double, NSC_DOUBLE, 0,
00346 "Civilian birth rate")
00347 EMPCFBOTH("rollover_avail_max", rollover_avail_max, int, NSC_INT, 0,
00348 "Maximum avail that can roll over an update")
00349
00350 EMPCF_COMMENT("\n\n### Nukes")
00351 EMPCFBOTH("decay_per_etu", decay_per_etu, double, NSC_DOUBLE, 0,
00352 "Decay of fallout per ETU")
00353 EMPCFBOTH("fallout_spread", fallout_spread, double, NSC_DOUBLE, 0,
00354 "Amount of fallout that leaks into surrounding sectors")
00355 EMPCFBOTH("drnuke_const", drnuke_const, float, NSC_FLOAT, 0,
00356 "Amount of research to tech needed to build a nuke, a common value is 0.33")
00357
00358 EMPCF_COMMENT("\n\n### Market/Trade")
00359 EMPCFBOTH("MARK_DELAY", MARK_DELAY, int, NSC_INT, 0,
00360 "Number of seconds commodities stay on the market for bidding")
00361 EMPCFBOTH("TRADE_DELAY", TRADE_DELAY, int, NSC_INT, 0,
00362 "Number of seconds ships, planes, and units stay on the market for bidding")
00363 EMPCFBOTH("buytax", buytax, double, NSC_DOUBLE, 0,
00364 "Tax (in percentage points) charged to the buyer on market purchases")
00365 EMPCFBOTH("tradetax", tradetax, double, NSC_DOUBLE, 0,
00366 "Amount of a trade transaction the seller makes (the rest is tax)")
00367
00368 EMPCF_COMMENT("\n\n### Trade ships")
00369 EMPCFBOTH("trade_1_dist", trade_1_dist, int, NSC_INT, 0,
00370 "Less than this distance no money for cashing in")
00371 EMPCFBOTH("trade_2_dist", trade_2_dist, int, NSC_INT, 0,
00372 "Less than this distance gets trade_1 money for cashing in")
00373 EMPCFBOTH("trade_3_dist", trade_3_dist, int, NSC_INT, 0,
00374 "Less than this distance gets trade_2 money for cashing in (>= gets trade_3")
00375 EMPCFBOTH("trade_1", trade_1, float, NSC_FLOAT, 0,
00376 "Return per sector on trade_1 distance amount")
00377 EMPCFBOTH("trade_2", trade_2, float, NSC_FLOAT, 0,
00378 "Return per sector on trade_2 distance amount")
00379 EMPCFBOTH("trade_3", trade_3, float, NSC_FLOAT, 0,
00380 "Return per sector on trade_3 distance amount")
00381 EMPCFBOTH("trade_ally_bonus", trade_ally_bonus, float, NSC_FLOAT, 0,
00382 "Bonus you get for cashing in with an ally")
00383 EMPCFBOTH("trade_ally_cut", trade_ally_cut, float, NSC_FLOAT, 0,
00384 "Bonus your ally gets for you cashing in with them")
00385
00386 EMPCF_COMMENT("\n\n### Misc.")
00387 EMPCFBOTH("disabled_commands", disabled_commands, char *, NSC_STRING, KM_INTERNAL,
00388 "Disabled commands, separated by space")
00389 EMPCFBOTH("anno_keep_days", anno_keep_days, int, NSC_INT, KM_INTERNAL,
00390 "How long until announcements expire (<0 means never)")
00391 EMPCFBOTH("news_keep_days", news_keep_days, int, NSC_INT, KM_INTERNAL,
00392 "How long until news expire")
00393 EMPCFBOTH("fuel_mult", fuel_mult, int, NSC_INT, 0,
00394 "Multiplier for fuel to mobility calculation")
00395 EMPCFBOTH("lost_items_timeout", lost_items_timeout, int, NSC_INT, KM_INTERNAL,
00396 "Seconds before a lost item is timed out of the database")
00397
00398
00399 EMPCFONLYC(NULL, emp_config_dummy, NULL, NSC_NOTYPE, 0, NULL)
00400
00401 #undef EMPCFONLYC
00402 #undef EMPCFBOTH
00403 #undef EMPCF_COMMENT