New show product
This is the human-readable buddy of xdump product, which dumps pchr[]. It duplicates much of the information in show sect c, but in more accessible form. It's in show_product(). Remove product information from info Quick-ref. show reflects the actual game, is more complete, and should be just as readable.
This commit is contained in:
parent
ae8c4620b0
commit
71bbd642df
7 changed files with 101 additions and 136 deletions
|
@ -652,6 +652,7 @@ extern void show_sect_stats(int);
|
||||||
extern void show_sect_capab(int);
|
extern void show_sect_capab(int);
|
||||||
extern void show_item(int);
|
extern void show_item(int);
|
||||||
extern void show_news(int);
|
extern void show_news(int);
|
||||||
|
extern void show_product(int);
|
||||||
extern void show_updates(int);
|
extern void show_updates(int);
|
||||||
/* shpsub.c */
|
/* shpsub.c */
|
||||||
extern void shp_sel(struct nstr_item *, struct emp_qelem *);
|
extern void shp_sel(struct nstr_item *, struct emp_qelem *);
|
||||||
|
|
160
info/Products.t
160
info/Products.t
|
@ -8,121 +8,65 @@ Some of those products may, in turn,
|
||||||
be considered raw materials for other industries
|
be considered raw materials for other industries
|
||||||
which produce other products.
|
which produce other products.
|
||||||
.s1
|
.s1
|
||||||
This table gives the constituents and costs for each type of product.
|
The show command displays characteristics of products:
|
||||||
.s1
|
.s1
|
||||||
All costs given in the table are for 100% production efficiency.
|
.EX show product
|
||||||
Many processes depend on technology level
|
.NF
|
||||||
or educational level of the country;
|
product cost raw materials reso dep level p.e.
|
||||||
a note like \*Qp.e.=(tlev+10)/(tlev+20)\*U means
|
iron i $0 min 0 1.0
|
||||||
that a country with a technology level of 0
|
dust d $0 gold 20 1.0
|
||||||
has a production efficiency of 50%
|
food f $0 fert 0 (tech+10)/(tech+20)
|
||||||
and will only produce one-half of the specified product amount
|
oil o $0 ocont 10 (tech+10)/(tech+20)
|
||||||
for the given costs,
|
rad r $2 uran 35 (tech-40)/(tech-30)
|
||||||
whereas a country with a technology level of 100
|
shells s $3 2l 1h (tech-20)/(tech-10)
|
||||||
will have a production efficiency of 92%.
|
guns g $30 1o 5l 10h (tech-20)/(tech-10)
|
||||||
|
petrol p $1 1o (tech-20)/(tech-10)
|
||||||
|
bars b $10 5d 1.0
|
||||||
|
lcm l $0 1i (tech+10)/(tech+20)
|
||||||
|
hcm h $0 2i (tech+10)/(tech+20)
|
||||||
|
tech $300 1d 5o 10l (educ-5)/(educ+5)
|
||||||
|
medical $90 1d 5o 10l (educ-5)/(educ+5)
|
||||||
|
edu $9 1l 1.0
|
||||||
|
happy $9 1l 1.0
|
||||||
|
.FI
|
||||||
.s1
|
.s1
|
||||||
In addition, some sectors don't produce raw materials as well as others,
|
The columns are:
|
||||||
and some produce much better than others. Use the "show sector capabilities"
|
.in \w'raw materials\0\0'u
|
||||||
command to see production efficiencies and other useful information on
|
.L product
|
||||||
producing sectors.
|
The name of the product and the one-letter mnemonic of the commodity
|
||||||
|
made, if any.
|
||||||
|
.L cost
|
||||||
|
Cost per unit of production.
|
||||||
|
.L "raw materials"
|
||||||
|
Raw materials for one unit of production.
|
||||||
|
.L "reso dep"
|
||||||
|
Natural resource exploited, and its rate of depletion.
|
||||||
|
.L "level p.e."
|
||||||
|
Level production efficiency, for 100% sector type production
|
||||||
|
efficiency
|
||||||
|
.in
|
||||||
.s1
|
.s1
|
||||||
The rate at which constituents can be turned into products
|
How much a sector can produce
|
||||||
is governed by the amount of \*Qwork\*U performed by its populace,
|
is governed by the amount of \*Qwork\*U performed by its populace,
|
||||||
divided by the units of constituents
|
divided by the amount of raw materials
|
||||||
per unit of product.
|
per unit of production.
|
||||||
E.g., it takes 3 units of \*Qwork\*U to produce 1 shell;
|
E.g., it takes 3 units of \*Qwork\*U to produce 1 shell;
|
||||||
2 units to incorporate the light construction materials
|
2 units to incorporate the light construction materials
|
||||||
and 1 unit for the heavy.
|
and 1 unit for the heavy.
|
||||||
\*QNatural resources\*U such as fertility
|
Mining a \*Qnatural resource\*U such as fertility
|
||||||
count as one unit of constituents;
|
takes one unit of work;
|
||||||
e.g., it takes 1 unit of work per unit of food produced.
|
e.g., it takes 1 unit of work per unit of food produced.
|
||||||
.s1
|
.s1
|
||||||
.in \w'technology\0\0'u
|
How many products each unit of production makes depends on the level
|
||||||
.L shells
|
production efficiency, which is the product's level p.e. (shown by
|
||||||
Shell production efficiency depends on technology level;
|
"show product") times the sector type's p.e. (shown by "show sect
|
||||||
p.e.=(tlev-20)/(tlev-10)
|
stats"). Production requires a level p.e. above zero, obviously.
|
||||||
Shells cost $3 each to manufacture.
|
|
||||||
Each requires 2 units of light construction materials
|
|
||||||
and 1 unit of heavy construction materials.
|
|
||||||
You must have a minimum technology of 20 to produce shells.
|
|
||||||
.L guns
|
|
||||||
Gun production depends on technology level;
|
|
||||||
p.e.=(tlev-20)/(tlev-10)
|
|
||||||
Guns cost $30 each to manufacture.
|
|
||||||
Each requires 5 units of light construction materials,
|
|
||||||
10 units of heavy construction materials,
|
|
||||||
and 1 unit of oil.
|
|
||||||
You must have a minimum technology of 20 to produce guns.
|
|
||||||
.L iron
|
|
||||||
Iron ore production depends on the mine's mineral richness.
|
|
||||||
Extracting iron ore is free,
|
|
||||||
and doesn't deplete the sector's mineral richness.
|
|
||||||
.L dust
|
|
||||||
Gold dust production depends on the mine's gold richness.
|
|
||||||
Extracting gold dust is free,
|
|
||||||
but depletes the sector's gold richness.
|
|
||||||
.L bars
|
|
||||||
Gold bars cost $10 to produce and require 5 units of gold dust each.
|
|
||||||
.L food
|
|
||||||
Food production efficiency depends on technology level
|
|
||||||
and the fertility of the sector;
|
|
||||||
p.e.=(tlev+10)/(tlev+20).
|
|
||||||
Growing food is free,
|
|
||||||
and doesn't deplete the sector's fertility.
|
|
||||||
.L oil
|
|
||||||
Oil production efficiency depends on technology level
|
|
||||||
and the oil content of the sector;
|
|
||||||
p.e.=(tlev+10)/(tlev+20).
|
|
||||||
Pumping oil is free,
|
|
||||||
but depletes the sector's oil content.
|
|
||||||
.L petrol
|
|
||||||
Petrol production depends on technology level;
|
|
||||||
p.e.=(tlev-20)/(tlev-10).
|
|
||||||
A unit of petrol costs $1 to manufacture.
|
|
||||||
Every 10 units of petrol require 1 unit of oil to produce.
|
|
||||||
You must have a minimum technology of 20 to produce petrol.
|
|
||||||
.L lcm
|
|
||||||
Light construction material production efficiency
|
|
||||||
depends on technology level;
|
|
||||||
p.e.=(tlev+10)/(tlev+20).
|
|
||||||
Producing lcms does not cost money, but requires 1 unit of iron ore.
|
|
||||||
.L hcm
|
|
||||||
Heavy construction material production efficiency
|
|
||||||
depends on technology level;
|
|
||||||
p.e.=(tlev+10)/(tlev+20).
|
|
||||||
Producing hcms does not cost money, but requires 2 unit of iron ore.
|
|
||||||
.L rad
|
|
||||||
Radioactive material production efficiency depends on technology level,
|
|
||||||
which must be at least 40.
|
|
||||||
p.e.=(tlev-40)/(tlev-30).
|
|
||||||
Producing rads cost $2 per ton,
|
|
||||||
and depletes the uranium content of the sector.
|
|
||||||
.L education
|
|
||||||
A unit of education (a \*Qclass of graduates\*U),
|
|
||||||
costs $10 to produce and requires 1 unit
|
|
||||||
of light construction materials (see "info Education").
|
|
||||||
.L happiness
|
|
||||||
A unit of happiness (\*Qhappy strollers\*U),
|
|
||||||
costs $10 to produce and requires 1 unit
|
|
||||||
of light construction materials (see "info Happiness").
|
|
||||||
.L technology
|
|
||||||
Technology production efficiency depends on education level;
|
|
||||||
p.e.=(elev-5)/(elev+5).
|
|
||||||
A unit of technology (a \*Qtechnological breakthrough\*U),
|
|
||||||
costs $5 times the number of ETUs per update
|
|
||||||
to produce, and requires 10 units
|
|
||||||
of light construction materials,
|
|
||||||
5 units of oil and 1 unit of gold dust. For more details about how
|
|
||||||
technology level is calculated from technology units, see "info Technology".
|
|
||||||
.L research
|
|
||||||
Research production efficiency depends on education level;
|
|
||||||
p.e.=(elev-5)/(elev+5).
|
|
||||||
A unit of research (a \*Qmedical discovery\*U),
|
|
||||||
costs $90 to produce and requires 10 units
|
|
||||||
of light construction materials,
|
|
||||||
5 units of oil and 1 unit of gold dust (see "info Research").
|
|
||||||
.s1
|
.s1
|
||||||
Note that the resource depletion documented above can be customized by
|
Say your country is at tech level 25. Then your agribusinesses' level
|
||||||
the deity.
|
p.e. is (25+10)/(25+20) * 900% = 7, i.e. they'll make 7 food per unit
|
||||||
.in
|
of production. Your shell industries' level p.e. is only
|
||||||
.SA "Producing, Updates"
|
(25-20)/(25-10) * 100% = 1/3, i.e. they'll make 1 shell per three
|
||||||
|
units of production. Your uranium mines can't produce at all, because
|
||||||
|
their level p.e. is negative.
|
||||||
|
.s1
|
||||||
|
.SA "Producing, Updates, Item-types"
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
.TH Concept "Quick Reference Card"
|
.TH Concept "Quick Reference Card"
|
||||||
.NA Quick-ref "A quick reference card for sector types and production"
|
.NA Quick-ref "A quick reference card for sector types"
|
||||||
.LV Basic
|
.LV Basic
|
||||||
.NF
|
.NF
|
||||||
|
|
||||||
Sector-types:
|
Sector-types:
|
||||||
BASICS INDUSTRIES MILITARY / SCIENTIFIC
|
BASICS INDUSTRIES MILITARY / SCIENTIFIC
|
||||||
. sea d defense plant t technical center
|
. sea d defense plant t technical center
|
||||||
|
@ -18,25 +17,5 @@ Sector-types:
|
||||||
j light manufacturing
|
j light manufacturing
|
||||||
# bridge head k heavy manufacturing
|
# bridge head k heavy manufacturing
|
||||||
= bridge span % refinery
|
= bridge span % refinery
|
||||||
|
|
||||||
(Petrol is per 10 units; others per unit)
|
|
||||||
|
|
||||||
Products:
|
|
||||||
Item $ Lcm Hcm Iron Dust Oil Rad Tech Production Eff.
|
|
||||||
Shells: 3 2 1 0 0 0 0 20 (tech-20)/(tech-10)
|
|
||||||
Guns: 30 5 10 0 0 1 0 20 (tech-20)/(tech-10)
|
|
||||||
Iron: 0 0 0 0 0 0 0 0 0
|
|
||||||
Dust: 0 0 0 0 0 0 0 0 0
|
|
||||||
Bars: 10 0 0 0 5 0 0 0 0
|
|
||||||
Food: 0 0 0 0 0 0 0 0 (tech+10)/(tech+20)
|
|
||||||
Oil: 0 0 0 0 0 0 0 0 (tech+10)/(tech+20)
|
|
||||||
Petrol 1 0 0 0 0 1 0 20 (tech-20)/(tech-10)
|
|
||||||
Lcm: 0 0 0 1 0 0 0 0 (tech+10)/(tech+20)
|
|
||||||
Hcm: 0 0 0 2 0 0 0 0 (tech+10)/(tech+20)
|
|
||||||
Rad: 2 0 0 0 0 0 0 40 (tech-40)/(tech-30)
|
|
||||||
Educate: 9 1 0 0 0 0 0 0 0
|
|
||||||
Happy: 9 1 0 0 0 0 0 0 0
|
|
||||||
Tech: 5*ETUS 10 0 0 1 5 0 0 (edu-5)/(edu+5)
|
|
||||||
Resrch: 90 10 0 0 1 5 0 0 (edu-5)/(edu+5)
|
|
||||||
.FI
|
.FI
|
||||||
.SA "Sectors, Producing"
|
.SA "Sectors"
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
.NA show "Characteristics of sectors, units, updates and more"
|
.NA show "Characteristics of sectors, units, updates and more"
|
||||||
.LV Basic
|
.LV Basic
|
||||||
.SY "show <land|nuke|plane|sector|ship> [b|s|c] [tech]"
|
.SY "show <land|nuke|plane|sector|ship> [b|s|c] [tech]"
|
||||||
.SY "show <bridge|item|news|tower>"
|
.SY "show <bridge|item|news|product|tower>"
|
||||||
.SY "show <updates> [number]"
|
.SY "show <updates> [number]"
|
||||||
The show command shows characteristics of sectors, units (ships,
|
The show command shows characteristics of sectors, units (ships,
|
||||||
planes, land units and nukes), bridges (spans and towers), items and
|
planes, land units and nukes), bridges (spans and towers), items, news
|
||||||
news, as well as information on updates.
|
and products, as well as information on updates.
|
||||||
.s1
|
.s1
|
||||||
Characteristics are more fully described in separate info
|
Characteristics are more fully described in separate info
|
||||||
pages (Ship-types, Nuke-types, etc.).
|
pages (Ship-types, Nuke-types, etc.).
|
||||||
|
@ -36,4 +36,4 @@ Printing for tech level '325'
|
||||||
75kt fusion 3 90 3 320 106 $ 20000
|
75kt fusion 3 90 3 320 106 $ 20000
|
||||||
.FI
|
.FI
|
||||||
.s1
|
.s1
|
||||||
.SA "Ship-types, Nuke-types, Plane-types, Unit-types, Sector-types, Ships, Planes, LandUnits, Nukes, Bridges, Item-types, newspaper, Updates"
|
.SA "Ship-types, Nuke-types, Plane-types, Unit-types, Sector-types, Ships, Planes, LandUnits, Nukes, Bridges, Item-types, Products, newspaper, Updates"
|
||||||
|
|
|
@ -98,6 +98,10 @@ show(void)
|
||||||
cfunc = show_land_capab;
|
cfunc = show_land_capab;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
|
if (p[1] == 'r') {
|
||||||
|
show_product(99999);
|
||||||
|
return RET_OK;
|
||||||
|
}
|
||||||
bfunc = show_plane_build;
|
bfunc = show_plane_build;
|
||||||
sfunc = show_plane_stats;
|
sfunc = show_plane_stats;
|
||||||
cfunc = show_plane_capab;
|
cfunc = show_plane_capab;
|
||||||
|
|
|
@ -230,7 +230,7 @@ struct cmndstr player_coms[] = {
|
||||||
{"ship <SHIPS>", 0, shi, 0, NORM},
|
{"ship <SHIPS>", 0, shi, 0, NORM},
|
||||||
{"shoot <c|u> <SECTS> <NUMBER>", 3, shoo, C_MOD, NORM + MONEY + CAP},
|
{"shoot <c|u> <SECTS> <NUMBER>", 3, shoo, C_MOD, NORM + MONEY + CAP},
|
||||||
{"show <TYPE> <\"build\"|\"stats\"|\"cap\"> [<tech>]\n"
|
{"show <TYPE> <\"build\"|\"stats\"|\"cap\"> [<tech>]\n"
|
||||||
"\tshow <bridge|item|news|tower>\n"
|
"\tshow <bridge|item|news|product|tower>\n"
|
||||||
"\tshow updates [<NUM>]>",
|
"\tshow updates [<NUM>]>",
|
||||||
0, show, 0, VIS},
|
0, show, 0, VIS},
|
||||||
{"shutdown <minutes> <disable update?>", 0, shut, 0, GOD},
|
{"shutdown <minutes> <disable update?>", 0, shut, 0, GOD},
|
||||||
|
|
|
@ -597,6 +597,43 @@ show_item(int tlev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
show_product(int tlev)
|
||||||
|
{
|
||||||
|
struct pchrstr *pp;
|
||||||
|
int i;
|
||||||
|
char *lev;
|
||||||
|
|
||||||
|
pr("product cost raw materials reso dep level p.e.\n");
|
||||||
|
|
||||||
|
for (pp = pchr; pp->p_sname; pp++) {
|
||||||
|
pr("%7.7s %c $%-3d ",
|
||||||
|
pp->p_sname,
|
||||||
|
pp->p_type < 0 ? ' ' : ichr[pp->p_type].i_mnem,
|
||||||
|
pp->p_cost);
|
||||||
|
(void)CANT_HAPPEN(MAXPRCON > 3); /* output has only three columns */
|
||||||
|
for (i = 0; i < 3; i++) {
|
||||||
|
if (i < MAXPRCON && pp->p_camt[i]
|
||||||
|
&& pp->p_ctype[i] > I_NONE && pp->p_ctype[i] <= I_MAX)
|
||||||
|
pr(" %2d%c", pp->p_camt[i], ichr[pp->p_ctype[i]].i_mnem);
|
||||||
|
else
|
||||||
|
pr(" ");
|
||||||
|
}
|
||||||
|
if (pp->p_nrndx)
|
||||||
|
pr(" %5.5s %3d ",
|
||||||
|
symbol_by_value(pp->p_nrndx, resources), pp->p_nrdep);
|
||||||
|
else
|
||||||
|
pr(" ");
|
||||||
|
if (pp->p_nlndx < 0)
|
||||||
|
pr("1.0\n");
|
||||||
|
else {
|
||||||
|
lev = symbol_by_value(pp->p_nlndx, level);
|
||||||
|
pr("(%.4s%+d)/(%.4s%+d)\n",
|
||||||
|
lev, -pp->p_nlmin, lev, pp->p_nllag - pp->p_nlmin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
show_news(int tlev)
|
show_news(int tlev)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue