LPlate2
Warlord
- Joined
- Dec 27, 2018
- Messages
- 299
Hi,
I'm looking to add in another wonder (Wall of Thorns) that creates a graphic around a civ's borders like the the Great Wall. However, I also want to use the Great Wall graphic within the same mod.
The great wall graphic is generated when bBorderObstacle is set to 1.
In CvCity.cpp, the following code is triggered by this;
In FFH, when the Sanctuary spell is cast, it similarly creates the great wall around a civ. The trigger for this appears to be in CvPlayer but also uses this gDLL->getEngineIFace().
Does anyone know where I'll find the files referred to in the lines;
gDLL->getEngineIFace()->AddGreatWall(this); and
gDLL->getEngineIFace()->RemoveGreatWall(this);?
I'll want to edit them so that they can use different graphics depending on the wonder that has been constructed or else duplicate similar functions for each additional "border" wonder.
I'm looking to add in another wonder (Wall of Thorns) that creates a graphic around a civ's borders like the the Great Wall. However, I also want to use the Great Wall graphic within the same mod.
The great wall graphic is generated when bBorderObstacle is set to 1.
In CvCity.cpp, the following code is triggered by this;
Spoiler :
Code:
//great wall
if (bFirst)
{
if (GC.getBuildingInfo(eIndex).isAreaBorderObstacle())
{
int iCountExisting = 0;
for (iI = 0; iI < GC.getNumBuildingInfos(); iI++)
{
if (eIndex != iI && GC.getBuildingInfo((BuildingTypes)iI).isAreaBorderObstacle())
{
iCountExisting += getNumRealBuilding((BuildingTypes)iI);
}
}
if (iCountExisting == 1 && iNewValue == 0)
{
gDLL->getEngineIFace()->RemoveGreatWall(this);
}
else if (iCountExisting == 0 && iNewValue > 0)
{
gDLL->getEngineIFace()->AddGreatWall(this);
}
}
}
In FFH, when the Sanctuary spell is cast, it similarly creates the great wall around a civ. The trigger for this appears to be in CvPlayer but also uses this gDLL->getEngineIFace().
Spoiler :
Code:
void CvPlayer::changeSanctuaryTimer(int iChange)
{
if (iChange > 0)
{
gDLL->getEngineIFace()->AddGreatWall(getCapitalCity());
}
if (iChange != 0)
{
m_iSanctuaryTimer += iChange;
}
if (m_iSanctuaryTimer == 0)
{
gDLL->getEngineIFace()->RemoveGreatWall(getCapitalCity());
}
}
Does anyone know where I'll find the files referred to in the lines;
gDLL->getEngineIFace()->AddGreatWall(this); and
gDLL->getEngineIFace()->RemoveGreatWall(this);?
I'll want to edit them so that they can use different graphics depending on the wonder that has been constructed or else duplicate similar functions for each additional "border" wonder.