When does a building process expire?

Kark

Mad berserker
Joined
Jan 28, 2007
Messages
356
Location
Nidaros, Norway. Viking capital.
It's happend before, but now again. I was building Stonehenge and took a pause to get a settler or two. And suddenly, no Stonehenge in the building queue.
 
Someone else might have the specific math, but I believe after 10-15 turns (which may be affected by game speed) the hammers in unfinished builds will start to degrade. So leaving an item for too long without any new work on it will cause the hammers invested to decrease. You can avoid this by just working on it for a turn to refresh it after 10 turns or so.
 
Probably somebody else built it... it takes a very long time to lose hammers in a build que, and especially if you've got enough to be seriously taking a shot at a wonder... more likely then not, Stonehenge was built elsewhere, and you got the money from the production, but didn't notice the notification at the top of the screen.
 
<DefineName>BUILDING_PRODUCTION_DECAY_TIME</DefineName>
<iDefineIntVal>50</iDefineIntVal>
<DefineName>UNIT_PRODUCTION_DECAY_TIME</DefineName>
<iDefineIntVal>10</iDefineIntVal>

These values are in GlobalDefines.xml.
The other thing I found out just recently is that a single refresh turn and then switching back to something else does not prevent the spent hammers from decaying further. Once the decay starts you need to finish the item to avoid loss of hammers.
 
It's happend before, but now again. I was building Stonehenge and took a pause to get a settler or two. And suddenly, no Stonehenge in the building queue.

Once you start building Stonehenge, you don't stop until it's finished. It's a very popular Wonder in the game and someone will beat you to it if you pause. Especially for something that takes as long as a couple of Settlers.
 
Once you start building Stonehenge, you don't stop until it's finished. It's a very popular Wonder in the game and someone will beat you to it if you pause. Especially for something that takes as long as a couple of Settlers.
Exactly my point.... I'm sure it's not in his build cue because somebody else built it! Putting it in your que doesn't mean you get to keep it for all eternity! Somebody else will build it if you don't make it a priority!
 
<DefineName>BUILDING_PRODUCTION_DECAY_TIME</DefineName>
<iDefineIntVal>50</iDefineIntVal>
<DefineName>UNIT_PRODUCTION_DECAY_TIME</DefineName>
<iDefineIntVal>10</iDefineIntVal>
These values are in GlobalDefines.xml.
The other thing I found out just recently is that a single refresh turn and then switching back to something else does not prevent the spent hammers from decaying further. Once the decay starts you need to finish the item to avoid loss of hammers.

