help me fix a bug in RoM:AND ? (need some pointers)

flitz

Warlord
Joined
Sep 16, 2009
Messages
245
mod: Rise of Mankind: A new dawn

bug: use coinage civic, which will consume all gold and silver resources, but switching away from coinage will not give those resources back to you.

In general, I just need some pointers where to start looking for this issue. I poked around the xml, python and cpp code a bit but without having modded civ4 before it is a bit hard to get a grip of what is done where.

What I did so far was to grep around the XML and Python and Source directories for various stuff.
The coinage civic has defined a custom tag <iMintedPercent> which says that gold and silver are being consumed (and minted ;)).

I also found fields
Code:
int* m_paiBonusMintedPercent;
and
Code:
int* m_piBonusMintedPercent;
in the CvPlayer.h and CvInfos.h respectively.

So maybe values in those fields should get changed back (to 0) once you switch away from coinage again ?
I looked into functions CvUpdateCivics and CvNetUpdateCivics but it didn't really lead anywhere.

Any ideas/hints how this would be done in civ4 ?

thanks, f.
 
CIV4CivicInfos.xml
(control-f [find])
<BonusType>BONUS_SILVER</BonusType>
<BonusType>BONUS_GOLD</BonusType>

Perhaps if you just delete these two?
 
Thanks, that obviously removes the problem. But it helps only so far that nobody will accidently damage his savegame.
Because coinage doesn't do much else than minting gold and silver it becomes very useless without this bonus and could be taken out from the selection completely.

(I tried something else: edited a similar section to the guilds civic but only with minted percentages set to 0 for silver and gold in the hope that during switching from coinage to guilds the game would reread those values and neutralizing the effect, but this didn't work).

I discovered that this bug goes even further. With two gold resources available (and no silver) I got minted two points of (money-)gold each turn for each city - like it should be.
But when switching away from the coinage civic, not only didn't I get my resources back but I also got applied the same minted-bonus-money another time, meaning that I had now 4 points of minted money per city. Switching back to coinage applied the same bonus again giving me a total of 6 minted moneys and away from coinage again a bonus of 8 and so forth.

So basically, it should be possible to completely recalculate the consumption of resources on switching civics. (Shouldn't be something similar already been done when you add/remove a corporation from a city?)
And the bonus-minted-money should get removed when switching away from coinage, not added.

EDIT: fixed it in the SDK
 
Back
Top Bottom