K-Mod: Far Beyond the Sword

Karadoc,

About no espionage, have you seen this mod? Maybe it could be merged in with yours?

(Btw, Thank you for the clarification a while back about how to see WW for your own civ. I guess you can't see it broken out into how much WW stems from each of your wars if you're in more than one though, huh?)

Edit: Oops, just saw that in the mod the intelligence agency and security bureau were removed from ALL games. Maybe you can fix that? :)
 
Karadoc,

The "no espionage" choice now works as expected. Thanks for that...quick work!

Something else I encountered last night...not sure if it's a new setting I'm missing. When a unit attacks (specifically a 1 square move unit like an axeman or trebuchet) the attack is made and if they survive the selection stays on them instead of moving to the next unit. This happened almost all the time (except for, I think, a very brief period when it didn't).

I did have a quick look in the BUG settings but didn't see anything to change.
 
Great update Karadoc. This in particular put me at risk of laughing out loud:

Changed the way the game updates which unit should be displayed on top of each plot. This change significantly improves the game's response time when selecting units. (Previously the game would update every plot on the map every time a unit was selected. Now, it only updates plots in the locale of the selected unit.)

It is soooo bad that the original code has the game do that. No wonder the game always would hitch every time I selected a unit in the lategame.

Thanks for putting in a loop-breaker for the pillage thing. Next time I'm modding, I will see if I can make use of that. :)

And I'm interested in the simple-shift-click selection option. Looks good. I take it this will help prevent the problem where shift-clicking inadvertently would grab up multiple stacks of units unintentionally when you only wanted one very specific collection of units?

Good stuff. :D
 
Hi Karadoc,

we observed this crash several times while using K-Mod but always thought it must be some bad luck, but yesterday we explicitly tried to open multiplayer games and it crashed every time, so it might be a K-Mod problem.

It will crash, when
the host loads a multiplayer save with Direct IP connection and does not wait for the other player to join before clicking on the launch button. The game crashes on the client side (when he finally has joined) after it is finished loading for the client.
It will not crash, when
the host loads a multiplayer save with Direct IP connection and does wait for the other player to join before clicking on the launch button.​
 
Ok. Thanks. I'll check that out next time I play a multiplayer game (whenever that might be). But the first question that comes to my mind is does this happen only in K-Mod? Does it happen when no mods are loaded at all? Maybe it's a bug in the core of the game.
 
When I played with BBAI a few months ago, this had been no problem. In fact I usually tried to launch the game as a host before others joined, because I could check the world map while waiting. So this definitely worked before.
But I don't know if it worked in previous versions of K-mod.
 
Karadoc I was posting in the mod thread a question about the possibility of changing the way air combat plays. This is probably a bit overly ambitious (or not in the scope of your mod) but curious for your thoughts.

I was asking about incorporating the Civ 2 style of air combat as it seemed more intuitive and involved than the abstract nature of air combat in Civ 4 and the (micromanagement it entails with aircraft city slots etc etc.)

I was wondering if you would ever consider experimenting with this?
 
Actually I vastly prefer Civ4's mechanic to Civ2's "must count the number of tiles between my base and the target so my fighter doesn't crash on its way back" system.
 
Sure haha that could be annoying, but when at war im counting movement points anyway (of my stacks etc - lol so they dont fall one square short of enemy artillery hehe)

To me Civ4s air combat isnt really a mechanic, its just a point and bomb exercise without the fun of manouvering bombers, fighters (and dogfighting etc as you could in civ2.) The abstract nature of 'whump' your planes are 77% damaged etc, just felt out of sync with the other combat mechanisms for units.

That said Leoreth my request/suggestion is a bit ambitious and goodness knows im sure most feel the way you do about it anyway :)
 
Not sure if you already merge this Mod. But if not I would like that you know: it has the same line as the K-Mod.

Actually I posted because I feel the lack of a component of the BULL (or Bug ?), in the K-Mod: More information on the screen of civilizations, as the number of cities of the opponent and your relationship with him. (forget it, just ajust in scoreboard) - but probabily you don't merge because I don't see show Hidden atitude mod in K-Mod.

Update: In fact, part of component is working, but in a different way from the original. What are the changes? How do I access the cheat mod?
 
Hello, karadoc!

Thank you for your great work. I realize you are not offering any official merge support, but perhaps you could offer an advice?

