scribbler
Warlord
Don't worry, those Brits are just jealous of our success.![]()
Well, yeah. Plus they're still peeved about getting the Most Successful title taken away from them by way of Germany and Japan

Don't worry, those Brits are just jealous of our success.![]()
I think it's a great idea. You don't even have to make it dependent on AND's installer if you don't want to; nothing stops you from self-distributing it too.
@Afforess
Awesome! However I would still like it to stay as an option in AND rather than self distributing since AND was ment to be a RoM community mod.
Anywho which mods of yours can I combine into my "uber mod"? So far I have ...
- Misc Mod
- Water Mod
- Military Mod
- Health Mod
- Domestic Animals Mod
- Science Mod
- Transportation Mod
- Garbage Mod
- disabled buildings from Early Buildings
- disabled Buildings from Civic Buildings
- Towers and Walls Mod
I would like to add the following ...
- Firestorm Mod
- Zoological Buildings Mod
- Farming Mod
- Education Mod (Gladiator School, Drama School, Music School, etc)
- Public Pool (from the Sports Mod)
- Misc Mod (Cryogenic Prison, Saloon, etc)
- NIMBY Mod
- GeneralStaff's Vacation Mod (National Parks, Cruse Ship Port, etc)
- All of Early Buildings (or at least some key buildings like the weaver, tailor, apiary, candlemaker, etc)
In short which can I use of these?
Once combined you can take them out of the installation, thus making far fewer choice for custom installation.
All of them. You have permission to modify and take over over all of those you listed. To be specific, you can have:
- Firestorm Mod
- Zoological Buildings Mod
- Farming Mod
- Education Mod
- Public Pool
- Misc Mod
- NIMBY Mod
- GeneralStaff's Vacation Mod
- The Buildings I cut from the Early Buildings.
By the way, I never delete perfectly good buildings. You will find I just commented out the buildings, so you should find it easy to turn them back on.
2. Aw darn I was hoping for some more of the early buildings (like the apiary, weaver's hut, wheelwright and stonemaker's hut. Sure you don't want to disable some more?
4. So once I get is all combined into one and uploaded you are going to take out the other mods that are completely combined right?
Nothing stops you from using the bForceOverwrite tag, and re-creating the building the way you see fit.
Yes. Unless you have something else in mind.
> CvGameCoreDLL.dll!CvCity::hasVicinityBonus(BonusTypes eBonus=8) 行18993 C++
CvGameCoreDLL.dll!CvCity::changeNumBonuses(BonusTypes eIndex=8, int iChange=-2) 行12112 + 0xc 字节 C++
CvGameCoreDLL.dll!CvPlot::setPlotGroup(PlayerTypes ePlayer=0, CvPlotGroup * pNewValue=0x00000000) 行7691 C++
CvGameCoreDLL.dll!CvPlotGroup::recalculatePlots() 行164 C++
CvGameCoreDLL.dll!CvPlayer::updatePlotGroups() 行4581 C++
CvGameCoreDLL.dll!CvGame::updatePlotGroups() 行2431 C++
void CvCity::changeNumBonuses(BonusTypes eIndex, int iChange)
{
FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
FAssertMsg(eIndex < GC.getNumBonusInfos(), "eIndex expected to be < GC.getNumBonusInfos()");
if (iChange != 0)
{
bool bOldHasBonus = hasBonus(eIndex);
/************************************************************************************************/
/* Afforess Start 04/23/10 */
/* */
/* */
/************************************************************************************************/
bool bHadVicinityBonus = hasVicinityBonus(eIndex);
/************************************************************************************************/
/* Afforess END */
/************************************************************************************************/
m_paiNumBonuses[eIndex] += iChange;
/************************************************************************************************/
/* Afforess Start 04/23/10 */
/* */
/* */
/************************************************************************************************/
[COLOR="Blue"]bool bHasVicinityBonus = hasVicinityBonus(eIndex);[/COLOR]
if (bOldHasBonus != hasBonus(eIndex))
{
if (hasBonus(eIndex))
{
[COLOR="red"]processBonus(eIndex, 1, bHadVicinityBonus != bHasVicinityBonus);[/COLOR]
}
else
{
[COLOR="Red"]processBonus(eIndex, -1, bHadVicinityBonus != bHasVicinityBonus);[/COLOR]
}
}
/************************************************************************************************/
/* Afforess END */
/************************************************************************************************/
if (isCorporationBonus(eIndex))
{
updateCorporation();
}
}
}
/************************************************************************************************/
/* Afforess Start 12/7/09 */
/* */
/* */
/************************************************************************************************/
for (iI = 0; iI < NUM_COMMERCE_TYPES; iI++)
{
changeBonusCommerceRateModifier(((CommerceTypes)iI), (getBonusCommerceRateModifier(((CommerceTypes)iI), eBonus) * iChange));
}
for (iI = 0; iI < GC.getNumBuildingInfos(); iI++)
{
if (getNumActiveBuilding((BuildingTypes)iI) > 0)
{
for (int iJ = 0; iJ < NUM_YIELD_TYPES; iJ++)
{
updateYieldRate((BuildingTypes)iI, (YieldTypes)iJ, ((getBuildingYieldChange((BuildingClassTypes)(GC.getBuildingInfo((BuildingTypes)iI).getBuildingClassType()), (YieldTypes)iJ)) + (GC.getBuildingInfo((BuildingTypes)iI).getBonusYieldChanges(eBonus, iJ) * getNumActiveBuilding((BuildingTypes)iI) * iChange)));
if (bLostVicinityBonus)
{
[COLOR="Red"]updateYieldRate((BuildingTypes)iI, (YieldTypes)iJ, ((getBuildingYieldChange((BuildingClassTypes)(GC.getBuildingInfo((BuildingTypes)iI).getBuildingClassType()), (YieldTypes)iJ)) + (GC.getBuildingInfo((BuildingTypes)iI).getVicinityBonusYieldChanges(eBonus, iJ) * iChange)));[/COLOR]
}
}
}
}
/************************************************************************************************/
/* Afforess END */
/************************************************************************************************/
}
bool CvCity::hasVicinityBonus(BonusTypes eBonus) const
{
//No sense in checking...
if (!hasBonus(eBonus))
{
return false;
}
bool bHasVicinityBonus = false;
for (int iI = 0; iI < [COLOR="red"]getNumCityPlots(); [/COLOR]iI++)
{
CvPlot* pLoopPlot = plotCity(getX_INLINE(), getY_INLINE(), iI);
if (pLoopPlot != NULL)
{
if (pLoopPlot->getBonusType() == eBonus)
{
if (pLoopPlot->getOwnerINLINE() == getOwnerINLINE())
{
if (pLoopPlot->isHasValidBonus() && pLoopPlot->isConnectedTo(this))
{
bHasVicinityBonus = true;
break;
}
}
}
}
}
if (!bHasVicinityBonus)
{
return false;
}
return true;
}
int CvCity::getNumCityPlots() const
{
int iRadius;
int var_city_plots;
if (getCultureLevel() == -1)
{
return NUM_CITY_PLOTS_1;
}
iRadius = GC.getCultureLevelInfo(getCultureLevel()).getCityRadius();
switch (iRadius)
{
case 3:
var_city_plots = NUM_CITY_PLOTS;
break;
case 2:
var_city_plots = NUM_CITY_PLOTS_2;
break;
case 1:
var_city_plots = NUM_CITY_PLOTS_1;
break;
default:
var_city_plots = NUM_CITY_PLOTS_2;
break;
}
return (var_city_plots);
}
bool CvCity::hasVicinityBonus(BonusTypes eBonus) const
{
//No sense in checking...
if (!hasBonus(eBonus))
{
return false;
}
bool bHasVicinityBonus = false;
for (int iI = 0; iI < [COLOR="red"]getNumCityPlots(); [/COLOR]iI++)
{
CvPlot* pLoopPlot = plotCity(getX_INLINE(), getY_INLINE(), iI);
if (pLoopPlot != NULL)
{
if (pLoopPlot->getBonusType() == eBonus)
{
[COLOR="Blue"]if (pLoopPlot->getOwnerINLINE() == getOwnerINLINE())[/COLOR]
{
if (pLoopPlot->isHasValidBonus() && pLoopPlot->isConnectedTo(this))
{
bHasVicinityBonus = true;
break;
}
}
}
}
}
if (!bHasVicinityBonus)
{
return false;
}
return true;
}
Do you remember that you changed the calculation method of city's culture radius? I guess this old way will not get the city's real working plots. To avoid this bug without modify many codes, I suggest you simply disable this feature temporarily.
Unless I'm missing something, I'm not sure that is the problem. CvCity::hasVicinityBonus() does check that you own the plot's:
Code:bool CvCity::hasVicinityBonus(BonusTypes eBonus) const { //No sense in checking... if (!hasBonus(eBonus)) { return false; } bool bHasVicinityBonus = false; for (int iI = 0; iI < [COLOR="red"]getNumCityPlots(); [/COLOR]iI++) { CvPlot* pLoopPlot = plotCity(getX_INLINE(), getY_INLINE(), iI); if (pLoopPlot != NULL) { if (pLoopPlot->getBonusType() == eBonus) { [COLOR="Blue"]if (pLoopPlot->getOwnerINLINE() == getOwnerINLINE())[/COLOR] { if (pLoopPlot->isHasValidBonus() && pLoopPlot->isConnectedTo(this)) { bHasVicinityBonus = true; break; } } } } } if (!bHasVicinityBonus) { return false; } return true; }
CvGameCoreDLL.dll!CvCity::hasVicinityBonus(BonusTypes eBonus=8) 行19018 C++
CvGameCoreDLL.dll!CvCity::changeNumBonuses(BonusTypes eIndex=8, int iChange=1) 行12122 + 0xc 字节 C++
CvGameCoreDLL.dll!CvPlotGroup::changeNumBonuses(BonusTypes eBonus=8, int iChange=1) 行248 C++
[COLOR="red"]CvGameCoreDLL.dll!CvPlot::updatePlotGroupBonus(bool bAdd=true) 行1269[/COLOR] C++
CvGameCoreDLL.dll!CvPlot::setPlotGroup(PlayerTypes ePlayer=0, CvPlotGroup * pNewValue=0x58e6aa68) 行7724 C++
CvGameCoreDLL.dll!CvPlotGroup::addPlot(CvPlot * pPlot=0x4f6624a4) 行86 C++
CvGameCoreDLL.dll!CvMap::combinePlotGroups(PlayerTypes ePlayer=0, CvPlotGroup * pPlotGroup1=0x5c534988, CvPlotGroup * pPlotGroup2=0x58e6aa68) 行564 C++
CvGameCoreDLL.dll!CvPlot::updatePlotGroup(PlayerTypes ePlayer=0, bool bRecalculate=true) 行7830 C++
> [COLOR="red"]CvGameCoreDLL.dll!CvPlotGroup::recalculatePlots() 行179 C++[/COLOR] CvGameCoreDLL.dll!CvPlayer::updatePlotGroups() 行4581 C++
CvGameCoreDLL.dll!CvGame::updatePlotGroups() 行2431 C++
void CvPlotGroup::recalculatePlots()
{
PROFILE_FUNC();
CLLNode<XYCoords>* pPlotNode;
CvPlot* pPlot;
CLinkList<XYCoords> oldPlotGroup;
XYCoords xy;
PlayerTypes eOwner;
int iCount;
eOwner = getOwnerINLINE();
pPlotNode = headPlotsNode();
if (pPlotNode != NULL)
{
pPlot = GC.getMapINLINE().plotSorenINLINE(pPlotNode->m_data.iX, pPlotNode->m_data.iY);
iCount = 0;
gDLL->getFAStarIFace()->SetData(&GC.getPlotGroupFinder(), &iCount);
gDLL->getFAStarIFace()->GeneratePath(&GC.getPlotGroupFinder(), pPlot->getX_INLINE(), pPlot->getY_INLINE(), -1, -1, false, eOwner);
if (iCount == getLengthPlots())
{
return;
}
}
{
PROFILE("CvPlotGroup::recalculatePlots update");
oldPlotGroup.clear();
pPlotNode = headPlotsNode();
while (pPlotNode != NULL)
{
PROFILE("CvPlotGroup::recalculatePlots update 1");
pPlot = GC.getMapINLINE().plotSorenINLINE(pPlotNode->m_data.iX, pPlotNode->m_data.iY);
FAssertMsg(pPlot != NULL, "Plot is not assigned a valid value");
xy.iX = pPlot->getX_INLINE();
xy.iY = pPlot->getY_INLINE();
oldPlotGroup.insertAtEnd(xy);
[COLOR="red"]pPlot->setPlotGroup(eOwner, NULL);[/COLOR]
pPlotNode = deletePlotsNode(pPlotNode); // will delete this PlotGroup...
}
pPlotNode = oldPlotGroup.head();
while (pPlotNode != NULL)
{
PROFILE("CvPlotGroup::recalculatePlots update 2");
pPlot = GC.getMapINLINE().plotSorenINLINE(pPlotNode->m_data.iX, pPlotNode->m_data.iY);
FAssertMsg(pPlot != NULL, "Plot is not assigned a valid value");
[COLOR="red"]pPlot->updatePlotGroup(eOwner, true);[/COLOR]
pPlotNode = oldPlotGroup.deleteNode(pPlotNode);
}
}
}
void CvPlot::setPlotGroup(PlayerTypes ePlayer, CvPlotGroup* pNewValue)
{
int iI;
CvPlotGroup* pOldPlotGroup = getPlotGroup(ePlayer);
if (pOldPlotGroup != pNewValue)
{
if (NULL == m_aiPlotGroup)
{
m_aiPlotGroup = new int[MAX_PLAYERS];
for (int iI = 0; iI < MAX_PLAYERS; ++iI)
{
m_aiPlotGroup[iI] = FFreeList::INVALID_INDEX;
}
}
CvCity* pCity = getPlotCity();
if (ePlayer == getOwnerINLINE())
{
updatePlotGroupBonus(false);
}
if (pOldPlotGroup != NULL)
{
if (pCity != NULL)
{
if (pCity->getOwnerINLINE() == ePlayer)
{
FAssertMsg((0 < GC.getNumBonusInfos()), "GC.getNumBonusInfos() is not greater than zero but an array is being allocated in CvPlot::setPlotGroup");
for (iI = 0; iI < GC.getNumBonusInfos(); ++iI)
{
[COLOR="red"]pCity->changeNumBonuses(((BonusTypes)iI), -(pOldPlotGroup->getNumBonuses((BonusTypes)iI)));[/COLOR] }
}
}
}
if (pNewValue == NULL)
{
m_aiPlotGroup[ePlayer] = FFreeList::INVALID_INDEX;
}
else
{
m_aiPlotGroup[ePlayer] = pNewValue->getID();
}
if (getPlotGroup(ePlayer) != NULL)
{
if (pCity != NULL)
{
if (pCity->getOwnerINLINE() == ePlayer)
{
FAssertMsg((0 < GC.getNumBonusInfos()), "GC.getNumBonusInfos() is not greater than zero but an array is being allocated in CvPlot::setPlotGroup");
for (iI = 0; iI < GC.getNumBonusInfos(); ++iI)
{
pCity->changeNumBonuses(((BonusTypes)iI), getPlotGroup(ePlayer)->getNumBonuses((BonusTypes)iI));
}
}
}
}
if (ePlayer == getOwnerINLINE())
{
updatePlotGroupBonus(true);
}
}
}
void CvPlot::updatePlotGroupBonus(bool bAdd)
{
PROFILE_FUNC();
CvCity* pPlotCity;
CvPlotGroup* pPlotGroup;
BonusTypes eNonObsoleteBonus;
int iI;
if (!isOwned())
{
return;
}
pPlotGroup = getPlotGroup(getOwnerINLINE());
if (pPlotGroup != NULL)
{
pPlotCity = getPlotCity();
if (pPlotCity != NULL)
{
for (iI = 0; iI < GC.getNumBonusInfos(); ++iI)
{
if (!GET_TEAM(getTeam()).isBonusObsolete((BonusTypes)iI))
{
pPlotGroup->changeNumBonuses(((BonusTypes)iI), (pPlotCity->getFreeBonus((BonusTypes)iI) * ((bAdd) ? 1 : -1)));
}
}
if (pPlotCity->isCapital())
{
for (iI = 0; iI < GC.getNumBonusInfos(); ++iI)
{
pPlotGroup->changeNumBonuses(((BonusTypes)iI), (GET_PLAYER(getOwnerINLINE()).getBonusExport((BonusTypes)iI) * ((bAdd) ? -1 : 1)));
pPlotGroup->changeNumBonuses(((BonusTypes)iI), (GET_PLAYER(getOwnerINLINE()).getBonusImport((BonusTypes)iI) * ((bAdd) ? 1 : -1)));
}
}
}
eNonObsoleteBonus = getNonObsoleteBonusType(getTeam());
if (eNonObsoleteBonus != NO_BONUS)
{
if (GET_TEAM(getTeam()).isHasTech((TechTypes)(GC.getBonusInfo(eNonObsoleteBonus).getTechCityTrade())))
{
if (isCity(true, getTeam()) ||
((getImprovementType() != NO_IMPROVEMENT) && GC.getImprovementInfo(getImprovementType()).isImprovementBonusTrade(eNonObsoleteBonus)))
{
if ((pPlotGroup != NULL) && isBonusNetwork(getTeam()))
{
[COLOR="red"]pPlotGroup->changeNumBonuses(eNonObsoleteBonus, ((bAdd) ? 1 : -1));[/COLOR]
}
}
}
}
}
}
void CvCity::changeNumBonuses(BonusTypes eIndex, int iChange)
{
FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
FAssertMsg(eIndex < GC.getNumBonusInfos(), "eIndex expected to be < GC.getNumBonusInfos()");
if (iChange != 0)
{
bool bOldHasBonus = hasBonus(eIndex);
/************************************************************************************************/
/* Afforess Start 04/23/10 */
/* */
/* */
/************************************************************************************************/
[COLOR="red"]bool bHadVicinityBonus = hasVicinityBonus(eIndex);[/COLOR]
/************************************************************************************************/
/* Afforess END */
/************************************************************************************************/
m_paiNumBonuses[eIndex] += iChange;
/************************************************************************************************/
/* Afforess Start 04/23/10 */
/* */
/* */
/************************************************************************************************/
[COLOR="red"]bool bHasVicinityBonus = hasVicinityBonus(eIndex);[/COLOR]
if (bOldHasBonus != hasBonus(eIndex))
{
if (hasBonus(eIndex))
{
[COLOR="red"]processBonus(eIndex, 1, bHadVicinityBonus != bHasVicinityBonus);[/COLOR] }
else
{
processBonus(eIndex, -1, bHadVicinityBonus != bHasVicinityBonus);
}
}
/************************************************************************************************/
/* Afforess END */
/************************************************************************************************/
if (isCorporationBonus(eIndex))
{
updateCorporation();
}
}
}
bool CvCity::hasVicinityBonus(BonusTypes eBonus) const
{
//No sense in checking...
if (!hasBonus(eBonus))
{
return false;
}
bool bHasVicinityBonus = false;
for (int iI = 0; iI < getNumCityPlots(); iI++)
{
CvPlot* pLoopPlot = plotCity(getX_INLINE(), getY_INLINE(), iI);
if (pLoopPlot != NULL)
{
if (pLoopPlot->getBonusType() == eBonus)
{
if (pLoopPlot->getOwnerINLINE() == getOwnerINLINE())
{
[COLOR="red"]if (pLoopPlot->isHasValidBonus() && pLoopPlot->isConnectedTo(this))[/COLOR]
{
bHasVicinityBonus = true;
break;
}
}
}
}
}
if (!bHasVicinityBonus)
{
return false;
}
return true;
}
bool CvPlot::isConnectedTo(const CvCity* pCity) const
{
FAssert(isOwned());
return (([COLOR="red"]getPlotGroup(getOwnerINLINE()[/COLOR]) == pCity->plotGroup(getOwnerINLINE())) || (getPlotGroup(pCity->getOwnerINLINE()) == pCity->plotGroup(pCity->getOwnerINLINE())));
}
[COLOR="red"]( the bonus' plot )CvGameCoreDLL.dll!CvPlot::isConnectedTo(const CvCity * pCity=0x5f47a060) 行1137 + 0x11 字节 C++ [/COLOR]
CvGameCoreDLL.dll!CvCity::hasVicinityBonus(BonusTypes eBonus=8) 行19010 + 0x1b 字节 C++
CvGameCoreDLL.dll!CvCity::changeNumBonuses(BonusTypes eIndex=8, int iChange=-2) 行12112 + 0xc 字节 C++
[COLOR="Red"]( the city's plot )CvGameCoreDLL.dll!CvPlot::setPlotGroup(PlayerTypes ePlayer=0, CvPlotGroup * pNewValue=0x00000000) 行7691 C++ [/COLOR]
CvGameCoreDLL.dll!CvPlotGroup::recalculatePlots() 行164 C++
CvGameCoreDLL.dll!CvPlayer::updatePlotGroups() 行4581 C++
CvGameCoreDLL.dll!CvGame::updatePlotGroups() 行2431 C++
[COLOR="red"]( bonus' plot )CvGameCoreDLL.dll!CvPlot::setPlotGroup(PlayerTypes ePlayer=0, CvPlotGroup * pNewValue=0x66454720) 行7663 C++ [/COLOR]
CvGameCoreDLL.dll!CvPlotGroup::addPlot(CvPlot * pPlot=0x4f623a64) 行86 C++
CvGameCoreDLL.dll!CvPlot::updatePlotGroup(PlayerTypes ePlayer=0, bool bRecalculate=true) 行7823 C++
CvGameCoreDLL.dll!CvPlotGroup::recalculatePlots() 行179 C++
CvGameCoreDLL.dll!CvPlayer::updatePlotGroups() 行4581 C++
CvGameCoreDLL.dll!CvGame::updatePlotGroups() 行2431 C++
void CvPlot::setPlotGroup(PlayerTypes ePlayer, CvPlotGroup* pNewValue)
{
int iI;
CvPlotGroup* pOldPlotGroup = getPlotGroup(ePlayer);
if (pOldPlotGroup != pNewValue)
{
if (NULL == m_aiPlotGroup)
{
m_aiPlotGroup = new int[MAX_PLAYERS];
for (int iI = 0; iI < MAX_PLAYERS; ++iI)
{
m_aiPlotGroup[iI] = FFreeList::INVALID_INDEX;
}
}
[COLOR="red"]CvCity* pCity = getPlotCity();[/COLOR]
if (ePlayer == getOwnerINLINE())
{
updatePlotGroupBonus(false);
}
if (pOldPlotGroup != NULL)
{
if (pCity != NULL)
{
if (pCity->getOwnerINLINE() == ePlayer)
{
FAssertMsg((0 < GC.getNumBonusInfos()), "GC.getNumBonusInfos() is not greater than zero but an array is being allocated in CvPlot::setPlotGroup");
for (iI = 0; iI < GC.getNumBonusInfos(); ++iI)
{
pCity->changeNumBonuses(((BonusTypes)iI), -(pOldPlotGroup->getNumBonuses((BonusTypes)iI)));
}
}
}
}
if (pNewValue == NULL)
{
m_aiPlotGroup[ePlayer] = FFreeList::INVALID_INDEX;
}
else
{
m_aiPlotGroup[ePlayer] = pNewValue->getID();
}
if (getPlotGroup(ePlayer) != NULL)
{
if (pCity != NULL)
{
if (pCity->getOwnerINLINE() == ePlayer)
{
FAssertMsg((0 < GC.getNumBonusInfos()), "GC.getNumBonusInfos() is not greater than zero but an array is being allocated in CvPlot::setPlotGroup");
for (iI = 0; iI < GC.getNumBonusInfos(); ++iI)
{
pCity->changeNumBonuses(((BonusTypes)iI), getPlotGroup(ePlayer)->getNumBonuses((BonusTypes)iI));
}
}
}
}
if (ePlayer == getOwnerINLINE())
{
updatePlotGroupBonus(true);
}
}
}
Not to sure wether its a bug or on my side, but yeah was running a clean version of a New Dawn, and in the diplomacy screen, for vote for me in the U.N. when i click on it i get no response or no reaction in the diplomacy screen from the AI player, tried most of them. Any idea?
I've noticed this with the Apostolic Palace. You ask them to vote for you - it's either available or not. They don't ask for anything for voting for you.