Protection Group for AI Siege Units

Cybah

Emperor
Joined
Jun 22, 2007
Messages
1,481
I want to make the AI move siege units with a protecting group like moving a settler.

It's too easy to kill single siege units on their way to the AI main stack. ;)

Any ideas?
 
I think the answer lies in CvUnitAI.cpp. There is a reference to sea escorts. Maybe that would be worth investigating and figure out if it can be duplicated for land escorts.

Another approach is to "lure" AI military units into wanting to join a group, which has a settler. Precisely which UNIT_AI to trigger on, how precisely and where is the real question in this approach.

Another small tip for testing. Edit CvPlot::isVisible like this:
PHP:
bool CvPlot::isVisible(TeamTypes eTeam, bool bDebug) const
{
	if (eTeam == 0)
	{
		return true;
	}
That way you can see the entire map and only you can see it. Sure it's cheating, but it is a good way to observe what the AI is doing.


And if you figure it out, please tell us how you did it. Improving the AI is on my todo list and something like this sounds really interesting :)
 
hear hear.
Its been bugging me as well.
Especially those "lone ranges" that uses the collateralAI to hit a city, with no chance of taking it down. Im considering turning off collateralAI for all sieges (since I modded range attacks for them, so direct attack is no longer needed).

Btw Nightinggale, if Chipotle cheat is enabled (which I guess it is for all modders) then Ctrl + z shows the entire map.
 
Btw Nightinggale, if Chipotle cheat is enabled (which I guess it is for all modders) then Ctrl + z shows the entire map.
Oh that really works. I really need to figure out precisely what can be done with cheats. I use it so rarely that I keep forgetting about it. Quite likely the main problem is that it is faster to hack a cheat like I just proposed instead of looking up how to cheat.
 
All I can say is that I would be much interested in such a feature, too. :)

A good "escort" functionality would solve many of my problems in modding Colonization.
 
Top Bottom