Modders Guide to FfH2

I was just trying to add a few minor SDK changes I'd made a couple weeks ago to the 0.41b SDK using WinMerge, and I got to wondering what this new "AI may use Warlords to create super-medic units" stuff I came across was all about. Care to explain?

Do you mean by the code? If so, I have no idea. If not, its because in Civ4 bts, a unit with the warlord "promotion" could get some special promotions (combat VI, medic3promo's, etc.) In other words, the AI will purposely use a warlord on a unit with medic I and II to get medic III and the extra 15% heal rate.

Of course, this is pointless in FFH because units cannot promote themselves to get medic promotions.
 
I can't seem to get my modified 0.41b DLL to compile nearly as easily as the 0.41 version. There weren't a lot of changes and all of them worked fine in the old version (well, I got rid of the DllExport before my TempFeature and TempImprovement functions since I saw it was removed from your TempTerrain function of which they were based, but the rest was the same and ), but now I'm getting a lot of errors.

Code:
Switching to target: Final Release
Linking dynamic library: ..\Beyond the Sword\Assets\CvGameCoreDLL.dll
   Creating library ..\Beyond the Sword\Assets\CvGameCoreDLL.lib and object ..\Beyond the Sword\Assets\CvGameCoreDLL.exp
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::cityHurry(class CvCity *,enum HurryTypes)" (?cityHurry@CvEventReporter@@QAEXPAVCvCity@@W4HurryTypes@@@Z) referenced in function "public: void __thiscall CvCity::hurry(enum HurryTypes)" (?hurry@CvCity@@QAEXW4HurryTypes@@@Z)
CvSelectionGroup.obj : error LNK2001: unresolved external symbol "public: static class CvEventReporter & __cdecl CvEventReporter::getInstance(void)" (?getInstance@CvEventReporter@@SAAAV1@XZ)
CvTeam.obj : error LNK2001: unresolved external symbol "public: static class CvEventReporter & __cdecl CvEventReporter::getInstance(void)" (?getInstance@CvEventReporter@@SAAAV1@XZ)
CvUnit.obj : error LNK2001: unresolved external symbol "public: static class CvEventReporter & __cdecl CvEventReporter::getInstance(void)" (?getInstance@CvEventReporter@@SAAAV1@XZ)
CvGame.obj : error LNK2001: unresolved external symbol "public: static class CvEventReporter & __cdecl CvEventReporter::getInstance(void)" (?getInstance@CvEventReporter@@SAAAV1@XZ)
CvPlayer.obj : error LNK2001: unresolved external symbol "public: static class CvEventReporter & __cdecl CvEventReporter::getInstance(void)" (?getInstance@CvEventReporter@@SAAAV1@XZ)
CvPlayerAI.obj : error LNK2001: unresolved external symbol "public: static class CvEventReporter & __cdecl CvEventReporter::getInstance(void)" (?getInstance@CvEventReporter@@SAAAV1@XZ)
CvPlot.obj : error LNK2001: unresolved external symbol "public: static class CvEventReporter & __cdecl CvEventReporter::getInstance(void)" (?getInstance@CvEventReporter@@SAAAV1@XZ)
CvCity.obj : error LNK2019: unresolved external symbol "public: static class CvEventReporter & __cdecl CvEventReporter::getInstance(void)" (?getInstance@CvEventReporter@@SAAAV1@XZ) referenced in function "public: void __thiscall CvCity::hurry(enum HurryTypes)" (?hurry@CvCity@@QAEXW4HurryTypes@@@Z)
CvDLLButtonPopup.obj : error LNK2001: unresolved external symbol "public: static class CvEventReporter & __cdecl CvEventReporter::getInstance(void)" (?getInstance@CvEventReporter@@SAAAV1@XZ)
CvDLLWidgetData.obj : error LNK2001: unresolved external symbol "public: static class CvEventReporter & __cdecl CvEventReporter::getInstance(void)" (?getInstance@CvEventReporter@@SAAAV1@XZ)
CvDeal.obj : error LNK2001: unresolved external symbol "public: static class CvEventReporter & __cdecl CvEventReporter::getInstance(void)" (?getInstance@CvEventReporter@@SAAAV1@XZ)
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::cityGrowth(class CvCity *,enum PlayerTypes)" (?cityGrowth@CvEventReporter@@QAEXPAVCvCity@@W4PlayerTypes@@@Z) referenced in function "protected: void __thiscall CvCity::doGrowth(void)" (?doGrowth@CvCity@@IAEXXZ)
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::religionRemove(enum ReligionTypes,enum PlayerTypes,class CvCity *)" (?religionRemove@CvEventReporter@@QAEXW4ReligionTypes@@W4PlayerTypes@@PAVCvCity@@@Z) referenced in function "public: void __thiscall CvCity::setHasReligion(enum ReligionTypes,bool,bool,bool)" (?setHasReligion@CvCity@@QAEXW4ReligionTypes@@_N11@Z)
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::religionSpread(enum ReligionTypes,enum PlayerTypes,class CvCity *)" (?religionSpread@CvEventReporter@@QAEXW4ReligionTypes@@W4PlayerTypes@@PAVCvCity@@@Z) referenced in function "public: void __thiscall CvCity::setHasReligion(enum ReligionTypes,bool,bool,bool)" (?setHasReligion@CvCity@@QAEXW4ReligionTypes@@_N11@Z)
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::cityBuildingBuilding(class CvCity *,enum BuildingTypes)" (?cityBuildingBuilding@CvEventReporter@@QAEXPAVCvCity@@W4BuildingTypes@@@Z) referenced in function "public: void __thiscall CvCity::pushOrder(enum OrderTypes,int,int,bool,bool,bool,bool)" (?pushOrder@CvCity@@QAEXW4OrderTypes@@HH_N111@Z)
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::cityBuildingUnit(class CvCity *,enum UnitTypes)" (?cityBuildingUnit@CvEventReporter@@QAEXPAVCvCity@@W4UnitTypes@@@Z) referenced in function "public: void __thiscall CvCity::pushOrder(enum OrderTypes,int,int,bool,bool,bool,bool)" (?pushOrder@CvCity@@QAEXW4OrderTypes@@HH_N111@Z)
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::corporationRemove(enum CorporationTypes,enum PlayerTypes,class CvCity *)" (?corporationRemove@CvEventReporter@@QAEXW4CorporationTypes@@W4PlayerTypes@@PAVCvCity@@@Z) referenced in function "public: void __thiscall CvCity::setHasCorporation(enum CorporationTypes,bool,bool,bool)" (?setHasCorporation@CvCity@@QAEXW4CorporationTypes@@_N11@Z)
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::corporationSpread(enum CorporationTypes,enum PlayerTypes,class CvCity *)" (?corporationSpread@CvEventReporter@@QAEXW4CorporationTypes@@W4PlayerTypes@@PAVCvCity@@@Z) referenced in function "public: void __thiscall CvCity::setHasCorporation(enum CorporationTypes,bool,bool,bool)" (?setHasCorporation@CvCity@@QAEXW4CorporationTypes@@_N11@Z)
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::unitBuilt(class CvCity *,class CvUnit *)" (?unitBuilt@CvEventReporter@@QAEXPAVCvCity@@PAVCvUnit@@@Z) referenced in function "public: void __thiscall CvCity::popOrder(int,bool,bool)" (?popOrder@CvCity@@QAEXH_N0@Z)
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::buildingBuilt(class CvCity *,enum BuildingTypes)" (?buildingBuilt@CvEventReporter@@QAEXPAVCvCity@@W4BuildingTypes@@@Z) referenced in function "public: void __thiscall CvCity::popOrder(int,bool,bool)" (?popOrder@CvCity@@QAEXH_N0@Z)
CvUnit.obj : error LNK2001: unresolved external symbol "public: void __thiscall CvEventReporter::buildingBuilt(class CvCity *,enum BuildingTypes)" (?buildingBuilt@CvEventReporter@@QAEXPAVCvCity@@W4BuildingTypes@@@Z)
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::projectBuilt(class CvCity *,enum ProjectTypes)" (?projectBuilt@CvEventReporter@@QAEXPAVCvCity@@W4ProjectTypes@@@Z) referenced in function "public: void __thiscall CvCity::popOrder(int,bool,bool)" (?popOrder@CvCity@@QAEXH_N0@Z)
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::cultureExpansion(class CvCity *,enum PlayerTypes)" (?cultureExpansion@CvEventReporter@@QAEXPAVCvCity@@W4PlayerTypes@@@Z) referenced in function "public: void __thiscall CvCity::setCultureLevel(enum CultureLevelTypes,bool)" (?setCultureLevel@CvCity@@QAEXW4CultureLevelTypes@@_N@Z)
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::cityLost(class CvCity *)" (?cityLost@CvEventReporter@@QAEXPAVCvCity@@@Z) referenced in function "public: void __thiscall CvCity::kill(bool)" (?kill@CvCity@@QAEX_N@Z)
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::cityDoTurn(class CvCity *,enum PlayerTypes)" (?cityDoTurn@CvEventReporter@@QAEXPAVCvCity@@W4PlayerTypes@@@Z) referenced in function "public: void __thiscall CvCity::doTurn(void)" (?doTurn@CvCity@@QAEXXZ)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvMessageControl::sendFoundReligion(enum PlayerTypes,enum ReligionTypes,enum ReligionTypes)" (?sendFoundReligion@CvMessageControl@@QAEXW4PlayerTypes@@W4ReligionTypes@@1@Z) referenced in function "public: virtual void __thiscall CvDLLButtonPopup::OnOkClicked(class CvPopup *,class PopupReturn *,class CvPopupInfo &)" (?OnOkClicked@CvDLLButtonPopup@@UAEXPAVCvPopup@@PAVPopupReturn@@AAVCvPopupInfo@@@Z)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvMessageControl::sendLaunch(enum PlayerTypes,enum VictoryTypes)" (?sendLaunch@CvMessageControl@@QAEXW4PlayerTypes@@W4VictoryTypes@@@Z) referenced in function "public: virtual void __thiscall CvDLLButtonPopup::OnOkClicked(class CvPopup *,class PopupReturn *,class CvPopupInfo &)" (?OnOkClicked@CvDLLButtonPopup@@UAEXPAVCvPopup@@PAVPopupReturn@@AAVCvPopupInfo@@@Z)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvMessageControl::sendEmpireSplit(enum PlayerTypes,int)" (?sendEmpireSplit@CvMessageControl@@QAEXW4PlayerTypes@@H@Z) referenced in function "public: virtual void __thiscall CvDLLButtonPopup::OnOkClicked(class CvPopup *,class PopupReturn *,class CvPopupInfo &)" (?OnOkClicked@CvDLLButtonPopup@@UAEXPAVCvPopup@@PAVPopupReturn@@AAVCvPopupInfo@@@Z)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvMessageControl::sendEventTriggered(enum PlayerTypes,enum EventTypes,int)" (?sendEventTriggered@CvMessageControl@@QAEXW4PlayerTypes@@W4EventTypes@@H@Z) referenced in function "public: virtual void __thiscall CvDLLButtonPopup::OnOkClicked(class CvPopup *,class PopupReturn *,class CvPopupInfo &)" (?OnOkClicked@CvDLLButtonPopup@@UAEXPAVCvPopup@@PAVPopupReturn@@AAVCvPopupInfo@@@Z)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvMessageControl::sendExtendedGame(void)" (?sendExtendedGame@CvMessageControl@@QAEXXZ) referenced in function "public: virtual void __thiscall CvDLLButtonPopup::OnOkClicked(class CvPopup *,class PopupReturn *,class CvPopupInfo &)" (?OnOkClicked@CvDLLButtonPopup@@UAEXPAVCvPopup@@PAVPopupReturn@@AAVCvPopupInfo@@@Z)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvMessageControl::sendDiploVote(int,enum PlayerVoteTypes)" (?sendDiploVote@CvMessageControl@@QAEXHW4PlayerVoteTypes@@@Z) referenced in function "public: virtual void __thiscall CvDLLButtonPopup::OnOkClicked(class CvPopup *,class PopupReturn *,class CvPopupInfo &)" (?OnOkClicked@CvDLLButtonPopup@@UAEXPAVCvPopup@@PAVPopupReturn@@AAVCvPopupInfo@@@Z)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvMessageControl::sendChooseElection(int,int)" (?sendChooseElection@CvMessageControl@@QAEXHH@Z) referenced in function "public: virtual void __thiscall CvDLLButtonPopup::OnOkClicked(class CvPopup *,class PopupReturn *,class CvPopupInfo &)" (?OnOkClicked@CvDLLButtonPopup@@UAEXPAVCvPopup@@PAVPopupReturn@@AAVCvPopupInfo@@@Z)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvMessageControl::sendConvert(enum ReligionTypes)" (?sendConvert@CvMessageControl@@QAEXW4ReligionTypes@@@Z) referenced in function "public: virtual void __thiscall CvDLLButtonPopup::OnOkClicked(class CvPopup *,class PopupReturn *,class CvPopupInfo &)" (?OnOkClicked@CvDLLButtonPopup@@UAEXPAVCvPopup@@PAVPopupReturn@@AAVCvPopupInfo@@@Z)
CvDLLWidgetData.obj : error LNK2001: unresolved external symbol "public: void __thiscall CvMessageControl::sendConvert(enum ReligionTypes)" (?sendConvert@CvMessageControl@@QAEXW4ReligionTypes@@@Z)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvMessageControl::sendUpdateCivics(class std::vector<enum CivicTypes,class std::allocator<enum CivicTypes> > const &)" (?sendUpdateCivics@CvMessageControl@@QAEXABV?$vector@W4CivicTypes@@V?$allocator@W4CivicTypes@@@std@@@std@@@Z) referenced in function "public: virtual void __thiscall CvDLLButtonPopup::OnOkClicked(class CvPopup *,class PopupReturn *,class CvPopupInfo &)" (?OnOkClicked@CvDLLButtonPopup@@UAEXPAVCvPopup@@PAVPopupReturn@@AAVCvPopupInfo@@@Z)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::cityAcquiredAndKept(enum PlayerTypes,class CvCity *)" (?cityAcquiredAndKept@CvEventReporter@@QAEXW4PlayerTypes@@PAVCvCity@@@Z) referenced in function "public: virtual void __thiscall CvDLLButtonPopup::OnOkClicked(class CvPopup *,class PopupReturn *,class CvPopupInfo &)" (?OnOkClicked@CvDLLButtonPopup@@UAEXPAVCvPopup@@PAVPopupReturn@@AAVCvPopupInfo@@@Z)
CvPlayer.obj : error LNK2001: unresolved external symbol "public: void __thiscall CvEventReporter::cityAcquiredAndKept(enum PlayerTypes,class CvCity *)" (?cityAcquiredAndKept@CvEventReporter@@QAEXW4PlayerTypes@@PAVCvCity@@@Z)
CvPlayerAI.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::cityAcquiredAndKept(enum PlayerTypes,class CvCity *)" (?cityAcquiredAndKept@CvEventReporter@@QAEXW4PlayerTypes@@PAVCvCity@@@Z) referenced in function "public: int __thiscall CvPlayerAI::AI_getAttitudeVal(enum PlayerTypes,bool)const " (?AI_getAttitudeVal@CvPlayerAI@@QBEHW4PlayerTypes@@_N@Z)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvMessageControl::sendDoTask(int,enum TaskTypes,int,int,bool,bool,bool,bool)" (?sendDoTask@CvMessageControl@@QAEXHW4TaskTypes@@HH_N111@Z) referenced in function "public: virtual void __thiscall CvDLLButtonPopup::OnOkClicked(class CvPopup *,class PopupReturn *,class CvPopupInfo &)" (?OnOkClicked@CvDLLButtonPopup@@UAEXPAVCvPopup@@PAVPopupReturn@@AAVCvPopupInfo@@@Z)
CvGameInterface.obj : error LNK2001: unresolved external symbol "public: void __thiscall CvMessageControl::sendDoTask(int,enum TaskTypes,int,int,bool,bool,bool,bool)" (?sendDoTask@CvMessageControl@@QAEXHW4TaskTypes@@HH_N111@Z)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvMessageControl::sendChangeWar(enum TeamTypes,bool)" (?sendChangeWar@CvMessageControl@@QAEXW4TeamTypes@@_N@Z) referenced in function "public: virtual void __thiscall CvDLLButtonPopup::OnOkClicked(class CvPopup *,class PopupReturn *,class CvPopupInfo &)" (?OnOkClicked@CvDLLButtonPopup@@UAEXPAVCvPopup@@PAVPopupReturn@@AAVCvPopupInfo@@@Z)
CvDLLWidgetData.obj : error LNK2001: unresolved external symbol "public: void __thiscall CvMessageControl::sendChangeWar(enum TeamTypes,bool)" (?sendChangeWar@CvMessageControl@@QAEXW4TeamTypes@@_N@Z)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "public: static class CvMessageControl & __cdecl CvMessageControl::getInstance(void)" (?getInstance@CvMessageControl@@SAAAV1@XZ) referenced in function "public: virtual void __thiscall CvDLLButtonPopup::OnOkClicked(class CvPopup *,class PopupReturn *,class CvPopupInfo &)" (?OnOkClicked@CvDLLButtonPopup@@UAEXPAVCvPopup@@PAVPopupReturn@@AAVCvPopupInfo@@@Z)
CvDLLWidgetData.obj : error LNK2001: unresolved external symbol "public: static class CvMessageControl & __cdecl CvMessageControl::getInstance(void)" (?getInstance@CvMessageControl@@SAAAV1@XZ)
CvGame.obj : error LNK2001: unresolved external symbol "public: static class CvMessageControl & __cdecl CvMessageControl::getInstance(void)" (?getInstance@CvMessageControl@@SAAAV1@XZ)
CvGameInterface.obj : error LNK2001: unresolved external symbol "public: static class CvMessageControl & __cdecl CvMessageControl::getInstance(void)" (?getInstance@CvMessageControl@@SAAAV1@XZ)
CvDLLPython.obj : error LNK2019: unresolved external symbol "void __cdecl CyMessageControlInterface(void)" (?CyMessageControlInterface@@YAXXZ) referenced in function "void __cdecl DLLPublishToPython(void)" (?DLLPublishToPython@@YAXXZ)
CvDLLWidgetData.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::cityRename(class CvCity *)" (?cityRename@CvEventReporter@@QAEXPAVCvCity@@@Z) referenced in function "public: void __thiscall CvDLLWidgetData::doRenameCity(void)" (?doRenameCity@CvDLLWidgetData@@QAEXXZ)
CvDLLWidgetData.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::unitRename(class CvUnit *)" (?unitRename@CvEventReporter@@QAEXPAVCvUnit@@@Z) referenced in function "public: void __thiscall CvDLLWidgetData::doRenameUnit(void)" (?doRenameUnit@CvDLLWidgetData@@QAEXXZ)
Process terminated with status 1 (0 minutes, 9 seconds)
52 errors, 0 warnings


I guess I should have tried compiling an unmodified 0.41b dll first.

Edit: Oh, I see that this appears to be the same thing Ahwaric and cyther reported. I guess I'll wait until they have it resolved to try again. I should probably be focused on homework (especially my lab report) for now anyway.
 
Just got back from vacation on which I had limited access to the net, I am guessing from some of the posts that Kael has released a 3.19 compatible version before I cleaned up all my own bugs to release FF. Anyway, some answers:

I am having problem with 0.41 source. I can't compile it, as at the linking stage I get :
Spoiler :
CvCity.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvEventReporter::cityHurry(class CvCity *,enum HurryTypes)" (?cityHurry@CvEventReporter@@QAEXPAVCvCity@@W4HurryTypes@@@Z) referenced in function "public: void __thiscall CvCity::hurry(enum HurryTypes)" (?hurry@CvCity@@QAEXW4HurryTypes@@@Z)
CvSelectionGroup.obj : error LNK2001: unresolved external symbol "public: static class CvEventReporter & __cdecl CvEventReporter::getInstance(void)" (?getInstance@CvEventReporter@@SAAAV1@XZ)
CvTeam.obj : error LNK2001: unresolved external symbol "public: static class CvEventReporter & __cdecl CvEventReporter::getInstance(void)" (?getInstance@CvEventReporter@@SAAAV1@XZ)

nad 103 more such errors.

I found it when compiling Orbis updated source, but then checked unchanged FfH files and got the same result (on two different machines, running xp and vista).

I use VS2003. After starting CvGameCoreDLL.vcproj I switch to final release and then start Rebuild CvGameCoreDLL.
It works fine for both previous version of FfH source and 3.19 source that comes with the BtS patch. Only FfH gives me trouble.

Any idea what is wrong and what should I do?

Unresolved Externals means that you didn't do a COMPLETE RECOMPILE of the source, but you removed a function from one file, or changed how it is called (made it a CONST function, added more variables to be passed in....) So just do a clean build and you will be set.

I was just trying to add a few minor SDK changes I'd made a couple weeks ago to the 0.41b SDK using WinMerge, and I got to wondering what this new "AI may use Warlords to create super-medic units" stuff I came across was all about. Care to explain?

Firaxis just made it so that if someone has a promotion flagged as bLeader (so came by attaching a warlord to it) then they would REALLY want to gain promotions which enhance healing for the stack/nearby units. It's like 4 lines of code or so in the CvUnitAI.cpp file is about all.
 
Unresolved Externals means that you didn't do a COMPLETE RECOMPILE of the source, but you removed a function from one file, or changed how it is called (made it a CONST function, added more variables to be passed in....) So just do a clean build and you will be set.
I believe that is not the case. Unless complete recompile is different than rebuild command - removing all intermediate files and rebuilding from cpp and h files (which goes on it's own anyway, as the changes are quite big). I believe all obj files are created from scatch. But if there is something else I have to do, I would be grateful for explanation

Also, I believe there is something wrong with the FfH source, as I (and I am not the only one it seems) can't compile FfH even if I did not change a sigle thing in any of the files. On the other hand, I have no problems compiling BtS 3.19 source (or FfH 0.41)

Did anyone compile FfH with succes?
 
I too have been using mostly Rebuild.


When I used WinMerge to compare the custom dll I'd made and the 0.41b dll, I noticed that there were several files only on the right hand side. These mostly had "message" as part of their names. Maybe Kael forgot to post the whole source code?

There are also a lot of thing that became CONST in 0.41b, but I don't think I touched any of them.
 
Well, if you did a full rebuild and still got that error then it is a bit stranger. I would venture you just plain don't have the other function in your DLL anywhere at all. But that ought to give you a different error message. Though in Codeblocks it might phrase it this way, been a while since I used it.

Haven't tried to compile Kael's code yet, just recently downloaded it and planned to see how his and my 3.19 merges differ in the few places it intersected his code tomorrow.

There are 15 new files with 3.19 (and 1 removed), all were included in what I downloaded. You need to add them to your Makefile (VS) or Project (Codeblocks), but if compiling what Kael distributed with Codeblocks it should already be included for you.



EDIT: Looking closer at the unresolved externals, I wonder if you could check the top of CvCity.cpp for:

#include "CvEventReporter.h"



If you are missing that it would cause such an issue (maybe). But it ought to cause a lot more than just that one... Though you say you get 103 more such errors, so maybe that is just the only one you posted from CvCity on a random grab. In each file that a call is made to the event reporter, the reporter must be included.
 
EDIT: Looking closer at the unresolved externals, I wonder if you could check the top of CvCity.cpp for:

#include "CvEventReporter.h"

If you are missing that it would cause such an issue (maybe). But it ought to cause a lot more than just that one... Though you say you get 103 more such errors, so maybe that is just the only one you posted from CvCity on a random grab. In each file that a call is made to the event reporter, the reporter must be included.

It is where it should be, in // interfaces used section at the beginning of the file.
I am currently trying to recompile just Kael's files, my changes not included. But I get exactly the sam result. I am attaching buildlog, just in case. The folder name is test, but I got the same result if just used Kael's default name.

Not sure if there is something wrong with my setting (but BtS 3.19 is fine) or with FfH source (but Kael compiled it... so maybe there are some changes missing in what he posted?)

Edit: CvEventReporter.h is not listed in build log... Maybe Kael have posted an older version, with not updated makefile? But would it compile till the linking stage without it?
 

Attachments

It still seems something is wrong with CvEventReporter et CvMessageControl. Don't know more than that, though...
 
GOT IT!

The CvGameCoreDLL.vcproj in the pack is an old one. I should have checked the date, it was last edited on 14 april.
It does not include the new files from 3.19, so it is impossible to compile without error.

I have added missing files (and removed one extra, hope it was not something Kael added for FfH, will have to check it). Anyway, it compiled fine, and Orbis runs fine on BtS 3.19 and FfH 41b :)

In case anyone needs it, here is the edited CvGameCoreDLL.vcproj. Just replace the old one, it does not contain any Orbis-specific stuff (as there is none at that level)

Edit: the file removed was CvDLLEventReporterIFaceBase.h, a base BtS file removed in last patch. Should be fine without it.
 

Attachments

GOT IT!

The CvGameCoreDLL.vcproj in the pack is an old one. I should have checked the date, it was last edited on 14 april.
It does not include the new files from 3.19, so it is impossible to compile without error.

I have added missing files (and removed one extra, hope it was not something Kael added for FfH, will have to check it). Anyway, it compiled fine, and Orbis runs fine on BtS 3.19 and FfH 41b :)

