View Full Version : Free army reserves


Mama Lazarou
Sep 21, 2006, 11:43 AM
Ok, am I right that if you change production in a city it saves the progress until you change back and finish it?

If so, couldn't you build units until there is one turn til completion, then change the production to something else?

In theory each city could have a queue of different units ready to appear in one turn that you don't have to pay upkeep on. Am I right?

munin0
Sep 21, 2006, 11:48 AM
You start to lose production on queued items after 10 turns.

Mama Lazarou
Sep 21, 2006, 11:49 AM
Balls. Do you know much?

Zophos
Sep 21, 2006, 02:19 PM
Buildings decay 1%/turn, starting after 50 turns.

Units decay 2%/turn, starting after 10 turns.

Note that these are percentages of the hammers invested to date (not of the final price of the unit/building), rounded up, so the minimum decay/turn is 1 hammer.

For example, if you queue a Warrior and invest 15 hammers, then switch away, it will lose 1 hammer per turn starting on turn 11. If you queue a Modern Armor and invest 110 hammers, then switch away, it will lose 3/turn (starting on turn 11) until it drops below 101 hammers, then 2/turn until it drops below 51, etc.

References:
Warlords SDK - CvCity.cpp:9699 (CvCity::doDecay())
GlobalDefines.xml (for decay times and percentages)

wioneo
Sep 21, 2006, 02:59 PM
Are you serious, Zophos? Five(which is a huge exageration for the entire game, especially the early stages) hammers per turn is not much reason to dissuade me from massing huge amounts of 1 turn axes and then releasing them upon the world in a seemingly endless stream of death and destruction. But that's just me...

Dr Elmer Jiggle
Sep 21, 2006, 03:09 PM
In the early stages of a game, I will often build a unit (sometimes multiple units) until I'm 1 turn away from completion, then switch to a barracks. What I like about this approach is that most of the time you get an experienced unit by waiting for the barracks before you finish him, but if an emergency comes up (someone declares war, a barbarian appears, you finish a settler before you thought and need an escort, a city grows and needs a defender for happiness, etc.) you're only one turn away from having that unit.

I think you can only queue one of each type of unit per city using this technique. In other words, one city can theoretically have an axeman, a chariot, a spearman, a swordsman, and an archer all within 1 turn of completion (minus decay), but you can't have 5 axemen ready to go in one city.

wioneo
Sep 21, 2006, 03:18 PM
I think you can only queue one of each type of unit per city using this technique. In other words, one city can theoretically have an axeman, a chariot, a spearman, a swordsman, and an archer all within 1 turn of completion (minus decay), but you can't have 5 axemen ready to go in one city.

Oh well... I suppose that my army reserves(I like that commercial) will be defenders... That's still cool.

EDIT: By the way, if you put, say 1 hammer back into that unit, will the decay counter restart?

pholkhero
Sep 21, 2006, 05:31 PM
yes it will restart.

svv
Sep 21, 2006, 05:39 PM
Oooo, with the restart thing, this could work out well. Thanks for the tip!

Is there a way to move units up and down in the queue, so that you can rotate several of them, giving each of them their one turn of production before ten turns run on it? How, mechanicly, would you do that? I've accidently lost things in my queue, apparently by trying to move them or putting new things in wrong.

Paeanblack
Sep 21, 2006, 06:48 PM
Oooo, with the restart thing, this could work out well. Thanks for the tip!

Is there a way to move units up and down in the queue, so that you can rotate several of them, giving each of them their one turn of production before ten turns run on it? How, mechanicly, would you do that? I've accidently lost things in my queue, apparently by trying to move them or putting new things in wrong.


You don't lose the hammer investment by removing them from the queue. As soon as put that unit back in the queue, it's right where you left off, minus any decay. Queue juggling is a sufficiently powerful technique that mastering it is worth more than a full difficult level jump.

Zophos
Sep 21, 2006, 09:07 PM
Are you serious, Zophos? Five(which is a huge exageration for the entire game, especially the early stages) hammers per turn is not much reason to dissuade me from massing huge amounts of 1 turn axes and then releasing them upon the world in a seemingly endless stream of death and destruction. But that's just me...

