Merging superspies 3.17

vincentz

Programmer
Joined
Feb 4, 2009
Messages
3,614
Location
Denmark
I tried to merge the superspies 3.17 version by only taking what was commented as superspies, but when compiling I get this error :

Code:
1>cvplayerai.cpp
1>cvplayerai.cpp(9551) : error C2511: 'EspionageMissionTypes CvPlayerAI::AI_bestPlotEspionage(CvPlot *,PlayerTypes &,CvPlot *& ,int &)' : overloaded member function not found in 'CvPlayerAI'
1>        c:\Documents and Settings\Ejer\Skrivebord\CvGameCoreDLL\CvPlayerAI.h(13) : see declaration of 'CvPlayerAI'

Anyone has any clue to what it mean?
 
I tried to merge the superspies 3.17 version by only taking what was commented as superspies, but when compiling I get this error :

Code:
1>cvplayerai.cpp
1>cvplayerai.cpp(9551) : error C2511: 'EspionageMissionTypes CvPlayerAI::AI_bestPlotEspionage(CvPlot *,PlayerTypes &,CvPlot *& ,int &)' : overloaded member function not found in 'CvPlayerAI'
1>        c:\Documents and Settings\Ejer\Skrivebord\CvGameCoreDLL\CvPlayerAI.h(13) : see declaration of 'CvPlayerAI'

Anyone has any clue to what it mean?

I found this good reference file online of what some C++ compile errors mean. LINK

I think that maybe something is missing from CvPlayerAI.h. Try merging the the .h file again. Often times when I get errors I just try merging the files again and then I find a mistake.

BTW, you could also try using the source code of RevDCM since we know it is already compatible with 3.19. Let me know how it goes and if it works out. I am actually merging Super Spies with my mod currently. I believe I isolated all the required code, but have not compiled yet. let me know if you had to change any source codes.
 
the problem with the revdcm source is it is connected to bug/bull and the configscreen.
I'd like it to be independent of any other mods, and as far as I can tell the 3.17 is (except for perhaps the betterai part, which I'm not sure is causing trouble).

maybe I try to isolate it completely, so it is only the source code. That way it should be able to be implemented in a vanilla sdk.
 
If we try the RevDCM, then we should somehow make it "always on" with regards to using superspies/assasinate/bribe.

I dont know how though.

I think if we could make it for vanilla 3.19 then alot of other people might use it as well.

Will try again later.
 
If we try the RevDCM, then we should somehow make it "always on" with regards to using superspies/assasinate/bribe.

I dont know how though.

I think if we could make it for vanilla 3.19 then alot of other people might use it as well.

Will try again later.

I believe the always on mechanism is through python? So the SDK code can have that ability and then without the python nothing would be calling on it.
 
The error just tells you "Hi, I´ve found a CvPlayerAI function called AI_bestPlotEspionage with the return type "EspionageMissionTypes". You wanted to call it with the following parameters: "CvPlot *,PlayerTypes &,CvPlot *& ,int &". But there is no function that takes this parameters, there is a function with that name (AI_bestPlotEspionage) but it takes other parameters than those you gave me."
--
It just means there are too much/less parameters for this function. Maybe Firaxis added/removed some parameters during the patch. So you just have to look in the header file which parameters the function actually takes and correct this. Maybe you forgot to merge the header file correctly either.
 
I believe the always on mechanism is through python? So the SDK code can have that ability and then without the python nothing would be calling on it.

any luck with merging?

I tried the revdcm, but 2 files were difficult (cvplayerAI.cpp and cvunit.cpp) and it came up with tons of errors.

I dont know about the 3.17 as a lot of the code seems changed in 3.19.

if (kPromotion.getInterceptChange() != 0) in 3.19 is
if (GC.getPromotionInfo(ePromotion).getInterceptChange() != 0) in 3.17.

I dont know if it actually makes a difference.

I'll try with the 3.17 again and see if I can find whats missing.


edit :

I attached the merged 3.17 with the 3.19 sourcefiles incl project and makefile if anyone wants to give it a shot.
 
Those differences probably do make a difference. I will try merging the RevDCM soon as well. I've noticed that sometimes winmerge has difficulty with certain documents, but notepad++ can better analyze them. Those two files you mentioned are particularly large and using notepad provides a larger interface, which can help.

Are there any other mods that use Super Spies 3.19? I have yet to find any.
 
OK, I was able to successfuly compile super spies from revdcm. However, the spies have no missions to choose from in the game. I used the 3.17 files and the RevDCM source code. Not sure what is going on maybe you might figure it out. I have the source files attached.
 
could it be because of this:

Code:
	// RevolutionDCM - super spies
	// Disable spy promotions mechanism
	if (GC.getUnitInfo(eUnit).isSpy() [B]&& !GC.isSS_ENABLED())[/B] {
		return false;
	}
	// RevolutionDCM - end

It might be. SS_Enabled is in the GlobalDefinesAlt.xml RevDCM file and should be on.
 
I think that any python of Super Spies should be deleted. I believe I have successfully merged Dale's Combat Mod from RevDCM into my own mod. The main scren interface was messed up until I deleted the python code of DCM. Then all I had to do was go in GlobalTypesAlt.xml and set the DCM values to 1. That did the trick.

I think the SS_Enabled just links to the that .xml file I referred to and is necessary for turning Super Spies on. If DCM from that source code can merge successfully then Super Spies probabaly can too. If I merge DCM successfully for 3.19 without bugs I'll post that as well. I know people have been asking for it for awhile.
 
Edit: I have successfully merged DCM with my mod to 3.19.

I truly believe we can merge Super Spies as well now. I'll try again soon. Looking at the .xml for Super Spies, I found no GlobalDefines file. There is an .xml just for espionage missions. Maybe that is where things went wrong and the spy had no missions. Maybe we have to merge the missions with the normal .xml missioninfos.
 
@deanej. I was just trying to be gentle. :cheers:

@Vincentz. I sucessfully compiled the source code you uploaded in post #8 (3.17 Spies+BTS 3.19). :woohoo: Ialso included the compiled .dll. There were a few indentation errors and one .h file was not referenced properly and I added two code strings in another header to make it compile. I hope this works for you and then for me. Let me know.
 
I successfully converted Super Spies to 3.19. I've attached it for now and I'll release it later. :band: I have a lot of stuff to do though for now. Enjoy. Here is how I made it merge properly:

1. Took the base Bts 3.19 source code
2. copied and replaced the Better BTS AI source code on top of #1
3. Took the relevant RevDCM source code of Super Spies (commented as TSheep and Super_Spies) and merged those to #2
4. Compiled the .dll successfully
5. Used Super Spies 3.17 Mod as the base and replaced the .dll in it with the one from #4.
6. Replaced missioninfos, espionage mission infos of Super Spies with the same .xml from RevDCM.
7. Added BBAI .xml to the new mod.
8. Added RevDCM's GlobalDefinesAlt.xml and removed everything, but the Super Spies parts.
9. Turned on the super Spies options from #8 by changing 0's to 1's.

I was only able to merge it by using BBAI since the RevDCM super spies parts is integrated into BBAI and I did not know how to seperate and properly indent certain things.
 
Back
Top Bottom