K-Mod: Far Beyond the Sword

The issue with increasing 'ATTACK_CITY_STACK_RATIO' and things like that is that although it may solve your current issue, it will make the AI more likely to sit around doing nothing when their stack is already big enough to take a city.

A ratio of "100" in this context means that the AI thinks its stack is equally strong at attack as the enemy is at defending. A ratio of anything greater than 100 means the AI thinks its stack should win.

The calculation of the ratio isn't exact and so it isn't always correct. It actually doesn't properly account for promotions which give bonuses against particular units (such as 'Charge'), but it does take most promotions into account. It's difficult to calculate the effect of things like Charge, because it depends on which particular unit faces up against which other unit - which depends on the order of attacks, and on the outcome of individual battles, and stuff like that.

Players generally don't want to "barely" win a stack attack, they want to win comfortably so that they minimise their loses. That's the main reason for wanting a higher threshold for the attack ratio. But really, if the AI attacks with a ratio of 120 and loses, then that's either really bad luck, or a flaw in the calculation. I don't think it should be corrected by increasing the attack threshold. If it really is a problem, it should be somehow addressed by making the calculation more accurate; otherwise we'll just end up messing it up for all the other cases where the calculation is already accurate.

Horatius is right that there are some personality modifications involved. And it isn't only what's in the xml files. I've personally written some stuff which adjusts the attack threshold based on AI personality and on the particular situation and strategy. So it can vary quite a bit, and it isn't surprising to me that sometimes a stack attack fails. I think it's important to remember that sometimes human players make that same mistake!

--

Does anyone know if the "please prepare for war with civ X" diplomacy command makes the AI make more ships and transports to be able to attack island civs or does the Ai only make more land units?
Telling your ally to prepare for war should make them start building whatever they would have normally built if they were preparing for war themselves - including ships and transports.

