K-Mod: Far Beyond the Sword

I dont know for sure, but right now it feels like the ai tries about 10-15% of the time to win and spends the other 85-90% of the time role playing or doing nothing. Perhaps that should be balanced out a bit...

And yea the mayans, last game, made one cannon in 10 turns of war, had not one mined hill and very few irrigation, and were building some econ buildings while they lost 4 cities. But they were going through tech like crazy (very unpleasant feeling for me you dont get a sense of an era at that high a tech rate).

And yea, just as I make peace with the Mayans after taking their religious holy city, who do I see coming through their land?

The russians with 30 special cossacks and about 10 cannons. I know for damn sure they wont be killing off the mayans and expanding, they will be attacking me with no hope of profit for them.

As far as city placement,
Personally I dont chop tundra forests or plains forests anymore unless they are outside of my cities used tiles....but then I try to plant my city next to two food sources or river grasslands or flood plains, basically at least three tiles with at least the possibly of 3 food or two tiles with more than 3 food. Ive found in heavy food but low hill type cities definitely benefit from plains with forest/tundra with forest for their production needs.
 
Hi Karadoc,

thanks for the reply.

The new paradrop command is very useful.

Regarding chopping, I understand your point of view, but I still have the feeling that Darius make too few improvements in his cities.

However I am sure that I need to play much more games with Kmod in order to evalutate better the situation.

I look forward version 109!
 
Can't wait, by the way, I integrated my mod into yours, I love the new AI :thumbsup:

I'm having an issue, it seems that randomly the game just crashes, for instance, at turn 104 the game crashed and trying to advance the turn on the autosave results in another crash, any idea what could have caused this? I'll turn python exceptions on to see if anything happens if you think that could be the issue.
 
I'm having an issue, it seems that randomly the game just crashes, for instance, at turn 104 the game crashed and trying to advance the turn on the autosave results in another crash, any idea what could have caused this? I'll turn python exceptions on to see if anything happens if you think that could be the issue.
As I understand it, your mod uses the K-Mod dll... so the crash is probably a K-Mod problem. So if you like, you can upload the save here and I'll see if I can work out what the problem is. Fixing crash bugs is high priority.


The next version is coming along nicely. -- But rather than uploading what I've done so far, I'm started getting a bit carried away while doing a semi-rewrite of the grouping parts of the AI.
Spoiler :
The original AI group functions were a bit archaic and confusing. So I've started replacing them with some new group AI - and while I convert stuff from the old functions to the new, I have to think about what the actual purpose of each function call is - so that I know what parameters to pass to my new function. During this process I've noticed lots of questionable AI behaviour. So I'm making lots of AI changes as I go along. The upshot is that I'm probably going to break something and the next version will be complete trash. :crazyeye: -- but the good news is, I think I've solved the AI's productivity problems.
 
Here is the mod download and here is the save, I hope you find the issue, in my little time playing it, the AI was good, almost too good :goodjob:.
 

Attachments

  • AutoSave_BC-0275.CivBeyondSwordSave
    117.4 KB · Views: 50
That save doesn't open in my version of K-Mod, nor in the mod that you linked to (which does not include K-Mod).

I expected that it actually would open with just K-Mod... but anyway. It looks like I might need the merged version of your mod if you want me to test it. Which version of the K-Mod dll was it using anyway? Notice that in the changelog, there was one crash bug fixed in v1.08.
 
I've found that problem. It isn't actually something that affects K-Mod, but I'll see if I can find an easy way to fix it for the next version anyway.

The problem is caused by the -1 food for mines under slavery in your mod. -1 food on a plains hill results in a negative food.

The code that actually gives you the food at the end of each turn just forces the yield to be non-negative. (ie. you get zero food instead of -1 food). But the AI code for choosing which improvements to build does not work in the same way. It involves adding up various bonuses from combinations of civics and terrain and plot features... anyway, there's a particular bit of code that has something like (some number) / (food yield + 1). When the food yield is -1, this causes a divide-by-zero crash. :(

So that you can continue playing, I'm attaching a modified version of the dll which doesn't have this particular crash - but it may have similar problems elsewhere.

By the way, there are a few warnings about missing xml entries when your mod starts. FLAVOR_RESEARCH, CIVILIZATION_BYZANTIUM, CIVILIZATION_PERSIA.
 
So, that russian army, sure enough declared war, even though by that time I was at peace with Pacal, and turns out it was 110 units of cossacks/riflemen/cannons/ and like 6 trebs, most with at least triple upgrades. Thats how much the ai has sat around lol.

Having to fall back, as I just got cannons, abandoning one city so far for sturdier ground...

Perhaps i should mentition im playing with the "no tech trading" and no "Tech brokering" options selected. Maybe the ai gets some INSANE research bonus/world wonder super bonuses- with those options or something.
 
My guess is that the problem was caused by BUG mod being installed into the custom assets folder on one of the computers; or something like that. In any case, I'm glad you reported the issue, otherwise I wouldn't have known that problem existed.

Spoiler :
I've just uploaded version 1.08; and I've changed the K-Mod.ini to have 'NoCustomAssets = 1', so that other people don't have this same problem.