Interesting. The decay must be very slow (I've never measured it, or looked in the code for that bit, maybe ~1-2hammer a turn). I know at one point in my current game I've had 4 or more units alternated in the build queue, and the time to build never changed on them, and at least one or two of them must have been paused for more than 10 turns to get them all within 1 turn to build.
 
<DefineName>BUILDING_PRODUCTION_DECAY_TIME</DefineName>
<iDefineIntVal>50</iDefineIntVal>
<DefineName>UNIT_PRODUCTION_DECAY_TIME</DefineName>
<iDefineIntVal>10</iDefineIntVal>

I suppose this means the decay starts after 50 turns (when building Stonehenge).

Interesting. The decay must be very slow (I've never measured it, or looked in the code for that bit, maybe ~1-2hammer a turn). I know at one point in my current game I've had 4 or more units alternated in the build queue, and the time to build never changed on them, and at least one or two of them must have been paused for more than 10 turns to get them all within 1 turn to build.

But that's strange. I have to do some testing when the current game is finished.

And by the way: Nobody else built the Stonehenge.
 
Probably somebody else built it... it takes a very long time to lose hammers in a build que, and especially if you've got enough to be seriously taking a shot at a wonder... more likely then not, Stonehenge was built elsewhere, and you got the money from the production, but didn't notice the notification at the top of the screen.

I often start building Wonders in a city with no intention of completing them just for the :gold:. This can get you much needed :gold: early in the game.
 
I often start building Wonders in a city with no intention of completing them just for the :gold:. This can get you much needed :gold: early in the game.

That was my plan to - and the :gold: was lost. Maybe some locals got tired of waiting for the strange construction to be finished and used the stone for house building.
 
Ok, so the code says ( CvCity::doDecay() ):
Code:
[B]if (isHuman())[/B]
{
	if (getBuildingProductionTime((BuildingTypes)iI) > GC.getDefineINT("BUILDING_PRODUCTION_DECAY_TIME"))
	{
		setBuildingProduction(((BuildingTypes)iI), ((getBuildingProduction((BuildingTypes)iI) * GC.getDefineINT("BUILDING_PRODUCTION_DECAY_PERCENT")) / 100));
	}
}
for buildings (units the same)
with
<DefineName>BUILDING_PRODUCTION_DECAY_PERCENT</DefineName>
<iDefineIntVal>99</iDefineIntVal>
<DefineName>UNIT_PRODUCTION_DECAY_PERCENT</DefineName>
<iDefineIntVal>98</iDefineIntVal>
in GlobalDefines.xml

That means:
1. AI does not suffer from hammer decay! :mad:
2. Decaying buildings will lose at least 1% of invested hammers (1 hammer minimum)
3. Decaying units will lose at least 2% of invested hammers (1 hammer minimum)

"at least" because NewHammers = floor(OldHammers*0.98) for units
Counter is only reset when all hammers have disappeared --> no "refresh turns" :cry:
 
#1 is OK since I think the AI Almost NEVER stops producing something (it might in the case of a war.. but usually once it has started something it keepb building until it stops)



Finally regarding the OP
just because it is not in your queue (list of things on the bottom left of the city screen), doesn't mean you have lost the hammers
If it is still something you can build (box of pictures on the bottom middle of the city screen) then the hammers are still there
 
Finally regarding the OP
just because it is not in your queue (list of things on the bottom left of the city screen), doesn't mean you have lost the hammers
If it is still something you can build (box of pictures on the bottom middle of the city screen) then the hammers are still there
That's another thing too... if you build something 50% complete (say a Rifleman), then somehow remove it from your que (like order something else to be built without using the "SPACE" bar), the item may not be in your que, but the computer remembers the hammers completed.

In the above case, if you removed a 50% complete rifleman from your que, then several turns later ordered the city to produce a rifleman, you'd still have a 50% complete rifleman when you select it in your que.
 
Vote 5* :) This thread has been one of the more interesting/informative ones I've read in some time. And it hasn't broken down into bickering and point counterpointing heh.
 
That's another thing too... if you build something 50% complete (say a Rifleman), then somehow remove it from your que (like order something else to be built without using the "SPACE" bar), the item may not be in your que, but the computer remembers the hammers completed.

In the above case, if you removed a 50% complete rifleman from your que, then several turns later ordered the city to produce a rifleman, you'd still have a 50% complete rifleman when you select it in your que.

Just watch out not to discover Assembly Line in between--you won't be able to put the Rifleman back into the queue and its hammers will be lost. If you keep the 50% Rifleman in the queue, I think it will "auto-upgrade" in the queue and emerge there as a 30% Infantry...
 
Hammers put toward Wonders don't decay. Post a save and let people look at it.

Save 1: Turn 0, 4000 BC.
Starts building Stonehenge.

Turn 20.
Changes to building Settler.
Stonehenge (in queue) at 40 hammers.
Later: Starts building another Settler.

Save 2: Turn 72, 2920 BC.
Decay starts. Stonehenge (in queue) at 39 hammers.
Reduction 1 hammer pr turn from now on.

Save 3: Turn 70, 2950 BC.
Jumped some turns back, started building Stonehenge again.

Turn 80.
Changes to building Settler. Stonehenge (in queue) at 64 hammers.

Turn 84.
Decay starts. Stonehenge (in queue) at 63 hammers.
 

Attachments

  • Kark BC-4000.CivBeyondSwordSave
    205.8 KB · Views: 59
  • Kark BC-2920.CivBeyondSwordSave
    247.2 KB · Views: 61
  • Kark BC-2950.CivBeyondSwordSave
    247.5 KB · Views: 67
Hammers put toward Wonders don't decay. Post a save and let people look at it.

They do as wonders are buildings by definition!
Tested it in a Marathon game to check out scaling for game speed:

New game, went to WB gave me BW and Mysticism as well as 2 Workers on a forest each. Sarted Stonehenge from turn 0 and let the workers chop.
On turn 9 I have 129 hammers on Stonehenge:


Changed to Settler, Stonehenge remains in queue.
I didn't want to hit <enter> at least 50 times so I modified the decay time for buildings from 50 to 5 in the mentioned XML.
Turn 14 still 129 hammers on Stonehenge:


Turn 15 only 127 hammers on Stonehenge = 2 hammers decayed:


Interesting fact: Decay times do not scale with game speed! Hmmm....

Edit: very similar cross-post Kark :lol::lol::lol:
 
Hah! Its decaying faster than you can build it! No way you can build it without losing all the hammers and starting over again, or building a mine. Thats funny. Awesome GP farm.
 
Top Bottom