RevolutionDCM for BTS

OK, I will test it out then tonight. Report back tomorrow night with final report.
Thanks for taking time and patience ;).
 
Eh OS
Ok so far it looks like the combat odds drop down box for auto hunt is working (confirmed). The code in the DLL matches with RAND (confirmed). The issue is unit suiciding whether that is working correctly. If you get the time check it out with a save game. I will move onto auto-protect for now and come back to it later.
Cheers
 
I forgot that I can easily use world Builder. Anyway what I did was:
10 Spearmen for me
1 Maceman for barbarian
Both of us are on grasslands

Ok obviously a spearman will lose terribly to a Maceman. But with Unit suiciding on my stack was supposed to send any of spearman to attack the Maceman.

OK, I clicked Hunt.

My stack ran away!

I'm going to test once again in RAND the same process. If the stack run away, then I must had misunderstood Afforess badly. But if the stack send in one spearman to die, then the connection between BUG option and DLL is missing somewhere.

Be back in 30 minutes.
 
Ouch.

It seem there was a small miscommunication between Afforess and me.

It seem that Unit Suiciding code only work if there is a varying of strengths of the units in the stack. It doesn't work if all the units in the stack are of same strength.

I need to chat up Afforess to see if he can fix this so that if there is no weakest unit so to speak, then to randomly send any of the unit in the stack to die.

My apologies for stressing you out ;).
 
Yeah no problem OS. I'm glad someone else is helping to check it out. If Afforess is missing, then if suiciding is working the same as RAND, I'll release 2.90 and we fix it to how you think it should be in 2.91.
Cheers
 
There is for sure a mistake in the code. I've done your test in CCV. My axeman has got a survive chance of 24,09% against the maceman (no barb). If I set the minimum attack chance to 45% my axeman will still attack the maceman. If the setting is higher he will not do it. So there must be a mistake. There seems to be a critical factor 2 in the code.

A stack of axemen with suicide allowed will attack even if the setting is so high that a single axeman wouldn't have done it. So this code part is maybe okay.

And now a guess. Was there a revealed goody hut near (range 4) in your test? This is the highest priority of the hunt mission.

EDIT: :yup: The factor 2 comes from this code!
PHP:
int CvUnitAI::AI_finalOddsThreshold(CvPlot* pPlot, int iOddsThreshold)

	else
	{
		iFinalOddsThreshold *= 6 + (iDefenders/((pCity != NULL) ? 1 : 2));
		int iDivisor = 3;
		iDivisor += GET_PLAYER(getOwnerINLINE()).AI_adjacentPotentialAttackers(pPlot, true);
		iDivisor += ((stepDistance(getX_INLINE(), getY_INLINE(), pPlot->getX_INLINE(), pPlot->getY_INLINE()) > 1) ? getGroup()->getNumUnits() : 0);
		iDivisor += (AI_isCityAIType() ? 2 : 0);
		iFinalOddsThreshold /= iDivisor;
	}
 
