CommanderZ
Warlord
I'm trying to create a terain feature on a plot. I have this code (it is located in CvGame::doTurn()). The code is only lightly modified code from a nuke function:
This is the XML from globalDefines.xml:
It throws this assert message:
Without that line in CvGame.cpp is everything okay. The feature FEATURE_TIBERIUM_IMPACT works perfectly in editor.
I had exactly the same problem with setTerrainType() - it was somehow unable to load my XML definition from modded globalDefines.xml. I solved it by using the global warming terrain type definition (I needed to use desert anyways), but this approach cannot be applied now as I'm trying to load completely custom terrain feature. My XML definitions in the globalDefines.xml are simply under the default content. Integer values seem to work well.
Thanks for help.
Code:
pLoopPlot->setFeatureType((FeatureTypes)(GC.getDefineINT("TIBERIUM_FEATURE_IMPACT")))
Code:
<Define>
<DefineName>TIBERIUM_FEATURE_IMPACT</DefineName>
<DefineTextVal>FEATURE_TIBERIUM_IMPACT</DefineTextVal>
</Define>
Code:
Assert Failed
File: .\CvGlobals.cpp
Line: 1151
Expression: eFeatureNum < GC.getNumFeatureInfos()
Message:
----------------------------------------------------------
I had exactly the same problem with setTerrainType() - it was somehow unable to load my XML definition from modded globalDefines.xml. I solved it by using the global warming terrain type definition (I needed to use desert anyways), but this approach cannot be applied now as I'm trying to load completely custom terrain feature. My XML definitions in the globalDefines.xml are simply under the default content. Integer values seem to work well.
Thanks for help.