Resource icon

AI+ v13.1

I gave my CS additional starting units - a couple archers, a spearman, and a builder. I've also increased their starting strength. It has helped them resist attempts to conquer them in the early game. They also do a nice job of keeping Barbarians in check. Now if I can only find a way to give them Ancient Walls, I'd be happy...:crazyeye:

What code did you add in for this? :)
 
I gave my CS additional starting units - a couple archers, a spearman, and a builder. I've also increased their starting strength. It has helped them resist attempts to conquer them in the early game
would also like to have this code.
 
Last edited:
Do you know if there's a way to make AI more likely to build and\or upgrade units than build settlers?

This mod has made the AI so much more competitive and enjoyable. The only thing that bothers me now is since settler operations are limited at 2, the AI have a big build-up of idle settlers in their cities. They are already settling more cities than me (which is great). But I wish they'd use more money on army instead of settlers.

I'm still using v3.
 
What code did you add in for this? :)
would also like to have this code.
This is just for the Ancient Era starts, but you can add other eras as well.
Code:
<GameInfo>
    <BonusMinorStartingUnits>
        <Row Era="ERA_ANCIENT" Unit="UNIT_BUILDER"/>
        <Row Era="ERA_ANCIENT" Unit="UNIT_ARCHER" Quantity="2"/>
        <Row Era="ERA_ANCIENT" Unit="UNIT_SPEARMAN" Quantity="1"/>
    </BonusMinorStartingUnits>
</GameInfo>
For the strength I added this to an SQL I already had for something else.
Code:
UPDATE StartEras SET StartingMeleeStrengthMinor = '30' WHERE EraType = 'ERA_ANCIENT';

INSERT INTO StartEras    (EraType,        StartingRangedStrengthMinor)
VALUES                   ('ERA_ANCIENT',     '25')
I also bumped the starting gold up to 30. I wasn't sure that's what the CS gets as well, but I wanted them to be able to afford maintenance on the Archers and Spearman.
 
Seriously.. What the hell Scythia!! How can she afford that many horses!!! Any idea how to change her bonus to only get say, 50% to the next horse, instead of one free??
15045363_10153972205822401_1301829507_o.jpg
 
any XML? doesn't it have to be added to AI+?

Yeah any one :) You don't need either of the game info, as if you're adding it to another mod it should already have the game info's.. Just make sure you put it in between the top and bottom one. So just paste

** <GameInfo>** -- These will already be in the mod you're adding the lines to

<BonusMinorStartingUnits>
<Row Era="ERA_ANCIENT" Unit="UNIT_BUILDER"/>
<Row Era="ERA_ANCIENT" Unit="UNIT_ARCHER" Quantity="2"/>
<Row Era="ERA_ANCIENT" Unit="UNIT_SPEARMAN" Quantity="1"/>
</BonusMinorStartingUnits>

** </GameInfo> **
 
Hello Siesta,

I mostly play in multiplayer and enabling AI+ seems to cause a desynchronization in beginning of the second turn. What happens is when we pass the first turn all my friends are taken back to loading screen and their civs are switched with each other. Any idea why and is there any way to fix it?

Thank you for the awesome work, playing without AI+ in multiplayer reminds me of how good a job you've been doing with this mod. Keep it up!

Hmm, I'm not really sure on this. I think we'll probably have to wait for proper multiplayer mod support from firaxis for this to work, they promised some pretty nifty things like automatic mod downloading from the host (which I'm guessing isn't in yet?). I'll have a look myself at some point too because I was also planning on trying it in multiplayer.


One thing that I think might help with the AI at the moment, would be if it didn't build all those farms and went for production.

So there's only one readily available set of values I can tweak that could actually impact improvement building, and considering I set the weight for production 2.75 times as high as food, the behavior we currently see really suggests to me it doesn't actually impact it or that there's some hidden effects somewhere that still make it terrible at making mines. (It's not really overproducing farms either, it's mostly underproducing mines). I wish I could do something more here too, but so far it seems were out of luck.

A quick question : since new version of the mod overwrite previous on disk, is it possible to upgrade to v4 and not restart a game from scratch (ie just reload a game that used v3 and it is now v4 used ) ?
That would allow to compare whats done by AI in unthreaten territories with v4 (compared to v3), especially using and old save like 30 turns back and compare 30 turns later (which is a lot at this era and speed). I would gladly post results back.
Or is the mod "embedded" in the saved games and changing them (v3 to v4) on disk has no effects once game is created?