I can't compile cvgamecoredll.dll :(
Build log:

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
CvPlayer.obj : error LNK2001: unresolved external symbol "bool __cdecl getBugOptionBOOL(char const *,bool,char const *)" (?getBugOptionBOOL@@YA_NPBD_N0@Z)
CvSelectionGroup.obj : error LNK2001: unresolved external symbol "bool __cdecl getBugOptionBOOL(char const *,bool,char const *)" (?getBugOptionBOOL@@YA_NPBD_N0@Z)
CvUnit.obj : error LNK2001: unresolved external symbol "bool __cdecl getBugOptionBOOL(char const *,bool,char const *)" (?getBugOptionBOOL@@YA_NPBD_N0@Z)
CvDLLButtonPopup.obj : error LNK2019: unresolved external symbol "bool __cdecl getBugOptionBOOL(char const *,bool,char const *)" (?getBugOptionBOOL@@YA_NPBD_N0@Z) referenced in function "private: bool __thiscall CvDLLButtonPopup::launchProductionPopup(class CvPopup *,class CvPopupInfo &)" (?launchProductionPopup@CvDLLButtonPopup@@AAE_NPAVCvPopup@@AAVCvPopupInfo@@@Z)
CvDLLWidgetData.obj : error LNK2001: unresolved external symbol "bool __cdecl getBugOptionBOOL(char const *,bool,char const *)" (?getBugOptionBOOL@@YA_NPBD_N0@Z)
CvGameInterface.obj : error LNK2001: unresolved external symbol "bool __cdecl getBugOptionBOOL(char const *,bool,char const *)" (?getBugOptionBOOL@@YA_NPBD_N0@Z)
CvGameTextMgr.obj : error LNK2001: unresolved external symbol "bool __cdecl getBugOptionBOOL(char const *,bool,char const *)" (?getBugOptionBOOL@@YA_NPBD_N0@Z)
CvDLLPython.obj : error LNK2019: unresolved external symbol "void __cdecl CyCityPythonInterface2(class boost::python::class_<class CyCity,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified> &)" (?CyCityPythonInterface2@@YAXAAV?$class_@VCyCity@@Unot_specified@detail@python@boost@@U2345@U2345@@python@boost@@@Z) referenced in function "void __cdecl DLLPublishToPython(void)" (?DLLPublishToPython@@YAXXZ)
CvDLLWidgetData.obj : error LNK2019: unresolved external symbol "bool __cdecl isBug(void)" (?isBug@@YA_NXZ) referenced in function "public: void __thiscall CvDLLWidgetData::parseFlagHelp(struct CvWidgetDataStruct &,class CvWStringBuffer &)" (?parseFlagHelp@CvDLLWidgetData@@QAEXAAUCvWidgetDataStruct@@AAVCvWStringBuffer@@@Z)
CvGameInterface.obj : error LNK2019: unresolved external symbol "float __cdecl getDefineFLOAT(char const *,float)" (?getDefineFLOAT@@YAMPBDM@Z) referenced in function "public: void __thiscall CvGame::updateColoredPlots(void)" (?updateColoredPlots@CvGame@@QAEXXZ)
CvGameInterface.obj : error LNK2019: unresolved external symbol "char const * __cdecl getDefineSTRING(char const *,char const *)" (?getDefineSTRING@@YAPBDPBD0@Z) referenced in function "public: void __thiscall CvGame::updateColoredPlots(void)" (?updateColoredPlots@CvGame@@QAEXXZ)
CvGameTextMgr.obj : error LNK2019: unresolved external symbol "int __cdecl getBugOptionINT(char const *,int,char const *)" (?getBugOptionINT@@YAHPBDH0@Z) referenced in function "public: void __thiscall CvGameTextMgr::setUnitHelp(class CvWStringBuffer &,enum UnitTypes,bool,bool,bool,class CvCity *)" (?setUnitHelp@CvGameTextMgr@@QAEXAAVCvWStringBuffer@@W4UnitTypes@@_N22PAVCvCity@@@Z)
CvGlobals.obj : error LNK2019: unresolved external symbol "void __cdecl setIsBug(bool)" (?setIsBug@@YAX_N@Z) referenced in function "public: void __thiscall CvGlobals::setIsBug(bool)" (?setIsBug@CvGlobals@@QAEX_N@Z)
CvInfos.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvXMLLoadUtilityModTools::setLocationName(class CvString *,char const *)" (?setLocationName@CvXMLLoadUtilityModTools@@QAEXPAVCvString@@PBD@Z) referenced in function "public: virtual bool __thiscall CvInfoBase::read(class CvXMLLoadUtility *)" (?read@CvInfoBase@@UAE_NPAVCvXMLLoadUtility@@@Z)
CvInfos.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvXMLLoadUtilityModTools::StringArrayExtend(class CvString * *,int *,class CvString * *,int,class CvString)const " (?StringArrayExtend@CvXMLLoadUtilityModTools@@QBEXPAPAVCvString@@PAH0HV2@@Z) referenced in function "public: void __thiscall CvCivilizationInfo::copyNonDefaults(class CvCivilizationInfo *,class CvXMLLoadUtility *)" (?copyNonDefaults@CvCivilizationInfo@@QAEXPAV1@PAVCvXMLLoadUtility@@@Z)
CvInfos.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CvXMLLoadUtilityModTools::isDuplicate(int,int *,int)const " (?isDuplicate@CvXMLLoadUtilityModTools@@QBE_NHPAHH@Z) referenced in function "public: void __thiscall CvHandicapInfo::copyNonDefaults(class CvHandicapInfo *,class CvXMLLoadUtility *)" (?copyNonDefaults@CvHandicapInfo@@QAEXPAV1@PAVCvXMLLoadUtility@@@Z)
CvInfos.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CvXMLLoadUtilityModTools::isDuplicate(int,class CvWString *,class CvWString)const " (?isDuplicate@CvXMLLoadUtilityModTools@@QBE_NHPAVCvWString@@V2@@Z) referenced in function "public: void __thiscall CvEventTriggerInfo::copyNonDefaults(class CvEventTriggerInfo *,class CvXMLLoadUtility *)" (?copyNonDefaults@CvEventTriggerInfo@@QAEXPAV1@PAVCvXMLLoadUtility@@@Z)
CvPlayerAI.obj : error LNK2019: unresolved external symbol "void __cdecl logBBAI(char *,...)" (?logBBAI@@YAXPADZZ) referenced in function "public: virtual void __thiscall CvPlayerAI::AI_conquerCity(class CvCity *)" (?AI_conquerCity@CvPlayerAI@@UAEXPAVCvCity@@@Z)
CvXMLLoadUtilitySet.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvXMLLoadUtilitySetMod::loadModControlArray(class std::vector<class CvString,class std::allocator<class CvString> > &,char const *,int)" (?loadModControlArray@CvXMLLoadUtilitySetMod@@QAEXAAV?$vector@VCvString@@V?$allocator@VCvString@@@std@@@std@@PBDH@Z) referenced in function "private: void __thiscall CvXMLLoadUtility::LoadDiplomacyInfo(class std::vector<class CvDiplomacyInfo *,class std::allocator<class CvDiplomacyInfo *> > &,char const *,char const *,char const *,class CvCacheObject * (__thiscall CvDLLUtilityIFaceBase::*)(char const *))" (?LoadDiplomacyInfo@CvXMLLoadUtility@@AAEXAAV?$vector@PAVCvDiplomacyInfo@@V?$allocator@PAVCvDiplomacyInfo@@@std@@@std@@PBD11P8CvDLLUtilityIFaceBase@@AEPAVCvCacheObject@@1@Z@Z)
CvXMLLoadUtilitySet.obj : error LNK2019: unresolved external symbol "public: class CvString __thiscall CvXMLLoadUtilityModTools::deleteFileName(char const *,char)" (?deleteFileName@CvXMLLoadUtilityModTools@@QAE?AVCvString@@PBDD@Z) referenced in function "private: void __thiscall CvXMLLoadUtility::LoadDiplomacyInfo(class std::vector<class CvDiplomacyInfo *,class std::allocator<class CvDiplomacyInfo *> > &,char const *,char const *,char const *,class CvCacheObject * (__thiscall CvDLLUtilityIFaceBase::*)(char const *))" (?LoadDiplomacyInfo@CvXMLLoadUtility@@AAEXAAV?$vector@PAVCvDiplomacyInfo@@V?$allocator@PAVCvDiplomacyInfo@@@std@@@std@@PBD11P8CvDLLUtilityIFaceBase@@AEPAVCvCacheObject@@1@Z@Z)
CvXMLLoadUtilitySet.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CvXMLLoadUtilityModTools::isModularArt(char const *)" (?isModularArt@CvXMLLoadUtilityModTools@@QAE_NPBD@Z) referenced in function "private: bool __thiscall CvXMLLoadUtility::LoadModLoadControlInfo<class CvModLoadControlInfo>(class std::vector<class CvModLoadControlInfo *,class std::allocator<class CvModLoadControlInfo *> > &,char const *,char const *)" (??$LoadModLoadControlInfo@VCvModLoadControlInfo@@@CvXMLLoadUtility@@AAE_NAAV?$vector@PAVCvModLoadControlInfo@@V?$allocator@PAVCvModLoadControlInfo@@@std@@@std@@PBD1@Z)
CvXMLLoadUtilitySet.obj : error LNK2019: unresolved external symbol "public: void __thiscall CvXMLLoadUtilitySetMod::setModLoadControlDirArray(bool)" (?setModLoadControlDirArray@CvXMLLoadUtilitySetMod@@QAEX_N@Z) referenced in function "private: void __thiscall CvXMLLoadUtility::ModularLoadingControlXML(void)" (?ModularLoadingControlXML@CvXMLLoadUtility@@AAEXXZ)
..\Beyond the Sword\Assets\CvGameCoreDLL.dll : fatal error LNK1120: 16 unresolved externals
Process terminated with status 1120 (12 minutes, 52 seconds)
23 errors, 0 warnings
 