Unfortunately, as I mentioned this has the side effect of disabling custom graphics packs. I personally much prefer to play with the Blue Marble tileset, so I've prepared a pack-file of the Blue Marble graphics that I use. I've attached the file to this post. If you want to use these graphics, unzip the attached file ("BM tiles.FPK") into the K-Mod\Assets folder. That's all you need to do.

I've done a quick test to confirm that multiplayer games still work regardless of whether anyone (or everyone) is using the graphics pack, so it shouldn't be a problem.

Anyway. Version 1.08 is up. The main feature is that it includes my first attempt of giving the AI some basic tactical memory (as I mentioned in an earlier post). I don't expect that this AI will be significantly stronger. But I do expect that it will stop the AI from being confused by well defended choke-points. I just hope there aren't any problem which cause the AI to actually play worse than before.

Nice. One more question. Can u link me to that graphics mod if possible. I cant find it using search and i want to enhance the graphics in this mod. I didnt wanna try anything before cus of the problems i had.
My pc is broken for some time so i didnt have time to check out the new version. Hopefully ill get the new motherboard today and enjoy your lovely mod. ;)
 
Thank you very much, I'll check it out tomorrow when I have some time and get back to you with feedback.

Awesome, worked like a charm :) I'm noticing the AI is much more agressive with each other, it may just be their personalities, but it's great to see the AI consistently declare war and bribe others into entanglements rather than me starting the war and the AI peacevassaling to somebody else, and dragging them into the war. Overall great work (also, if I removed the -1 food from slavery mines, the issue with the standard dll would go away, right?)
 
I've just uploaded v1.09. [edit - and now I've updated the changelog, and this post.]

This version was a bit rushed. Not all of the features have been properly tested, but I think it'll be ok.

The main reason I'm uploading it now is that I've just discovered a critical bug in v1.08. Basically, in v1.08, if someone creates a colony, the game will start misbehaving in a big way. If you're lucky it will just crash.. but other bad stuff is possible. For example, the game can get stuck while writing a save file... and then just keep writing the save file bigger and bigger until you force Civ4 to close. It really is a nasty bug, and I'm sorry I didn't spot it sooner. I'm also sorry that I can't really put safeguards in to prevent that kind of bug from happening in the future, because the actual badness was happening inside the core game - not the dll. (The bug was caused by a mistake that I'd made in the .dll, but the nasty way it manifested is part of the .exe.)

But aside from that, I think the new version will be pretty good anyway. You can see that there is some pretty nice stuff in the changelog. It has the stack promotions feature that Axios was asking for. (It's a good feature. :)); it has the paradrop change, which makes paradropping much less tedious... and it has stacks of improvements to the tactical AI. So, unless I've missed something important while testing, I think it'll be a really good version.

Perhaps i should mentition im playing with the "no tech trading" and no "Tech brokering" options selected. Maybe the ai gets some INSANE research bonus/world wonder super bonuses- with those options or something.
I don't thinks the AI gets any special bonuses with any different game options. As far as I know, they only get bonuses based on the difficulty level. -- They always got big bonuses; but now that they know how to use great people properly, and how to build useful plot improvements... they are pretty strong.

Nice. One more question. Can u link me to that graphics mod if possible. I cant find it using search and i want to enhance the graphics in this mod. I didnt wanna try anything before cus of the problems i had.
My pc is broken for some time so i didnt have time to check out the new version. Hopefully ill get the new motherboard today and enjoy your lovely mod. ;)
The graphics pack I uploaded (here) is from the Blue Marble mod. All I've done is removed a few images that I think looked really bad, and then bundled into a single fpk file so that it is easier to manage.

If I removed the -1 food from slavery mines, the issue with the standard dll would go away, right?
Yes. The problem was only caused by the -1 food on plots that already had 0 food. But regardless, the problem has been fixed in v1.09 anyway.
 
I've just uploaded v1.09. [edit - and now I've updated the changelog, and this post.]

This version was a bit rushed. Not all of the features have been properly tested, but I think it'll be ok.

The main reason I'm uploading it now is that I've just discovered a critical bug in v1.08. Basically, in v1.08, if someone creates a colony, the game will start misbehaving in a big way. If you're lucky it will just crash.. but other bad stuff is possible. For example, the game can get stuck while writing a save file... and then just keep writing the save file bigger and bigger until you force Civ4 to close. It really is a nasty bug, and I'm sorry I didn't spot it sooner. I'm also sorry that I can't really put safeguards in to prevent that kind of bug from happening in the future, because the actual badness was happening inside the core game - not the dll. (The bug was caused by a mistake that I'd made in the .dll, but the nasty way it manifested is part of the .exe.)

But aside from that, I think the new version will be pretty good anyway. You can see that there is some pretty nice stuff in the changelog. It has the stack promotions feature that Axios was asking for. (It's a good feature. :)); it has the paradrop change, which makes paradropping much less tedious... and it has stacks of improvements to the tactical AI. So, unless I've missed something important while testing, I think it'll be a really good version.

-CUT-

Nice bug... promptly fixed!:goodjob:

Thanks for have updated BUG mod to 4.5 :)