Entirely serious. That's why I quote my source when I'm discussing game mechanics.

But, as other have pointed out, you can't amass huge amounts of 1-turn axes. Best you can do is one per city. Queue-switching tricks are worth the effort under certain circumstances, such as the unit-barracks idea shown above, but it's not a panacea.

Mama Lazarou
Sep 22, 2006, 02:51 AM
Cool so there is merit in the idea. The rate of decay is so low that it's not worth worrying about really! Resetting the counter by adding a turn is simple enough too. Great!

shivute
Sep 22, 2006, 03:47 AM
I do this a lot.
I will build barracks in a few cities and will mass build units in these cities - one of each, until only one turn left. When they start decaying, I change my civics to theocracy + vasselage and pump them out.
Its a great way to build up lots of units that you don't pay maintenance for. Excellent for preparing for war and also allows you to remain in pacifism or whatever for longer too.
It works best superbly when playing marathon and also when playing as spiritual. A bit of a cheat perhaps? because it usually totally overwhelms neighbouring AIs.

Mama Lazarou
Sep 22, 2006, 03:52 AM
I think exploit is the word you're looking for ;)

DaviddesJ
Sep 23, 2006, 12:18 AM
EDIT: By the way, if you put, say 1 hammer back into that unit, will the decay counter restart?

No, the counter does NOT restart. Post #8 by pholkhero is wrong. Every turn that a partially completed unit is not worked on, its counter increases. The counter never decreases or resets. When the counter reaches 10, every subsequent turn that the unit is not worked on, its stored hammers decay.

At least, that's how it works in 1.61. (I haven't read the code, but I've tested several variations to be sure I know how it works.)

Zophos
Sep 23, 2006, 10:21 AM
No, the counter does NOT restart. Post #8 by pholkhero is wrong. Every turn that a partially completed unit is not worked on, its counter increases. The counter never decreases or resets. When the counter reaches 10, every subsequent turn that the unit is not worked on, its stored hammers decay.

At least, that's how it works in 1.61. (I haven't read the code, but I've tested several variations to be sure I know how it works.)
By inspection of the code in the Warlords SDK, Daviddes appears to be right. Working a unit prevents the counter from increasing, but does not reset it.

Source: CvCity.cpp:9699
void CvCity::doDecay()
{
int iI;

for (iI = 0; iI < GC.getNumBuildingInfos(); iI++)
{
if (getProductionBuilding() != ((BuildingTypes)iI))
{
if (getBuildingProduction((BuildingTypes)iI) > 0)
{
changeBuildingProductionTime(((BuildingTypes)iI), 1);

if (isHuman())
{
if (getBuildingProductionTime((BuildingTypes)iI) > GC.getDefineINT("BUILDING_PRODUCTION_DECAY_TIME"))
{
setBuildingProduction(((BuildingTypes)iI), ((getBuildingProduction((BuildingTypes)iI) * GC.getDefineINT("BUILDING_PRODUCTION_DECAY_PERCENT")) / 100));
}
}
}
else
{
setBuildingProductionTime(((BuildingTypes)iI), 0);
}
}
}

for (iI = 0; iI < GC.getNumUnitInfos(); iI++)
{
if (getProductionUnit() != ((UnitTypes)iI))
{
if (getUnitProduction((UnitTypes)iI) > 0)
{
changeUnitProductionTime(((UnitTypes)iI), 1);

if (isHuman())
{
if (getUnitProductionTime((UnitTypes)iI) > GC.getDefineINT("UNIT_PRODUCTION_DECAY_TIME"))
{
setUnitProduction(((UnitTypes)iI), ((getUnitProduction((UnitTypes)iI) * GC.getDefineINT("UNIT_PRODUCTION_DECAY_PERCENT")) / 100));
}
}
}
else
{
setUnitProductionTime(((UnitTypes)iI), 0);
}
}
}
}

flamingzaroc121
Sep 23, 2006, 05:25 PM
also if you are close to theology, you can queue an army and then switch civics and build the army so you get more exp