power: Saner power for items, ships, planes and land units

Items, ships, planes and land units all contribute to the power
factor, which determines position on the power chart.

Items are worth

    amount * item value * (0.5 + nation tech level / 1000.0)

The item values aren't quite right: producing stuff can *hurt* your
position on the power chart.  Food, uw and rads are worth nothng.

Reduce the value of oil, and give rads the same value as oil.  Tweak
value of iron and oil products so that production's power change is
roughly zero around p.e. 0.9 (tech 110), except for construction
materials, where it's zero at p.e. 0.5 (tech 0).  Construction
materials become less valuable, shells, guns and petrol become more
valuable.  Increase value of bars to roughly match the other changes.
It may still be too low.  Halve the value of civilians, and give the
other half to uw.  Results:

            old     new     change
    civ      100     50   / 2
    mil      100    100
    shell     80    125   * 1.5625
    gun      400    950   * 2.375
    pet        2      7   * 3.5
    iron      10     10
    dust     200    200
    bar     1000   2500   * 2.5
    food       0      0
    oil      100     50   / 2
    lcm      100     20   / 5
    hcm      200     40   / 5
    uw         0     50   new
    rad        0     50   new

Ships, planes and land units are worth

    base value * effic/100.0 * (0.5 + unit tech level / 1000.0)

For ships and land units, the base value is

    lcm/5.0 + hcm/5.0

Build cost is ignored, but lcms are valued twice as much "loose" ones
(before this commit).  Therefore, building stuff can change your
position on the power chart in both directions, depending on the type
of build.

For planes, the base value is

    20 * (0.5 + nation tech level / 1000.0)

Build cost and materials are ignored, and tech is squared.  This
is plainly absurd.

Unify to

    (power value of money and materials to build) * effic/100.0

This formula is chosen so that building stuff doesn't change your
power factor.  Bonus: it doesn't assume anything about possible build
materials.

For ships and land units, factoring in build cost overcompensates the
discounted value of construction materials more often than not.

Noteworthy changes for the stock game:

    ship type          old     new    change
    ss   slave ship     20     5.8    * 0.29    largest decrease
    cs   cargo ship     20     7.8    * 0.39
    ts   trade ship     60    25.5    * 0.42
    frg  frigate        12     7.8    * 0.65
    bb   battleship     24    21.8    * 0.91
    cal  light carrier  22    30.4    * 1.38
    can  nuc carrier    30    84.6    * 2.82    largest increase

    land unit type     old     new    change
    hat  hvy artillery  12     9.6    * 0.8     largest decrease
    linf light infantry  2.4   3.32   * 1.38
    cav  cavalry         3     5.4    * 1.8
    inf  infantry        3     5.4    * 1.8
    lar  lt armor        3     6.4    * 2.13
    com  commando        3    15.4    * 5.13
    eng  engineer        3    30.4    * 10.13
    meng mech engineer   3    45.4    * 15.13   largest increase

For planes, the power value change depends on the type.  Below a
certain nation tech level, planes of this type become more valuable,
above less.

For the stock game, planes costing at most $1000 become less valuable
at any nation tech level that can build them, and planes costing at
least $1800 become more valuable at any practical tech level,
i.e. under 400.  Noteworthy planes:

    plane type                 new
    sam  Sea Sparrow           2.1              least valuable
    f2   P-51 Mustang          4.34
    lb   TBD-1 Devastator      5.92
    jf1  F-4 Phantom          10.6
    tr   C-56 Lodestar        10.78
    jt   C-141 Starlifter     15.86
    jhb  B-52 Strato-Fortress 33.54
    ss   KH-7 spysat          41.2              most valuable

The old value is a flat 12 at nation tech level 100, 15 at tech level
250, and 18 at tech level 400.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2016-05-27 17:41:45 +02:00
parent 1307a3be6b
commit ea5c8a6598
Notes: Markus Armbruster 2017-08-14 20:30:51 +02:00
Partial fix for bug#133.
8 changed files with 276 additions and 256 deletions

View file

@ -11,20 +11,20 @@ The show command displays the detailed characteristics of items.
.NF
item power value sell lbs packing melt item
mnem in no wh ur bk deno name
c 100 1 no 1 1 10 10 10 10 4 civilians
c 50 1 no 1 1 10 10 10 10 4 civilians
m 100 0 yes 1 1 1 1 1 1 20 military
s 80 5 yes 1 1 1 10 1 1 80 shells
g 400 60 yes 10 1 1 10 1 1 100 guns
p 2 4 yes 1 1 1 10 1 1 50 petrol
s 125 5 yes 1 1 1 10 1 1 80 shells
g 950 60 yes 10 1 1 10 1 1 100 guns
p 7 4 yes 1 1 1 10 1 1 50 petrol
i 10 2 yes 1 1 1 10 1 1 100 iron ore
d 200 20 yes 5 1 1 10 1 1 100 dust (gold)
b 1000 280 yes 50 1 1 5 1 4 200 bars of gold
b 2500 280 yes 50 1 1 5 1 4 200 bars of gold
f 0 0 yes 1 1 1 10 1 1 2 food
o 100 8 yes 1 1 1 10 1 1 50 oil
l 100 2 yes 1 1 1 10 1 1 100 light products
h 200 4 yes 1 1 1 10 1 1 100 heavy products
u 0 1 yes 2 1 1 2 1 1 2 uncompensated workers
r 0 150 yes 8 1 1 10 1 1 1000 radioactive materials
o 50 8 yes 1 1 1 10 1 1 50 oil
l 20 2 yes 1 1 1 10 1 1 100 light products
h 40 4 yes 1 1 1 10 1 1 100 heavy products
u 50 1 yes 2 1 1 2 1 1 2 uncompensated workers
r 50 150 yes 8 1 1 10 1 1 1000 radioactive materials
.FI
.s1
The meaning of the headings are:

View file

@ -80,11 +80,8 @@ The power value of money is dollars / 100.
.s1
The power value of a sector is efficiency / 10.
.s1
The power value of a ship or land unit is (lcm cost / 10 + hcm cost +
10) * efficiency / 100 * 2.
.s1
The power value of a plane is 20 * efficiency / 100 * (20 + nation
tech level) / 500.
The power value of a ship, plane or land unit is the power value of
the materials and money needed to build * efficiency / 100.
.s1
The power value of commodities is amount * type factor. \*Qshow
item\*U shows the type factor in column \*Qpower\*U.