I'm not entirely sure yet whether it's fully 'embedded' or whether some changes do occur. I'm leaning more towards it being fully embedded atm. Many of the changes would either have to make the AI 'lose memory' on every loaded game or would cause crashes. I would recommend you start a new game if you want to play with v4. v3 should still be decent though, theres going to be a few spare settlers hanging around, and itll play a little worse overall but it should be fine.

but every single CIV does it not just the WM ones.

Well technically, it's done more by civs who have more units (and thus feel more comfortable going for an attempt), which is often the warmongery civs. I've also introduced something that makes them consider these city state attacks 'warmongery', so that they'll be hesitant to do it unless they dont care about being considered warmongers (this wasn't a thing in vanilla for some reason). However, in the ancient era, no one cares about that (basically everyone is a warmonger in ancient), which is why the warrior rush is especially common.
 
Good luck trying to sort this out without the dll :)

It's indeed unlikely to get anywhere, which is why I'm postponing it for now. It's possible it can just be done through operations and behaviortrees, if they happened to add naval city attack logic. Otherwise were out of luck.


Other civs fought with each other on an off but nothing substantial other than a few cities on the border of Sumer & Egypt that changed hands back and forth a couple times. They definitely do better with war but they don't seem to have any significant goals beyond declaring war and throwing units at each other for a little while. I am able to get them to war more often and longer if I reduce the war weariness penalties but that affects the player too so I'm not sure if that's something you want to mess with or not. Hard to say if it makes it better or just more often. Most often this means there aren't many city states left by the end of the medieval era :)

I'll try a game with v4 shortly.

The goal is generally to take a city, but once that has happened or failed, it does indeed tend towards that 'just throw units at it' behavior and they never really get anywhere. It's unforutnately also just the game, not just the AI. A defender has a significant advantage, so two people fighting each other with similar production and similar skill, just end up getitng into these stalemates that do nothing but hurt them both.

Still playing with v3, not V4.
Atm one of the biggest issue to me is the ai doesnt build (and thus use) builders enough, by FAR.
You can try this :
- starting era : latest (information I think)
- big enough map (used ynamp, but no need for so big^^)
- fastest speed just to not spend 20 hours testing, reveal all can also speed testing up
You can pretty much outprod, outgold etc. AI on deity while they have insane bonuses (especially since I use a mod to increase them). Why ? Because you make fully improved cities and the AI only improve 1-2 tile in cities with 10+ pple in them.

So I've been constantly trying to boost builder production, and it'll be better in v4 but as you said, it's indeed still nowhere near good enough. The main issue roadblock I have here is that the AI
never seems to feed its smaller cities with builders from bigger cities and I can't think of a way to make them to that without dll access.

Great project and keep the good work since Ai is the most problematic aspect of the game atm.

on a side note, is there a way to code city states to be really powerful. From what i saw in vanilla game play they are a bit better than barbarians although i saw barbarians ravage some city states :)). Considering they are mostly non aggressive, they don't do wonders, they don't expand, their military stays in its borders, would make more sense for them to be a bit smarter than the average ai civ, since their role is also very specific.

I'll try to do some minor civ work later, right now I've been focusing on the major civs. Unfortunately there's probably not that much that can be done here. Definitely room for improvement though.

Do you know if there's a way to make AI more likely to build and\or upgrade units than build settlers?

This mod has made the AI so much more competitive and enjoyable. The only thing that bothers me now is since settler operations are limited at 2, the AI have a big build-up of idle settlers in their cities. They are already settling more cities than me (which is great). But I wish they'd use more money on army instead of settlers.

I'm still using v3.

Removing the big buildup of settlers is actually the main improvement of v4, so I hope youll enjoy that :) Let me know if you still see it happen there. The main problem wasn't really the limit of 2 operations, it was much more that they were super indecisive in these operations and were running back and forth needlessly.

Seriously.. What the hell Scythia!! How can she afford that many horses!!! Any idea how to change her bonus to only get say, 50% to the next horse, instead of one free??

