marioflag
History Addict
Marioflag, August 16 is the latest. Though you may want to restore your espionage mission XML file.
No no i have already done that

Marioflag, August 16 is the latest. Though you may want to restore your espionage mission XML file.
Solver, have you seen the latest infinite loops posted on this thread?
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.
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.
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);
}
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.
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.![]()
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.
int CvPlayer::calculateInflatedCosts() const
{
int iCosts;
iCosts = calculatePreInflatedCosts();
iCosts -= getTotalCorporationMaintenance(); // here iCosts will be negative
...
iNewMaintenance = (calculateBaseMaintenanceTimes100() * max(0, (getMaintenanceModifier() + 100))) / 100;
iCorporationMaint += (pLoopCity->calculateCorporationMaintenanceTimes100() * max(0, (pLoopCity->getMaintenanceModifier() + 100))) / 100;