Resource icon

[ModMod] Kek-Mod v0.26

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:
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?
 
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?

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.

If I wanted to change how the AI works, how would I go about it?

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.
 
It depends on what you want to change.

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.

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.

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

"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.)

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?

I was thinking of something like this.
 
Hi DarkLunaPhantom,
I just had my first OOS since years, so I just reloaded, but I get it every turn from this turn on.
Could you look at the save to see what's going on? I can connect to check multiplayer if you want.

Scanning my hard disk showed an error on the file CIV4TechInfos.xml :(
So that might be the reason for the OOS.... I'll check in a few days with my friend, sorry for that :)
 

Attachments

  • AD-0670.zip
    2.5 MB · Views: 11
Last edited:
Does using nuclear weapons cause global warming in this mod?
 
Is it a bug that when distributed by teams, nations are randomized internally?
Weird, I will check what is happening there. I did change how civs/leaders are randomized some time ago, so there might be a bug there.
Thanks for the video!
 
[I am starting this new thread because the Kek-Mod thread has vanished from this forum. Fortunately, the download page is intact.]

Non-raging Barbarians are much stronger, more dangerous and expensive to fight in Kek-Mod. A downside of this Barbarian power is that the early game becomes more difficult to a human player who tries to save on military building and maintenance, and the early game is already more difficult than the late game because of AI bonuses at higher difficulty levels. Maybe the Barbarians shouldn't suddenly rush into civilizations' cultural borders at some fixed point in time? At this time they sometimes conquer even AI cities. How about making them gradually more likely to enter civilized borders to reduce the suddenness of the onslaught and give civilizations more time to prepare?

The much higher Barbarian threat makes the Great Wall very attractive indeed, unless the map is overly crowded by civilizations. If the Barbarians remain so powerful, the Great Wall should become significantly more expensive in Kek-Mod. On the order of 300-400 rather than 150 hammers, I guess.
 
[I am starting this new thread because the Kek-Mod thread has vanished from this forum. Fortunately, the download page is intact.]
Thank you for informing me about this. It seems that all my mod threads had suddenly vanished earlier this year, but they have been restored now by admins.

Non-raging Barbarians are much stronger, more dangerous and expensive to fight in Kek-Mod. A downside of this Barbarian power is that the early game becomes more difficult to a human player who tries to save on military building and maintenance, and the early game is already more difficult than the late game because of AI bonuses at higher difficulty levels. Maybe the Barbarians shouldn't suddenly rush into civilizations' cultural borders at some fixed point in time? At this time they sometimes conquer even AI cities. How about making them gradually more likely to enter civilized borders to reduce the suddenness of the onslaught and give civilizations more time to prepare?
That was kind of the point of my changes to barbarians, to make it much more risky to neglect military in the early game.
However, I rarely play on difficulties higher than Monarch (over the last several years most of my games were somewhat beginner-friendly multiplayer games) so this effect might be tuned way too high on higher difficulties without me noticing it. I also rarely play without raging barbarians so I mostly expect them to be a problem and I agree that non-raging barbarians shouldn't be a deadly menace.

The much higher Barbarian threat makes the Great Wall very attractive indeed, unless the map is overly crowded by civilizations. If the Barbarians remain so powerful, the Great Wall should become significantly more expensive in Kek-Mod. On the order of 300-400 rather than 150 hammers, I guess.
There are many things in the game related to barbarians that are awkwardly designed, Great Wall included. I am reluctant to change construction costs, but I did already change the barbarians and this wonder's purpose is to negate them...

I haven't really actively worked on the mod in the last few years, but let's stay optimistic that this is going to change:
Some things that could be changed easily are the sheer number of barbarians with no raging barbarians option, maybe the barbarians could spawn (and upgrade) only further away from civ borders or their intensity could be tuned with time (e.g. tied to game era). One thing that's sorely missing is that you don't receive any kind of message when barbarians start to spawn!
Their behaviour could also be changed, e.g. probability of entering cultural borders that changes with time, but I would rather try other interventions first.
 
For the record: I have played two Kek-Mod games with tech trading disabled and land-only (no ocean). In the first game (Immortal difficulty) 4 Barbarian axemen suddenly entered my borders and razed a city. Luckily I was able to finish researching Iron Working, build an Iron mine and prevent any more city captures. What followed, was constant struggle against Barbarians with significant hammer waste on units. Eventually, the most powerful AI declared and conquered my not-advanced-enough civilization. I am sure I could have expanded, advanced technologically and better prepared for the war, if I didn't have to ward off barbarians all the time.

In the second game (Emperor difficulty) I wisely built The Great Wall. Then easily out-researched the AI and built almost all other wonders. Was able to train an army just-in-time when an AI brought troops to my border (and declared the next turn), and haven't lost a single city. EDIT: in this game the barbarians razed a Babylonian AI city, despite the Bowman bonus against Melee Units.

In my experience, the most difficult and risky phase of a single-player game at higher difficulty levels is the beginning. A successful beginning makes beating the AI in later game trivial. The Kek-Mod barbarians without The Great Wall make the early game even more difficult, which forces me to lower the difficulty level and then be bored with the too-weak AI in later game.

I was considering a multiplayer Kek-Mod game and realized that whoever builds the cheap Great Wall gains a huge advantage over other human players. I suppose the Great Wall is even more overpowered in a raging-barbarian game.

Some things that could be changed easily are the sheer number of barbarians with no raging barbarians option, maybe the barbarians could spawn (and upgrade) only further away from civ borders or their intensity could be tuned with time (e.g. tied to game era). One thing that's sorely missing is that you don't receive any kind of message when barbarians start to spawn!
Their behaviour could also be changed, e.g. probability of entering cultural borders that changes with time, but I would rather try other interventions first.
These proposed changes look good to me.
 
Last edited:
Top Bottom