1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Installing and using the SDK

Discussion in 'Civ4 - Creation & Customization' started by Kael, Apr 13, 2006.

  1. clinton

    clinton Warlord

    Joined:
    Apr 24, 2004
    Messages:
    132
    If you're getting trouble with no "windows.h", repeat step 6 after saving the project. Worked for me.
     
  2. Agent 009

    Agent 009 Civ 4 Addict

    Joined:
    Mar 28, 2006
    Messages:
    346
    Location:
    In a virtual Civ 4 Environment.
    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
     
  3. Grey Fox

    Grey Fox Master of Points

    Joined:
    Dec 19, 2001
    Messages:
    8,726
    Gender:
    Male
    Location:
    Sweden
    How can I repeat it when the text Im suppose to add in Step6 is already there? o.O
     
  4. Chieftess

    Chieftess Moderator Retired Moderator

    Joined:
    Feb 10, 2002
    Messages:
    24,160
    Location:
    Baltimore
    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.
     
  5. The Great Apple

    The Great Apple Big Cheese

    Joined:
    Mar 24, 2002
    Messages:
    3,361
    Location:
    Oxford, England
    All the files for me were read only - had me quite confused for a while.
     
  6. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    Cool, I added a note to the first post about turning off the read only flag.
     
  7. Grey Fox

    Grey Fox Master of Points

    Joined:
    Dec 19, 2001
    Messages:
    8,726
    Gender:
    Male
    Location:
    Sweden
    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:
     
  8. HP_Ganesha

    HP_Ganesha Chieftain

    Joined:
    Apr 12, 2006
    Messages:
    22
    Location:
    Belem, Brasil!
    have problem if I used Borland C++ Builder v5.02?????
     
  9. Agent 009

    Agent 009 Civ 4 Addict

    Joined:
    Mar 28, 2006
    Messages:
    346
    Location:
    In a virtual Civ 4 Environment.
    If you are using Codeblocks then the only Borland Version that will work is 5.5 ;)
     
  10. Elvince

    Elvince Chieftain

    Joined:
    Nov 22, 2005
    Messages:
    39
    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?
     
  11. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    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.
     
  12. Bill3000

    Bill3000 OOOH NOOOOOOO! Supporter

    Joined:
    Oct 31, 2005
    Messages:
    18,464
    Location:
    Quinquagesimusermia
    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.
     
  13. clinton

    clinton Warlord

    Joined:
    Apr 24, 2004
    Messages:
    132
    *shrugs* The text seemed to disappear for me, thats all.
     
  14. Grey Fox

    Grey Fox Master of Points

    Joined:
    Dec 19, 2001
    Messages:
    8,726
    Gender:
    Male
    Location:
    Sweden
    Yeah it did for me too, once I pressed ok. (I was looking at the dialog window when I posted.)
     
  15. Chieftess

    Chieftess Moderator Retired Moderator

    Joined:
    Feb 10, 2002
    Messages:
    24,160
    Location:
    Baltimore
    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.)
     
  16. Unspeakable Horror

    Unspeakable Horror Lich.

    Joined:
    Dec 30, 2001
    Messages:
    45
    Location:
    Southern Crypt.
    I think your download is corrupted, clear your browser cache and redownload.
     
  17. Chieftess

    Chieftess Moderator Retired Moderator

    Joined:
    Feb 10, 2002
    Messages:
    24,160
    Location:
    Baltimore
    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);
     
  18. talchas

    talchas Prince

    Joined:
    Jan 3, 2006
    Messages:
    428
    I dled the iso version and mounted that, as I couldn't get a full set of the separate files to dl properly.
     
  19. HP_Ganesha

    HP_Ganesha Chieftain

    Joined:
    Apr 12, 2006
    Messages:
    22
    Location:
    Belem, Brasil!
    owh man... this SDK plataform is a VERY HUGE download... this file is a relly nescessary???? if is I have a GREAT problem...
     
  20. AvianAvenger

    AvianAvenger Warlord

    Joined:
    Mar 14, 2006
    Messages:
    170
    Hehe yea i tried the same thing, im fond user of the free 2005 download.

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

Share This Page