I've been attempting to merge K-Mod and Realism Invictus and the result is somewhat ambiguous. I've merged all RI stuff into your DLL and managed to get the mod running. The AI seems competent, especially economy-wise, but there are a few issues:
1. The most serious and unexpected is that the game runs a lot slower with the custom K-Mod DLL than with the regual BBAI-based RI DLL. I've checked all the changes in the code I made twice and can't figure out what could be the cause - RI adds a few features but they are hardly major.

The performance is fine at the very start of the game but rapidly declines. By turn 6 or 8 turn times are already several times longer. My guess was that this has something to do with units. Not only do animals spawn at approximately that turn, but RI is notable for a huge amount of new UnitTypes - 18Mb in UnitInfo XMLs. I've checked all the getNumUnitInfos loops but they seem fine, hardly able to have such a huge impact.

I am inclined to think that the decline in game performance results from the original K-Mod code being run with RI Assets. Is this possible?

2. For some reason, AI units in cities do not look fortified. The same is true for me when I run your mod. Is this intended? How can I change this?

3. I noticed an AI stack in a besieged city randomly march out of it in the direction of the besieging player's empire. The city gets conquered the next turn and the defending stack return to try and take it back. Probably my fault, but, again, no idea where in code to look for a cause of this problem.

Your advices and recommendations will be much appreciated! RI is such a great mod, the only thing it lacks is a decent AI. :)

Thank you!
 
Actually I posted because I feel the lack of a component of the BULL (or Bug ?), in the K-Mod: More information on the screen of civilizations, as the number of cities of the opponent and your relationship with him. (forget it, just ajust in scoreboard) - but probabily you don't merge because I don't see show Hidden atitude mod in K-Mod.

Update: In fact, part of component is working, but in a different way from the original. What are the changes? How do I access the cheat mod?
I don't understand what you are asking about. Sorry. In general, I have not merged the BULL mod, but I have reimplemented a few of the BULL features myself. So... any missing BULL features would just be features that I haven't reimplemented, and any differences would just be because my implementation wasn't copied directly from the BULL code.

Karadoc I was posting in the mod thread a question about the possibility of changing the way air combat plays. This is probably a bit overly ambitious (or not in the scope of your mod) but curious for your thoughts.

I was asking about incorporating the Civ 2 style of air combat as it seemed more intuitive and involved than the abstract nature of air combat in Civ 4 and the (micromanagement it entails with aircraft city slots etc etc.)

I was wondering if you would ever consider experimenting with this?
Such a mod would certainly be doable, but your right that it is outside of the scope of K-Mod.

The main changes to implement something like that would be to replace the special air movement rule in CvSelectionGroup::groupPathTo and a few other places so that they are more similar to the land units rules; air units would need to be changed so that they can be on the same plot as enemy units without instantly dieing - except in special circumstances. (eg. if the air unit is stationary in a city and an enemy walks in, the air unit dies. But if the air unit is just flying around, then it can fly over enemy units.) ... and a few other things like that. - I don't intend to do it, but it is certainly doable.

When I played with BBAI a few months ago, this had been no problem. In fact I usually tried to launch the game as a host before others joined, because I could check the world map while waiting. So this definitely worked before.
But I don't know if it worked in previous versions of K-mod.
It does sound like a problem in K-Mod then. However, although I don't remember ever testing the exact procedure you described, I certainly have some similar stuff countless times without problems. For example, I've had players quit and rejoin mid game; and I've loaded games with a PitBoss host and then (obviously) joined after the game was loaded. Those both seem similar to what you described. -- So it makes me think that either it only happens with particular save games, or particular setups or something - or that it was something that I only broke very recently and so hadn't tested properly. Anyway, I'll probably test it this weekend.

Hello, karadoc!

Thank you for your great work. I realize you are not offering any official merge support, but perhaps you could offer an advice?

I've been attempting to merge K-Mod and Realism Invictus and the result is somewhat ambiguous. I've merged all RI stuff into your DLL and managed to get the mod running. The AI seems competent, especially economy-wise, but there are a few issues:
1. The most serious and unexpected is that the game runs a lot slower with the custom K-Mod DLL than with the regual BBAI-based RI DLL. I've checked all the changes in the code I made twice and can't figure out what could be the cause - RI adds a few features but they are hardly major.

The performance is fine at the very start of the game but rapidly declines. By turn 6 or 8 turn times are already several times longer. My guess was that this has something to do with units. Not only do animals spawn at approximately that turn, but RI is notable for a huge amount of new UnitTypes - 18Mb in UnitInfo XMLs. I've checked all the getNumUnitInfos loops but they seem fine, hardly able to have such a huge impact.