@OS79
If you are trying to sort out unit suiciding, don't download the latest SVN ok. It breaks save game compatibility because it introduces a new unit automation to automate spy counter espionage missions. If you want to take a look at what I did there, go ahead but the icon for the spy automations is pinked out because I have no graphic icon for it yet.

If anyone wants to make the dds for it please I'd appreciate it.
Cheers
 
I'm in the middle of a game, yeah. I already told you how I sorted it out, from my limited experience. That the stack with equivalent strength units don't Unit Suicide as they are supposed to. That is all. Of course if you understand it different and it is actually working according to how Afforess wanted it, then I guess it is done as far as you are concerned and I can live with it.

As for Espionage counter, I thought that if I just sleep spies in all my cities, they already automatically counter enemies' spies?
 
The new counter espionage automation is against civs not against spies. OS I want to fix unit suicide for you but it is just one priority I have right now. When you finish your current game, download the latest SVN and see if you can upload a simple save a game that shows me where the unit suiciding problem is so that I can get straight in and fix it. If you think I am asking too much, realise how much time I am personally putting into this mod and then you will know I am not asking too much.
Cheers
 
No problem. I just gave up the game I was in (my capital was razed).

So, about 2 hours or so from now (suppertime for me) I should have new version of RevDCM in and a savegame ready for you.