Incidentally, they'll only continue preparing for 20 turns (on 'normal' game speed). If you still want them to keep preparing after that, you'll have to remind them. (Or just start the war. They don't need to be told when they are actually at war!) 20 turns isn't really a huge amount of time, but the AI doesn't trust that you'll remember to tell them to cancel the war preparations if you change your mind... Maybe the AI should contact the human to ask if the war is still on rather than just silently cancelling the plans; but I don't think it matters much.

--

By the way, the main reason the new patch doesn't have more balance changes is that I haven't been in a position to play-test properly, and I don't feel strongly enough to just push through any particular changes right now. In any case though, xml changes are something that individual players can pretty easily make themselves to try out their own ideas. So I figure it doesn't matter much if I just leave that alone for the time being.
 
Hey man! Thank you so much for the new changes for Christmas, it was the best gift I got from anyone, no kidding.

We were all hoping you were doing well.

That prepare for war command for your ai vassal is super cool and helpful! And I have forgotten a time or two that I ordered them LOL, so Im glad they eventually stop on their own..

(*Resists asking you a billion xml related questions lol*)

Other than making the ai more likely to make units, how can I encourage the ai to increase the size of its naval invasions, more specifically, its number of troops transported and dropped against an enemy.
 
I want to say the AI seems quite good these days. I was in a land war with a civ with whom I shared borders, and we fought the typical battles on the border, but they also snuck some galleons around and attacked my poorly defended cities way in the back, and did a lot of damage that way. I'm not sure if they did that whole strategy just for me, or if they were loading up galleons to go to war against someone else anyway and had them available to fight me, but it was quite a surprise.

I also like how the AI seems more focused now. Recently I had a game where I was bigger than everyone and ahead in GNP and MFG, and then Napoleon decided to go on a rampage with cannons/grens. After a while I went to war with him to tame his expansion and couldn't believe the numbers in his stacks. When I sent spies into his empire I noticed every single city was covered in workshops/watermills. I had 2x the number of cities but he had slightly more MFG than I. It was interesting.
 
Spending hours finding my own preferences. I went in and adjusted the civ4leaderheadinfos the ai build unit values to 28-38 and gave the ai a very small chance to attack pleased and friendly relations. Base attack odds and attack odds rand to 2,8 respectively.
I also have the ai set up to build granaries, forges, factories, unique building etc highly and value the life saving techs: pottery, iron working, metal casting, rifling, assembly line, guilds, banking etc. The ai values the oracle more (has every flavor). Set iDeclareWarTradeRand (ai hires others more often to join their wars) to 35 from 40.
Gave the ai some nice production bonuses that scale with era in the handicapinfo.
Increased the base minimum starting distance in the global defines to give slower start civs more of a chance. Decreased ai tech trading slightly and willingness to make peace.. Made the ai turtle sooner when facing double odds or more. Took Karadoc's advice and lowered my changes to the bbai ai variables.

The resulting chaos is amazing. Even Tech focused Ais have enough units to defend their lead and maybe start some trouble of their own. War mongering civs actually can actually threaten and eliminate others (I got eliminated my first two games against sizeable armies lol).

Also having alot of fun balancing unique buildings...Ive adjusted almost every one slightly- like the dun getting +1 experience for all troops not just melee (hill upgrade seems weaker than forest upgrade until you get to level 3 upgrade, macemen get no free hill upgrade). Gave Ikhanda a military production bonus instead of a maintenance reduction. Also got rid of low power unique units, (dog soldier, numidian cavalry) just gave them +1 power and lowered their other bonuses slightly. Improved holkan and impi, navy seal, balista elephant, keshik didnt have immunity to first strikes...

Lowered collateral damage slightly, the direct attack ~70%, the number of units effected (4 for cat), and the amount of damage spread over units. Definitely lowered battleship collaterol damage in those areas and increased production cost.
Anyone else feel submarines should come with combustion and destroyers with radio and not the reverse (thinking about ww1)?

1. Im also getting a problem where Im playing with 9 civs including myself and the "civ points list" is cutting off the lowest point civ off the list, at a certain point in the game. Maybe its cause Im editing files as I go...but somehow I dont think so. :(

Edit: "Evil ai" attachment. Catherine with tech lead attacks and burns one of my cities, then hires Bismark to join her cause LOL. I thought I had the game won lol.
 

Attachments

  • EvilAi.CivBeyondSwordSave
    564.2 KB · Views: 45
Okay so I've noticed a trend now. I've had many games now where I acquire several vassals and go for a conquest victory, but all the while I have to play a game of whack-a-mole as my vassals repeatedly revolt and become independent. I then march back in and burn a few cities, and they capitulate again. It's annoying. I know that a vassal can revolt when it has 50% of my land and population, but must it do so? I don't remember this happening so frequently before. What's odd is the vassal will do it regardless of the power score. I'd understand if they were revolting because they built a military close to mine in power, or if I were faring poorly in a war and lost most of my army, but they seem to revolt even when I have huge stacks on their border prepared for them to do so, and I burn many cities in a very short period of time. I suppose the answer is to do more damage to my victims before accepting their capitulation?
 
I think the major factor in vassal revolts is the unit losses it takes helping you. Now they make more units, thus more potential losses, thus more likely to revolt. I think.

You could lower it in the globaldefines.

<DefineName>VASSAL_REVOLT_OWN_LOSSES_FACTOR</DefineName>
<iDefineIntVal>50</iDefineIntVal>
 
really?? I thought it was just based on their relative size to yours, in population and land area. I haven't played unmodded BTS in years, literally, so I can't remember vassal behaviour before Kmod. I do know, however, that back in those days I rarely took vassals anyway.
 
Catherine took some losses....but also at least 5 or 6 cities from my vassals and has superior tech/a larger army. She was about to crush Charlemagne's capital, as I finally get assembly line, then this turn pops up and she offers generous terms.

I increased the "value" of city taking in determining war success- from 25 to 35 in the bbai_ai_variables, decreased wllingness to talk in the leaderheadinfos, and made the ai less likely to make peace (also in leaderheadinfos).

Think that'll fix it?

(notice how awesome the ai uses machine guns lol)

Also: How do you turn off Fog of War- for testing?

Edit 2: Can I be the first to say that the world war one and two era in a Normal game, feels more awesome than the ACTUAL ww2 scenario. I mean I'm getting out produced, the ai has 3 or 4 armies attack various points. Carriers are wrecking my attack forces lol.
Edit 3: Catherine offers me one of her top 3 culture cities. Save labeled UhO,
 

Attachments

  • CatherineWinning.CivBeyondSwordSave
    611.7 KB · Views: 36
  • UhO.CivBeyondSwordSave
    739.2 KB · Views: 41
Hey, great mod. I really want to play it and I tried to but I just couldn't with the changed camera angle that comes with it. I think it's called "depth of field"? Can you please release a version of the mod with just the improved AI? I hope it's not too much to ask. I really want to beat it, I love a good challenge :D
 
@charles
ctrl+z in single player mode to show all map. you need to edit this line in the civIV.ini:

; Move along
CheatCode = chipotle


@impis
in the in-game menu, click "bug mod options". under the 2nd tab (map), there's a couple tick boxes for field of view options.

@everyone else
i only have one game to go off but the ai seems to value trade resources poorly since the update. as in trading health resources for military ones on a one-for-one basis. eg i offer clams and get iron. not just from friends either.
 
So this game has gone on longer than usual ( in a very good, fun way).

The germans had a huge period after infantry where they stayed out of wars and had a long time to build up a huge military.

The russians offered me their number 3 largest culture city (they were close to culture win as well, the save is shown in previous post), and I declined, instead deciding to take the city by force (which had weak defenses) and since has been taken by the germans and given back to the russians)

As I set all my cities to build gold and teched up like a monster, Russia and Germany have reestablished armies lost in wars. The Germans finally declared war, took two of my russian cities I stole, sent some awesomely organized battleships with carriers that blew up my resources and economy near my mainland with jet fighters (I was not prepared for the awesomeness).

They took two cities from my vassals very briefly...one was razed by carthage and another retaken.

I guess my point is...where are the huge stacks that I saw around assembly line? 50 infantry sized stacks along with artillery creeping through my vassal's cities like butter? The german ai is leaving a large army at the two russian cities it took from me, on that russian island and seems unable to reuse that army elsewhere.

And the Russians who hate me now have a much larger power rating and it seems they are spending alot on cultural funding- the problem is I took their 3rd most cultured city and so the the top two cities dont need the culture spending and the 3rd one (since it got crushed) will take forever to reach 75,000 culture.

Maybe why attacking is discouraged past a certain point:

1. I noticed that guided missiles are way over powered. I nerfed them to 30 air combat from 40 in my version and multiplied their cost by 2.2. I beat the carrier/battleships stacks with guided missles and attack sub follow up. I wonder how good the ai's use of the guided missles are....Alexander had a nice stockpile of guided missles when he retook that city from the germans, but I didnt see the action.

2. Battleship collateral damage imo should be largely nerfed (for fun and for balance) and hammer cost increased.

3. In my save I have buffed subs and attack subs, maybe slightly too much, but they were almost useless before (although 50% withdrawal is boss) since they come with radio and not combustion where they should be (ww1).

4. I think that levees should have the advantages of dikes. Buildable near the ocean and rivers, and providing +1 hammer per ocean tile like dikes do. I gave the dikes a bonus +5 hammers which I think is a decent enough unique building bonus. I think this might help balance islands vs mainlanders.

5. I think machine guns should be able to get interception promotions, or a base increase in interception chance- merely from the fact that bombers and fighters obliterate armies. Something needs to calm down the well organized ai bomber/fighter attacks until Sam infantry can replace the machine guns.

6. The ai seems to love paratroopers way more than marines...I have only seen the ai use paradrop once this game...(and I gave paratroopers a 70% evasion chance).

7. I have nerfed every collateral damage units starting with catapults (65 combat limit, 42 collateral damage limit, 4 units effected). From cats to trebs, the only increase is the number of units effected is 4 to 5 (which never goes more than 5). After that cannons, artillery, and mobile artillery only get an additional point in combat limit and collateral damage limit). I think this helps tone down the stack loss to a relatively small number of collateral damage units.

