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

    Kornaki Warlord

    Joined:
    Feb 20, 2009
    Messages:
    182
    Step 0? Download the SDK... I get a timeout error from the website.
     
  2. Kalimakhus

    Kalimakhus Emperor

    Joined:
    May 8, 2007
    Messages:
    1,249
    You no longer need to download the SDK. It is included in every official patch for Civ4, Warlords, and BTS. For Civ4 it is in "C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\CvGameCoreDLL". For expansions it is in folders with the same name under the expansion's folder.
     
  3. Kornaki

    Kornaki Warlord

    Joined:
    Feb 20, 2009
    Messages:
    182

    Oh, ok... I thought that would be it, but didn't want to deviate from instructions :lol:
     
  4. Kornaki

    Kornaki Warlord

    Joined:
    Feb 20, 2009
    Messages:
    182
    Ok, I'm all the way to the end, did the BTS fixes that were tacked on, and still get a 'fatal error C1038: cannot open include file: 'windows.h' No such file or directory'

    What's the deal with that?
     
  5. Olleus

    Olleus Deity

    Joined:
    Oct 30, 2005
    Messages:
    6,478
    Location:
    England
    Just wanted to say that after 2 years out of the modding world I've dusted off codeblocks, updated note pad, re-installed civ4 and ready to go again! I have to say, I have missed the hours trying to find that one tiny bug and play testing endlessly to get the exact results I want.


    kornaki, that sounds like you either havent installed the windows c++ toolkit properly, or its in a different directory and you havent linked codeblocks to it properly.
     
  6. PiMan

    PiMan Emperor

    Joined:
    Oct 1, 2008
    Messages:
    1,995
    Location:
    Melbourne, Australia
    I hope you don't actually use notepad...
    Use notepad++, it has syntax highlighting for almost any language you could want to use, including C++, Python and XML.
    If there is a keyword you are looking for and don't know which file it is in, notepad++ will be able to find every instance of that word or text string in every file in seconds.
    The only way I could possibly go without it for Civ modding is if I had Crimson Editor. A program that is almost as good as Notepad++.
     
  7. Olleus

    Olleus Deity

    Joined:
    Oct 30, 2005
    Messages:
    6,478
    Location:
    England
    Yeah of course, I use Notpad++. Otherwise I think my eyes would simply burn out lol.
     
  8. Kornaki

    Kornaki Warlord

    Joined:
    Feb 20, 2009
    Messages:
    182

    Possibly, but in the original set of files that file doesn't exist anyway. So I'm not even sure where it got the name from. I'll consider reinstalling, but from my initial impression the error isn't nearly as fatal as it claims to be :crazyeye:
     
  9. KJ Jansson

    KJ Jansson Prince

    Joined:
    Oct 7, 2008
    Messages:
    509
    I tried to compile CvGameCoreDLL.dll file for CivIVColonization and strictly follow to Kael's instructions on page 1.

    I have:

    - Codeblocks 8.02
    - Microsoft Visual C++ Toolkit 2003
    - Microsoft Platform SDK
    - plus 3 files (msvcprt.lib, msvcrt.lib, msvcrtd.lib) in C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib directory.

    As example I used CivIVCol with official patch from Firaxis and all files from CvGameCoreDLL directory including Boost-1.32.0 and Python24 subdirectories. No one file was changed.

    However, I have such error message

    -------------- Build: Final Release Win32 in CvGameCoreDLL ---------------

    CvArea.cpp
    CvArtFileMgr.cpp
    CvCity.cpp
    CvCityAI.cpp
    CvDLLButtonPopup.cpp
    CvDLLEntity.cpp
    CvDLLPython.cpp
    CvDLLWidgetData.cpp
    CvDeal.cpp
    CvDiploParameters.cpp
    CvFractal.cpp
    CvGame.cpp
    CvGameAI.cpp
    CvGameCoreDLL.cpp
    Execution of 'rc.exe /IBoost-1.32.0\include /IPython24\include -fo"Final Release Win32\CvGameCoreDLL.res" CvGameCoreDLL.rc' in 'E:\1\CvGameCoreDLL' failed.
    Nothing to be done.
    ------------------------------------------------

    How to compile CvGameCoreDLL.dll and what's the reason of this error?
     
  10. 77alex77

    77alex77 Chieftain

    Joined:
    Oct 25, 2007
    Messages:
    91
    Location:
    Somewhere beyond the sea
    You should try to remove 'CvGameCoreDLL.rc' from the project.
     
  11. KJ Jansson

    KJ Jansson Prince

    Joined:
    Oct 7, 2008
    Messages:
    509
    Thank you, 77alex77. This is really solution.:goodjob:
     
  12. TDK

    TDK Emperor

    Joined:
    Feb 22, 2006
    Messages:
    1,229
    Location:
    Denmark
    I'm now getting this after it spent about 10 minutes compliling: "LINK : fatal error LNK1104: cannot open file '..\Assets\CvGameCoreDLL.dll'".

    Any ideas?

    Thanks,
    TDK
     
  13. frekk

    frekk Scourge of St. Lawrence

    Joined:
    Jun 21, 2003
    Messages:
    3,151
    Location:
    Kingston, Ontario
    I'm trying to merge Super Spies with Dale's Combat Mod (and a few other little things).

    I've been using CodeBlocks succesfully to compile the SDK, without a hitch, but Super Spies has something I've never run into before: a file that isn't present in the CvGameCoreDLL folder and a "makefile".

    So ... what should I do differently?
     
  14. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,913
    Location:
    DE/NL/FR
    Are you working with Vista and without admin rights?

    Try this.
     
  15. chaos0987654321

    chaos0987654321 Chieftain

    Joined:
    Mar 21, 2008
    Messages:
    40
    what? *i shake my head*....um could some one explain the basics of SDK.....using big words and flashcards please?
     
  16. PiMan

    PiMan Emperor

    Joined:
    Oct 1, 2008
    Messages:
    1,995
    Location:
    Melbourne, Australia
    Can do:


    Does that help?
     
  17. PiMan

    PiMan Emperor

    Joined:
    Oct 1, 2008
    Messages:
    1,995
    Location:
    Melbourne, Australia
    Can do:


    Does that help?
     
  18. Gooblah

    Gooblah Heh...

    Joined:
    Jun 5, 2007
    Messages:
    4,282
    the SDK (C:/.../Assets/CvGameCoreDLL) is written in C++. It defines all the tags you see in the various XML files in the game.

    To edit the SDK, you'll need to download an editor, usually Microsoft's (free) Visual Studio 2008 (just google it). The SDK's files can be found in C:/.../Beyond the Sword/CvGameCoreDLL, the folder - NOT the file under /Assets. The .cpp files hold all the functions that control the game's behavior and the AI. The .h files hold declarations of all those functions, the various classes of functions the game uses, etc.

    You can fire up these files in your downloaded editor.

    For the game to actually reflect those changes in-game, however, you have to compile your files, using the method outlined in the first post.

    Finally, you can copy the CvGameCoreDLL.dll file from the /Beyond the Sword/CvGameCoreDLL/Final Release folder to your mod's /Assets folder, and voila! you have a new SDK and a new AI.
     
  19. Gooblah

    Gooblah Heh...

    Joined:
    Jun 5, 2007
    Messages:
    4,282
    Aargh! Okay, so I followed Kael's instructions to the letters (including the BTS addendum).

    I'm using Vista, the latest versions of the PSDK, VC++Toolkit 2003, and VS9.0. When I set VS2008 as my compiler, I got a fatal error stating that the 'winmm.h' directory did not exist. When I set VC++ Toolkit 2003 as my compiler, I got a fatal error that 'sal.h' did not exist, and thus the whole thing wouldn't work.

    What?!
     
  20. chaos0987654321

    chaos0987654321 Chieftain

    Joined:
    Mar 21, 2008
    Messages:
    40
    ok well um could someone also explain.....HOW THE HELL DO I FIND THE FREAKING .kfm FILE?!?!?!?! i cant use hitler as Germany because i cant find that freaking file man T-T
     

Share This Page