Map

AdelineJ

Warlord
Joined
Apr 28, 2012
Messages
288
Location
France
Hello !
I would want to know if anyone have the formulas where appear the parameters defined in CIV4WorldInfo.xml ? Thanks !
AdelineJ
 
<iGridWidth> and <iGridHeight> multiplied by 4.

But some mapscripts have their own specifications.
 
Thanks, I know it. But for the others parameters, as iTradeProfitPercent in trade's formula.
 
The formula is as follows:

Code:
int CvCity::getBaseTradeProfit(CvCity* pCity) const
{
	int iProfit = std::min(pCity->getPopulation() * GC.getDefineINT("THEIR_POPULATION_TRADE_PERCENT"), plotDistance(getX_INLINE(), getY_INLINE(), pCity->getX_INLINE(), pCity->getY_INLINE()) * GC.getWorldInfo(GC.getMapINLINE().getWorldSize()).getTradeProfitPercent());

	iProfit *= GC.getDefineINT("TRADE_PROFIT_PERCENT");
	iProfit /= 100;

	iProfit = std::max(100, iProfit);

	return iProfit;
}

I guess it doesn't help you much but you're asking a difficult question here! Plus it continues in other formulas.

I got this by searching iTradeProfitPercent as an example in the CvGameCoreDLL folder. It is used as getTradeProfitPercent in the CvCity.cpp file.

So, answering your question and making it understable are two different things. I can only do the first part (and this is just one tag)...
 
"A factor, which scales the trade profit from trade routes according to the world size"

Pretty straightforward answer from Modiki...
 
Yes, a multiplier.

It's not the first time that AdelineJ is referred to the Modiki, I didn't want to do it this time...
 
If AdelineJ doesn't understand the definition from Modiki written in English, she will find it harder to understand what you posted in coding languages :D

Anyway for the "Unknowns" in modiki:
iAdvancedStartPointsMod simply is a % of the default ASP of that game speed.
iMaxConscriptModifier simply + or - the Max Consript by the %
Same for War Weariness...
iNumCitiesAnarchyPercent increases anarchy turns by number of cities but not sure exact formula.
 
You speak of modiki... What page of modiki are the informations, please ?
I search iResearchPercent, iDistanceMaintenancePercent, iNumCitiesMaintenancePercent, iColonyMaintenancePercent, iCorporationMaintenancePercent, iNumCitiesAnarchyPercent and iAdvancedStartPointsMod in Beyond the sword, Warlords and Vanilla but no results. Where do you find the formulas ?
 
Modiki page on WorldInfo!

I gave you a formula. Are you happy with it?

I also told you how to find the formula: in the (BtS/)CvGameCoreDLL folder. In the end, it is compiled in the dll.

Sorry, but I will not repeat the search for all the formulas you're asking. Help yourself!
 
I find for DistanceMaintenancePercent ! But i don't arrive to translate the program in formula. Anyone can help me, please ?
Code:
	for (pLoopCity = GET_PLAYER(getOwnerINLINE()).firstCity(&iLoop); pLoopCity != NULL; pLoopCity = GET_PLAYER(getOwnerINLINE()).nextCity(&iLoop))
	{
		iTempMaintenance = 100 * (GC.getDefineINT("MAX_DISTANCE_CITY_MAINTENANCE") * plotDistance(getX_INLINE(), getY_INLINE(), pLoopCity->getX_INLINE(), pLoopCity->getY_INLINE()));

		iTempMaintenance *= (getPopulation() + 7);
		iTempMaintenance /= 10;

		iTempMaintenance *= max(0, (GET_PLAYER(getOwnerINLINE()).getDistanceMaintenanceModifier() + 100));
		iTempMaintenance /= 100;

		iTempMaintenance *= GC.getWorldInfo(GC.getMapINLINE().getWorldSize()).getDistanceMaintenancePercent();
		iTempMaintenance /= 100;

		iTempMaintenance *= GC.getHandicapInfo(getHandicapType()).getDistanceMaintenancePercent();
		iTempMaintenance /= 100;

		iTempMaintenance /= GC.getMapINLINE().maxPlotDistance();

		iWorstCityMaintenance = max(iWorstCityMaintenance, iTempMaintenance);

		if (pLoopCity->isGovernmentCenter())
		{
			iBestCapitalMaintenance = min(iBestCapitalMaintenance, iTempMaintenance);
		}
	}

	return min(iWorstCityMaintenance, iBestCapitalMaintenance);
}
 
Back
Top Bottom