[ModMod] Kek-Mod v0.26

ModMod for K-Mod

  1. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    7,084
    Location:
    israel
    Easier to debug with debug dll and a save game.
    Not sure about the dump file.
     
  2. TheOnlyDJCat

    TheOnlyDJCat Warlord

    Joined:
    Dec 31, 2006
    Messages:
    122
    Location:
    Germany
    Hi!
    I just wanted to try the Great plains map script with gigantic size. The generated map did not have any mountains, so I looked in the python code and tried to add the GIGANTIC code lines as needed, but still no mountains :(.
    Do you know an easy way to debug the python code?

    Nevermind, I edited the Great Plains.py in the Civ4 directory and not in the Warlords directory. Then everything worked :)
     
    Last edited: May 27, 2022
    DarkLunaPhantom likes this.
  3. UltravioletCatastrophe

    UltravioletCatastrophe Chieftain

    Joined:
    Jun 16, 2022
    Messages:
    5
    Hi! Considering you're familiar with K-mod and modding in general, I'd like to ask you what is it that karadoc exactly changed about the AI? The only AI script I found on the K-mod folder is some old A* search method implementation for unit pathing. Where are all the substantial AI changes implemented? And why is the CvGameCoreDLL.dll heavier than usual? If I wanted to change how the AI works, how would I go about it?
     
  4. DarkLunaPhantom

    DarkLunaPhantom Prince Supporter

    Joined:
    Feb 4, 2013
    Messages:
    509
    Location:
    Croatia
    Hi! Almost all changes were implemented by changing existing files and not by adding new ones. Karadoc used some version of Better AI mod as a starting point and then implemented a lot more of his own changes. All these changes in the code are usually commented and they are very numerous as there are changes all throughout the source code.
    Easiest way to see the differences between BTS source code and K-Mod source code is to use a tool like WinMerge to compare files.
    AI related things are usually in files whose name ends with AI like CvCityAI.cpp, CvPlayerAI.cpp, CvTeamAI.cpp and CvUnitAI.cpp, but they could be anywhere.
    CvGameCoreDLL.dll is larger simply because it contains more stuff.

    It depends on what do you want to change. You need to find the code related to it and see what can be done about it. If you want to change things contained in the dll, then you need to be able to compile the dll and there are guides on how to do that.
     
    keldath likes this.
  5. UltravioletCatastrophe

    UltravioletCatastrophe Chieftain

    Joined:
    Jun 16, 2022
    Messages:
    5
    Well, improving the CivIV AI is something that has been on the back of my mind for many years now, and because I was a bit disappointed with K-mod's performance (I admit I was perhaps expecting too much from it) I thought I could try and see how it all works underneath. More specifically, because CivIV runs (partly) on Python, which is a language I'm familiar with and which has many AI capabilities and libraries, I was wondering if it would be possible to use all of those tools to make a truly advanced CivIV AI. Do you know if I'm saying something stupid? I'm very new to this and I don't know to what extent one can modify the base game.

    Well, what are the kinds of things are contained in that dll? And is https://forums.civfanatics.com/resources/makefile-instructions-bts-3-17-sdk-debugging.10018/ one of the guides you mentioned?
     
  6. DarkLunaPhantom

    DarkLunaPhantom Prince Supporter

    Joined:
    Feb 4, 2013
    Messages:
    509
    Location:
    Croatia
    "Civ4 AI" and "Python AI libraries" have nothing to do with each other. Civ4 AI is a large web of mostly very simple heuristics.
    Almost all core game features are implemented in C++ and that's what you would need to use to make any significant AI improvements or any large changes whatsoever. (Although you could use C++ to delegate that task to Python code, but that would be inefficient.)

    I was thinking of something like this.
     

Share This Page