Chronicles of Mankind

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.
It's stable based on game speed. I've run multiple games in the TH Era without issue.

Not entirely accurate. You need to be really paying attention to your sub-category civics, or it can come around and bite you in the ass and you'll wind up losing part of your empire to to civil unrest.
 
When I launched the game it had several critical errors as if the files were missing
Sounds like the possibility of a) Not updated to 3.19 patch, or b) your winzip isn't updated to 64 bit.
 
So I was thinking a little more about Oligarhcy...

The original idea was (and still is) that Autocracy favors wide empires, Democracy favors tall empires, and Oligarchy is the middle way. Unfortunately this makes Oligarchy kind of useless/meaningless.

Here's an idea of making it a little more interesting is to rework events a little. Many events are about something bad happening and you have to solve the situation. Now most events have only 1 good choice while the others are just bad / less favorable and your choice is not a real strategic decision. It's like: "What do you want? 5 :gold:, 20 :gold: or 100 :gold:?"

Many / most of the events could be reworked to have 4 or 5 options:

  1. [BAD STUFF] You don't do anything about the situation. Face some serious penalties.
  2. [NEUTRAL] You solve the problem by spending a lot of money on it.
  3. [AUTOCRACY] You force your will on your subjects to get things done. Costs nothing but causes some temporary anger.
  4. [OLIGARCHY] Your supporters persuade the right people to do the right thing. Costs nothing.
  5. [DEMOCRACY] You spend lots of resources on convincing your voters to do what has to be done. Costs less than [NEUTRAL].
So there would be always at least 2 or 3 options available: Bad stuff, Neutral and a civic specific one.

I still don't feel that it would make Oligarchy so much more desirable though :(

Let me know what you think.
 
I continue here our conversation with @keldath :

Spoiler :


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>

So this is how I inserted the code:

Spoiler :


Code:
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);
    }
}


This part I omit:
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>


With this next part I have some trouble:
---
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>
--

I put the code here but I'm not sure about it:

Spoiler :


Code:
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

So I did this:
Spoiler :

Code:
    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);


And this one:
after this check:
Code:
if (bCapital)
{
kOwner.findNewCapital();
.....
on the end of the statement of the if check,
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.
...I don't understand what to do with it
:undecide:
[/URL]

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>

Okay, this was easy :) Added to GlobalDefines.xml


So, 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.

The xml entry was added:
1718359825292.png



Thanks for your help (again and again) @keldath :)
I owe you a beer :beer:
 
Last edited:
Just to make it clear: The xml entry was added when I tested it and there was no anarchy.
THX for your help in advance

Ma man!

You bring the beer i bring the snacks :)
Okay :)
 
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.
Okay, I'll do that. Thanks! 🙂

Should I use GitHub or anything will do it?
 
@<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.
 
@<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.
Like this?
1718963545623.png


Spoiler Something's wrong :

1>------ Build started: Project: CvGameCoreDLL, Configuration: Release-fast Win32 ------
1> Building source list
1> Running fastdep
1> CvPlayer.cpp
1>..\CvPlayer.cpp(8903): error C2143: syntax error : missing ';' before '}'
1> jom: F:\Games\Civilization 4\Beyond the Sword\Mods\Chronicles of Mankind\CvGameCoreDLL\project\Makefile [temp_files\Release\.\CvPlayer.obj] Error 2
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "set TARGET=Release
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: nmake source_list /NOLOGO
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: nmake fastdep /NOLOGO
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: nmake precompile /NOLOGO
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: bin\jom build /NOLOGO" exited with code 2.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 
Back
Top Bottom