Max Tax Rate Trigger?

The Fool King

Chieftain
Joined
Feb 26, 2007
Messages
79
I'd like to to and start with bigger empires a little. The custom house mod is a great way to do this (I am al setting the education threshold increase to zero).

Having played a few games on Explorer difficulty now where I arrived at a tax rate of 99% (can you imagine some of the positive production results that yielded?), I arrived at the conclusion that it would make the game more interesting (to me at least) if I introduced a maximum limit for the total king's tax (60% sounds about right to me).

My modding knowledge isn't that great, so I'd appreciate if someone could tell me which value I have to modify to do that.

Thank you. :)
 
Id like to know too... If the trading system was better between the natives/fellow europeans in "the new world" i wouldnt care as much. Its just that i find it all pretty horrible...

Would be nice to establish automated trade routes with natives/europeans, but would be useless with the current trade system.
 
This one here changes the tax rate, I'd just add 'if (getTaxRate() > 60) { setTaxRate(60); }' but I'm not a C++ modder

Code:
void CvPlayer::changeTaxRate(int iChange)
{
	if (iChange != 0)
	{
		int iOldRate = getTaxRate();
		setTaxRate(iOldRate + iChange);

		//reset yields traded
		for(int i=0;i<NUM_YIELD_TYPES;i++)
		{
			setYieldTradedTotal((YieldTypes) i, 0);
		}

		PlayerTypes eParent = getParent();
		if (eParent != NO_PLAYER)
		{
			CvString szTextKey = (iOldRate < getTaxRate() ? "TXT_KEY_TAX_RATE_CHANGED" : "TXT_KEY_TAX_RATE_LOWERED");
			CvWString szBuffer = gDLL->getText(szTextKey.GetCString(), GET_PLAYER(eParent).getNameKey(), iOldRate, getTaxRate());
			gDLL->getInterfaceIFace()->addMessage(getID(), true, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_REVOLTSTART", MESSAGE_TYPE_MINOR_EVENT, NULL, (ColorTypes)GC.getInfoTypeForString("COLOR_RED"));
		}
	}
}
 
Where exactly is that located and how do you... ehm make it work lol?

In the CivGameCoreDLL folder you will find CivPlayer.cpp that has that function. Simply open the CivGameCoreDLL.vcproj in Visual Studio (You can get the express version for free). Make the changes in the project. Compile to create a dll. Add the dll to the root folder of the mod.
 
This one here changes the tax rate, I'd just add 'if (getTaxRate() > 60) { setTaxRate(60); }' but I'm not a C++ modder

It's not the best place.
There is method doPrices() in cvPlayes.cpp, where tax raise is determinied and implied. There is already used limit of max possible tax rate to 99% (sadly, it's hardwired in code, not made as parameter in XML). Better to change it there (it will be more clear)


I also like building big self-sufficient colonies (And much more I like to have a choice either to build small or big colony with equal fun) so I intended to creat much bigger mod where such aspects will be balanced. Not only tax rate, but also education degrade, ref calculations, weak AI, dull natives...
There are many other problems beside tax rate, so there needed complex solution :)
 
Agreed, there's tons of problems, but while I am testing some mods I at least like to have some sort of fun - which vanilla sadly isn't as it is now (No I am not loosing, like everyone else I figured out how to 'game' the engine after the first game .... and had a rather boring game the second time).

At least this way I can play an economic empire game because there's really no point in competing with the AI powers now (which was something I enjoyed in the original Col.

Too bad the 99% is hardwired (I hit that at around turn 650 of 900 in a Marathon game with only 8 cities - I am pretty sure this is not working as intended ... geez, at least I hope not.)
 
The problem is how to get the king to stop demanding a tax increase once you've hit the cap. The majority of the code between king and player is hidden away in the depths of the exe and not made available to modders. For some reason, Firaxis has always felt they needed to guard this code... I don't know why, but it annoys me because I wanted to make taxes yield-specific. So instead of an across the board tax increase, they'll ask for a tax increase on whatever commodity you're selling the most (and whichever commodity you'll dump in the harbor if you reject the increase). Unfortunately, there doesn't seem to be any way to do this.
 
The problem is how to get the king to stop demanding a tax increase once you've hit the cap. The majority of the code between king and player is hidden away in the depths of the exe and not made available to modders. For some reason, Firaxis has always felt they needed to guard this code... I don't know why, but it annoys me because I wanted to make taxes yield-specific. So instead of an across the board tax increase, they'll ask for a tax increase on whatever commodity you're selling the most (and whichever commodity you'll dump in the harbor if you reject the increase). Unfortunately, there doesn't seem to be any way to do this.

I suppose it can be not so hard to implement in gamecore.dll. If you can realize all user interface change required for it I can change code and make complete mod from it.

And I am not complete sure will such feature improve gameplay or just add inconveniences for player. But sounds intresting.
 
I suppose it can be not so hard to implement in gamecore.dll. If you can realize all user interface change required for it I can change code and make complete mod from it.

And I am not complete sure will such feature improve gameplay or just add inconveniences for player. But sounds intresting.

Believe me, it is. I've been modding the SDK for a few years now in Civ4. Firaxis has kept most of the diplomatic code in the exe file which we cannot edit. In fact, it wasn't even until the latest Civ4 patch that modders could add new tradeable items.
 
Believe me, it is. I've been modding the SDK for a few years now in Civ4. Firaxis has kept most of the diplomatic code in the exe file which we cannot edit. In fact, it wasn't even until the latest Civ4 patch that modders could add new tradeable items.

Ye, I didn't check what contains diplomacy about tax rate. Will check it at evening. So far I only checked how taxes processed and raised. At that point must be no problem to make it separated by yield. But diplomacy - yes, can be problem, I haven't check it so far.
 
Hello,

I'm a player from the german CIV - community (www.civforum.de). I programed a MOD which include a maximum tax-rate to the game.

This maximum tay rate is controlled by the level of difficulty. If you refuse the gold payment to your king, the maximum rate ist increase. If you accept the payment the maximum rate is decrease. You can see this maximum tax rate in the europe-screen next to the current tax rate.

Additionally this Mod also include a new education system. (No increase of education time, but the time is basically higher than in Civ4:Col "vanilla"... and you must build a college or university to get ah higher education (elder statesman)).

You can download it form here.

If you only need the maximum tax rate you can download the sources (here) and look at the comment "NBMOD" in the files. So you can extract my code to program your own mod.

I hope it will help, and sorry for my poor english :shifty:

Netbandit
 
Believe me, it is. I've been modding the SDK for a few years now in Civ4. Firaxis has kept most of the diplomatic code in the exe file which we cannot edit. In fact, it wasn't even until the latest Civ4 patch that modders could add new tradeable items.

Ok, I've played a little about it.
Now I can say - it's possible to setup separate taxes for each commodity. And, of course, show tax dialog related to the exact commodity (probably - mostly traded) and declare boycott no this same commodity.

I didn't catch yet every detail, but if we'll set tax alway on 'Most traded commodity' there must be all ok.

I also didn't learn so far how to save personal data in the mod (there will be an array of taxes insted of single tax value) but I suppose it must be possible (I've seen related article somewhere there)

So, it's possible to make such a mod.

But, I still not sure it will be too nice. It souds great, but I can see a problem here. Right now you have a choise - either to stop trading your most common resource (you most income) or to recieve tax for it and all other resources. It can be hard choise.
But if you will have the simply choice as either stop trade you most common resource or set up tax for it and only it, then it's obvious that any tax is better then no trade at all.
 
Back
Top Bottom