[DOTO] Dawn Of The OverLords

ok, im working on strategic unit source cap.

each city that has a bonus in it, will provide a cap.
a unit built with a resource of that bonus cap will deduct its prereq bonus upon creation.

trough example:

2 cities
in my nation , 2 iron,

so each city has access to 2 iron.

the Iron cap will be -> 4.

so i can produce 4 units that uses iron,

when i produced 3 units, i will have 1 Iron cap remaining.-> 1/4

lets say i lost 1 Iron,
so now each city has access to 1 Iron. so my Iron Cap 1/2
if i lost the 2 Iron,
ill have 0/0,
how does that sound?
( i will ad a modifier to multiply the cap by 4 per resource + number of cities or something like that).
 
Traini Units Resources Cap is happening:
Cap.JPG
 
well looks like civ4 activity is at its slowest.
that saddens me , I played my first game of civ5...and playing civ6.
AI is numb and the games feels slow . despite, it feels rather fun.
even though i still think civ4 with AdvCiv still give a much challenging and immersive experience.

maybe its the twilight for civ4, with so many 4x games soon to be and exists.
but, i cant shake my commitment and enjoyment for this game.
so, i still actively developing my mod :)

working on a new version, with focus on bonus Unit Cap as seen above. i really refined it along with AI code and
algorithms to calculate the Caps. i think it will give a new strategic layer for the game play.

Anyway,
blessing to all and peace.
 
well looks like civ4 activity is at its slowest.
that saddens me , I played my first game of civ5...and playing civ6.
AI is numb and the games feels slow . despite, it feels rather fun.
even though i still think civ4 with AdvCiv still give a much challenging and immersive experience.

maybe its the twilight for civ4, with so many 4x games soon to be and exists.
but, i cant shake my commitment and enjoyment for this game.
so, i still actively developing my mod :)

working on a new version, with focus on bonus Unit Cap as seen above. i really refined it along with AI code and
algorithms to calculate the Caps. i think it will give a new strategic layer for the game play.

Anyway,
blessing to all and peace.
I don't think it's a matter of CiV being in its twilight, but more of a matter of new games to try. It'll still be there as long as modders keep wanting to try things.
Personally, I solve my Civ itch by bouncing between Civ III to V, as dedicated modders like to keep things fresh. I can't really get into 6 though, because for me, it doesn't really feel like a 4x game. More of a city builder with some 4x elements added on.
Anyways, lol, CiV has stood the test of time, you and other modders on these boards should feel proud of your accomplishments in extending it's life.
 
@Drakarska
atleast your still around :)
. It'll still be there as long as modders keep wanting to try things.
i guess, same as me.

In the past month, i played 3 a bit, did a multiplayer in 5 and lost a single in Civ 6.
civ3 it was hard to get into, its mostly a war game :) which i like, but hard to stay true with 4,5,6.
6 is so overloaded with stuff, cant get my head around it all. also, i find that i dont like districts nor wonders on tiles.

Cant get into new 4x's, i tried old world and gal civ 4.
maybe millennia will bring some serious civ franchise challenge, as for civ7, well, it will probably be long and i have low expectation if they keep the civ6 feature bucket.

i guess, im still cvi4ing modding,

---
for my new version:
- bonus unit caps
- fix for a civic issue
- gonna use realism Invictus ranged attack over my ranged immunity.
- governor for now i removed, might re add it .
 
ok, im working on strategic unit source cap.

each city that has a bonus in it, will provide a cap.
a unit built with a resource of that bonus cap will deduct its prereq bonus upon creation.


how does that sound?
( i will ad a modifier to multiply the cap by 4 per resource + number of cities or something like that).
Ehhh... Sorry for the late reply.

I like the general idea and I would even go further with it.

I think there could be two types of cap:

1) A training cap
2) A fuel consumption cap


1) Training cap is how many units you can train per turn.
If you have access to 2 units of Iron than you can train units requiring Iron in 2 of your cities but your 3rd city cannot. This is a turn to turn limit.

