]> git.pond.sub.org Git - empserver/commitdiff
power: Make item power value configurable
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 27 May 2016 19:18:47 +0000 (21:18 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 17:59:45 +0000 (19:59 +0200)
Custom games may want to tweak how items contribute to the power
factor, in particular when products are also customized.  Add ichrstr
member i_power and item selector power for that.

"info power" doesn't reflect this change, yet.  It'll be updated in
the next commit.

The current item power values are problematic.  This will be addressed
later.

For straightforward configurations, reasonable item power values could
perhaps be derived from the configuration automatically.  However,
this is surprisingly hard in the general case: since producing things
should not decrease power, the efficiency of processing products into
other products needs to be considered, and estimating these
efficiencies can be difficult.

Deities can create multiple products making the same item, or multiple
sector types with the same product, but different process efficiency
(sect-chr selector peffic).  Providing differently efficient ways to
make the same item can be reasonable when the sector types involved
have different terrain.  To average them, you'd need to know the map.

The stock game has one example: gold mines produce dust with 100%
process efficiency, mountains produce it with 75%.  Mountains are
normally rare enough not to matter.

Level p.e. (product selectors nlmin, nllag) may have to be considered.
In the stock game, level p.e. variations are minor, because it reaches
0.9 pretty quickly.  In games where it doesn't, you might have to
increase the power value of the product.

Resources (sect selectors min, gold, fert, ocontent, uran) and
resource depletion (product selectors nrndx and nrdep) further
complicate things: you might want to increase the power value of
products depending on unusually scarce resources, but you can't know
what's scarce without understanding the map.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>

No differences found