K-Mod: Far Beyond the Sword

The barbarians don't really have any goals. Or rather, I guess you could say their goal is to destroy all civs, but they are very disorganized. The barbarians and deliberately reckless. They'll often attack even when they know they'll probably lose. They can't build cultural buildings or settlers, and so they can't expand.

AI civs are not conscious of the "raging barbarians" setting. They wont' make any special preparations for it; and so they may struggle with it a bit more than human players do. But the AI is generally pretty cautious with its city defenses anyway...
How do they build culture then? Convert production? Trade routes between barb cities?

With "raging barbs", AI cities are captured by barbs regularly, especially if the barb cities are well developed, connected by roads. A "new world" type continent full of barbs is an extreme example.
 
How do [the barbarians] build culture then? Convert production? Trade routes between barb cities?
Once they get drama, they can convert production to culture. They were always technically able to do this, but I only recently changed the AI so that they would actually use it. -- Aside from that, they can also get culture if they capture a city that has a religion in it.

Is there a alternate civ4handicapinfo.xml file for k-mod?[...]
There is not. I guess the AI is just playing well. :)

Karadoc, any thoughts/plans on the next version?
Well, nothing major is planned. I've made a few bug fixes and AI adjustments.. but that's about all. One balance change that I've been using which will probably be in the next version is that Drill promotions all give +15% collateral damage reduction. (instead of 0, 20, 20, 20; it's 15, 15, 15, 15.)
 
I like that idea. The drill promotion line is way too bottom heavy. Drill 4 is a great promotion but Drill 1 is very underpowered. Your idea would alleviate the problem somewhat. I'm not sure why Firaxis added so much randomness to the first strikes either. Why can't each drill promotion just provide 1 first strike?
 
Just an unscientific observation - one thing I have noticed with Kmod is that winners win bigger than in the retail version. When I played BTS emperor if I lost it would usually be a close game and when I won it was also somewhat close, a lot of the time, but with Kmod I still have close games but most of the time the game is not close at all - I either get completely wrecked by some runaway AI, or I completely wreck the AI. It's weird. I'll go three games in a row losing, 2 of them getting owned by dogpiles, and think "geez Kmod is too hard" and then on the fourth game I'll get WAY AHEAD of the AI and be fighting with tanks vs cavalry or something absurd.

You know, I've noticed this as well and it's so striking that it's hard not to think that something's up. Still I doubt it and chalk it up to since Civ being a game where advantages and disadvantages snowball. The third or fourth time playing a map your prioritization is much better and your predictions about AI behavior are as well and then I think, so this is what more experience will gain me and I can see acing this difficulty with that much more experience. It's almost necessary to play with some weaknesses - defense where it's not needed to gain advantages elsewhere and it's so easy to get burned by doing this. More experience will tell us what we can get away with and what we can't. And so we're getting better bit by bit.

I think I should be watching the power graph more carefully. The lack of the plotting fist is fine though.
 
yeah I wasn't a fan of the plotting fist in BUG - it seemed like a cheap exploit. Now I just prepare for war and watch diplomacy.

Karadoc: If I wanted to change the graphics of my game but still play your mod what would be the best way to do so? I was thinking of perhaps finding a graphics mod and using it to replace the game's files (so those graphics would load without having to load the mod) and then loading kmod on top of that like I normally do. I'm not sure if this will work, though. Thoughts?
 
I've just played 4 pangea games in a row over the last week and a half or so and I've noticed something in Kmod that stands out. In every single pangea game I've had a civ from the other side of the continent march through 2 empires just to get to me and start razing my cities. This is happening even though I'm higher on the power graph...I inevitably wipe out the invading army and then what? I could march all the way to their territory and do...what exactly? It's on the other side of the continent. This is also happening when there is no strategic reason to attack me, I'm not first place by any measure and yet I do have a strong military...it seems to be happening out of sheer flavour reasons (religion, etc). It's unbelievably annoying. It's MAD (mutually assured destruction). They manage to surprise me and raze one of my good cities and drag me into a pointless war, and then I annihilate their entire military so they end up dying very soon, but they drag me down with them. What happened to the AI saying "we would have nothing to gain". Why would the AI attack a civ on the other side of the continent...it makes no sense.
 
Congratulations with the successful mod, Karadoc. I'm new to this mod and surely going to explore more to it.:D

I want Failaxis announce this as their official 3.2v patch. And all credits go to you.;)
Thanks. I think K-Mod would make a good official patch - because it has a bunch of changes that make things easier for other mods (for example, multi-language support is easier to implement in K-Mod than in the unmodded game). Existing mods which don't want to avoid the K-mod changes would have to include their own custom dll - but that's not really a big deal, because most mods do that anyway for BUG features or bug fixes.

