Installing and using the SDK

If you're getting trouble with no "windows.h", repeat step 6 after saving the project. Worked for me.
 
c.fe said:
You are right, that is indeed possible. :)



When I extracted the source files they were all marked as read only. So it had nothing to do with CodeBlocks, you just had to "turn off" the read only with the explorer (or cmd, if you like ;) ).

Hey thanks man... I think that is kind of dumb if you ask me... if it was read only like that I think it should make it more clear so that noob programmers like me won't pull out their hair. :p
 
clinton said:
If you're getting trouble with no "windows.h", repeat step 6 after saving the project. Worked for me.

How can I repeat it when the text Im suppose to add in Step6 is already there? o.O
 
Agent 009 said:
Are you sure it is neccesary to replace the CvGameCoreDLL.dll? I was thinking it would be theoretically possible to just place your new .dll into your mod's Asset folder.


EDIT: Another question... How do you get this compiler to not be read only? I cannot edit anything at present for some reason and since I've never used this program... I have no idea how to turn it off. :p

Read only? It shouldn't be... Maybe they were using a source control program (so that only one programmer has access to one file at a time), and everything was read only.
 
The Great Apple said:
All the files for me were read only - had me quite confused for a while.

Cool, I added a note to the first post about turning off the read only flag.
 
clinton said:
If you're getting trouble with no "windows.h", repeat step 6 after saving the project. Worked for me.

Ok, I did this one more time. (After clicking ok), and the Platform path was gone for some reason. So I added it again, and now it works to compile.

:goodjob:
 
have problem if I used Borland C++ Builder v5.02?????
 
HP_Ganesha said:
have problem if I used Borland C++ Builder v5.02?????

If you are using Codeblocks then the only Borland Version that will work is 5.5 ;)
 
for me it compiles normally execpt that once it has finished compiling everything it gives the following error:

Linking dynamic library: ..\Assets\CvGameCoreDLL.dll
LINK : fatal error LNK1181: cannot open input file 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\Lib.obj'

any idea of what is going wrong?
 
Elvince said:
for me it compiles normally execpt that once it has finished compiling everything it gives the following error:

Linking dynamic library: ..\Assets\CvGameCoreDLL.dll
LINK : fatal error LNK1181: cannot open input file 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\Lib.obj'

any idea of what is going wrong?

Im guessing you may want to recheck step 6 to make sure you changed it exactly as it says and on the screens that it specifies. There are quite a few similiar list boxes there, make sure you are changing it in the right one.
 
I'm having a problem installin the Platform SDK - it says that one of the files is not digitally licensed or something, and then uninstalls itself. Is there anything that I can do?

Error message:
A file that is required cannot be installed because the cabinet file C:\WINDOWS\Installer\MSIA3.tmp is not digitally signed. This may indicate that the cabinet file is corrupt.

Edit: Another message. Same type, different file.
A file that is required cannot be installed because the cabinet file C:\WINDOWS\Installer\MSIFA.tmp is not digitally signed. This may indicate that the cabinet file is corrupt.
 
Grey Fox said:
How can I repeat it when the text Im suppose to add in Step6 is already there? o.O

*shrugs* The text seemed to disappear for me, thats all.
 
clinton said:
*shrugs* The text seemed to disappear for me, thats all.

Yeah it did for me too, once I pressed ok. (I was looking at the dialog window when I posted.)
 
Just for grins and giggles, this is an example of how you can confuse another programmer: (this is from the SDK. I hope it isn't Soren's code. :) ).

Code:
bool CvGame::isPaused()
{
	return (getPausePlayer() != NO_PLAYER);
}

It's like saying "I'm not no player!" using bad English. I read in a C++ Code/Naming Convention website that the above method is how not to code. It just reminded me of that. (now, is that "no" players? Or "Number" of players? I've seen count and num used in there, too.)
 
Bill3000 said:
I'm having a problem installin the Platform SDK - it says that one of the files is not digitally licensed or something, and then uninstalls itself. Is there anything that I can do?

Error message:


Edit: Another message. Same type, different file.

I think your download is corrupted, clear your browser cache and redownload.
 
BTW, in the SDK, the CvGame.cpp file is literally rock-bottom of the code. Try a project search for ->Update(). You won't find anything. The actual game loop is probably hidden in the exe. CvGame.cpp would be a good start to see where things are coming from (almost 8,000 lines of code!).

If you wanna mess with the AI, take a look at Cv####AI. (There's several files with AI at the end of them). Just don't get spooked by long boolean checks like this one:

Code:
	if (atWar(getTeam(), GET_PLAYER(ePlayer).getTeam()))
	{
		if (GET_TEAM(getTeam()).AI_getAtWarCounter(GET_PLAYER(ePlayer).getTeam()) < (GC.getLeaderHeadInfo(getPersonalityType()).getRefuseToTalkWarThreshold() * ((GET_TEAM(getTeam()).AI_isChosenWar(GET_PLAYER(ePlayer).getTeam())) ? 2 : 1)))
		{
			return false;
		}
	}

EDIT: Basically, this one is using the cryptic if/else statement inside of an if/else statement. It essentially comes out to "If two sides are at war.... do this: if the war counter is less than the "refuses to talk threshold" times 2 (if true) or 1 (if false).... return false... I think that above code there could be written cleaner. This thing took me maybe 10 minutes or so to decipher what it was trying to do. (Proof that when other programmers enter mid-stream, it takes awhile to get the idea of what the others were trying to do. Also proof that multiple programmers will have multiple programming styles.)

Also, here's an example of a wieghed value system:

Code:
	iAttitude += AI_getCloseBordersAttitude(ePlayer);
	iAttitude += AI_getWarAttitude(ePlayer);
	iAttitude += AI_getPeaceAttitude(ePlayer);
	iAttitude += AI_getSameReligionAttitude(ePlayer);
	iAttitude += AI_getDifferentReligionAttitude(ePlayer);
	iAttitude += AI_getBonusTradeAttitude(ePlayer);
	iAttitude += AI_getOpenBordersAttitude(ePlayer);
	iAttitude += AI_getDefensivePactAttitude(ePlayer);
	iAttitude += AI_getRivalDefensivePactAttitude(ePlayer);
	iAttitude += AI_getShareWarAttitude(ePlayer);
	iAttitude += AI_getFavoriteCivicAttitude(ePlayer);
	iAttitude += AI_getTradeAttitude(ePlayer);
	iAttitude += AI_getRivalTradeAttitude(ePlayer);
 
Bill3000 said:
I'm having a problem installin the Platform SDK - it says that one of the files is not digitally licensed or something, and then uninstalls itself. Is there anything that I can do?

Error message:


Edit: Another message. Same type, different file.
I dled the iso version and mounted that, as I couldn't get a full set of the separate files to dl properly.
 
owh man... this SDK plataform is a VERY HUGE download... this file is a relly nescessary???? if is I have a GREAT problem...
 
Kael said:
Yeah, I tried to compile origionally with Visual C++ 2005 couldn't get it to work (Firaxis built it with Visual C++ 2003). If you have VC++ 2003 you are all set, but thats a little difficult to find nowdays. Hence this option.

Hehe yea i tried the same thing, im fond user of the free 2005 download.

owh man... this SDK plataform is a VERY HUGE download... this file is a relly nescessary???? if is I have a GREAT problem...

Yes it is, you wont be able to compile without it.
 
Top Bottom