2) Fuel consumption cap would be about how many units you can CONTROL you lose the ability train more. This will need a multiplier, let's say 10. If you have 2 units of Oil you can have 20 units requiring Oil. When you reach that cap you cannot train more of those kind of units. This is an overall limit.

What do you think about it?
 
maybe its the twilight for civ4, with so many 4x games soon to be and exists.
but, i cant shake my commitment and enjoyment for this game.
so, i still actively developing my mod :)
Same here.
Civ4 is an old game and in the past few weeks I have abandoned it for Heroes 3, which is even older :lol:
But it's community is still active with some really good mods.
So age alone is not a thing 🙂
Just think of chess.
 
@<Nexus>
Heroes 3 you say,
I have a top games list,civ, heroes3,xcom, Divinity os1,2.

I assume you play hota mod?
Very cool.

I liked the chess competition:)

Latley i played civ5 multiplayer with friends,no ai,so its quite nice.
Also had some civ6 and cov5 BE.

----
Fuel, i had thought about it plus someone once created a fuel mod here .
I wanted to go with first a unit cap. I formed a nice algorithm to calc the cap and its already done.

---
Also,
I converted the governor to a simpler think. Palace upgrade event tgat is cpp written.
Basen on platyping idea.

Ill do a release soon, got lazy a bit.
-
 
civ5 civ6 is good game.

but there's no 'select all city's production'

that's why i can't play them.

civ4 is only answer.
 
Alright, so I have finally returned from my HoMM3 / Icewind Dale / etc detour to Civ4 playing and modding :)

Now I try to merge these code. Let's see if Im doing it right:

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
}



To be continued...
:)
 
Let me continue in a new post:

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:

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>
[/spoiler]
Okay, this was easy :) Added to GlobalDefines.xml
 
ok, im working on strategic unit source cap.... how does that sound?
The fact is that the «Master of Mana» has a fully developed resource system. That is, there

1. Resources are produced by buildings and improvements

2. They (resources) accumulate.

3. And resources are spent on

a) building buildings and improvements

b) maintaining the existence of units

c) getting promotions (in the game, this is framed as getting weapons / armor)

d) missions. That is, attacks, searching for resources on tiles, etc.

Obviously, d) is our fuel and ammunition. Less obvious is that b) is food and possibly repairs/"spare parts".

That is, we can build a building in the city (warehouse?), that gives a minus to food, but at the same time produces a resource called "food supplies" - already as a resource for maintaining the existence of units.

In general, the "fantasists" have created a realistic economy. And a little earlier, as Merkava wisely noted, they also created a more adequate system of remote attacks/spells.

At the same time, a certain enthusiast on the forum currently working on the refinement/development of the mod. https://forums.civfanatics.com/threads/tweak-mod-for-xtended-master-of-mana-updates.684050/

Moreover, he is familiar with the code well enough to make adjustments to it.

Perhaps (sorry for the pathos) borrowing this system will breathe new life into the mainstream/non-fantasy Civ-4. Because it will allow you to compete with late games, etc. In general, this is an "application" for a new generation of "realistic" mods.

As for your concept, the catch is that instead of a fun race for resources all over the map, banal spam of cities with a minimum population and as close to the old cities as possible will be much more in demand. Which will further reduce the pace of territorial expansion. That is, it will reduce the motivation for fights and the dynamics of the game. At the same time, there is a rational grain in the idea. Now the game is designed so that the optimal way is a handful of megacities, and small settlements are a necessary evil. It is hardly necessary to clarify that in reality small settlements totally prevailed. The over-concentration of the population in megacities is seriously unfolding only now. In general, the balance should be reviewed. At the same time, there are a number of other points in the confrontation between large and small cities that suggest strange ideas about the game. For example, historically, large cities have not only grown almost exclusively due to migration. They even simply maintained the population only at the expense of it – the mortality rate often exceeded the birth rate and the population did not reproduce. Now the situation is repeating itself simply due to a drop in the birth rate – but yes, this is not a damn new situation. And it can be fairly reflected in the game, it seems to me. Someday, in honor of the release of «Civilization 10», of course.
 
Top Bottom