8. Could it be something like the ai not making enough transports because the asset value and power of transports is small when competing against the value/power of subs/battleships/destroyers? Or is it the ai cant group up naval units in the amounts that it can with land units? I think lowering battleship/bomber collateral damage could make larger ai naval groups more interesting.

9. Ai sent a medium stack of transports and 2 or 3 battleships after my mainland....but I had 8 battleships defending...maybe the ai should prioritize attacking the closest and weakest enemy (be it vassal or whatever) with larger stacks, land and naval to get that foothold on a continent. I dont think the ai knows it can drop in friendly, non allied territory (like Brennus's land in the save). Maybe railroad distance traveled needs to be nerfed as well, so huge armies will take more time to get places

Edit: 10. I won a space victory and the units killed tab...top 4: 251 infantry, 180 cavalry, 143 cannon, 74 destroyers. Nothing except destroyers comes after assembly line...I knew the ai wasnt making as many units...
 

Attachments

  • NearEndGame.CivBeyondSwordSave
    879 KB · Views: 31
Naval warfare has been nonexistant in my games, so it's hard to comment on that. Most of the time, ships can go from one continent to another in just a few turns. Ships can declare war and sail in and take out cities on the same turn, there is no chance intercept them.

Think about it. You could have 1000... yes, one thousand battleships, 1000 carriers, 3000 jet fighters, and 50 mech infantry in a city, with your entire navy there at port.

I sail my 4 battleships, 100 transports, and 500 marines to about 5 squares from your city, still in international waters. Next turn, I declare war, sail in, bombard your city with my 4 battleships and attack with my marines. My marines beat your mech infantry, and I raze the city.

Your fleet of 2000 ships and 3000 aircraft just lost to my fleet of 54 ships and zero aircraft.
Even if your fleet was not in port, I couldn't sink it, but I could still sail in and blow up your city, probably even take out 5-6 of your cities. Your fleet is 100% absolutely worthless.

This is why naval combat in Civ is nonexistant. The combat mechanics in water are complete bullcrap. This is unfortunate, because naval combat would be fun, but you have to roleplay to make it happen. In every scenario you would increase your chances of winning by pulling little stealthy tricks. It is never worthwhile to build a massive navy with carriers/subs/etc. Never. Yes, I mean that with 100% certainty. If your goal is to win the game it is absolutely never in your interests to build a big navy. I have ideas on how to fix this but they didn't seem popular.

For one, I proposed that there be a way to stop a nation from declaring war and then sailing in and attacking on the same turn.

Another thing - you could have 10 carriers and 30 jet fighters defended by 5 battleships just off the coast of my nation. I have 10 battleships and no air force. I should lose this fight, right? Well, the way civ works, I can just, on my turn, sail my ships and attack your fleet and do massive damage to it. On your turn, your fighters can't do crap. Even though they should be able to scramble and attack my ships they won't. This is ridiculous. Real naval combat could theoretically occur in the middle of the ocean, far away from any continent, but that's the only place it's even possible. As soon as you get close to land naval combat doesn't exist.
 
I think the only reason large naval stacks are weak is collateral damage- remember ships can get healing promotions etc. so as long as you keep enough of them together to protect the wounded, then its smart. Note: it may be realistic for battleships to be the best ship AND do lots of collateral damage, but its not really good from a balance perspective...not unless there is a sizeable cost increase etc etc.

I keep a stack of 8-10 battleships together because the ai doesnt group its naval units they attack 2 or 3 at a time in that time period, so I get relatively few losses. Oddly around the frigate/galleon time period, the ai does seem to keep massive naval stacks even BEFORE drydocks (which was my observation above).

And going to your scenario- Keeping "scout" ships along your coastline isnt hard as a human. Basically you see the invasion coming, you wreck it with those ships. And losing a city is not the end of the world in kmod or any civ game. If you get through an entire game without losing a city, then I think the difficulty needs to go up.

500 marines beating 50 mech infantry with massive losses, seems like a fair trade to me, although those numbers arent realistic. I feel bad for those marines the turn after they take the city LOL. Not like you can immediately replace 500 marines.

Personally I would love the ai to use 100 transports with 30 battleships dropping a death stack against my vassals or me. The fun is in the potential to lose. I give the ai sizeable production discounts in the handicapinfo for that reason.

I get a bunch of transports and battleships and drop on the ai, myself...so fairs fair.
 
The point I'm making is that there is no real naval combat and no point in having a navy. In air battles, for example, you can set your fighters on intercept. Having an air force is actually useful because when your enemy tries to launch strikes against you, on their turn, your fighters defend your skies. Your navy is completely worthless on the enemy's turn. You could have 5 billion ships and your enemy could have just 1 transport, and he could sail it right by your 5 billion ships, just one tile away, and go and attack a city with that 1 transport. It's incredibly stupid.

The whole scouting every turn answer is not fun. Also, you have to be the one to declare war to defend yourself because ships can move more tiles than your borders are wide.

Imagine if your fighters could not do anything unless it was your turn, then enemy bombers could just bomb the crap out of your territory... in fact, in such a scenario, there would be no need for fighters at all. This is exactly what naval combat is like in Civ.

Compare this to another turn based strategy game - any of the space ones. In Master of Orion or in Galactic Civ, you can have ships on the same tile as a space station or a planet, and they will defend that area on the enemy's turn. The problem is that in Civ, having your ships in port, in your city, is useless, as they won't defend the city from on oncoming naval assault.

It's difficult to come up with a way to solve this. Perhaps lowering the movement speed of modern ships would help, along with increasing the range of aircraft. And something needs to be done about the whole amphibious invasion mechanic. Perhaps ocean tiles could be owned by culture just like all other tiles.
 
A strong navy is a solid strategy in many Civ-games. And yes, the tactic is to scout and declare war before the AI reaches you. But yes, this isn't a fun or deep mechanic.

One thing you can do is extend the "Sea Patrol" to not only defend resources, but act more like the Intercept mission for aircraft. All enemy units that enter the zone of control is getting attacked by the ship on Sea Patrol.

Naval combat also have the problem of no interesting terrain. The plays and counterplays possible is extremely limited.
 
Another solution could be to simply extend the vision over ocean tiles, especially with certain technologies.

Let's be honest, Civ is a game, it's supposed to be fun. I don't want to spend every turn moving my ships in the ocean to scout, and launching plane after plane on scouting missions. I would be moving a dozen units every turn just to scout the ocean, possibly for more than a hundred turns. There's got to be a better way.

I'm not complaining that it causes me losses. Not at all. The AI rarely launches amphibious invasions that bring down my empire... it's extremely rare actually. Also, when I launch amphibious invasions usually I don't even really need a navy. A crapload of transports and a few actual combat ships are all that's really needed. 95% of the time bringing carriers and air power along is completely unnecessary.
 
I was wondering if one solution might be making it so that 'enemy' water tiles cost much more movement to get through.. so essentially you would only move 1 square per turn, giving the defender a chance to get ships in and intercept, that where you would have to grind your way through to get to shore.. It would be an SDK change, but possibly not a big one. The code already has the ability to switch roads on and off in enemy teritory, so perhaps something similar could be done to 'enemy' water tiles that beefs up the terrain movement cost... That would stop the border rush of current naval warfare, that or just make all transports painfully slow! (which would be the quick xml fix :D)

it would also make carriers a bit better, as they could be sent ahead with a combat force to 'soften up' an enemy while you wait for the transports to catch up
 
^^ Lib that's an excellent idea. In a Civ3 mod what they did was make ocean tiles cheap to cross, and coastal tiles extremely expensive, so that even modern ships could only move 1 coastal tile per turn. It was fairly good for solving this problem but it was annoying to move your own ships in your own coastal tiles. I like your idea. Still, I know Karadoc prefers the simplest solution, and I'm not sure how simple that is. It's definitely worth looking into, though
 
yeah, the one small problem with the coastal slowness route is that you have the same problem again, you have to CONSTANTLY be lining up your ships with your opponent, which can get pretty boring... what you need is for the enemy to be slow but the defender to still be fast, so that you can catch them and have the naval battle 'before' they can land.

hmmm... I wonder if it would be possible to make coastal terrain the same as roads in the code, so that if it 'belongs' to the enemy you get no speed boost...I think this can be done in python.. (I don't know how though, platy would know..) alternatively maybe you could make a sea 'road' and get the map scripts to put it on all coastal tiles, thus control works just like with roads.. all of these ideas would be modcomps though and not really within the 'scope' of what k-mod is about...

It would be more of a 'Naval Fights Modcomp' with the goal of making navies have a point, because you can bloackade coastal towns, but really you just want to land and take the coastal towns, and there is no real 'convoys' to raid..

I think overall the best solution is making transports really slow, at least transports that can transport military units. Thus exploration would still be fine.. I can't remember if settlers and workers could be added to the 'special cargo' ships easily, so that expansion wouldn't take forever, although you would have no military to protect them until the super slow transports arrive.. unless you just make a 'colony guard' that is only defensive and can travel with your Explorers, Settlers and Workers, but has no 'offensive' value... hmmm

Yes it looks like it can be done by adding the SPECIALUNIT_PEOPLE reference under the unitinfo tag <special> then a ship that can transport an explorer (SPECIALUNIT_PEOPLE) could also transport workers, settlers, and a basic 'guard' type, thus keeping exploration and expansion fast paced as is normal, but making naval invasion 'slower' and more prone to interception and destruction, rather than than now with it being an 'edge' rush with no real chance of doing anything about it navally speaking. So keeping navies in the vacinity or your coastal towns has much greater value, as does transport escorts.. you could even then give things like subs, flanking against transports, then you really start to get the WW2 Wolf Pack vibe!... hmmm... I may have stumbled onto something here... can flanking actually kill a target? Like if you flanked it 5 times would it get killed, I confess to not having much experience with it.. that way you could sacrifice a bunch of subs to get rid of a naval invasion rather than having to sacrifice a whole fleet in a surface battle.....I guess the counter is more transports, or a naval 'screen' rather than just a stack... but that would be a pain to manuevre at 1 square per turn... but it would still be kinda fun right.. Naval formations!! :D
 
Increasing movement speed cost in enemy coast/ocean would completely kill the AIs ability to do a intercontinental invasion, but only be a minor inconvenience for the human.

I honestly don't think intercontinental warfare favors the attacker that much at all. The problem is that the AI doesn't recognize a big stack of transports as a threat.
 
Top Bottom