<Nexus>
Traveler of the Multiverse
Well... a re-install may help 


It's stable based on game speed. I've run multiple games in the TH Era without issue.I can't answer it myself. Haven't played/tested the trans-human era for a long time. Anyone else?
Actually dictatorships (autocracies) are far more stable than democracies. Democracies are easier to exploit.
Sounds like the possibility of a) Not updated to 3.19 patch, or b) your winzip isn't updated to 64 bit.When I launched the game it had several critical errors as if the files were missing
, 20
or 100
?"
Sounds NiceLet me know what you think.

hey buddy @<Nexus>
ok first -> in the function of ->void CvPlayer::findNewCapital() in CvPlayer.cpp.
place the below bulk somewhere in the middle of the set of iValue +=....:
Spoiler :
Code://doto113 keldath find the best capital enhanced start - by <Nexux> //BuildingClassTypes eCapitalBuilding2 = (BuildingClassTypes)GC.getInfoTypeForString(GC.getDefineSTRING("CAPITAL_BUILDINGCLASS_2")); BuildingTypes const eCapitalBuilding2 = getCivilization().getBuilding((BuildingClassTypes)GC.getInfoTypeForString( GC.getDefineSTRING("CAPITAL_BUILDINGCLASS_2"))); if (eCapitalBuilding2 != NO_BUILDING) { int eCapitalBuilding2Amnt = pLoopCity->getNumBuilding(eCapitalBuilding2); if (eCapitalBuilding2Amnt > 0) iValue += pLoopCity->getPopulation() * 2; } //BuildingClassTypes eCapitalBuilding3 = (BuildingClassTypes)GC.getInfoTypeForString(GC.getDefineSTRING("CAPITAL_BUILDINGCLASS_3")); BuildingTypes const eCapitalBuilding3 = getCivilization().getBuilding((BuildingClassTypes)GC.getInfoTypeForString( GC.getDefineSTRING("CAPITAL_BUILDINGCLASS_3"))); if (eCapitalBuilding3 != NO_BUILDING) { int eCapitalBuilding3Amnt = pLoopCity->getNumBuilding(eCapitalBuilding3); if (eCapitalBuilding3Amnt > 0) iValue += pLoopCity->getPopulation() * 2; } iValue += pLoopCity->getNumNationalWonders(); iValue += pLoopCity->getNumWorldWonders(); //doto113 keldath find the best capital enhanced start - by <Nexux>
void CvPlayer::findNewCapital()
{
CvCity* pOldCapital;
CvCity* pLoopCity;
CvCity* pBestCity;
BuildingTypes eCapitalBuilding;
int iValue;
int iBestValue;
int iLoop = 0;
eCapitalBuilding = ((BuildingTypes)(GC.getCivilizationInfo(getCivilizationType()).getCivilizationBuildings(GC.getDefineINT("CAPITAL_BUILDINGCLASS"))));
if (eCapitalBuilding == NO_BUILDING)
{
return;
}
pOldCapital = getCapitalCity();
iBestValue = 0;
pBestCity = NULL;
for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
{
if (pLoopCity != pOldCapital)
{
if (0 == pLoopCity->getNumRealBuilding(eCapitalBuilding))
{
iValue = (pLoopCity->getPopulation() * 4);
iValue += pLoopCity->getYieldRate(YIELD_FOOD);
iValue += (pLoopCity->getYieldRate(YIELD_PRODUCTION) * 3);
iValue += (pLoopCity->getYieldRate(YIELD_COMMERCE) * 2);
iValue += pLoopCity->getCultureLevel();
iValue += pLoopCity->getReligionCount();
iValue += pLoopCity->getCorporationCount();
iValue += (pLoopCity->getNumGreatPeople() * 2);
//doto113 keldath find the best capital enhanced start
//BuildingClassTypes eCapitalBuilding2 = (BuildingClassTypes)GC.getInfoTypeForString(GC.getDefineSTRING("CAPITAL_BUILDINGCLASS_2"));
BuildingTypes const eCapitalBuilding2 = getCivilization().getBuilding((BuildingClassTypes)GC.getInfoTypeForString(
GC.getDefineSTRING("CAPITAL_BUILDINGCLASS_2")));
if (eCapitalBuilding2 != NO_BUILDING)
{
int eCapitalBuilding2Amnt = pLoopCity->getNumBuilding(eCapitalBuilding2);
if (eCapitalBuilding2Amnt > 0)
iValue += pLoopCity->getPopulation() * 2;
}
//BuildingClassTypes eCapitalBuilding3 = (BuildingClassTypes)GC.getInfoTypeForString(GC.getDefineSTRING("CAPITAL_BUILDINGCLASS_3"));
BuildingTypes const eCapitalBuilding3 = getCivilization().getBuilding((BuildingClassTypes)GC.getInfoTypeForString(
GC.getDefineSTRING("CAPITAL_BUILDINGCLASS_3")));
if (eCapitalBuilding3 != NO_BUILDING)
{
int eCapitalBuilding3Amnt = pLoopCity->getNumBuilding(eCapitalBuilding3);
if (eCapitalBuilding3Amnt > 0)
iValue += pLoopCity->getPopulation() * 2;
}
iValue += pLoopCity->getNumNationalWonders();
iValue += pLoopCity->getNumWorldWonders();
//doto113 keldath find the best capital enhanced start
iValue *= (pLoopCity->calculateCulturePercent(getID()) + 100);
iValue /= 100;
if (iValue > iBestValue)
{
iBestValue = iValue;
pBestCity = pLoopCity;
}
}
}
}
if (pBestCity != NULL)
{
if (pOldCapital != NULL)
{
pOldCapital->setNumRealBuilding(eCapitalBuilding, 0);
}
FAssertMsg(!(pBestCity->getNumRealBuilding(eCapitalBuilding)), "(pBestCity->getNumRealBuilding(eCapitalBuilding)) did not return false as expected");
pBestCity->setNumRealBuilding(eCapitalBuilding, 1);
}
}
add in the globaldefines or in the altglobaldefines xml:
Spoiler :
Code:<!-- doto113 keldath find the best capital enhanced start - by <Nexux>--> </Define> <Define> <DefineName>CAPITAL_BUILDINGCLASS_2</DefineName> <DefineTextVal>BUILDINGCLASS_GREAT_PALACE</DefineTextVal> </Define> <Define> <DefineName>CAPITAL_BUILDINGCLASS_3</DefineName> <DefineTextVal>BUILDINGCLASS_VERSAILLES</DefineTextVal>
---
in the Cvplayer.cpp, under the function of
getCivicAnarchyLength
pastethe bulk:
Spoiler :
--Code://doto 113 -> loose capital anarchy start by <Nexus> int CvPlayer::getCapitalLossAnarchyLength() const // advc.132 { int const iMaxAnarchyTurns = getMaxAnarchyTurns(); // advc if (iMaxAnarchyTurns == 0) return 0; //if (/* <advc.132> */ !bIgnoreGoldenAge && /* </advc.132> */ isGoldenAge()) // return 0; int iAnarchyLength = 0; static int const iBASE_LOSS_CAPITAL_ANARCHY_LENGTH = GC.getDefineINT("BASE_LOSS_CAPITAL_ANARCHY_LENGTH"); // advc.opt iAnarchyLength += iBASE_LOSS_CAPITAL_ANARCHY_LENGTH; iAnarchyLength += ((getNumCities() * GC.getInfo(GC.getMap(). getWorldSize()).getNumCitiesAnarchyPercent()) / 100); iAnarchyLength = ((iAnarchyLength * std::max(0, getAnarchyModifier() + 100)) / 100); if (iAnarchyLength == 0) return 0; iAnarchyLength *= GC.getInfo(GC.getGame().getGameSpeedType()).getAnarchyPercent(); iAnarchyLength /= 100; iAnarchyLength *= GC.getInfo(GC.getGame().getStartEra()).getAnarchyPercent(); iAnarchyLength /= 100; return range(iAnarchyLength, 1, iMaxAnarchyTurns); } //doto 113 -> loose capital anarchy end by <Nexus>
void CvPlayer::revolution(CivicTypes* paeNewCivics, bool bForce)
{
int iAnarchyLength;
int iI;
int iCivicChanges = 0;
if (!bForce && !canRevolution(paeNewCivics))
{
return;
}
// BUG - Revolution Event - start
CivicTypes* paeOldCivics = new CivicTypes[GC.getNumCivicOptionInfos()];
for (iI = 0; iI < GC.getNumCivicOptionInfos(); iI++)
{
paeOldCivics[iI] = getCivics(((CivicOptionTypes)iI));
}
// BUG - Revolution Event - end
iAnarchyLength = getCivicAnarchyLength(paeNewCivics);
if (iAnarchyLength > 0)
{
changeAnarchyTurns(iAnarchyLength);
}
bool bRecalc = false; // f1rpo
for (iI = 0; iI < GC.getNumCivicOptionInfos(); iI++)
{
if ( paeOldCivics[iI] != paeNewCivics[iI] )
{
iCivicChanges++;
if ( gPlayerLogLevel > 0)
{
logBBAIForTeam(getTeam(), "Player %S switches from %S to %S",
getCivilizationDescription(0),
GC.getCivicInfo(paeOldCivics[iI]).getDescription(),
GC.getCivicInfo(paeNewCivics[iI]).getDescription());
} // <f1rpo>
for (int j = 0; !bRecalc && j < GC.getNumSpecialistInfos(); j++)
{
for (int k = 0; !bRecalc && k < NUM_YIELD_TYPES; k++)
{
if (GC.getCivicInfo((CivicTypes)paeNewCivics[iI]).
getSpecialistYieldPercentChanges(j, k) != 0)
{
bRecalc = true;
}
}
} // </f1rpo>
setCivics(((CivicOptionTypes)iI), paeNewCivics[iI]);
civcSwitchInstance switchInstance;
switchInstance.iTurn = GC.getGameINLINE().getGameTurn();
switchInstance.eFromCivic = paeOldCivics[iI];
switchInstance.eToCivic = paeNewCivics[iI];
switchInstance.bNoAnarchy = (iAnarchyLength == 0);
m_civicSwitchHistory.push_back(switchInstance);
}
} // <f1rpo> Avoid infinite recursion by doing the recalc only once in the end
if (bRecalc)
GC.getGameINLINE().recalculateModifiers(); // </f1rpo>
NoteCivicsSwitched(iCivicChanges);
setRevolutionTimer(std::max(1, ((100 + getAnarchyModifier()) *
GC.getDefineINT("MIN_REVOLUTION_TURNS")) / 100) + iAnarchyLength);
if (getID() == GC.getGameINLINE().getActivePlayer())
{
gDLL->getInterfaceIFace()->setDirty(Popup_DIRTY_BIT, true); // to force an update of the civic chooser popup
}
// BUG - Revolution Event - start
CvEventReporter::getInstance().playerRevolution(getID(), iAnarchyLength, paeOldCivics, paeNewCivics);
delete [] paeOldCivics;
// BUG - Revolution Event - end
//doto 113 -> loose capital anarchy start
int CvPlayer::getCapitalLossAnarchyLength() const // advc.132
{
int const iMaxAnarchyTurns = getMaxAnarchyTurns(); // advc
if (iMaxAnarchyTurns == 0)
return 0;
//if (/* <advc.132> */ !bIgnoreGoldenAge && /* </advc.132> */ isGoldenAge())
// return 0;
int iAnarchyLength = 0;
static int const iBASE_LOSS_CAPITAL_ANARCHY_LENGTH = GC.getDefineINT("BASE_LOSS_CAPITAL_ANARCHY_LENGTH"); // advc.opt
iAnarchyLength += iBASE_LOSS_CAPITAL_ANARCHY_LENGTH;
iAnarchyLength += ((getNumCities() * GC.getInfo(GC.getMap().
getWorldSize()).getNumCitiesAnarchyPercent()) / 100);
iAnarchyLength = ((iAnarchyLength * std::max(0, getAnarchyModifier() + 100)) / 100);
if (iAnarchyLength == 0)
return 0;
iAnarchyLength *= GC.getInfo(GC.getGame().getGameSpeedType()).getAnarchyPercent();
iAnarchyLength /= 100;
iAnarchyLength *= GC.getInfo(GC.getGame().getStartEra()).getAnarchyPercent();
iAnarchyLength /= 100;
return range(iAnarchyLength, 1, iMaxAnarchyTurns);
}
//doto 113 -> loose capital anarchy end
}
in the CvPlayer.h under the function of getCivicAnarchyLength
place this small bulk:
Spoiler :
Code://doto 113 -> loose capital anarchy start int getCapitalLossAnarchyLength() const; // Exposed to Python //doto 113 -> loose capital anarchy end
int countHolyCities() const; // Exposed to Python
DllExport void foundReligion(ReligionTypes eReligion, ReligionTypes eSlotReligion, bool bAward); // Exposed to Python
bool hasHeadquarters(CorporationTypes eCorporation) const; // Exposed to Python
int countHeadquarters() const; // Exposed to Python
int countCorporations(CorporationTypes eCorporation) const; // Exposed to Python
void foundCorporation(CorporationTypes eCorporation); // Exposed to Python
DllExport int getCivicAnarchyLength(CivicTypes* paeNewCivics) const; // Exposed to Python
//doto 113 -> loose capital anarchy start
int getCapitalLossAnarchyLength() const; // Exposed to Python
//doto 113 -> loose capital anarchy end
DllExport int getReligionAnarchyLength() const; // Exposed to Python
DllExport int unitsRequiredForGoldenAge() const; // Exposed to Python
int unitsGoldenAgeCapable() const; // Exposed to Python
DllExport int unitsGoldenAgeReady() const; // Exposed to Python
void killGoldenAgeUnits(CvUnit* pUnitAlive);
...I don't understand what to do with itafter this check:
on the end of the statement of the if check,Code:if (bCapital) { kOwner.findNewCapital(); .....
after the text of the switched capital takes place
cause you need the anarchy to fire if its a capital and after all the stuff that changed the capital finishes.
in the globaldefines or the altglobaldefines xml add this:
[spoiler
Code:<!-- doto 113 -> loose capital anarchy start by <Nexus> --> </Define> <Define> <DefineName>BASE_LOSS_CAPITAL_ANARCHY_LENGTH</DefineName> <iDefineIntVal>1</iDefineIntVal>
Added to GlobalDefines.xmlSo, anarchy,
I have a vague memory on it.
Didnt i add an xml entry that manages it?
If not, we just need to add a line of code that sets the anarchy. Ill revisit the code today i hope.


OkayMa man!
You bring the beer i bring the snacks![]()

Yes, so I will greatly appreciate your help again ☺Ah so issue still stands right?
Okay, I'll do that. Thanks!sure man,
do me a favor,
pack up you dll files . im on a new cpu and i dont have the full code that i created for you back then.
nahh, just zip the cpp+ h files
Like this?@<Nexus>
add this:
//doto add anarchy best capital enhanced
changeAnarchyTurns(getCapitalLossAnarchyLength())
under this:
pBestCity->setNumRealBuilding(eCapitalBuilding, 1);
in the function of void CvPlayer::findNewCapital()
in cvplayer.cpp
let me know how much anarchy it creates.