K-Mod: Far Beyond the Sword

Thanks Ben. I agree with both suggestions - kind of.

I use Blue Marble myself, and I think its a great improvement over the original graphics. But since the mod works fine with and without Blue Marble, and since some people might actually prefer the original graphics, I chose not to include Blue Marble with the mod.

Actually, there are a some parts of Blue Marble that I don't like. On my own computer I've edited it to suit me. So if I did include it with this mod, I'm not sure if I should include the version I like, or the version the Blue Marble designer likes...

About religion. I agree that there are problems with the current religion system, and I intend to change it. I've been trying to think of how best to fix it. I just haven't gotten around to it yet. I haven't thought of a solution that I really like. Maybe I should browse around through other mods to see how they deal with it. On the topic of religions, I've also been trying (and failing) to think of a good way to buff Divine Right. I know that some mods give a great prophet to the first civ, and I think that's a decent idea, but I really think the tech needs something more permanent. Currently, all the benefits of Divine Right go to the first couple of civs to get it; and then it just becomes a complete waste of research points with no value whatsoever. ...
 
I'll throw out a suggestion regarding the religion system that I've wished someone would implement for a while.

I'd like to see religions be a little more dynamic in that a religion will fade away/die out if you don't actively maintain it by building temples, missionaries, etc. Also, my opinion is that religions should spread more slowly unless you are actively working to spread them via missionaries, etc.
 
I was thinking that maybe, rather than religions disappearing over time, they could have some probability of being removed when a new religion is spread to the city. Currently, when a missionary attempt to spread a religion, it has some probability of failure which is based on how many religions are already in the city; I'm suggesting that there could also be a probability of spreading successfully and wiping out a different religion from the city in the process.

The probability of religions being removed could depend on a bunch of things, such as whether or not it is your state religion, how close it is to the holy city, and how many religious buildings the city has. Free Religion could make you immune to this religion removing mechanic.

What do you think of that idea?


All that aside; I've found some problems in the latest version and I'll probably upload a minor update soon.

