So Inflation Is Killing Me - Video In Thread

Yup and Hurry buying too. Planning is now trumping both these player exploits. :D It's been a goal for a longtime and is now starting to bear fruit from the efforts put into their curbing and reducing the excess gold.
 
Huh? In the real world, slavery leads to more production and thus to deflation, not inflation. Slavery causing inflation is counter intuitive. Also in BTS, slavery was a valid strategy, don't understand why it needs to be punished now.
 
Huh? In the real world, slavery leads to more production and thus to deflation, not inflation. Slavery causing inflation is counter intuitive. Also in BTS, slavery was a valid strategy, don't understand why it needs to be punished now.
Say what?
 
Why is slavery punished with 1% more inflation, like the video shows?
 
Why is slavery punished with 1% more inflation, like the video shows?
I did Nothing with Slavery, absolutely Nothing! Take your beef up with the ones who changed the coding. And Slavery simply sucks too.
 
As far as I can see there is no inflation on any of the Slavery buildings or specialists. All of Slavery is implemented via buildings and specialists. I have no idea where this 1% inflation is coming from.
 
@Thunderbrd: Here's the dll code that is triggered by clicking the hurry button
Spoiler Here's the dll code that is triggered by clicking the "whipping" and "buy" city buttons :

void CvCity::hurry(HurryTypes eHurry)
{
int iHurryGold;
int iHurryPopulation;
int iHurryAngerLength;

if (!canHurry(eHurry))
{
return;
}
/************************************************************************************************/
/* Afforess Start 06/27/10 */
/* */
/* */
/************************************************************************************************/
GET_PLAYER(getOwnerINLINE()).changeHurriedCount(1);
/************************************************************************************************/
/* Afforess END */
/************************************************************************************************/
iHurryGold = hurryGold(eHurry);
iHurryPopulation = hurryPopulation(eHurry);
iHurryAngerLength = hurryAngerLength(eHurry);

changeProduction(hurryProduction(eHurry));

GET_PLAYER(getOwnerINLINE()).changeGold(-(iHurryGold));
changePopulation(-(iHurryPopulation));

changeHurryAngerTimer(iHurryAngerLength);

/************************************************************************************************/
/* BETTER_BTS_AI_MOD 10/02/09 jdog5000 */
/* */
/* AI logging */
/************************************************************************************************/
if( gCityLogLevel >= 2 )
{
CvWStringBuffer szBuffer;
CvWString szString;
if (isProductionUnit())
{
szString = GC.getUnitInfo(getProductionUnit()).getDescription(getCivilizationType());
}
else if (isProductionBuilding())
{
szString = GC.getBuildingInfo(getProductionBuilding()).getDescription();
}
else if (isProductionProject())
{
szString = GC.getProjectInfo(getProductionProject()).getDescription();
}

logBBAI(" City %S hurrying production of %S at cost of %d pop, %d gold, %d anger length", getName().GetCString(), szString.GetCString(), iHurryPopulation, iHurryGold, iHurryAngerLength );
}
/************************************************************************************************/
/* BETTER_BTS_AI_MOD END */
/************************************************************************************************/

if ((getOwnerINLINE() == GC.getGameINLINE().getActivePlayer()) && isCitySelected())
{
gDLL->getInterfaceIFace()->setDirty(SelectionButtons_DIRTY_BIT, true);
}

GC.getGameINLINE().reportEvent(CITY_EVENT_HURRY, getOwnerINLINE(), eHurry, getID());
// Python Event
//CvEventReporter::getInstance().cityHurry(this, eHurry);
}
I can't see any reference to inflation here, so maybe it's handled in the exe...

Edit:
it's because this happens both when whipping and buying.
GET_PLAYER(getOwnerINLINE()).changeHurriedCount(1);
I think the hurry count is only used to calculate the inflation so there should be no problem to add an if statement to exclude it from incrementing when whipping.
 
Last edited:
Maybe here?
Code:
GC.getGameINLINE().reportEvent(CITY_EVENT_HURRY, getOwnerINLINE(), eHurry, getID());
// Python Event
//CvEventReporter::getInstance().cityHurry(this, eHurry);

It wouldn't be in the EXE since it wasn't a factor in Vanilla or BtS so far as I know.

