Buy unit/building/wonder price

SWY

Prince
Joined
Oct 3, 2014
Messages
330
Location
The Netherlands
Hi! So, I've been implementing buying and selling production items in cities into CivOne. I realized way too late how the prices are calulated. Here's the explanation:

{price} = {number of shields} / 10

Unit gold price
({price} + 4) * 10 * {price}

Building gold price
{price} * 40

Building selling price
{price} * 10

Wonder gold price
{price} * 80

These are the base prices, when no shields have been produced yet.
Now, I have not yet figured out how the gold price is calculated when the city has produced shields. Is it known how this works?
 
Buildings with any progress cost (remaining shields)×2
Wonders (remaining shields)×4

Units with progress are a cute little puzzle, i will check it out.
 
K.

Screwed around with excel some and the in-progress unit buy formula is basically half the original one.

Start with your first formula, except we will call them remaining shields.

x
= {remaining shields} / 10

buy price = 5x²+20x


...rounded down to the nearest whole number ofc.


One unintuitive thing is that the progress % doesn't matter. 9 Shields left on a militia unit? 5*.9^2 + 20*.9 = 22 Gold. 9 Shields left on a battleship? 22 Gold.
 
Back
Top Bottom