[MOD] More Naval AI

Yea, it's pretty straight forward for me to do now that I've done it. I'm glad you've already got a decent solution going there on your end, it makes all the difference in the world to be able to see what values the AI are getting for different techs when sorting through this stuff. If you want me to merge that in at some point, just shoot me a PM and point me to a current copy of the source files.
 
Here's a repeatable crash situation. Not sure what's happening, but it crashes on two different PCs; just press "end turn".

Got it. Looks like someone was casting an area effect spell near the map edge and as the spell check was iterating through the nearby plots, I had it checking to see if those plots happened to have a city. However, I wasn't making sure that the plot wasn't equal to NULL before I did the city check, and this was causing the crash.

Thanks for the report! I'll have it fixed in the next release.
 
There's one feature that I've noticed in vanilla FFH a long time ago and it's both very annoying and doesn't make much sense - barbs pillage roads in unowned tiles. It's especially annoying when you play barbarian civ and downright stupid considering that barbs themselves build roads in the wilderness.
 
Got it. Looks like someone was casting an area effect spell near the map edge and as the spell check was iterating through the nearby plots, I had it checking to see if those plots happened to have a city. However, I wasn't making sure that the plot wasn't equal to NULL before I did the city check, and this was causing the crash.

Could you post an example of the code you use to resolve this? There's a few area effect spells in my mod that I'll need to apply a similar fix for.

thanks
 
Could you post an example of the code you use to resolve this? There's a few area effect spells in my mod that I'll need to apply a similar fix for.

No problem. And just to clarify, it wasn't the casting of the spell that was causing the crash, it was the AI assessing what would be hit with the AoE range.

Here's the relevant section of code.

Code:
for (int i = -iRange; i <= iRange; ++i)
{
	for (int j = -iRange; j <= iRange; ++j)
	{
		pLoopPlot = ::plotXY(plot()->getX_INLINE(), plot()->getY_INLINE(), i, j);

		[B][COLOR="Red"]if (NULL != pLoopPlot)[/COLOR][/B]
		{
			[I]other code here[/I]
		}
	}
}

The bold, red part is what I added. I just needed to make sure that a plot existed before I tried to run other checks on it
 
Perfect, thanks
 
Hi ...
Would it be possible to make an installer for next version, that would create a new folder for this modmod ? :)
 
Hey Tholal, the changed files adding the AI Tech Value debugging code is attached. I compiled and tested it all with your latest SVN version and it all went smoothly.

Everything is also commented, just search for 'ALN AITechValues' and you'll find all the changed code.
 
Hey Tholal, the changed files adding the AI Tech Value debugging code is attached. I compiled and tested it all with your latest SVN version and it all went smoothly.

Everything is also commented, just search for 'ALN AITechValues' and you'll find all the changed code.

Thanks Chris! I owe you one!
 
Ran into a repeatable crash bug. Just hit end turn on the attached save game and it should ctd.

I found the bug causing this crash, but for some reason I can't seem to fix your save game. :(

So instead of banging my head against it repeatedly, I decided to instead continue focusing on the next release. Sorry. Thanks for the report though!
 
One thing that's been jarring in my last couple games: the AI severely undervalues Iron as a resource. In three different games, I was able to trade a single luxury resource for one of the spare Iron resources from the AI who had built the Mines of Gal-Dur. I would have gladly paid everything I had for iron, since I was in the middle of a war in two of those games, and the instant +1 strength really turned things around.

In game #2, Varn actually dialed me up to offer Iron for Dye; in game #3, I asked Falamar what he'd give for Dye, and his answer was Iron + Pigs!
 
Aye it has been reported before, personaly i would suggest, that the AI should never trade away iron for anything unless you are realy friendly with them, same goes for mithrill.
 
Oh and while your at it, please make the Sheaim build more PZ´s, right now they usualy have about 1 PZ out of 10 units, usualy adepts or fawns (x.x), i would say it should be the other way around, with the bonus production the AI gets the Sheaim should be near invincable, but at the moment they are almost allways a pushover.
The issue with them not converting to AV apperes to be mostly resolved, even though they sometimes screw around with religions in the early game.
 
Back
Top Bottom