2 * Empire - A multi-player, client/server Internet based war game.
3 * Copyright (C) 1986-2005, 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 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.
28 * vers.c: Print out the Empire version
30 * Known contributors to this file:
49 static void show_opts(int val);
57 pr("Empire %d.%d.%d\n(KSU distribution %2.2f, Chainsaw version %2.2f, Wolfpack version %2.2f)\n\n", EMP_VERS_MAJOR, EMP_VERS_MINOR, EMP_VERS_PATCH, (float)KSU_DIST, (float)CHAINSAW_DIST, (float)WOLFPACK_DIST);
58 pr("The following parameters have been set for this game:\n");
59 pr("World size is %d by %d.\n", WORLD_X, WORLD_Y);
60 pr("There can be up to %d countries.\n", MAXNOC);
61 pr("By default, countries use %s coordinate system.\n",
62 (players_at_00) ? "the deity's" : "their own");
64 pr("An Empire time unit is %d second%s long.\n",
65 s_p_etu, s_p_etu != 1 ? "s" : "");
66 pr("Use the 'update' command to find out the time of the next update.\n");
67 pr("The current time is %19.19s.\n", ctime(&now));
68 pr("An update consists of %d empire time units.\n", etu_per_update);
69 pr("Each country is allowed to be logged in %d minutes a day.\n",
71 pr("It takes %.2f civilians to produce a BTU in one time unit.\n",
72 (1.0 / (btu_build_rate * 100.0)));
75 pr("A non-aggi, 100 fertility sector can grow %.2f food per etu.\n",
77 pr("1000 civilians will harvest %.1f food per etu.\n",
79 pr("1000 civilians will give birth to %.1f babies per etu.\n",
81 pr("1000 uncompensated workers will give birth to %.1f babies.\n",
83 pr("In one time unit, 1000 people eat %.1f units of food.\n",
85 pr("1000 babies eat %.1f units of food becoming adults.\n",
88 pr("No food is needed!\n");
92 pr("Banks pay $%.2f in interest per 1000 gold bars per etu.\n",
94 pr("1000 civilians generate $%.2f, uncompensated workers $%.2f each time unit.\n", 1000.0 * money_civ, 1000.0 * money_uw);
95 pr("1000 active military cost $%.2f, reserves cost $%.2f.\n",
96 -money_mil * 1000.0, -money_res * 1000.0);
97 if (rollover_avail_max)
98 pr("Up to %d avail can roll over an update.\n", rollover_avail_max);
100 pr("Declaring war will cost you $%i\n\n", War_Cost);
101 pr("Happiness p.e. requires 1 happy stroller per %d civ.\n",
102 (int)hap_cons / etu_per_update);
103 pr("Education p.e. requires 1 class of graduates per %d civ.\n",
104 (int)edu_cons / etu_per_update);
105 pr("Happiness is averaged over %d time units.\n", (int)hap_avg);
106 pr("Education is averaged over %d time units.\n", (int)edu_avg);
107 if (opt_ALL_BLEED == 0)
108 pr("The technology/research boost you get from your allies is %.2f%%.\n", 100.0 / ally_factor);
109 else /* ! ALL_BLEED */
110 pr("The technology/research boost you get from the world is %.2f%%.\n", 100.0 / ally_factor);
112 pr("Nation levels (tech etc.) decline 1%% every %d time units.\n",
113 (int)(level_age_rate));
115 pr("Tech Buildup is ");
116 if (tech_log_base <= 1.0) {
119 if (tech_log_base > 1.0) {
120 pr("limited to logarithmic growth (base %.2f)", tech_log_base);
121 if (easy_tech == 0.0)
124 pr(" after %0.2f.\n", easy_tech);
127 pr("\t\t\t\tSectors\tShips\tPlanes\tUnits\n");
128 pr("Maximum mobility\t\t%d\t%d\t%d\t%d\n", sect_mob_max,
129 ship_mob_max, plane_mob_max, land_mob_max);
130 pr("Max mob gain per update\t\t%d\t%d\t%d\t%d\n",
131 (int)(sect_mob_scale * (float)etu_per_update),
132 (int)(ship_mob_scale * (float)etu_per_update),
133 (int)(plane_mob_scale * (float)etu_per_update),
134 (int)(land_mob_scale * (float)etu_per_update));
135 pr("Max eff gain per update\t\t--\t%d\t%d\t%d\n",
136 min((int)(ship_grow_scale * (float)etu_per_update), 100),
137 min((int)(plane_grow_scale * (float)etu_per_update), 100),
138 min((int)(land_grow_scale * (float)etu_per_update), 100));
140 pr("Ships on autonavigation may use %i cargo holds per ship.\n", TMAX);
141 if (opt_TRADESHIPS) {
142 pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n", trade_1_dist, (float)(trade_1 * 100.0));
143 pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n", trade_2_dist, (float)(trade_2 * 100.0));
144 pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n", trade_3_dist, (float)(trade_3 * 100.0));
145 pr("Cashing in trade-ships with an ally nets you a %.1f%% bonus.\n", trade_ally_bonus * 100.0);
146 pr("Cashing in trade-ships with an ally nets your ally a %.1f%% bonus.\n\n", trade_ally_cut * 100.0);
149 pr("The tax you pay on selling things on the trading block is %.1f%%\n", (1.00 - tradetax) * 100.0);
150 pr("The tax you pay on buying commodities on the market is %.1f%%\n\n", (buytax - 1.00) * 100.0);
153 if (!ef_nelem(EF_NUKE_CHR))
154 pr("Nukes are disabled.\n");
155 else if (opt_DRNUKE) { /* NUKES && DRNUKE enabled */
156 pr("In order to build a nuke, you need %1.2f times the tech level in research\n", drnuke_const);
157 pr("\tExample: In order to build a 300 tech nuke, you need %d research\n\n", (int)(300.0 * drnuke_const));
160 pr("Fire ranges are scaled by %.2f\n", fire_range_factor);
162 pr("\nOptions enabled in this game:\n ");
164 pr("\n\nOptions disabled in this game:\n ");
166 pr("\n\nSee \"info Options\" for a detailed list of options and descriptions.");
168 pr("The person to annoy if something goes wrong is:\n\t%s\n\t(%s).\n",
170 pr("You can get your own copy of the source %s\n", GET_SOURCE);
180 struct option_list *op;
184 for (op = Options; op->opt_key; op++) {
185 if (!*op->opt_valuep != !val)
188 col += strlen(sep) + strlen(op->opt_key);
192 col = strlen(op->opt_key);
194 pr("%s%s", sep, op->opt_key);
199 * OBSOLETE: Ships used to be printed differently depending on
200 * option SHIPNAMES. Clients had to know whether SHIPNAMES was on
201 * to parse this. To ease the transition, pretend the option
205 col += strlen(sep) + 9;
210 pr("%sSHIPNAMES", sep);