I am inclined to think that the decline in game performance results from the original K-Mod code being run with RI Assets. Is this possible?

2. For some reason, AI units in cities do not look fortified. The same is true for me when I run your mod. Is this intended? How can I change this?

3. I noticed an AI stack in a besieged city randomly march out of it in the direction of the besieging player's empire. The city gets conquered the next turn and the defending stack return to try and take it back. Probably my fault, but, again, no idea where in code to look for a cause of this problem.

Your advices and recommendations will be much appreciated! RI is such a great mod, the only thing it lacks is a decent AI. :)

Thank you!
1. Running a lot slower is certainly bad news. :( I think it's highly likely that it is due to a combination of something in the K-Mod dll + the increased number of assets in RI. Maybe it is unit types, maybe improvement types or something else... it's really hard to say. I suggest that you compile a 'profiling' version of the dll; then use it load a save game which you know will be slow; then end turn; then quit and check the profile log to find out what the slowest functions are. It will only list functions which have "PROFILE_FUNC()" at the top of their code, but you can just put that line in to whichever functions you think are worth checking.

If you do that, and you find the source of the slowness, please let me know. Hopefully it's something that can be fixed easily without undoing any other changes.

2. You're right. They don't look fortified in K-Mod either, so it's almost certainly my fault. I'll try to fix that soon. (I don't yet know what's causing the problem. Maybe it's something to do with the stuff changed in updateCenterUnit - but maybe not.)
[edit]
Actually, I just did a quick test without any mods loaded. I started a new game, used the world builder to create a barb city with an archer in it where I had vision, and then pressed end turn. The barb archer did not look fortified. --- So. Apparently it's not my fault after all! The problem was there right from the start. Nevertheless, I'll see if I can fix it.
[/edit]

3. That's just an AI blunder rather than a bug... they do stuff like that from time to time. The reason it happens is that the stack's defined role in the AI's strategy is to take cities -- it actually doesn't check if any of it's own cities are in danger at all. (It does check if there are any enemy stacks nearby -- but if it decides that the enemy stack isn't worth attacking directly, they'll just ignore it.) .. Anyway, that's not your fault, or my fault. It was like that in the original AI, and BBAI didn't fix it, and I just haven't fixed it yet either.
 
How I acess autoplay to test? How to let the game in cheat mod?
(+ Autoplay and change player functionality is now only available in cheat mode.)
Spoiler :
Open the Beyond the Sword ini file. (_Civ4Config, in the Beyond the Sword directory.)
Find where it says "CheatCode". The comment above it says "Move along".
Change it from "CheatCode = 0" to "CheatCode = chipotle"
(I forgot to answer that bit in my previous post.)
 
It turns out that the reason the AI's units don't look fortified is because they aren't... The AI (almost) never fortifies it units. It just skips their turn when it doesn't want to move them.

So, it turns out that it wasn't my fault after all, and it isn't even a bug. It's just an oddity.

I can tell the AI to use the fortify command for its city defenders rather than the skip command, and that will make them look fortified. But that will come with a slight game-performance cost, because the game does a few (minor) calculations when units are woken up; and so if the AI does that with most of its units, every turn, then it may make a difference to the speed of the game. (probably it would be too small to make any difference, but maybe not...)

Alternatively, I can tell the game to always display the fortify animation whenever someone else's unit is given the 'skip' command. So that units which have been told still for a single turn will still look the same as units told to fortify indefinitely (except for the player's own units). Doing something like that would cost almost nothing inside the DLL, but maybe the .exe itself has some costs associated with triggering animations like that. I don't really know.

What do you think? Should it be changed?
 
funnily, if you load a save game then all the ai units that are static/fortified "appear" fortified. after a few turns they all just "wake" without being moved. if you save at this point with most of the ai units having the wake animation and reload the save they are all appear fortified again.

meh, its not important really is it, for all intents and purposes, these units are fortified, in that they get the bonus for fortification.

btw, theonlydjcat's problem with multiplayer crashing was fine for me on local anyway. (direct ip, host loads game,client joins after its loaded. no crash)

also, is there any way you could add some button in the military advisor for upgrading units in a more intuitive manner? bit of a pain at times wandering from city to city picking out who you want.

unless ive been playing the game all this time without knowing something really obvious....
 
Back
Top Bottom