Getting the player's current civic in the DLL

Lemon Merchant

Not Quite Sonic
Retired Moderator
Joined
Jun 27, 2008
Messages
8,773
Location
Red Sector A
I searched 10 pages of threads, but my internet connection is terrible today, so I suppose I'll just ask.

I've added a couple of new XML values to the DLL and they are working fine, but I would like to be able to make one of the XML values conditional depending on the active civic. In this case, Emancipation.

I've done it in Python like so:
Code:
iRnd = CyGame().getSorenRandNum(100, "female CEO")
            if iplayer.isCivic(gc.getInfoTypeForString("CIVIC_EMANCIPATION")):

But I'm having trouble finding the actual method to do it in the SDK. There has to be a way to do it easily, but I'm missing it completely. :(

Help? (Please?)
 
Both CvPlayer::isCivic() and GC.getInfoTypeForString() exist in the DLL. Not sure what's the problem here :dunno:
I was having an Intellisense problem in VS2010. Using isCivic, it kept barking at me that it was an invalid item and refused to find a declaration, or definition. Stupid laptop, or stupid me. I'm not sure which. ;)

I rebooted, reloaded, and rescanned the solution, and it seems to be working, so I'll give that a try.

Thanks, Asaf! :)
 
Back
Top Bottom