In case anyone needs it, here is the edited CvGameCoreDLL.vcproj. Just replace the old one, it does not contain any Orbis-specific stuff (as there is none at that level)

Edit: the file removed was CvDLLEventReporterIFaceBase.h, a base BtS file removed in last patch. Should be fine without it.


I just Rebuilt it using that CvGameCoreDLL.vcproj, and I didn't get any errors. Unfortunately, I didn't get a DLL either. It just stopped after making all the .obj files, CvGameCoreDLL.lib, andCvGameCoreDLL.exp.


Code:
Switching to target: Final Release
CvArea.cpp
CvArtFileMgr.cpp
CvCity.cpp
CvCityAI.cpp
CvDLLButtonPopup.cpp
CvDLLEntity.cpp
CvDLLPython.cpp
CvDLLWidgetData.cpp
CvDeal.cpp
CvDiploParameters.cpp
CvDllPythonEvents.cpp
CvDllTranslator.cpp
CvEventReporter.cpp
CvFractal.cpp
CvGame.cpp
CvGameAI.cpp
CvGameCoreDLL.cpp
CvGameCoreUtils.cpp
CvGameInterface.cpp
CvGameTextMgr.cpp
CvGlobals.cpp
CvHallOfFameInfo.cpp
CvInfoWater.cpp
CvInfos.cpp
CvInitCore.cpp
CvMap.cpp
CvMapGenerator.cpp
CvMessageControl.cpp
CvMessageData.cpp
CvPlayer.cpp
CvPlayerAI.cpp
CvPlot.cpp
CvPlotGroup.cpp
CvPopupInfo.cpp
CvPopupReturn.cpp
CvRandom.cpp
CvReplayInfo.cpp
CvReplayMessage.cpp
CvSelectionGroup.cpp
CvSelectionGroupAI.cpp
CvStatistics.cpp
CvStructs.cpp
CvTalkingHeadMessage.cpp
CvTeam.cpp
CvTeamAI.cpp
CvUnit.cpp
CvUnitAI.cpp
CvXMLLoadUtility.cpp
CvXMLLoadUtilityGet.cpp
CvXMLLoadUtilityInit.cpp
CvXMLLoadUtilitySet.cpp
CyArea.cpp
CyAreaInterface.cpp
CyArgsList.cpp
CyArtFileMgr.cpp
CyArtFileMgrInterface.cpp
CyCity.cpp
CyCityInterface1.cpp
CyDeal.cpp
CyEnumsInterface.cpp
CyGame.cpp
CyGameCoreUtils.cpp
CyGameCoreUtilsInterface.cpp
CyGameInterface.cpp
CyGameTextMgr.cpp
CyGameTextMgrInterface.cpp
CyGlobalContext.cpp
CyGlobalContextInterface1.cpp
CyGlobalContextInterface2.cpp
CyGlobalContextInterface3.cpp
CyGlobalContextInterface4.cpp
CyHallOfFameInfo.cpp
CyHallOfFameInterface.cpp
CyInfoInterface1.cpp
CyInfoInterface2.cpp
CyInfoInterface3.cpp
CyMap.cpp
CyMapGenerator.cpp
CyMapGeneratorInterface.cpp
CyMapInterface.cpp
CyMessageControl.cpp
CyMessageControlInterface.cpp
CyPlayer.cpp
CyPlayerInterface1.cpp
CyPlayerInterface2.cpp
CyPlot.cpp
CyPlotInterface1.cpp
CyRandomInterface.cpp
CyReplayInfo.cpp
CySelectionGroup.cpp
CySelectionGroupInterface.cpp
CyStructsInterface1.cpp
CyTeam.cpp
CyTeamInterface.cpp
CyUnit.cpp
CyUnitInterface1.cpp
FAssert.cpp
FDialogTemplate.cpp
_precompile.cpp
Linking dynamic library: ..\Beyond the Sword\Assets\CvGameCoreDLL.dll
   Creating library ..\Beyond the Sword\Assets\CvGameCoreDLL.lib and object ..\Beyond the Sword\Assets\CvGameCoreDLL.exp
