Quick Answers / 'Newbie' Questions

uh? No one is surprised that angry citizens are intentionally not fed while building settlers/workers?
I was drastically surprised that was not a bug after all. And such a good reason to grow up to 6 pop in the capital and then whip without the angry guy being costly.

Or for another city with 4 happy max, grow as fast as possible (2 strong food resources) up to pop 6 and whip those angry guys without them costing except the moment of growth between pop 5 and 6. But if done fast, their consumption will be lower than slowly.

No...
 
Greetings, and apologies if this has already been answered elsewhere.

Is there a way to link two or more military units so that moving one moves both of them? I thought this was what people meant by unit stacking, but I'm completely new and I haven't found a way to do this so far, so maybe they meant something else. I want to have two warrior units move at the same time.

Also, assuming there is a way to do this, does it result in the two units' combat strength being added together, or is it not that simple?

Thanks!
 
Click the button that says go to (all units) or go to (all units of this type), and that should stack them into one group. I have vanilla, so I don't know if it changed for bts.
 
Greetings, and apologies if this has already been answered elsewhere.

Is there a way to link two or more military units so that moving one moves both of them? I thought this was what people meant by unit stacking, but I'm completely new and I haven't found a way to do this so far, so maybe they meant something else. I want to have two warrior units move at the same time.

Also, assuming there is a way to do this, does it result in the two units' combat strength being added together, or is it not that simple?

Thanks!

To add to what nerdfighter13 said (which is quite correct if you want to move all units of the same type on a tile) you can click on the stack, and holding down shift click on the individual unit icons at the bottom of the main display. Here you can select any sub-set of the units on a tile.

Doing this has no effect on them in combat, it is just a UI convenience. If you attack with units so stacked only the strongest unit with moves left will attack as if it was not grouped with others.
 
You can also ALT + click to group all units on the same tile together or CTRL + click to group only units of the same type.

Cross post, deleted the rest.
 
In a recent game, the city grew and finished its granary on the same turn. I thought half the food would then be saved since the granary finished on the same turn, but it did not. So the granary has to be there on the turn before growth?
 
I recently won a culture game on Prince in 1939AD. I don't feel like I was being too slow on building temples and cathedrals. Could a contributing factor to this late win be because on the higher levels AI tech faster which leads to the human player getting Lib faster and then beginning the 100% culture slider phase earlier?
 
In a recent game, the city grew and finished its granary on the same turn. I thought half the food would then be saved since the granary finished on the same turn, but it did not. So the granary has to be there on the turn before growth?

Yes, the granary has to be completed the turn before. We were talking about this in a thread a few weeks ago. Tachywaxon starts bustin' out the code knowledge around Post 13.

EDIT for cross-posting in Tachy's shadow:
Spoiler :
Tachy, man, ya gotta let me know when you're on the case already. I coulda been doing something useful with my time, like looking at the funny pics thread, or something... :lol:
 
In a recent game, the city grew and finished its granary on the same turn. I thought half the food would then be saved since the granary finished on the same turn, but it did not. So the granary has to be there on the turn before growth?

Code laid down for reference:

Spoiler :
Code:
void CvCity::doGrowth()
{
	int iDiff;

	CyCity* pyCity = new CyCity(this);
	CyArgsList argsList;
	argsList.add(gDLL->getPythonIFace()->makePythonObject(pyCity));	// pass in city class
	long lResult=0;
	gDLL->getPythonIFace()->callFunction(PYGameModule, "doGrowth", argsList.makeFunctionArgs(), &lResult);
	delete pyCity;	// python fxn must not hold on to this pointer 
	if (lResult == 1)
	{
		return;
	}

	iDiff = foodDifference();

	changeFood(iDiff);
	changeFoodKept(iDiff);

	setFoodKept(range(getFoodKept(), 0, ((growthThreshold() * getMaxFoodKeptPercent()) / 100)));

	if (getFood() >= growthThreshold())
	{
		if (AI_isEmphasizeAvoidGrowth())
		{
			setFood(growthThreshold());
		}
		else
		{
			changeFood(-(std::max(0, (growthThreshold() - getFoodKept()))));
			changePopulation(1);

			// ONEVENT - City growth
			CvEventReporter::getInstance().cityGrowth(this, getOwnerINLINE());
		}
	}
	else if (getFood() < 0)    
	{
		changeFood(-(getFood()));

		if (getPopulation() > 1)
		{
			changePopulation(-1);
		}
	}
}

================================================


int CvCity::getFoodKept() const
{
	return m_iFoodKept;
}


void CvCity::setFoodKept(int iNewValue)
{
	m_iFoodKept = iNewValue;
}