I've never researched into inflation to know how it's done and I've never encountered coding for it that I took notice of. So I wonder if it's all done in python? I know there are globals that control it and that's as far as I have really seen anything about it. There are some places I'd look into further in the code above. Like:
Code:
GET_PLAYER(getOwnerINLINE()).changeHurriedCount(1);
Might be woven into that somehow which would explain why it affects both whipping and buying, if that can even be proven. I haven't watched the video so I'm not sure how it's 'showing' that inflation is affected since I'm not sure where inflation even gets any display into the game.
 
Maybe here?
Code:
GC.getGameINLINE().reportEvent(CITY_EVENT_HURRY, getOwnerINLINE(), eHurry, getID());
// Python Event
//CvEventReporter::getInstance().cityHurry(this, eHurry);

It wouldn't be in the EXE since it wasn't a factor in Vanilla or BtS so far as I know.

I've never researched into inflation to know how it's done and I've never encountered coding for it that I took notice of. So I wonder if it's all done in python? I know there are globals that control it and that's as far as I have really seen anything about it. There are some places I'd look into further in the code above. Like:
Code:
GET_PLAYER(getOwnerINLINE()).changeHurriedCount(1);
Might be woven into that somehow which would explain why it affects both whipping and buying, if that can even be proven. I haven't watched the video so I'm not sure how it's 'showing' that inflation is affected since I'm not sure where inflation even gets any display into the game.
You answered while I was editing my post. ^^

Edit:
I'm pretty sure eHurry is an integer that is 0 when whipping and 1 when buying.

If so it could be fixed by simply changing:
GET_PLAYER(getOwnerINLINE()).changeHurriedCount(1); →↓
GET_PLAYER(getOwnerINLINE()).changeHurriedCount(eHurry);

But that is of course only if the hurry count doesn't play a role other than calculating inflation from hurry.
I haven't watched the video so I'm not sure how it's 'showing' that inflation is affected since I'm not sure where inflation even gets any display into the game.
I watched it and it's clear that inflation from hurry increases by 1 percent each whipping.

Btw. the hurry count is now and again reduced by one when turns pass by, saw that in the doAdvancedEconomy function in the dll.
Code:
void CvPlayer::doAdvancedEconomy()
{
    PROFILE_FUNC()

    if (getHurriedCount() > 0)
    {
        int iTurnIncrement = GC.getDefineINT("HURRY_INFLATION_DECAY_RATE");
        iTurnIncrement *= GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getTrainPercent();
        iTurnIncrement /= 100;
        iTurnIncrement *= std::max(0, 100 + getHurryInflationModifier());
        iTurnIncrement /= 100;
        if (GC.getGameINLINE().getElapsedGameTurns() % std::max(1, iTurnIncrement) == 0)
        {
            changeHurriedCount(-1);
        }
    }  
}
 
Last edited:
I just watched the video and yeah ok so I see the point (also interesting that anyone uses the econ advisor screen...)

You might be right about that count factor Toffer... I'd have to look at the code when I get home to confirm.
 
Btw. the hurry count is now and again reduced by one when turns pass by, saw that in the doAdvancedEconomy function in the dll.
The global % was originally 2 for Hurry reduction. That is why it takes a while for it to come down IF you stop the hurrying. I just recently upped it to 10%. It can be upped much more. And IdiotiocUlt1mara is not yet using that newer svn version.

But this Makes me ask Why do we cater to player exploits like whipping? How does whipping help the AI be a challenge?

Same goes for Slavery as well after a fashion.
 
Slavery and whipping are not player exploits. The AI can and does use them and the challenge for us is to make sure they do so wisely. Eventually I'll make sure they are using the captive units as wisely as they can. I've done some recent work on trying to make them less likely to whip and undermine themselves in the process.

@Toffer90 : Your observation was correct. I've gone about the fix a little differently, in a way that makes the code process a little faster, probably not to a noticeable degree but hey everything counts right?
 
