TC01
Deity
Okay, I'll merge everything and update probably either tonight or some time tomorrow (depending on how much time I have).
// Change way max number of barbarian units is generated
// Target = (Number of Unowned Tiles * (Current Era + 1)) - Num Barbs
// To get actual value, subtract rand number less than half the Target
/* Old Code:
iNeededBarbs = ((pLoopArea->getNumUnownedTiles() / iDivisor) - pLoopArea->getUnitsPerPlayer(BARBARIAN_PLAYER)); XXX eventually need to measure how many barbs of eBarbUnitAI we have in this area...
New Code:*/
int iNumBarbs = pLoopArea->getUnitsPerPlayer(BARBARIAN_PLAYER);
int iTarget = (pLoopArea->getNumUnownedTiles() * ((int)GC.getGame().getCurrentEra() + 1)) - iNumBarbs;
// int iTarget = ((pLoopArea->getNumUnownedTiles() / iDivisor) - iNumBarbs ) * ((int)GC.getGame().getCurrentEra() + 1);
// Buggy version, kept for historical purposes
int iTarget = (pLoopArea->getNumUnownedTiles() / iDivisor * ((int)GC.getGame).getCurrentEra() + 1)) - iNumBarbs;
Agreed, the AI doesn't seem to like building planetary defense type units even when you weight them heavily. In the B5 mod they stick with the free orbital defense unit at game start until it's destroyed and only add to the defense with units that are mobile. E.G. Transports or Recon units both of which are poor in defence against the early pirate/alien units.It was fun, but it is a bit tedious to do all the squadron recon every turn. Would have been more fun if the AI was competent at fighting the pirates too.
if (GC.getCivicInfo(eCivic).getUnitCombatCostMods(iUnitCombat) == -1)
//Added in Final Frontier SDK: TC01
// Gets unit cost mods from civics used by the player
// This eliminates python getUnitCostMod callback in CvGameUtils
int iCivicOption, iUnitCombat, iCostMod;
CivicTypes eCivic;
for (iCivicOption = 0; iCivicOption < GC.getNumCivicOptionInfos(); ++iCivicOption)
{
eCivic = getCivics((CivicOptionTypes)(iCivicOption));
iUnitCombat = GC.getUnitInfo(eUnit).getUnitCombatType();
if (iUnitCombat != NO_UNITCOMBAT)
{
if (GC.getCivicInfo(eCivic).getUnitCombatCostMods(iUnitCombat) != -1)
{
iCostMod = 100 + GC.getCivicInfo(eCivic).getUnitCombatCostMods(iUnitCombat);
iProductionNeeded *= iCostMod;
iProductionNeeded /= 100;
}
}
}
//End of Final Frontier SDK
pAlien = CyMap().plot(i)
Hi all, i've had an error message on starting to play that ican't locate the cause of despite having most of the error described to me in the screen shot below. Any clues as to how to fix the problem?
Never saw this since I have never used the No Aliens option...
That should be "CyMap().plotByIndex(i)".
ON LOAD:
Assert Failed
File: f:\civilization 4 mods\sdk stuff\dll 1 bts\1.651 debug dll\cvgamecoredll\cvglobals.cpp
Line: 3493
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type TRAIT_AGGRESSIVE not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml
----------------------------------------------------------
Assert Failed
File: f:\civilization 4 mods\sdk stuff\dll 1 bts\1.651 debug dll\cvgamecoredll\cvglobals.cpp
Line: 3493
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type TRAIT_CHARISMATIC not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml
----------------------------------------------------------
Assert Failed
File: f:\civilization 4 mods\sdk stuff\dll 1 bts\1.651 debug dll\cvgamecoredll\cvglobals.cpp
Line: 3493
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type TRAIT_CREATIVE not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml
----------------------------------------------------------
Assert Failed
File: f:\civilization 4 mods\sdk stuff\dll 1 bts\1.651 debug dll\cvgamecoredll\cvglobals.cpp
Line: 3493
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type TRAIT_FINANCIAL not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml
----------------------------------------------------------
Assert Failed
File: f:\civilization 4 mods\sdk stuff\dll 1 bts\1.651 debug dll\cvgamecoredll\cvglobals.cpp
Line: 3493
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type TRAIT_IMPERIALIST not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml
----------------------------------------------------------
Assert Failed
File: f:\civilization 4 mods\sdk stuff\dll 1 bts\1.651 debug dll\cvgamecoredll\cvglobals.cpp
Line: 3493
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type TRAIT_INDUSTRIOUS not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml
----------------------------------------------------------
Assert Failed
File: f:\civilization 4 mods\sdk stuff\dll 1 bts\1.651 debug dll\cvgamecoredll\cvglobals.cpp
Line: 3493
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type TRAIT_ORGANIZED not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml
----------------------------------------------------------
Assert Failed
File: f:\civilization 4 mods\sdk stuff\dll 1 bts\1.651 debug dll\cvgamecoredll\cvglobals.cpp
Line: 3493
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type TRAIT_PHILOSOPHICAL not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml
----------------------------------------------------------
Assert Failed
File: f:\civilization 4 mods\sdk stuff\dll 1 bts\1.651 debug dll\cvgamecoredll\cvglobals.cpp
Line: 3493
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type TRAIT_PROTECTIVE not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml
----------------------------------------------------------
Assert Failed
File: f:\civilization 4 mods\sdk stuff\dll 1 bts\1.651 debug dll\cvgamecoredll\cvglobals.cpp
Line: 3493
Expression: strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message: info type TRAIT_SPIRITUAL not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml
----------------------------------------------------------
Assert Failed
File: f:\civilization 4 mods\sdk stuff\dll 1 bts\1.651 debug dll\cvgamecoredll\cvplayer.cpp
Line: 11669
Expression: eIndex < GC.getNumCivicOptionInfos()
Message: eIndex is expected to be within maximum bounds (invalid Index)
----------------------------------------------------------
Assert Failed
File: f:\civilization 4 mods\sdk stuff\dll 1 bts\1.651 debug dll\cvgamecoredll\cvteam.cpp
Line: 3451
Expression: eIndex >= 0
Message: eIndex is expected to be non-negative (invalid Index)
----------------------------------------------------------
ON CLICKING NEXT TURN:
Assert Failed
File: f:\civilization 4 mods\sdk stuff\dll 1 bts\1.651 debug dll\cvgamecoredll\cvcity.cpp
Line: 1096
Expression: iCount == getBaseYieldRate((YieldTypes)iI)
Message:
----------------------------------------------------------