Process terminated with status 0 (27 minutes, 48 seconds)
0 errors, 0 warnings
When I just try Build after that, I just get this:
Code:
Nothing to be done.
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 0 warnings
 
When I just try Build after that, I just get this:
Code:
Nothing to be done.
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 0 warnings

Could it possibly be in a differenet place from where you were expecting? That message normally indicates that there is a DLL somewhere.
 
Ah, it seems you are right. I'd overlooked the new folder on the desktop.

Edit: I also think I just figured out what was causing my 0.41 merges of my version to mess up. I thought it was the art, but it seems it was instead that I had left a few <bRequiresCaster>1 buildings in CIV4BuildingInfos.xml but hadn't added in the spells yet, since i was reconsidering using them. That may mean I can get working on my modmod in earnest soon, and maybe even release something. Of course, I should really do my lap report and homework first.
 
Just out of curiosity and because I just stumbled over this old peculiar thing again while making the Makefile for the next BtS 3.19 and FfH 0.41b compatible FlavourMod: Is there any reason for the files CyMessageControl2.h and CyMessageControl2.cpp? Kael includes these files in his FfH source code zip, but it seems their code isn't used anywhere. I never include these two files in my dlls and never had any trouble by doing so, but who knows, maybe I'm missing something ...
 
I think it is CvText.