Haha, wow, can't believe she can keep the maintenance of that under control. No idea how to do that change unfortunately, the type of modifier they use to make that work isn't production based. An easier change may be to just alter the production cost of the horse archers and add a new unique horsemen unit with decreased production.
 
I have only played a handful of games in vanilla so far so I can't say if the vanilla AI has the same issue but in AI+ I noticed the AI is terrible at defending it's settlers. Maybe it's just more noticeable since you've boosted the number of settlers being produced so it's more likely for a scouting unit to run into one.

I captured 4 settlers from my neighbor which basically meant I won the game from the +4 city upswing for free which instantly made me catch up and nullify all the AI buffs it gets on higher difficulties (this was on Immortal).

Looking at the various xmls and lua scripts I didn't see anything specific to escorting but then again I didn't look very hard. Maybe this can't be fixed until further mod support is enabled but right now if you aggressively camp the AI borders you can beat them just by feeding off their settlers.

Other thing I doubt can be fixed but I was sieging this AI who had 3 crossbowmen hanging around it's city who just sat there and moved around never actually shooting as I attacked his city over a few turns and finally took it. Seems to be an issue with ranged units specifically because his melee and even city bombardment worked just fine.
 
I have only played a handful of games in vanilla so far so I can't say if the vanilla AI has the same issue but in AI+ I noticed the AI is terrible at defending it's settlers. Maybe it's just more noticeable since you've boosted the number of settlers being produced so it's more likely for a scouting unit to run into one.

Yeah this is a problematic area. The main weird issue is that even though the 'behaviortree' tells it to form formations with its buddies, it just doesn't. So you see a lot of 'escorts' walking 2 or 3 tiles away, which is of course pointless. I'm going to try working on this in future versions and see if anything can be done about it without making it super indecisive when it comes to settling. In this game you mention, were you always at war with this AI? It at least seems to not even consider the units of players they're at peace with.

Other thing I doubt can be fixed but I was sieging this AI who had 3 crossbowmen hanging around it's city who just sat there and moved around never actually shooting as I attacked his city over a few turns and finally took it. Seems to be an issue with ranged units specifically because his melee and even city bombardment worked just fine.

Yah I'm not yet sure what that could be, can't think of anything that could realte to this that actually be changed. Were you approximately at the same tech level? Or were you way ahead?
 
I hagte to ask this here, but im going to use my one FNG card. I started a game with AI v3 and want to update to AI v4. How do I do that?
 
Yeah this is a problematic area. The main weird issue is that even though the 'behaviortree' tells it to form formations with its buddies, it just doesn't. So you see a lot of 'escorts' walking 2 or 3 tiles away, which is of course pointless. I'm going to try working on this in future versions and see if anything can be done about it without making it super indecisive when it comes to settling. In this game you mention, were you always at war with this AI? It at least seems to not even consider the units of players they're at peace with.

Initially was at peace but even once war was declared upon capturing the first settler I didn't really observe much of a difference in his settler movements. They were hanging out on the front line, I assume since the juicier spots to settle were around there or just beyond my units.

Yah I'm not yet sure what that could be, can't think of anything that could relate to this that actually be changed. Were you approximately at the same tech level? Or were you way ahead?

Yeah about the same tech level. We're talking Crossbowmen vs Halberds Horsemen and Archers. so he definitely could have done some damage, most of my units were injured as well from attacking cities and his melee units. So if the AI runs a calculation to see if it's worth attacking based on strength it shouldn't have deterred him. Altough I don't know if it's that sophisticated since it's usually pretty keen on attacking with damaged units anyway.
 
Hmm, I'm not really sure on this. I think we'll probably have to wait for proper multiplayer mod support from firaxis for this to work, they promised some pretty nifty things like automatic mod downloading from the host (which I'm guessing isn't in yet?). I'll have a look myself at some point too because I was also planning on trying it in multiplayer.

Alright, I look forward to it then.
 
I hagte to ask this here, but im going to use my one FNG card. I started a game with AI v3 and want to update to AI v4. How do I do that?

So in theory you can follow these steps:
1. Save your game and quit the game completely
2. Replace the files
3. Open the game again, redo the AI+ check in 'additional content', then load your game.

Some testing confirms that some of the changes do at least make it in. However, I'm not certain yet if all do, and there's some risk that it'll mess some things up (although I don't expect anything major).
 
Back
Top Bottom