Solver's Unofficial BtS Patch

Marioflag, August 16 is the latest. Though you may want to restore your espionage mission XML file.

No no i have already done that ;). I was just wondering if the change to AI using Poison water and Foment Unhappiness was implemented in 08/16/07 version because i didn't remember to see it before.thanks for the answer
 
Solver, have you seen the latest infinite loops posted on this thread?

Also, I haven't seen an AI recommendation thread, so I'll mention this here. In my first BTS game I played a huge fractal map with random settings. It turned out to have all the land mass fused into a giant pangea continent with two tiny 1-city islands close by. Despite the fact that there were no 'intercontinental trade routes' (with the possible exception of the 2 islands, I'm not sure how they were classified), the AI was building custom houses all over the place, and recommending the human player do the same.
 
Does anyone know where I can find the original files that were in cvgamecoredll with the vanilla bts? I changed them around and I want to reset them.
 
Does anyone know where I can find the original files that were in cvgamecoredll with the vanilla bts? I changed them around and I want to reset them.

The easiest and quickest way seems to be to de-install BtS and to install it again.
It will ask you for keeping saves and screenshots and some other things, so the whole operation is not that much complicated and might take around 15 minutes, if at all.

A precondition which has to be met of course will be to have the original CD's / DVD at hand.... :mischief:
 
There's a small bug with the domestic advisor. The value in parenthesis under culture is calculated incorrectly.

It appears to be calculating the next culture threshhold divided by the current culture rate. This is meaningless, however, as it fails to account for the city's current culture level.

For example, if your capital has a culture rate of 4 and currently has 140 culture and the next threshold is 500, the domestic advisor reads: 4 (125), when it should read: 4 (90).

Note that the mouseover in the city window shows the correct turns (eg 90).

Any chance we can add this to the quick fixes in the patch, Mr. Solver?


ew
 
I'll look at that infinite loop save, though I am fairly certain it'll be the same loop bug that I already know about but can't fix.

Enkidu Warrior, the Domestic Advisor bug isn't in the dll file, it's a Python error, and I want to stick to dll errors here.
 
I'll look at that infinite loop save, though I am fairly certain it'll be the same loop bug that I already know about but can't fix.

Enkidu Warrior, the Domestic Advisor bug isn't in the dll file, it's a Python error, and I want to stick to Python errors here.

You meant you want to stick to DLL errors, right?
 
Solver, I just made the following observations:

AI-Caravels will attack a privateer when under peace conditions, but during wartime they (completely outnumbering the privateer(s)) hide in the harbors. Same seems to be true for frigates.

For your convenience, I have uploaded a save.

Please have a look at Kerkouane and the other Carthagian harbors, which have been almost completely taken out of the game by just four ships.

If you would feel that this behaviour is not of your business, I would like to ask you to kindly inform Blake to take care of this.

Edit: I am making use of your dll as of August 16th.

Edit2: I think, you may disregard this posting. Two turns later the AI started to act as expected, that is to attack my ships with what he had.
Still, I don't know for what he was waiting before, but at least the AI makes use of the navy.
 

Attachments

I don't know whether it's the result of using this .dll or the fact that I'm using a very large earth map, but I've been getting ctd's about 1/3 of the time I load a saved game, giving the msg "bad memory allocation".

I'm really not sure which is causing this, the map or the .dll, but it doesn't happen on even huge terra maps with the .dll, and I wrote over my existing .dll so I can't go back to the previous one.

(I'm not short on ram either, 2GB RAM and 768MB for the vid card. Using vista, though.)

Any suggestions? I can do any rudimentary troubleshooting I am asked.
 
Here's a quick question for ya:

Is the AIPerEraModifier working as designed in the Handicaps file?

I ask because I customize the handicaps for my mod. We tend to keep it at Noble for Multiplayer purposes but that is too easy so I tweak the handicaps to suit taste.

Anyways, as I've started to increase the AIPerEraModifier, the AIs seem to be doing WORSE, not better. Granted its not a huge number, but each increase usually results in the AIs being more backwards than before.

The explanation of the modifier given on Blake/Iustus's SourceForge page for BetterAI is:

AIPerEraModifier:
AI only, percentage calculated as (100% - (AIPerEraModifier * era)), multiplied by: food needed to grow cities, civic upkeep costs, production costs, unit support costs, unit supply costs, unit upgrade costs, inflation rate, war weariness


OK, all of the AIPerEraModifiers already present in the game are as a negative number (ie -1 at Prince, -2 at Monarch etc). I've followed that example in my mod. But looking at the formula listed above, wouldnt a negative number be ADDING to the AI's costs/inflation/WW etc?

(100% - (-1*2)) = 102% which is then multiplied by all the AIs values etc. And as the Eras go by, this gets worse and worse particularly on the higher levels.

Is the 'definition' just incorrect or is the AI actually getting hosed by this? If its the latter, then that definately explains why people are thinking the AI techs worse etc....

Any ideas? Am I just reading something incorrectly or is the formula actually backwards?

Thanks!
 
my last bts game played with this Unofficial BtS Patch, everything was fine before i created my two corporations, i got a negative inflated costs and a negative total expenses, -1xxx total expeses.:lol:

i have checked the code, i think in function
Code:
int CvPlayer::getTotalCorporationMaintenance() const
{
	int iLoop;
	CvCity *pLoopCity;
	int iTotalCorporationMaintenance = 0;

	for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
	{
		iTotalCorporationMaintenance += pLoopCity->calculateCorporationMaintenanceTimes100() * pLoopCity->getMaintenanceModifier() / 100;
	}

	iTotalCorporationMaintenance /= 100;
	return abs(iTotalCorporationMaintenance);
}

the line in the loop should be
Code:
iTotalCorporationMaintenance += pLoopCity->calculateCorporationMaintenanceTimes100() * max(0, (pLoopCity->getMaintenanceModifier() + 100)) / 100;
 
I don't know whether it's the result of using this .dll or the fact that I'm using a very large earth map, but I've been getting ctd's about 1/3 of the time I load a saved game, giving the msg "bad memory allocation".

I'm really not sure which is causing this, the map or the .dll, but it doesn't happen on even huge terra maps with the .dll, and I wrote over my existing .dll so I can't go back to the previous one.

(I'm not short on ram either, 2GB RAM and 768MB for the vid card. Using vista, though.)

Any suggestions? I can do any rudimentary troubleshooting I am asked.

I've had CTDs from loading saved games too. I noticed it doesn't seem to crash the first time I load a game after booting up Civ 4, instead it's when I'm currently playing and I load a saved game. Happens pretty regularly too. It isn't too critical since they always work when I reload Civ 4, but it's still a little frustrating.
 
my last bts game played with this Unofficial BtS Patch, everything was fine before i created my two corporations, i got a negative inflated costs and a negative total expenses, -1xxx total expeses.:lol:

i have checked the code, i think in function
Code:
int CvPlayer::getTotalCorporationMaintenance() const
{
	int iLoop;
	CvCity *pLoopCity;
	int iTotalCorporationMaintenance = 0;

	for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
	{
		iTotalCorporationMaintenance += pLoopCity->calculateCorporationMaintenanceTimes100() * pLoopCity->getMaintenanceModifier() / 100;
	}

	iTotalCorporationMaintenance /= 100;
	return abs(iTotalCorporationMaintenance);
}

the line in the loop should be
Code:
iTotalCorporationMaintenance += pLoopCity->calculateCorporationMaintenanceTimes100() * max(0, (pLoopCity->getMaintenanceModifier() + 100)) / 100;

I do not immediately see why, though it's probably me being silly. The function should always return a positive value anyway, due to the return statement.
 
I do not immediately see why, though it's probably me being silly. The function should always return a positive value anyway, due to the return statement.

I don't know if the max of 0 is important (can the modifier go below -100?), but I think his main point is that you should multiply the maintenance by (100+modifier)/100, not by (modifier)/100. I.e., if getMaintenanceModifier always returns 0, i.e., no modifiers, then you're computing 0 for TotalCorporateMaintenance.
 
I do not immediately see why, though it's probably me being silly. The function should always return a positive value anyway, due to the return statement.

the function always returns a positive value. but function "calculateInflatedCosts" will return a negative value, because "calculatePreInflatedCosts" have a different way(a proper way) to calculate CorporationMaintenance

Code:
int CvPlayer::calculateInflatedCosts() const
{
	int iCosts;
	iCosts = calculatePreInflatedCosts();
	iCosts -= getTotalCorporationMaintenance(); // here iCosts will be negative
...

the reason is that "pLoopCity->getMaintenanceModifier()" always be a negtive value. if you built a CourtHouse, it's -50. when it's -50, your function shows the proper result(100+(-50) = abs(-50), but a wrong way), but my last game i played Holy Rome, it's -75, or Zulu it will be -70, the result will be different.

some official code also shows the right way how to calculate it:

in CvCity::updateMaintenance
Code:
iNewMaintenance = (calculateBaseMaintenanceTimes100() * max(0, (getMaintenanceModifier() + 100))) / 100;

in CvGameTextMgr::buildFinanceCityMaintString
Code:
iCorporationMaint += (pLoopCity->calculateCorporationMaintenanceTimes100() * max(0, (pLoopCity->getMaintenanceModifier() + 100))) / 100;
 
Hello. I am playing BTS with a no-cd crack. If I install this patch, will I require the CD to play?

Moderator Action: Piracy - We do not allow discussion of piracy or cd cracks!
Please read the forum rules: http://forums.civfanatics.com/showthread.php?t=422889
 
Back
Top Bottom