Thank you for your efforts :).
 
Eh OS, just uploaded the latest SVN with auto espionage finished. I'd grab that one if you can. Although sorry to hear that your capital got razed, I am actually happy about it . If this game were too easy, we wouldn't bother with it.

EDIT: you don't have to bother checking auto espionage, just focus on what you want fixed. The auto espionage option for spies is simply that on auto, spies will seek the rivals that are conducting major espionage efforts and conduct the counter espionage mission against them until told not to. Personally the need to keep counter espionage up by manually doing that with spies every 6-10 turns is probably laborious and that is why I have written the automation.

Cheers
 
#1 You accidentally put Debug DLL in SVN.

#2 Here is the savegame. Description:
a. ten spearmen for me, stacked together and one maceman for the barbarian
b. Hunt's Allow Unit Suiciding is on
c. Hunt's Odds is 50%
d. From c.'s odds the unit suicide code should allow the stack to attack at 5% odds and die, and so on until the odds pass 50%, then usual combat system should kick in.
e. Just click on Hunt and watch the spearmen in the stack run away from the barbarian maceman. Just one maceman!
 
Eh OS
In that test save of yours on unit suiciding/auto hunt, this is the result I get:
Unit Suiciding on:
Minimum Odds = 25 and the spearman stack kills barbarian maceman
Minimum Odds = 30 and the spearman stack lets the barbarian live

Repeat but turn off Unit Suiciding:
Minimum Odds = 0 and the stack kills barbarian maceman
Minimum Odds > 0 and the stack lets the barbarian live

Remember that the odds you see on the mouse over (98%) is including the bonus you get against barbarians based on difficulty. The code however just looks at the raw odds which are much lower (<1%). If you want unit suiciding to work differently, we are going to have to come up with an algorithm and alternative calculations because at this stage, I can't find any actual bug in the code.

Cheers
 
Understood.

I'll let it alone until you smart guys see how to improve it.

I will just have to adjust the Odds down to maybe 10%. It should be fine since I tend to have stacks of ten units each. I am not the player who fanatically keep highly experienced units the whole game other than the conquering cities stack.

Thanks for your assistance.
I guess with this final hurdle out of the way, the 2.9 version is coming soon then.

Good job there ;).
 
Ok OS I'll leave it at that for now thanks for checking it out. I'll do final testing on 2.90 and release in the next 2-3 days, then with follow up releases if needed for a while after that.

By the considering that you are a ruthless AI player, in my testing I've found that the option produces wildly varying but interesting and fun games. I've had games where the neighbours constantly pick on me and work together. If I switch to my own state religion they will hammer me. I've had other test games where the neighbours have hit me with espionage so badly but at the same time managed to hang on thanks to good relations with a rival in a world riddled with war. I've had other games where there has been minimal warring and I've been free to found my own religion and switch to it with only the faintest disapproval from the neighbours and only minimal espionage wars despite being competitive in size and surrounded by rival faiths. The variety of this engine is really amazing even on ruthless AI (well done for thinking that out Afforess).

The key is just to enjoy it for what it is and enjoy loosing as well.
Cheers
 
:mad: Finally finished all the merging and stupid-error-fixing, and now NwT is giving an "encountered a problem and needs to close" crash on load! Is there a separate tech-support thread for DCM, and what files are needed to diagnose the problem?
 
Ummm, tech support for DCM probably finished up three years ago and so you have arrived at the correct forum! If the mod crashes during load, it will probably be XML related. The question is whether the popups it throws provide any extra clues. If not, you have some work ahead of you I'll have to be honest. You are going to have to be very patient. Either you debug the load up with visual studio c++ or you use logical deduction, stripping out features until it loads again, then adding the features back in until you find the issue. The first step is to completely recompile the DLL from scratch and take it from there. If you can go down the modular route, the advantage is that you can actually debug the build by taking out modules and putting them back in again. At this stage, Diversica is the clearest example we have of rebuilding RevDCM from the modular ground up.
Cheers
 
Back
Top Bottom