Last edited:
The global % was originally 2 for Hurry reduction. That is why it takes a while for it to come down IF you stop the hurrying. I just recently upped it to 10%. It can be upped much more. And IdiotiocUlt1mara is not yet using that newer svn version.
Are you talking about this one from A_New_Dawn_GlobalDefines.xml ?
Code:
    <Define>
        <DefineName>HURRY_INFLATION_DECAY_RATE</DefineName>
        <iDefineIntVal>2</iDefineIntVal>
    </Define>
That one means that the base amount of turns, before the "hurry production remembered amount" is reduced by one, is two turns.

That base amount is modified by the <iTrainPercent> tag in gamespeed xml, so on eternity it would be 14 turns between each countdown ( -1 % inflation from hurrying).
The <iTrainPercent> is higher if playing with upscaled unit and building cost gameoption so it's around 20 turns on eternity with that option.

It is also adjusted by the <iHurryInflationModifier> tag in civic xml, so with mercantilism civic the countdown is multiplied with three, meaning 42/60 turns on eternity between countdown or every 6/8 turns on normal gamespeed..
 
Last edited:
So if anyone is unaware how inflation actually works. It is caused by the increase in consumer spending, and government spending. So during socialist "injection" policies where the government put as much money into the economy as possible this has a drastic effect on inflation. It is really hard to get inflation working correctly in a game like this.

The effect of inflation is that money is worth less and less over time.

That being said slavery "whipping" is destroying population to create something meaning less people will be around to "spend" money decreasing inflation - or even causing deflation, which btw is just as bad as inflation :P - whereas hurrying production is like "injecting" money into the economy so should increase inflation drastically. However balance wise there should be a benefit to spending money to hurry production cause otherwise no1 will ever use it - same as slavery should have a lot more negatives than it currently does.

Also yes @JosEPh_II I am not currently using the most up-to-date SVN in this video as it takes a hell of a long time for me to finish a series - considering I only record 3 hours per week and I play on the slowest speed haha. Also as @Thunderbrd did mention the AI does use whipping very effectively too - they probably use it MUCH more than the human player will. So this +1% to inflation for whipping actually damages the AI more than the human play atm

@Dancing Hoskuld the 1% inflation was coming from whipping not from the buildings or the specialists
 
balance wise there should be a benefit to spending money to hurry production cause otherwise no1 will ever use it
In certain situations, yes. If your neighbour sends 20000 armed tourists to your doorstep or an entire production chain comes crashing down (because of obsoletion or because the first already happened to a city of - formerly - yours) or you are locked in a wonder race, economic stability might take a back seat.
 
Are you talking about this one from A_New_Dawn_GlobalDefines.xml ?
Code:
    <Define>
        <DefineName>HURRY_INFLATION_DECAY_RATE</DefineName>
        <iDefineIntVal>2</iDefineIntVal>
    </Define>
That one means that the base amount of turns, before the "hurry production remembered amount" is reduced by one, is two turns.

That base amount is modified by the <iTrainPercent> tag in gamespeed xml, so on eternity it would be 14 turns between each countdown ( -1 % inflation from hurrying).
The <iTrainPercent> is higher if playing with upscaled unit and building cost gameoption so it's around 20 turns on eternity with that option.

It is also adjusted by the <iHurryInflationModifier> tag in civic xml, so with mercantilism civic the countdown is multiplied with three, meaning 42/60 turns on eternity between countdown or every 6/8 turns on normal gamespeed..

So for the HURRY_INFLATION_DECAY_RATE, to shorten the time between the countdown, the value should be a "-" value? Or just 1, or 0?

The Merchantile Civic could just plain lose it's effect on inflation imo.

These are easy adjustments. Modifying the iTrainPercent is not.
 
So for the HURRY_INFLATION_DECAY_RATE, to shorten the time between the countdown, the value should be a "-" value? Or just 1, or 0?
Yes, and 1 is the smallest sensible number to use there. Anything smaller than 1 means that the countdown will be locked to 1 turn on all gamespeeds.

A value of 2 ain't bad in my opinion, but I think I would prefer it at 1.
 
Last edited:
Yes, and 1 is the smallest sensible number to use there anything smaller than 1 means that the countdown will be locked to 1 turn on all gamespeeds.

A value of 2 ain't bad in my opinion, but I think I would prefer it at 1.

Consider it done then.

EDIT: Committed now.
 
Back
Top Bottom