Building Better AI

JacobP

Chieftain
Joined
Jun 13, 2009
Messages
17
Good evening,

I've been tinkering around with doing some light modding and I thought it would be instructive to tinker around with the Better AI mod. However, I've hit a bit of a roadblock and I'm hoping someone can point me in the right direction.

I was looking through the source files that shipped with 0.82. I noticed that this isn't the complete source; I assume it's just the changed files. I'm having trouble figuring what version of the SDK it's based on. Do I just copy the files from "C:\Program Files\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\CvGameCoreDLL" and then replace the appropriate files with those from the source directory?

Thanks for your help!
 
Yeah, it's based of 3.19.

Another option, depending on how deep you want to go and what you're comfortable with is checking out the full source from:

http://sourceforge.net/projects/civ4betterai/develop

You need tortoisesvn or something similar. You would then still need to copy over the never changed boost and python folders.

SVN is really easy to use and cool. In the future you just ask it to update the code and it goes and gets the latest, can show you logs of what changed when and how. Plus it means you can play around with the truly latest code ...
 
Thank you both for your replies.

Do you by chance have a download link for the 3.19 SDK? I've been looking for it and haven't had a lot of success. All I can find on Firaxis' site is the SDK for Vanilla Civ IV.
 
The SDK source is installed in your game directory, right next to the DLL.
 
Thanks for the help! I was worried that would be the version from my install media, not the most recent patched version. It's nice to know the patches also update the SDK.
 
Some information for the benefit of others who may stumble onto this thread. If you take the base SDK project, then replace files with those from this project, you will see the following linker errors:

Code:
CvGameCoreDLL error LNK2019: unresolved external symbol "void __cdecl logBBAI(char *,...)" (?logBBAI@@YAXPADZZ) referenced in function "protected: int __thiscall CvUnitAI::AI_promotionValue(enum PromotionTypes)" (?AI_promotionValue@CvUnitAI@@IAEHW4PromotionTypes@@@Z)
CvGameCoreDLL error LNK2019: unresolved external symbol "void __cdecl logBBAI(char *,...)" (?logBBAI@@YAXPADZZ) referenced in function "public: void __thiscall CvPlayer::acquireCity(class CvCity *,bool,bool,bool)" (?acquireCity@CvPlayer@@QAEXPAVCvCity@@_N11@Z)
CvGameCoreDLL error LNK2019: unresolved external symbol "void __cdecl logBBAI(char *,...)" (?logBBAI@@YAXPADZZ) referenced in function "public: int __thiscall CvPlayerAI::AI_techValue(enum TechTypes,int,bool,bool,int *,int *,int *)const " (?AI_techValue@CvPlayerAI@@QBEHW4TechTypes@@H_N1PAH22@Z)
CvGameCoreDLL error LNK2001: unresolved external symbol "void __cdecl logBBAI(char *,...)" (?logBBAI@@YAXPADZZ)
CvGameCoreDLL error LNK2001: unresolved external symbol "void __cdecl logBBAI(char *,...)" (?logBBAI@@YAXPADZZ)
CvGameCoreDLL error LNK2019: unresolved external symbol "void __cdecl logBBAI(char *,...)" (?logBBAI@@YAXPADZZ) referenced in function "public: void __thiscall CvCity::hurry(enum HurryTypes)" (?hurry@CvCity@@QAEXW4HurryTypes@@@Z)
CvGameCoreDLL error LNK2019: unresolved external symbol "void __cdecl logBBAI(char *,...)" (?logBBAI@@YAXPADZZ) referenced in function "protected: bool __thiscall CvCityAI::AI_chooseLeastRepresentedUnit(class std::vector<struct std::pair<enum UnitAITypes,int>,class std::allocator<struct std::pair<enum UnitAITypes,int> > > &)" (?AI_chooseLeastRepresentedUnit@CvCityAI@@IAE_NAAV?$vector@U?$pair@W4UnitAITypes@@H@std@@V?$allocator@U?$pair@W4UnitAITypes@@H@std@@@2@@std@@@Z)
CvGameCoreDLL error LNK2001: unresolved external symbol "void __cdecl logBBAI(char *,...)" (?logBBAI@@YAXPADZZ)
CvGameCoreDLL error LNK2019: unresolved external symbol "void __cdecl logBBAI(char *,...)" (?logBBAI@@YAXPADZZ) referenced in function "public: int __thiscall CvGame::calculateReligionPercent(enum ReligionTypes)const " (?calculateReligionPercent@CvGame@@QBEHW4ReligionTypes@@@Z)
CvGameCoreDLL fatal error LNK1120: 1 unresolved externals

To correct, right click on the project then choose "Add Existing Item" and add BetterBTSAI.cpp and BetterBTSAP.h.
 
Back
Top Bottom