View Full Version : Global Warming - Info needed
Voltage Oct 28, 2007, 11:59 AM Im playing on a huge map with 12 Civlizations active. There has been a total of 4 tatical nukes launched and then i banned them with the United Nations Resolution shortly after.
I have a great deal of the map thats not in 'fog of war' tiles and i dont seem to see Nuclear meltdowns occuring at all and i dont have any nuclear plants. Im guessing they bring pollution to nearby tiles when its a meltdown.
Im now getting roughly TWO-THREE tiles per turn in my territory turning to desert. Its ruining me (on 521 turn). Ive noticed since ive got a huge modern unit army, global warming seems to get worse.
How can i stop it? How can i prevent it? What are the causes of global warming?
ori Oct 28, 2007, 12:24 PM for every nuke ever exploded (this includes nukes and nuclear plant meltdowns) there is a 20% chance every turn that one random land tile turns into desert.
If there really are only 4 nukes that have ever exploded then you have 4 chances of 20% each every turn for global warming to occur. You cannot stop it, you can prevent it somewhat by passing the nonproliferation resolution.
If it bothers you you can copy ...\Assets\XML\GlobalDefines.xml to ...\customassets\xml\ and change the following value:
GLOBAL_WARMING_PROB
20
to 0
This gets rid of global warming for good.
Freesmog Nov 15, 2007, 04:10 PM for every nuke ever exploded (this includes nukes and nuclear plant meltdowns) there is a 20% chance every turn that one random land tile turns into desert.
If there really are only 4 nukes that have ever exploded then you have 4 chances of 20% each every turn for global warming to occur. You cannot stop it, you can prevent it somewhat by passing the nonproliferation resolution.
If it bothers you you can copy ...\Assets\XML\GlobalDefines.xml to ...\customassets\xml\ and change the following value:
GLOBAL_WARMING_PROB
20
to 0
This gets rid of global warming for good.
Actually, this is not true. I changed it before my current game, and now global warming is increased, and it seems to be worse than before :(
ori Nov 15, 2007, 04:30 PM Actually, this is not true. I changed it before my current game, and now global warming is increased, and it seems to be worse than before :(
:band: Welcome to CFC :band:
the code (in the spoiler tags) is pretty clear on this so I am surprised. Are you sure you changed it in the right file (i.e. in the file used for the game you are using)? also could you post what it looks like in that file?
void CvGame::doGlobalWarming()
{
CvCity* pCity;
CvPlot* pPlot;
CvWString szBuffer;
TerrainTypes eWarmingTerrain;
bool bChanged;
int iI;
eWarmingTerrain = ((TerrainTypes)(GC.getDefineINT("GLOBAL_WARMING_TERRAIN")));
for (iI = 0; iI < getNukesExploded(); iI++)
{
if (getSorenRandNum(100, "Global Warming") < GC.getDefineINT("GLOBAL_WARMING_PROB"))
{
pPlot = GC.getMapINLINE().syncRandPlot(RANDPLOT_LAND | RANDPLOT_NOT_CITY);
if (pPlot != NULL)
{
bChanged = false;
if (pPlot->getTerrainType() != eWarmingTerrain)
{
if (pPlot->calculateTotalBestNatureYield(NO_TEAM) > 1)
{
pPlot->setTerrainType(eWarmingTerrain);
bChanged = true;
}
}
if (pPlot->getFeatureType() != NO_FEATURE)
{
if (pPlot->getFeatureType() != GC.getDefineINT("NUKE_FEATURE"))
{
pPlot->setFeatureType(NO_FEATURE);
bChanged = true;
}
}
if (bChanged)
{
pPlot->setImprovementType(NO_IMPROVEMENT);
pCity = GC.getMapINLINE().findCity(pPlot->getX_INLINE(), pPlot->getY_INLINE());
if (pCity != NULL)
{
if (pPlot->isVisible(pCity->getTeam(), false))
{
szBuffer = gDLL->getText("TXT_KEY_MISC_GLOBAL_WARMING_NEAR_CITY", pCity->getNameKey());
gDLL->getInterfaceIFace()->addMessage(pCity->getOwnerINLINE(), false, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_GLOBALWARMING", MESSAGE_TYPE_INFO, NULL, (ColorTypes)GC.getInfoTypeForString("COLOR_RED"), pPlot->getX_INLINE(), pPlot->getY_INLINE(), true, true);
}
}
}
}
}
}
}
Freesmog Nov 15, 2007, 05:33 PM Ooops, I didn't copy to that other folder. We'll see what happens now :D
Note: I am playing BTS, but the file change above left the BTS file alone, that is, I only changed the initial asset folder. I did notice a globaldefine page in the BTS asset folder, but was unable to alter any values.
:band: Welcome to CFC :band:
the code (in the spoiler tags) is pretty clear on this so I am surprised. Are you sure you changed it in the right file (i.e. in the file used for the game you are using)? also could you post what it looks like in that file?
void CvGame::doGlobalWarming()
{
CvCity* pCity;
CvPlot* pPlot;
CvWString szBuffer;
TerrainTypes eWarmingTerrain;
bool bChanged;
int iI;
eWarmingTerrain = ((TerrainTypes)(GC.getDefineINT("GLOBAL_WARMING_TERRAIN")));
for (iI = 0; iI < getNukesExploded(); iI++)
{
if (getSorenRandNum(100, "Global Warming") < GC.getDefineINT("GLOBAL_WARMING_PROB"))
{
pPlot = GC.getMapINLINE().syncRandPlot(RANDPLOT_LAND | RANDPLOT_NOT_CITY);
if (pPlot != NULL)
{
bChanged = false;
if (pPlot->getTerrainType() != eWarmingTerrain)
{
if (pPlot->calculateTotalBestNatureYield(NO_TEAM) > 1)
{
pPlot->setTerrainType(eWarmingTerrain);
bChanged = true;
}
}
if (pPlot->getFeatureType() != NO_FEATURE)
{
if (pPlot->getFeatureType() != GC.getDefineINT("NUKE_FEATURE"))
{
pPlot->setFeatureType(NO_FEATURE);
bChanged = true;
}
}
if (bChanged)
{
pPlot->setImprovementType(NO_IMPROVEMENT);
pCity = GC.getMapINLINE().findCity(pPlot->getX_INLINE(), pPlot->getY_INLINE());
if (pCity != NULL)
{
if (pPlot->isVisible(pCity->getTeam(), false))
{
szBuffer = gDLL->getText("TXT_KEY_MISC_GLOBAL_WARMING_NEAR_CITY", pCity->getNameKey());
gDLL->getInterfaceIFace()->addMessage(pCity->getOwnerINLINE(), false, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_GLOBALWARMING", MESSAGE_TYPE_INFO, NULL, (ColorTypes)GC.getInfoTypeForString("COLOR_RED"), pPlot->getX_INLINE(), pPlot->getY_INLINE(), true, true);
}
}
}
}
}
}
}
ori Nov 15, 2007, 06:44 PM there definitely is a globaldefines file in assets\xml also in BtS and you need to copy that file to my games\bts\custom assets\xml and make the change there...
Freesmog Nov 15, 2007, 08:00 PM there definitely is a globaldefines file in assets\xml also in BtS and you need to copy that file to my games\bts\custom assets\xml and make the change there...
Even though the one to copy is 35.7 KB over the BTS 47.7 KB?
Edit: I may have resolved this issue. I found the shortcut in BTS for civ4customassets, and oddly enough there was no globaldefine file (assuming the ONLY change from doing that, as my above comment about file size concern, is the global warming feature).
Freesmog Nov 15, 2007, 08:23 PM there definitely is a globaldefines file in assets\xml also in BtS and you need to copy that file to my games\bts\custom assets\xml and make the change there...
Hmm....now BTS has an error during xml loading of the game :(
ori Nov 16, 2007, 05:07 AM from where did you take the xml file and where did you put it before you changed it (full file paths would be good).
Freesmog Nov 16, 2007, 05:22 PM from where did you take the xml file and where did you put it before you changed it (full file paths would be good).
OK, I finally got it working. Thanks for all the help :goodjob:
I forgot to edit the BTS file.
|
|