Financial trouble

zuzim

Chieftain
Joined
Aug 20, 2009
Messages
7
Location
Stockholm
I was wondering exactly what "Financial trouble" is and how it works. I understand it has something to do with running a deficit economy, but more than that I don't know. Does it also take into account how much money you have at the moment? For example if I lose 10 gold per turn, does it matter if I have 100 or 1000 left? How about spending money on promotions for example, does that count as deficit? Is there a difference if I run +100 GPT but spend it all on promotions, or if I run -100 GPT but make up for it by capturing cities and selling techs?

Also, I don't really understand what "cult" and "rate" in the Revolution Index refers to. These effects always seem to appear together sometimes when I build a library or religious building, but then suddenly they can go away. It would be nice if someone could explain this.
 
I hate to post in this thread, but I was wondering if anyone had ever found out what Financial Trouble exactly meant? Or how the math works out for it exactly.
 
It's not a secret, you just need to know where to look.

Spoiler :
Code:
[COLOR="Blue"]bool[/COLOR] CvPlayerAI::AI_isFinancialTrouble() [COLOR="Blue"]const[/COLOR]
{
[COLOR="Green"]/************************************************************************************************/
/* BETTER_BTS_AI_MOD                      06/12/09                                jdog5000      */
/*                                                                                              */
/* Barbarian AI                                                                                 */
/************************************************************************************************/[/COLOR]
	[COLOR="Blue"]if[/COLOR]( isBarbarian() )
	{
		[COLOR="Blue"]return false[/COLOR];
	}
[COLOR="Green"]/************************************************************************************************/
/* BETTER_BTS_AI_MOD                       END                                                  */
/************************************************************************************************/[/COLOR]

	[COLOR="Green"]//if (getCommercePercent(COMMERCE_GOLD) > 50)[/COLOR]
	{
		[COLOR="Blue"]int[/COLOR] iNetCommerce = 1 + getCommerceRate(COMMERCE_GOLD) + getCommerceRate(COMMERCE_RESEARCH) + std::max(0, getGoldPerTurn());
[COLOR="Green"]/************************************************************************************************/
/* UNOFFICIAL_PATCH                       06/11/09                       jdog5000 & DanF5771    */
/*                                                                                              */
/* Bugfix                                                                                       */
/************************************************************************************************/
/* original BTS code
		int iNetExpenses = calculateInflatedCosts() + std::min(0, getGoldPerTurn());
*/[/COLOR]
		[COLOR="Blue"]int[/COLOR] iNetExpenses = calculateInflatedCosts() + std::max(0, -getGoldPerTurn());
[COLOR="Green"]/************************************************************************************************/
/* UNOFFICIAL_PATCH                        END                                                  */
/************************************************************************************************/		[/COLOR]
		
		[COLOR="Blue"]int[/COLOR] iFundedPercent = (100 * (iNetCommerce - iNetExpenses)) / std::max(1, iNetCommerce);
		
		[COLOR="Blue"]int[/COLOR] iSafePercent = 40;
		[COLOR="Blue"]if[/COLOR] (AI_avoidScience())
		{
			iSafePercent -= 8;
		}
		
		[COLOR="Blue"]if[/COLOR] (GET_TEAM(getTeam()).getAnyWarPlanCount(true))
		{
			iSafePercent -= 12;
		}
		
		[COLOR="Blue"]if[/COLOR] (isCurrentResearchRepeat())
		{
			iSafePercent -= 10;
		}
		
		[COLOR="Blue"]if[/COLOR] (iFundedPercent < iSafePercent)
		{
			[COLOR="Blue"]return true[/COLOR];
		}
	}

	[COLOR="Blue"]return false[/COLOR];
}
 
Top Bottom