Did anyone find a way to make trait changes work? Seems Kael is busy and I think it is quite a serious bug that keeps me from updating.
I have seen Xienwolf's suggestion in the bug thread, but can someone explain how to make that one work? :mischief:
 
Look for some python code that creates a city or unit, that addresses the player entity (pPlayer). Now do the same kind of thing to get a player object to target your event on (unit.getowner or city.getowner if targetting a unit/city. Already done for you in the case of traits though).

Then you just have to do something like:

pPlayer.trigger(eEvent)

Where eEvent is the enum pointing at a CIV4EventTriggerInfos.xml object.

This will launch that trigger at that player, which means if it targets a player, you are done. But if it targets a unit/building/city or whatever and you want a SPECIFIC target, you have to inform the computer of your target by using the more complicated version of:

.def("initTriggeredData", &CyPlayer::initTriggeredData, python::return_value_policy<python::reference_existing_object>(), "EventTriggeredData* (int eEventTrigger, bool bFire, int iCityId, int iPlotX, int iPlotY, PlayerTypes eOtherPlayer, int iOtherPlayerCityId, ReligionTypes eReligion, CorporationTypes eCorporation, int iUnitId, BuildingTypes eBuilding)")

So you would do:

pPlayer.initTriggeredData(eEventTrigger, bFire, iCityId, iPlotX, iPlotY, eOtherPlayer, iOtherPlayerCityId, eReligion, eCorporation, iUnitId, eBuilding)

