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. Kael

    Kael Chieftain

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    Note:
    This thread is somewhat out-of-date.
    You can find assistance here:
    How to Install the SDK (modiki link)
    -or-
    Refar's Makefile/Instructions BTS 3.17 SDK / Debugging



    If you have Visual Studio 2003 (Visual C++ 7) you should be able to load the SDK up directly. If not (and you would like a free option) you can use the following process to get codeblocks to allow you to modify and compile the SDK.

    A huge thanks to DaveMcW for developing this process. I spent a very sad weekend staring at the SDK without any ability to do anything with it until he provided this writeup.

    You can download the SDK from: http://www.2kgames.com/civ4/downloads.htm

    Before you start this make sure to turn off the Read Only flag on all of the files in the SDK.

    For some examples of things that can be done easily with the SDK check out: http://forums.civfanatics.com/showthread.php?t=166934

    And for a bit more indepth example for you programmer types check out: http://forums.civfanatics.com/showthread.php?t=166935

    Here is an update from sgerner on some updates that are required for the BtS SDK:




    - Kael
     
  2. John Stalin

    John Stalin Chieftain

    Joined:
    Apr 5, 2006
    Messages:
    79
    >.> wow... complex........ I'm scroo-ed lol
     
  3. The Great Apple

    The Great Apple Big Cheese

    Joined:
    Mar 24, 2002
    Messages:
    3,361
    Location:
    Oxford, England
    Fantastic. Thanks for this!
     
  4. Agent 009

    Agent 009 Civ 4 Addict

    Joined:
    Mar 28, 2006
    Messages:
    346
    Location:
    In a virtual Civ 4 Environment.
    Is there a particular reason why these other files are neccesary. I mean can you not just load the project file into VC++? I fail to see the neccesity for the codeblocks and lib files. :confused:
     
  5. snarko

    snarko DLLer

    Joined:
    Dec 9, 2003
    Messages:
    1,512
    Location:
    Sweden
    VC++ isn't free is it? But ofcourse, if you can use it, no need for this.
     
  6. dh_epic

    dh_epic Cold War Veteran

    Joined:
    Feb 10, 2002
    Messages:
    4,627
    Location:
    Seasonal Residences
    Sticky This Thread!!!
     
  7. Civrules

    Civrules We the People

    Joined:
    Apr 6, 2003
    Messages:
    5,621
    Gender:
    Male
    Location:
    US
    Stickied. :)
     
  8. AndyTerry

    AndyTerry Russian Bear

    Joined:
    Feb 1, 2006
    Messages:
    601
    Location:
    St. Petersburg, Russia
    Is it tributes knowing of C++?
     
  9. Agent 009

    Agent 009 Civ 4 Addict

    Joined:
    Mar 28, 2006
    Messages:
    346
    Location:
    In a virtual Civ 4 Environment.

    Yeah I missed that part... I just skimmed through his post to see what he was saying was needed.

    I was talking to my Dad about it and he was uncertain about it as well and when I mentioned Kael said Microsoft Visual C++ Toolkit 2003, he wasn't certain what I was referring to. You see, we have both Borland C++ and Visual C++ 6.

    I doubt Borland will work however, I am uncertain if VC++ 6 will work or if this Toolkit Kael mentioned is some sort of extention that can be added to it.

    If VC++ 6 won't work then I guess I'll have to settle for Kael's free option. :p
     
  10. Kael

    Kael Chieftain

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

    Agent 009 Civ 4 Addict

    Joined:
    Mar 28, 2006
    Messages:
    346
    Location:
    In a virtual Civ 4 Environment.

    ahh I see... but will this still work in VC++ 6?
     
  12. The Great Apple

    The Great Apple Big Cheese

    Joined:
    Mar 24, 2002
    Messages:
    3,361
    Location:
    Oxford, England
    Hmmm, having slight trouble with the "Platform SDK" - the webpage linked is a dead page with a link to another page which claims that the file has been updated, and I can't seem to find the update on the MS website though...
     
  13. What do I do!? Do I continue working on units, or do I sink my teeth into the SDK, or do I finally take the time and play the actual game which I haven't touched in a month. Damn my mortal body and it's need to sleep! :wallbash: :D
     
  14. Kael

    Kael Chieftain

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    I wasn't able to get it to work with VC++ 6 or 8. Apparently it was compiled with Visual Stuido 2003 (not visual C++ 2003 as I said).

    So you may be able to get it to work if you have Visual Studio 2003 or VC++ 7. Otherwise you will probably need to use the method I described.
     
  15. Rex Tyrannus

    Rex Tyrannus 280lbs of gross stupidity

    Joined:
    Feb 22, 2006
    Messages:
    2,942
    Location:
    Charlotte, NC USA
    I was surprised to see that the "SDK" was really just the complete source code. Pretty cool actually. How many companies would give the source to a comercial app? But I was expecting at least a reference or a readme, maybe even an app. I suppose once I put this into VC++, I'll have a better understand of what's going on.

    Can't wait to break CIV!
     
  16. Kael

    Kael Chieftain

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    K, I moved the file over to a server I control.
     
  17. Agent 009

    Agent 009 Civ 4 Addict

    Joined:
    Mar 28, 2006
    Messages:
    346
    Location:
    In a virtual Civ 4 Environment.
    Thanks Kael. I'll get on that ASAP... got a small problem with my mod now as a direct result of the patch so I need to fix it first before attempting anything with the SDK.

    Rabbit, you might want to check yours as well. Mine lost all of the menu text and I haven't the slightest clue how to fix it.
     
  18. RogerBacon

    RogerBacon Chieftain

    Joined:
    Nov 16, 2003
    Messages:
    649
    I loaded the CvGameCoreDLL.vcproj up in Visual Studio dot Net (2003) and compiled the CvGameCoreDLL_RELEASE.dll without any problem. I was a little scared when I saw Keal's post about needing all of those files. I guess that's the way you do it if you don't have VisualStudio.Net.

    Now that I'm looking at the files I realize it's been about 5 years since I did an yserious C++ programming. This is going to take awhile. :yuck:

    Roger Bacon
     
  19. Thanks for the heads up, I'll check it.
     
  20. PeteT

    PeteT Chieftain

    Joined:
    Jan 2, 2002
    Messages:
    273
    Location:
    Winterpeg
    I think you have to go to "Project->CvGameCoreDll properties", then "Linker", and then edit the output file to be "../Assets/CvGameCoreDLL.dll" in order to get a usable dll. At least that's what I've been doing.
     

Share This Page