The main problem is that there's a flaw in my code which sometimes makes the AI gets stuck on 20% espionage rate permanently. But there are also a few other things. There's an original BtS bug which prevents the AI from using its culture slider for anything other than a cultural victory. (There's a bunch of code to calculate what the "ideal percentage" should be, and then it basically just gets set to zero because of this bug.) And also, the current AI seems to have an unnaturally high affection for Nationhood. Apparently the happiness bonus is being significantly overvalued...
 
I've uploaded version 0.98b. It fixes the issues that I mentioned in my previous post, as well as a few other things. Hopefully I didn't break anything else in the process!

Anyway, get it while its fresh. You don't have to abandon games or anything, just copy it over the top of the previous version.
 
Thanks for your reply, Karadoc.
Your religion idea sounds cool, but I would also recommend that later religions have a higher chance of getting in and removing other religions than earlier ones.
 
I was thinking that maybe, rather than religions disappearing over time, they could have some probability of being removed when a new religion is spread to the city. Currently, when a missionary attempt to spread a religion, it has some probability of failure which is based on how many religions are already in the city; I'm suggesting that there could also be a probability of spreading successfully and wiping out a different religion from the city in the process.

The probability of religions being removed could depend on a bunch of things, such as whether or not it is your state religion, how close it is to the holy city, and how many religious buildings the city has. Free Religion could make you immune to this religion removing mechanic.

What do you think of that idea?

I like it. It would allow the same thing I was after, that the later religions could make more of an impact in the game if they are aggressively spread/built up.

Another suggestion which I have been trying to do but I think is above my skill level is to have religions founded by Great Prophets instead of by tech.
 
I'm well, thanks Keldath.
This mod works fine in multiplayer. My girlfriend and I play it together most weekends.
(although, it still sometimes has the same OOS problems that normal BtS has. I haven't managed to track down where the OOS problems are coming from, but I suspect that it might not be in the dll at all.)

re-religion
I like it. It would allow the same thing I was after, that the later religions could make more of an impact in the game if they are aggressively spread/built up.
I'm glad you like the sound of it. I'll probably try making some of those changes soon - but at the moment I'm still fixated on the AI. My only concern with the religion changes is that it might become a bit frustrating / tedious having to spread the same religion to the same cities over and over due to them getting removed. From a strategy point of view I think it's fine, because you can always remove the problem by using Theocracy (to stop other civs from removing your religion) or Free Religion (to stop religions being removed at all), but it might just be a bit unfun. So I'll probably start with a fairly small removal probability and see how it goes.

The next version of the mod is pretty much ready; but as usual, I keep changing stuff - and then the changes need to be tested, and then I change more stuff, etc. I'll probably upload something in the next few days.

Once again, it will be all about the AI. I've fixed a few problems with the way the AI manages its spies and espionage points, mostly so that it will be more effective at using spies during war-time (instead of just doing useless missions all over the place). I've made improved the AIs placement of national wonders and cathedrals - this will stop them from wasting their cathedrals when they are trying to get a cultural victory. I've fixed some problems with my new great-person code that you would have seen in the current version. Unfortunately the current version massively over-values using great people to join / build in a city, and undervalues golden ages and bulbing. In the next version it will be a bit smarter and more varied in how it uses it great people (although there will still be a lot of joining / building, because that's easiest for the AI to understand.), for example, I've taught the AI to value a golden age more highly if it wants to switch civics. I've also taught it to switch civics more freely if it won't trigger any anarchy (eg. spiritual civs, golden ages, cristo redentor...)

Anyway, there will be stacks of AI changes. I just want to do a bit more test & tweaking before uploading.
 
Good to see your making progress.
Have you thought of incorporating BUG? I dont know how to merge mods and BUG really adds a lot.
 
It has BUG already (with a few incompatible features removed).

I think I'll upload the next version now - even though there are still untested changes (as usual).

I'll have it uploaded in a couple of minutes.
 
Ok. Done. Uploaded. It took a bit more than "a couple of minutes", sorry. It took longer than I expected to write the change log. (I don't really like writing the changelog.)

Anyway, as I mentioned earlier, it's almost exclusively AI changes. There are heaps of bug fixes, but they're mostly AI bug fixes - so you can just think of them as AI improvements. :p

About BUG, to add to what I said, most of the BUG features are in K-Mod already - but unlike in the normal BUG mod, most of the features are turned off by default. You have to go to the BUG options menu to turn them on. -- and that's where you might find another stumbling block: I've changed the BUG options button picture into a suitcase. (Originally it was a green "bug" / alien looking thing, which I thought looked very out of place...) A few people have asked me about including BUG, without noticing that it is already there. I wonder if I should try to make the options menu more obvious somehow.

oos, well mostly oos comes from the python, not the dll i believe.
What makes you think that python is the source of the OOS errors? I've barely changed anything in the python, so I don't have a strong understanding of what's in there. All I know is that in some games, we finish the whole game without a single OOS error, but in other games it happens heaps (and we have to keep reloading autosave). I don't think it happens any more often in K-Mod than it does in original BtS, so I don't think it's my fault. :x -- But I'd still really like to fix it, because those OOS errors are really frustrating. So if you happen to know of any particular python errors... let me know.

Here's one more thing about OOS errors that I found interesting. One time, I was playing a 3 player game, and it starting getting OOS errors. The interesting thing is that it was always the same computer that was out of sync. We had two desktop computers using ethernet cables, and one laptop using wireless - and it was always the laptop that was out of sync with the other two. So, based on that, I reckon the OOS errors are caused by a race-condition somewhere. Anyway, I've been unable to solve it so far. Every so often I change some suspicious code and think to myself "this could be it... this could be the end of OOS." But alas...
 
Karadoc, how well commented is your source code? If I wanted to merge it into my own mod.
 
Linkman226,

as i saw most is coded,
but if there are parts which is not - just use something like winmegre and compare it to the original bbai code,
and youll see all the changes ( tons of them).

civic ai - its a better code that helps the ai to choose his civics,
youll better know what it does by looking at bbai bug by fuyu :)
 
I do use winmerge, but some of the BBAI stuff is not necessary for RFC (of which my mod is based) and therefore I was wondering if that stuff is marked out and such

Or if I only wanted one feature (say Global Warming, which is clearly superior in this mod), if it'd be easy to find
 
Well, most of my changes are marked with something like
Code:
// K-Mod 'some comment'
/* original bts code
...
*/
(my code)
// K-Mod end
But the changes are not really broken down into categories (because many of the changes are interrelated), so I don't think there is any easy way to extract a particular subset of changes.

If you just want the global warming stuff, then my advise is be to start by replacing the original "doGlobalWarming" function with the one from my mod, and then try to compile it. It will give a bunch of errors saying that it can't find such and such functions - and then you'll know which other functions you'll need to copy. Then, after that, you could probably search my code for "getGwAngerPercent" and try to find all the places that it used. ... I think that's about all.

... actually. That isn't all. I just remembered there's also the Environmental Adviser screen, which is coded in EconomicsAdvisor.py; and that code will call a bunch of helper functions from CvGameTextMgr.cpp. Searching for "global warming" in my code would probably find most of the stuff. But the bottom line is that I don't think there is a particularly straight forward way to extract components from K-Mod. I'm sorry about that. The AI would probably be even more difficult, because I've changed stuff in pretty much every part of it. Probably the easiest thing to do there would be to just copy every file that ends in *AI.cpp and *AI.hpp... but even still, there are probably some bug-fixes / changes in other parts of the code that are required for the AI to work properly. A couple of examples that come to mind are the changes in "canDoEspionageMission", and a new function "getEspionageGoldQuantity" - but I'm sure there are others...

civic ai - its a better code that helps the ai to choose his civics, youll better know what it does by looking at bbai bug by fuyu :)
I see. Well, I'll probably have a look at it, but I've already made extensive changes to pretty much every part of the AI's civic changing code. I've rewritten big chunks of the civic evaluation code; and more recently, I've taught the AI to understand which civic changes will result in anarchy and which will not. (eg. golden ages, spiritual trait, a second civic change when they have already decided to change one [under the right conditions], and so on.)
 
Thanks karadoc. That looks like a doozy, but I'd really like a bunch of features in your mod in my mod cuz they're so awesome, so I will try. Thanks again.
 
Top Bottom