void CvCity::changeFoodKept(int iChange)
{
	setFoodKept(getFoodKept() + iChange);

int CvCity::getFood() const
{
	return m_iFood;
}


void CvCity::changeFood(int iChange)
{
	setFood(getFood() + iChange);
}



FIRST CASE: Without Granary

That one seems easy:

Let's call m_iFoodKept our variable that represents the inner property of a granary to stock food per turn up to its defined max (0.5*threshold). m_iFood is the variable dealing how far we got in food bar.
Second point, we have to know this section of code is compiled each turn, which makes more than 1 update.
Third point, granary starts stocking food during the IBT AFTER the turn being built. There is no food stockage timing with granary being built given the granary is built after food is put in the bin.

First, m_iFoodKept is like a pig coin bank that receives an allowance, which is the same value as the food rate (iDiff).

Then, m_iFoodKept is processed through a cropping function:setFoodKept, which maxes out at growthThreshold()/2. It is simply a restrictive range function where m_iFoodKept can go from 0 to growthThreshold()/2 (e.g. 22/2=11 for size one). If it goes below, the min is imposed otherwise over max, max is imposed.

But given there is no granary, then MAX value becomes 0. So the range is 0 to 0, thus only acceptable new m_iFoodKept is 0.

Lastly, the food rate (iDiff=foodDifference()) is added to m_iFood
. And then the new m_iFood
is reduced by growthThreshold() and gained m_iFoodKept. Nonetheless, there is none in the granary due to its absence, thus we end up with a simple growth.
E.G. We end up with m_iFood
=26/24. Substract growthThreshold() =24 and then the food bin is 2/26. Denominator is different because it is adjusted to the new size and the code doesn't process fractions but numerators as integers.

Conclusion: Matched game experience with the code.


Picture for next cases:




SECOND CASE: With Granary while being lower than half growthThreshold()

That's the green section in the picture. In a nutshell, we reach the max stockage capacity of the granary because "citizens had time to stock food".

Experience told us if we finish the granary and the same turn we end up with exact growthThreshold()/2 or less, then after growth we get max stockage of granary.

That's normal point of view of the code as when we finish the granary halfway of growthThreshold(), we have the other halfway to stock food in the granary and then the "citizens have time enough to stock full the granary". A granary in the middle of the picture (yellow line) means while the food rate adds to both m_iFood
and m_iFoodKept at the same time.
If the food rate makes some "surplus", then the cropping function will do its job by returning max value, which is growthThreshold()/2.

Thus, game experience is now compatible with code.

THIRD CASE: With Granary while being higher than half growthThreshold()

That is the most interesting case and that one where we see less granary stock after growth and what we call doubling "surplus" food.

Experience told us if we finish the granary and the food rate meanwhile goes over half of growthThreshold(), then the granary stock is lower than expected half.

Let imagine a situation where the food rate allows an exact growth without "surplus" food. If the granary was built in the red section, then the "citizens didn't have time to fully fill the granary". As already said, each turn, the food rate is added to both m_iFood
and m_iFoodKept at the same time and if there is less than growthThreshold()/2, then the cropping function will certainly return a lower value than half-growthThreshold().
Of course, under condition there is no "surplus" food that makes m_iFood
= (>growthThreshold())/growthThreshold().

When we have surplus due to a food rate allowing that, then because adjusted m_iFoodKept is processed before substracting food, this helps to catch up the "lack of food not gathered by citizens". And indeed, if the food rate makes the m_iFoodKept go over growthThreshold()/2, again we see the cropping function doing its job and thus the interesting part where "too much surplus food ended with no more doubling surplus".

Now, a fictitious example to illustrate the logics:

We're size one (threshold=22 food). We built granary at 13/22. And we have now a constant food rate of 6 :food: per turn. Whatever the food rate before the granary being built, it doesn't matter because it is not stocked. Now, in the IBT, we start stocking food. Next turn, food bin is at 19/22 and food in granary is at 6. Next turn, we reach m_iFood
=25, which is over 22, but it doesn't matter. Concept of surplus doesn't exist. Food in granary is now at 12, but being size 1, the cropping function does its job and crops at 11.
Finally, the code does the changePopulation function:
m_iFood-growthThreshold()+m_iFoodKept=
25-22+11=14 food. Yes, thanks to that immense food rate, we made up the loss of finishing the granary AFTER the yellow line in the picture.
The doubling factor came from both food bin and granary bin got their same share of food rate at the last turn before growth and when the cropping function starts to crop, bam granary stock stops to double "surplus" food.

Again, we have experiences combined with code reality.


This resumes the whole knowledge we can get from granaries.
Now, a whole micro hell comes from this because plenty of finishing granary optimal points rise. With many plots, it can be hard to choose which is the best combination of tiles to get most. Waiting to get more organic flow from plot outputs or simply whip now to get max from granary max stockage. Not counting situational reasons like getting OF for another build, or emergencies or bigger priorities. :crazyeye:
 
^
That stuff hereup took me 3 mins to set up
because I have written this long ago...

tl;dr
the granary completion comes after food income, thus granary effect are taken into account the following turn.
 
I was on the case at the same moment you posted. It really took me 3 minutes.
Your three minutes is better than mine. It took me more than three minutes just to find that link. Then three more minutes to sleepily type my comment. Then three more minutes to sleepily fix all my sleepy typos. :lol:

I recently won a culture game on Prince in 1939AD. I don't feel like I was being too slow on building temples and cathedrals. Could a contributing factor to this late win be because on the higher levels AI tech faster which leads to the human player getting Lib faster and then beginning the 100% culture slider phase earlier?

Bumped because I don't want Silv Something's question to get lost in the mix. No answer for ya, though, sorry...
 
Holy Mother of Crap! That is some writeup! :eek: Very impressive :goodjob:

Just to clarify, if you build the granary late in the growth process, so that the city is close to growing, will you still get it half-full post-growth?

Let's say the granary is built at 18/22 :food: and you have +4 :food:/turn. Will you start the next cycle with a half-full food bar (12/24) (11/24?) or only 4/24, or something else?
 
Gotcha! You haven't read. :satan:

Yeah, I understand most would be afraid in front a humongous wall of text as this one.

Give a try. Just skimming it would allow you to understand it...

Or just read the third case +examples.
 
I recently won a culture game on Prince in 1939AD. I don't feel like I was being too slow on building temples and cathedrals. Could a contributing factor to this late win be because on the higher levels AI tech faster which leads to the human player getting Lib faster and then beginning the 100% culture slider phase earlier?

A fast cultural win requires a lot of factors that I don't fully understand, but...

1) stealing workers from an AI helps a lot in most kinds of games
2) An early rush (take over of an AI's lands and cities) is usually quite good. The enemy's capital at the very least is often quite a nice city with more than an average amount of resources.
3) a slingshot using the oracle to get Civil Service is often quite powerful especially if you have a strong commerce rich capital
4) careful planning of your great people generation (perhaps early scientists to bulb education or other techs on the path to liberalism), plus extensive great artist farming for several "cultural bombs", planning for a powerful National Epic city, but also getting great people from your other cities before the NE city overwhelms them.
5) careful whipping of key temples and cathedrals is often necessary
6) The Sistine chapel is a key wonder I believe in cultural games
7) Hermitage is also critical
8) cultivating at least 3 different religions in your empire (often more)
9) getting at least 9 cities so you can build enough temples for cathedrals in your 3 planned legendary cities