And you have to enter proper values for each of those to get the target you want.


It seems that the options to launch an item from CIV4EventInfos.xml are not exposed to python, so to launch a single event you need to create a trigger for it which only has the one event as an option.
 
Thanks, but if I read it right, you have described how to fire an event. This part already works fine (events do fire), the messed up part is the following command type in CvRandomEventInterface.py:
Code:
	CyMessageControl().sendApplyEvent(5013, EventContextTypes.EVENTCONTEXT_ALL, (iPlayer,gc.getInfoTypeForString('TRAIT_AGGRESSIVE'),True))

With the addition of CyMessageControl.cpp file in patch 3.19, this command is broken as there is no sendapplyevent defined in it.
I have no idea how that was handled before, so no idea how to fix it either.
 
Perhaps it is something wrong with Scriptable Leader Traits. Maybe it was just a part of that that isn't working. I know Kael included it in FfH to get these events that have been failing to work.
 
Those functions still work. What doesn't work is forcing an Event to happen.


What I described does just cause an eventtrigger to occur, but it bypasses the normal random chance per turn and happens when you ask for it. This is slightly more roundabout than the old approach, but should still be able to work.


You could try exposing: CvMessageControl::sendEventTriggered to python. It looks like that one might work for you, it certainly executes a specific event for a specific player. Not quite sure what the event triggered ID should be for the final value, but I suspect it should be the enum of an eventtrigger. It appears that the actual event will not work if it does not exist, which could be problematic.
 
Back
Top Bottom