But even still, I don't think anyone at Firaxis cares about this mod at all, and I even if they did care I don't think they would want to devote any resources to releasing a new patch for their game. And if they did want to have a new patch, they might want to spend a bit of time fixing some bugs in the civ4 exe and the pitboss exe...

I guess one can only dream.

I'm not sure why Firaxis added so much randomness to the first strikes either. Why can't each drill promotion just provide 1 first strike?
I don't really know why "first strike chances" exist, but my guess is that first strikes were originally intended to actually true be first strikes (as in, if you have 2 "first strikes", then your unit will hit the enemy twice before anything else happens) - in which case, first strike chances is sensible half-way point. But for whatever reason, that's not how first strikes work... maybe they thought that would be too powerful (I think it probably would be very powerful...) or maybe whoever was in charge of implementing it just misunderstood the intention, and so what we're left with is basically "first strikes" meaning "rounds of invulnerability" where the unit may or may not actually hit anything - (and so a "first strike" might as well be called a "first strike chance", and a "first strike chance" can be a "chance at a first strike chance"...)

Karadoc: If I wanted to change the graphics of my game but still play your mod what would be the best way to do so? I was thinking of perhaps finding a graphics mod and using it to replace the game's files (so those graphics would load without having to load the mod) and then loading kmod on top of that like I normally do. I'm not sure if this will work, though. Thoughts?
I would suggest not replacing the game's own file. If you want to try something like that, then the best way would be to put the graphics mod into your 'custom assets' folder and change the K-Mod.ini file so that custom assets are not disabled. That would have the same effect as replacing the game files, but without actually messing with the files directly.

However, depending on graphics mod, that might not work anyway. If the graphics mod just adds new art and new xml/art files, then it should be fine - but if it changes the art stuff inside the CvUnitInfos.xml then it will conflict with changes already in the K-Mod version of that file. - To make it work, you'd have to manually merge the changes; which is a bit of a chore. Mmod includes some changes like that.

