Graceheart the Leopard
Resident Amur leopard
- Joined
- Sep 24, 2007
- Messages
- 3,476
How can you build improvements inside enemy territory? I'm trying to make an Entrench ability, but it's not really working.
How can you build improvements inside enemy territory? I'm trying to make an Entrench ability, but it's not really working.
And then the game still loads.Tag: ERA_ANCIENT in Info class was incorrect.
Current XML file is: xml\GameInfo/Civ4ForceControlInfos.xml
<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Firaxis Games (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- ForceControlInfos - This structure describes the name for each multiplayer option. -->
<Civ4ForceControlInfos xmlns="x-schema:CIV4GameInfoSchema.xml">
<ForceControlInfos>
<ForceControlInfo>
<Type>FORCECONTROL_SPEED</Type>
<Description>TXT_KEY_FORCE_CONTROL_SPEED</Description>
<Help>TXT_KEY_FORCE_CONTROL_SPEED_HELP</Help>
<bDefault>0</bDefault>
</ForceControlInfo>
<ForceControlInfo>
<Type>FORCECONTROL_HANDICAP</Type>
<Description>TXT_KEY_FORCE_CONTROL_HANDICAP</Description>
<Help>TXT_KEY_FORCE_CONTROL_HANDICAP_HELP</Help>
<bDefault>0</bDefault>
</ForceControlInfo>
<ForceControlInfo>
<Type>FORCECONTROL_OPTIONS</Type>
<Description>TXT_KEY_FORCE_CONTROL_OPTIONS</Description>
<Help>TXT_KEY_FORCE_CONTROL_OPTIONS_HELP</Help>
<bDefault>0</bDefault>
</ForceControlInfo>
<ForceControlInfo>
<Type>FORCECONTROL_VICTORIES</Type>
<Description>TXT_KEY_FORCE_CONTROL_VICTORIES</Description>
<Help>TXT_KEY_FORCE_CONTROL_VICTORIES_HELP</Help>
<bDefault>0</bDefault>
</ForceControlInfo>
<ForceControlInfo>
<Type>FORCECONTROL_MAX_TURNS</Type>
<Description>TXT_KEY_FORCE_CONTROL_MAX_TURNS</Description>
<Help>TXT_KEY_FORCE_CONTROL_MAX_TURNS_HELP</Help>
<bDefault>0</bDefault>
</ForceControlInfo>
<ForceControlInfo>
<Type>FORCECONTROL_MAX_CITY_ELIMINATION</Type>
<Description>TXT_KEY_FORCE_CONTROL_MAX_CITY_ELIMINATION</Description>
<Help>TXT_KEY_FORCE_CONTROL_MAX_CITY_ELIMINATION_HELP</Help>
<bDefault>0</bDefault>
</ForceControlInfo>
<ForceControlInfo>
<Type>FORCECONTROL_ADVANCED_START</Type>
<Description>TXT_KEY_FORCE_ADVANCED_START</Description>
<Help>TXT_KEY_FORCE_ADVANCED_START</Help>
<bDefault>0</bDefault>
</ForceControlInfo>
</ForceControlInfos>
</Civ4ForceControlInfos>
Lib.Spi't was right. It was in the GlobalDefines.xml. Thanks for the help.![]()
So you mean I was wrong. OK, I'm so sorry that I could not help you...![]()
Is it possible to change how many cities you must have on a landmass to grant independence to a colony? I want to grant independence to ALL the 1 tile islands.
bool CvPlayer::canSplitArea(int iAreaId) const
{
CvArea* pArea = GC.getMapINLINE().getArea(iAreaId);
CvCity* pCapital = getCapitalCity();
if (NULL == pCapital)
{
return false;
}
if (NULL == pArea || pArea == pCapital->area())
{
return false;
}
if (0 == pArea->getCitiesPerPlayer(getID()))
{
return false;
}
PlayerTypes ePlayer = getSplitEmpirePlayer(pArea->getID());
if (NO_PLAYER == ePlayer)
{
return false;
}
if (!GET_PLAYER(ePlayer).isAlive())
{
if (pArea->getCitiesPerPlayer(getID()) <= 1)
{
return false;
}
}
return true;
}
And the million dollar question is:
Why did they bother to check getCitiesPerPlayer twice...
bool [COLOR="Green"][B]CvPlayer::canSplitEmpire()[/B][/COLOR] const
{
int iLoopArea;
if (GC.getGameINLINE().isOption(GAMEOPTION_NO_VASSAL_STATES))
{
return false;
}
if (GET_TEAM(getTeam()).isAVassal())
{
return false;
}
CivLeaderArray aLeaders;
if (!getSplitEmpireLeaders(aLeaders))
{
return false;
}
bool bFoundArea = false;
for (CvArea* pLoopArea = GC.getMapINLINE().firstArea(&iLoopArea); pLoopArea != NULL; pLoopArea = GC.getMapINLINE().nextArea(&iLoopArea))
{
if (canSplitArea(pLoopArea->getID()))
{
bFoundArea = true;
break;
}
}
if (!bFoundArea)
{
return false;
}
return true;
}
bool CvDLLButtonPopup::launchFreeColonyPopup(CvPopup* pPopup, CvPopupInfo &info)
{
int iLoop;
PlayerTypes ePlayer = GC.getGameINLINE().getActivePlayer();
if (ePlayer == NO_PLAYER)
{
return false;
}
gDLL->getInterfaceIFace()->popupSetBodyString(pPopup, gDLL->getText("TXT_KEY_FREE_COLONY"));
if (GET_PLAYER(ePlayer).canSplitEmpire())
{
for(CvArea* pLoopArea = GC.getMapINLINE().firstArea(&iLoop); pLoopArea != NULL; pLoopArea = GC.getMapINLINE().nextArea(&iLoop))
{
if (GET_PLAYER(ePlayer).canSplitArea(pLoopArea->getID()))
{
CvWString szCityList;
int iCityLoop;
int iNumCities = 0;
for (CvCity* pLoopCity = GET_PLAYER(ePlayer).firstCity(&iCityLoop); pLoopCity != NULL; pLoopCity = GET_PLAYER(ePlayer).nextCity(&iCityLoop))
{
if (pLoopCity->area()->getID() == pLoopArea->getID())
{
if (!szCityList.empty())
{
szCityList += L", ";
}
++iNumCities;
szCityList += pLoopCity->getName();
}
}
CvWString szBuffer = gDLL->getText("TXT_KEY_SPLIT_EMPIRE", szCityList.GetCString());
gDLL->getInterfaceIFace()->popupAddGenericButton(pPopup, szBuffer, ARTFILEMGR.getInterfaceArtInfo("INTERFACE_BUTTONS_CITYSELECTION")->getPath(), pLoopArea->getID(), WIDGET_GENERAL);
}
}
}
Firaxis coders are fond of doing things in inefficient and redundant ways.
They (or Soren Johnson...?) enrolled students to code their stuff.
But it wouldn't make the best Civ of the franchise because Active Enterprises did that and it made the worst game of history.
And P.S.
Water tiles also form an area of their own.
The null check is to check whether the area is valid in the first place.
I think I've heard about each water mass is also an area.![]()