Friday, January 6, 2012

Making the AI work in CiV

I am doing more modding on Civ 5 lately.  I have a lot of things worked out well now but the real issue that I am ramming my head into is my inability to tell the AI how to use its resources.  The trouble spot is aircraft largely on the basis that using aircraft requires a lot more thought and strategy than other unit types.  If I make a bunch of Swordsmen and just keep pushing them towards your city attacking any units I see along the way then nothing too much can go wrong.  The real problem comes when the AI makes air units and then tries to figure out what to do with them because they don't work the way other units do.  In particular they are ranged units that take damage when they attack whereas normal ranged units do not.  Fighter jets also have a really low attack strength which means that the AI looks at its jets, thinks that they will ranged strike for very little damage and has them attack.  Because the jets are very weak in combat though they die instantly when they attack the enemies instead of the 'projected combat result' of them just doing a little bit of damage.  What the AI should do is use jets to attack incoming planes but it is actually pretty challenging to figure out where to place them and how to use them effectively.

My current options both are unpalatable.  Firstly I could just remove fighter jets entirely.  If they aren't there, the AI can't build them stupidly and throw them away for no benefit.  The trouble with this is it really messes up all the other balance and backstory surrounding the way bombers work - bombers are supposed to be weak to defensive fighters which is tricky when defensive fighters don't exist.  The other problem is that planes are ideal for the AI because they allow it to avoid chokepoints and unit clog and as such I really want the AI using planes.  In the endgame it is really problematic when the AI just creates ground units because it can support so many of them.  It ends up completely unable to get its units to useful places and is quite flummoxed by mountain passes.  The second option is to make fighter jets good at smashing cities and ground units.  There wouldn't be much difference between jets and bombers at that point but at least the AI would be able to use its jets to bash away on things usefully and it wouldn't be such a chump.  Of course one might question how exactly a squadron of fighter jets attacks a city in any useful way, and rightly so, so this option is clearly not much better in terms of flavour and backstory than the other.

The answer I would really like is 'Sky can fix the AI' so that it would build sensible comps of units and use them properly.  I don't expect miracles of course but having some way to tell the AI to spread out its fighters and use them for scouting and anti air defence would be nice.  An interface improvement that tells the AI that attacking with its fighters will kill them would also be a good idea - the computer is already quite competent at not attacking with units that will just die when it *knows* they will die.

I will say though that the CiV AI (and the game in general, really) is hugely better than it was at launch.  There are all kinds of idiotic things it used to do that it doesn't do anymore and many of the really huge abuses have been fixed.  That said, there are still some problems that need fixing and I won't stop until all the ones that can be fixed on my end are quite squashed.  If that requires me to play hundreds of games of CiV to test out then so be it:  I will make the sacrifice for the greater good.

No comments:

Post a Comment