Regarding "Fixed a mistake in AI_attackCityMove which caused the AI to incorrectly estimate the penalty from crossing rivers." in past too times I saw IA attacking crossing a river :(

Regarding "The number of cities scoreboard option from BUG will now only show the number of cities that are currently revealed on your map. (ie. it does not count any cities that you haven't seen.)": good job! Now isn't more a cheat.

"Added some flavour adjustments for the AI's evaluation of forest chopping." I can't wait to see the new IA behaviour about chopping!
 
The last game of 1.08 I played the enemy declared war with 10 war elephants, 4 axemen, 4 spears, and 4 cats.

They went around pillaging and bombarding intelligently and occasionally switching for weaker cities, so that I had to shift units between cities constantly for fear that the AI would take over one.

The AI pillaged so much...I got beaten fair and square. Crazy respect for your skills Karadoc.

It is also like the 6 th game in a row where Stalin- no matter how much on good terms I am with him- always tries to kill me early. Hes like the ai's hitman. He doesnt try to win per se, its more like hes farming for great generals while trying to keep the human player weak. So that the points leader ai can beat him.

1.09 is feeling pretty good so far, I was a little mad that the taoists- 2nd person to a religion tech (i use select religion) spread way faster than I did and they didnt even have open borders like 20 turns later than I did, and I was first to christianity- 1st to religion tech.

O btw, maybe the "ask human to declare war" and the "Ask human to cancel deals" could share a common delay between turns of asking. One civ asked me one turn to declare war, then the next turn to cancel deals...seemed a little overkill....and they made peace with that civ the next turn, so if I declared war like they asked, Id be screwed doing all the work.
 
...and they made peace with that civ the next turn, so if I declared war like they asked, Id be screwed doing all the work.

This has been in CIV IV forever. I've often wondered if Sid and Co. put that in there on purpose!

JosEPh ;)
 
I have to say, your AI is still very strong, normally I can pull ahead by the Renaissance, and while I've done that, it's not to the degree I would like, the AI is still fighting to stay in the game. It's sometimes almost infuriatingly good, I've never even been at the top of the scoreboard this game. Hats off to you, amazing mod.

In unrelated news, I've added your AI to my Pendragon mod and I'm calling it Pendragon + K-Mod, of course giving credit to you :).
 
Continuing 1.09 game.... Ai really beating each other up alot, most the bigger nations punishing the smaller nations, lots of "choking" and pillaging tactics, and much longer wars it seems. I cant see everything but I catch glimpses of large armies with crazy experience levels. Japan had lots of Samurai with 5+ upgrades, so awesome to see, like 3 strength upgrades and then 2 first strike upgrades.

I invaded Gilgamesh and took a city and he instantly made peace with the Japanese. He sent 3 knights and 5 trebs at my 25+ unit army and lost it all....seems like he shouldve left more units on defense (the default number of defenders seems to be 3) in that first city I took, and he shouldve grouped up more units before approaching my army, basically he threw away those 8 units, the knights and trebs.

I built up a large economy, actually didnt have iron, so I saved up huge amounts of money from my badass economy-got colossus and great lighthouse this game- saved up like 3500 gold, bought iron rights from the japs, and upgraded like 30 chariots to knights, and like 20 archers to longbowmen, and I had already stock piled about 12 catapults. My power rating jumped straight up lol.

I have a decent tech lead and im playing as the english with stockexchanges, and every top level ai has been at war for lots of years...somehow they are slowly getting to my level of gnp...and 43% of the world is jewish and they havent built the temple of soloman yet... seems mysterious.

I really like how the ai is aggressively expanding locally now (I do have random personalities selected), wish the ai would leave at least 4 or 5 units in border cities for defense, and I wish the ai would group more units before trying to reclaim a taken city/deal with my main stack.

I also notice that the ai doesnt ever come to me to ask for peace...even when i clearly a huge threat, basically the ai deals with it by having a stronger ai usually declares war on me (zulus declared war after I took two of Gilgamesh's Cities).

Also the ai seems to rarely have enough gold per turn income to trade me for resources. I love to trade out horse and copper to weaker smaller nations fighting larger nations that are a threat to me, but often I have to just give them the resource since they rarely have gold per turn available.
 
Hi Karadoc,

In the zip file I uploaded updated Italian translation for 1.09

Regarding Military Power Ratio, I installed 109 in a new folder and although "P" is activated in "Scoreboard" tab, is not showed in scoreboard.

So I opened K-Mod\Assets\Config\Advanced Scoreboard.xml

and changed
Code:
!-- Power Ratio -->
			<option id="Power" key="Power" 
					type="boolean" default="False" 
					get="isShowPower" set="setShowPower" dirtyBit="Score"/>

to

Code:
!-- Power Ratio -->
			<option id="Power" key="Power" 
					type="boolean" default="True" 
					get="isShowPower" set="setShowPower" dirtyBit="Score"/>

and now works.

Other question: in 107b and 108 I saw settlers or workers escorted by 2 swordsmans. It should be better if they were escorted by axeman, expecially because barbs often appears as axeman.
 
Top Bottom