There is more I'm sure, but considering the above points should improve your cultural games.
 
Holy Mother of Crap! That is some writeup! :eek: Very impressive :goodjob:

Just to clarify, if you build the granary late in the growth process, so that the city is close to growing, will you still get it half-full post-growth?

Let's say the granary is built at 18/22 :food: and you have +4 :food:/turn. Will you start the next cycle with a half-full food bar (12/24) (11/24?) or only 4/24, or something else?

Just to provide another way of looking at it (and I hope I am correct) if you look at the city the turn the granary completes (ie. it says "City has finished building Granary" and you click "View City") look at how much food the city has stored, and the total it needs to grow. When the city grows you will have the lowest of A and B:

A) "the total it needs to grow" - "how much food the city has stored" (ie. how much more it needs to store to grow)
B) Half of "the total it needs to grow".
 
I read it, every word. (It was at 4am though...).

Anyway, the key thing I'll take away from this is that the granary must be there latest on the turn before growth, or you get nothing in it. I had often whipped it on the turn of growth to get instant re-growth, but that isn't all that useful in the case of the granary, better to whip it a turn earlier (and make sure the city still doesn't instantly re-grow due to needing less food to grow).
 
In fact, the key aspect I learnt from reading the code and testing is there is many optimal points to get the granary and benefit the most asap from the granary. Indeed, following the granary construction, one or two growths are necessary to adjust the kept food and then the granary has no longer any peculiarities.
The common rule of thumb well-known was build the granary before getting to half point the growth and that way the granary has time to gather enough food for next max kept food.

But the existence of "overloading" the food bar makes possible to "catch up" missing food is you were over the half point to growth.
And that thing, amongst experts/crazymongers, is called the doubling food when growing in size...but there no doubling, just overloading the food bar.
 
granary is a good way to keep uhealthyiness from the forge improvement helps also to keep up the population during the slavery period ;)
 
Top Bottom