how does that sound?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,
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.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 guess, same as me.. It'll still be there as long as modders keep wanting to try things.
Ehhh... Sorry for the late reply.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).
Same here.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
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.
Okay, this was easy Added to GlobalDefines.xmlin the globaldefines or the altglobaldefines xml add this:
[spoiler
[/spoiler]Code:<!-- doto 113 -> loose capital anarchy start by <Nexus> --> </Define> <Define> <DefineName>BASE_LOSS_CAPITAL_ANARCHY_LENGTH</DefineName> <iDefineIntVal>1</iDefineIntVal>
The fact is that the «Master of Mana» has a fully developed resource system. That is, thereok, im working on strategic unit source cap.... how does that sound?