Graphics mods which only include the actual art files (ie. no xml changes whatsoever) can be put directly into the K-Mod folder without breaking the multiplayer compatibility of the mod (ie. you'll still be able to see multiplayer games of people without the graphics mod). The blue marble tile pack in the first post of this thread works like that.

I've just played 4 pangea games in a row over the last week and a half or so and I've noticed something in Kmod that stands out. In every single pangea game I've had a civ from the other side of the continent march through 2 empires just to get to me and start razing my cities.[...]...it makes no sense.
It sucks that that's happening... but I'm not sure what to tell you. The AI does understand that there's a lot more to be gained from attacking closer neighbours - especially in the early game. And I don't intend to completely remove the chance of the AI attacking remote civs like that even if it is a poor decision... (because I think the chance of it happening is good, just to keep players on their toes). The razing of the cities is strongly based on AI personality - some AI's just raze more often than others. As for why they're attacking you in the first place, it might just be bad luck. Even if they're 3 times as likely to attack someone close to them, there's still a chance they'll decide to go long.

I don't really remember what the original AI was like for that kind of stuff. Do you think they'd do it significantly less often? (... I guess 4 games isn't really a statistically significant sample for comparing stuff like that anyway.)


As for snowballing civs. I've not been seeing that in my games. All of my most recent games have been quite close - with 2 or 3 civs as strong contenders for victory right up until the end. eg. in the game I just finished, 2 civs launched their space ship, and another civ was less than 1 great artist way from a cultural victory when the first spaceship arrived. -- Maybe this stuff depends a lot of map style. I'm not sure. I always play on 'not too big or small', and I can imagine that conquest would be a bit easier on pangaea.
 
Yesterday I found a somewhat obvious pathfinding bug which has existed for the entire lifetime of Civ4 - I'm really surprised I hadn't noticed it before; and also a bit surprised that no one told me...

The bug is triggered whenever a group of units with different movement speeds are being moved on a railroad. For long moves, the pathfinder will say a larger number of turns than the move will actually take. (There are other cases that can trigger the bug as well, but this is by far the most common.)

The reason this happens is that the pathfinder only stores the minimum number of remaining moves for the whole group at each point of the path; and so if a group contains units with lots of movement points but a high movement cost combined with units with low movement points and a low movement cost, the pathfinder will basically do its pathfinding as though there was a low movement points and a high movement cost – resulting in a overly pessimistic estimate for the number of turns.

At first I thought this was going to be really hard to fix without making the pathfinder much slower, but I think I've come up with a solution... It will be in the next patch.

I've also put this new situation into my demonstration of UI problems scenario. (attached) - The scenario is just a map which is set up to demonstrate a few of the UI flaws that have been fixed in K-Mod. The idea is that you can be opened in the unmodded game to see the bugs, and then open it in K-Mod to verify that they are fixed.

--

2. Have city governor replace worked ocean tiled, after they get blockaded by ships and then the ships leave?
I checked this, and found that the governor already handles it. It may not assign the plots exactly as they were previously (because it doesn't remember how they were previously) - but it does refresh its citizen allocation once the ships leave, and so if it thinks the ocean is worth working, then it will work it.
 

Attachments

karadoc said:
But even still, I don't think anyone at Firaxis cares about this mod at all, and I even if they did care I don't think they would want to devote any resources to releasing a new patch for their game. And if they did want to have a new patch, they might want to spend a bit of time fixing some bugs in the civ4 exe and the pitboss exe...

I guess one can only dream.

What are the most infuriating/horrifying/mindboggling bugs in the exe files?
 
I'd like to report a very minor faulty assert in CvGame::isUnitClassMaxedOut that's off by one:
https://github.com/karadoc/Civ4-K-Mod/blob/master/CvGameCoreDLL/CvGame.cpp#L5313

Code:
FASSERT_BOUNDS(0, GC.getUnitClassInfo(eIndex).getMaxGlobalInstances(), getUnitClassCreatedCount(eIndex), "CvGame::isUnitClassMaxedOut");

The problem is that FASSERT_BOUNDS will throw if the maximum value is reached, but in this case it's permissible for getUnitClassCreatedCount() to match the value of getMaxGlobalInstances(). Here we simply don't want it to exceed the value.

Adding one to the boundary fixes the problem easily enough:

Code:
FASSERT_BOUNDS(0, GC.getUnitClassInfo(eIndex).getMaxGlobalInstances() + 1, getUnitClassCreatedCount(eIndex), "CvGame::isUnitClassMaxedOut");
 
Hmmm, I noticed an AI popping a great prophet from the great wall in the early game. He had no religion and no other wonders. I also popped a great prophet from the great wall city much later and am fairly sure that city hadn't run any other specialists. I feel like I have seen this happen with an AI in the base game with a reasonable amount of certainty. edit - the AI could have gotten the prophet from Moai, I will check to see if that was in the city, could very well be the reason. Will also recheck my GP pop to see what exactly the odds were, sorry for the hassle

Okay, ignoring the above question, my mistake, I'll ask another. Is it usual to not get culture per turn from wonders the AI built and you have captured. This was a captured city.
Spoiler :
2Pl2I.jpg
 
yeah I wasn't a fan of the plotting fist in BUG - it seemed like a cheap exploit.
Exploit? It's information that is available from the diplomacy screens, the quick visual indicator just stopped you having to check the screens every single turn! Personally I hope this comes back or Karadoc explains how to put it back in.
 
Exploit? It's information that is available from the diplomacy screens, the quick visual indicator just stopped you having to check the screens every single turn! Personally I hope this comes back or Karadoc explains how to put it back in.

I agree! Either put it back in oder change the diplomacy text so it doesn't show it at all anymore. At the moment you'd really have to check each turn and that's a bit annoying.
 
I agree! Either put it back in oder change the diplomacy text so it doesn't show it at all anymore. At the moment you'd really have to check each turn and that's a bit annoying.
I think it needs to be there, in real life wars don't start with no warning whatsoever - especially in the time frames covered by Civ turns. There would be rumours, news reports, reports from your intelligence agency etc etc.
 
I think it needs to be there, in real life wars don't start with no warning whatsoever - especially in the time frames covered by Civ turns. There would be rumours, news reports, reports from your intelligence agency etc etc.
I don't know about you, but I (almost) always realize that the AI is going to declare war on me a few turns in advance - because my scouts can see an attack stack heading my way. In this game, a few turns usually represent several years – so I think that completely covers the realism argument.

Exploit? It's information that is available from the diplomacy screens, the quick visual indicator just stopped you having to check the screens every single turn! Personally I hope this comes back or Karadoc explains how to put it back in.
I'm not sure if you've noticed, but that information is usually not available from the diplomacy screen anymore. Basically the AI will only tell you WHEOOHRN if they are already at war, or if they have no other excuse for being bribed into war. So usually if the war is going to be on you then they they'll just tell you "we don't like you enough" (but not always).

The reason this stuff was changed was for fairness. The AI doesn't get any diplomacy warning when a human player is preparing for war; and human players don't get any diplomacy warning when other human players are preparing for war; so why should the AI openly tell their enemy that they are currently preparing for war? It puts them at a tactical disadvantage.

In general, I'd suggest that rather than relying on your enemies to inform you that they are preparing for war, you should rely on information that you gather yourself. One of the best ways to do this is to just leave a couple of units standing on hills inside borders of your neighbours, so that you'll see when there is a stack coming. – Generally the AI will prefer to gather the stack in a city that you can't see, so if you want even more warning, then it's a good idea to occasionally move your spotter units further into their land just to check out what's in their cities, and then move them back onto the hills.

For coastal cities in the late game, airships on automatic explore work pretty well as spotters.

--

I'd like to report a very minor faulty assert in CvGame::isUnitClassMaxedOut that's off by one:
https://github.com/karadoc/Civ4-K-Mod/blob/master/CvGameCoreDLL/CvGame.cpp#L5313

Code:
FASSERT_BOUNDS(0, GC.getUnitClassInfo(eIndex).getMaxGlobalInstances(), getUnitClassCreatedCount(eIndex), "CvGame::isUnitClassMaxedOut");

The problem is that FASSERT_BOUNDS will throw if the maximum value is reached, but in this case it's permissible for getUnitClassCreatedCount() to match the value of getMaxGlobalInstances(). Here we simply don't want it to exceed the value.

Adding one to the boundary fixes the problem easily enough:

Code:
FASSERT_BOUNDS(0, GC.getUnitClassInfo(eIndex).getMaxGlobalInstances() + 1, getUnitClassCreatedCount(eIndex), "CvGame::isUnitClassMaxedOut");
You're right. That assert is incorrect. I guess I never noticed because there are no units which use that particular limit in K-Mod (or in the unmodded game). I'll make it +1. (Incidentally, even with +1 the assert can still be wrong if the worldbuilder is used to create more units. But since asserts have no effect on the game I guess it's not really important.)

What are the most infuriating/horrifying/mindboggling bugs in the exe files?
Actually, I can't think of very many bugs off the top of my head. Mostly it's not too bad. Here are a few things that come to mind:

There are some delays in the controls which are pretty annoying (but which I've been able to work around to some degree by using the winAPI directly rather than using the game's own control system).

There's a problem which causes the game to dramatically slow down when someone is trying to contact you in multiplayer. The flashing of the player's name on the scoreboard apparently triggers to the game to do something very slow on every flash. I'm not certain this can't be fixed using dll & python but I haven't been able to work out how.

Although the .ini file can be changed from the DLL, the current settings can't be read and the in-game effects often can't be changed without restarting the game. .. I realised this only after I spent ages creating a special dialog box to allow players to easily change the autosave settings. The dialog box works fine, but I haven't included it in-game because of these problems. (The box cannot show the current settings, and the altered settings don't take effect until the game is restarted; so I decided it would probably be too confusing to use – and no better than just editing the .ini file.)

There's a problem in-game sign-posts being drawn on top of each other, which some people were talking about earlier in this thread. That's handled by the .exe, and so I can't fix it.
 
Karadoc - I'm sorry if you addressed this before, I seem to remember you saying something about it but I can't find the posts. How can I stop the interface from switching between active units on me? If I have a stack of catapults and swordsmen, for example, and I stack attack with the catapults, the interface will whip me across the planet to control some fishing boat, and I have to manually go all the way back to give the swordsmen orders. Is there some way to avoid this?

In regards to the plotting discussion. I agree with Karadoc and Kmod on this one. I'd rather have to use spotters and the espionage function to tell what my rivals are doing, than be able to get a magical warning indicator when they are preparing for war. I mean...BTS added espionage to the game and there is a lot to it and it's probably one of the most commonly underused aspects of the game, but this is something for which it is perfectly suited. And in fact, on that topic - I wish that the espionage system's balance was tweaked a bit so that active missions cost more points and passive missions were cheaper. As it stands right now it is very cheap and easy to use espionage to poison wells, foment anger, and blow up buildings, but it's relatively difficult to have enough points to grant vision of enemy territory. I think it should be the other way around - vision should be cheaper and actually blowing things up should be more difficult. I suppose you could say that vision is possible by spamming spies every single turn and running them around in enemy lands but that is both micro intensive and annoying, and would cause a lot of diplomatic trouble.
 
@noto2, I think you're looking for the option "no unit cycling" in the standard options menu on the "game" tab. Tooltip text for it is "no automatic cycling between units".
 
Back
Top Bottom