Page 2 of 2

Re: Passive AI units despite local superiority

Posted: Wed Oct 25, 2017 7:36 am
by rbodleyscott
roguedjack wrote:Hi, some news. I'm sort of hijacking my own thread.
One AI code change leading to the other I basically ended up doing an AI mod.

About the "getting stuck" problem, I'm trying various stuff not just a threat map modification. But it is hard to get right, because sometimes you actually want the AI to stay behind other troops instead of going around them.
Yes I thought that might be an issue. It would be a bit weird if infantry reserves starting turning 90 degree and moving off to the flank. Maybe it would work OK if only applied to cavalry.
Everything is hard to get even slightly right in fact
Indeed
I'm also doing different turn ordering, target selection and other stuff. For instance the AI will resolve melee dues on its own when it wants to, like the player can, instead of waiting for the end of the turn for autoresolve. It changes AI battle dynamics.
I would love to see that.
So I thought, if I can get an ok result, I'll made a copy of the Rise of Rome campaign with my custom AI in it. So people playing SP can try something different, still play MP safely and it doesnt mess the game files.

If/when I'm reasonably happy with version 1.0, how do I make the AI campaign available, post it in mods forum?
When you are happy with it, send it to me and I will put it on the FTP for in-game download. That is probably the quickest way to play-test it and then it can be updated when improvements are made. I will PM you with my email address.

Re: Passive AI units despite local superiority

Posted: Wed Oct 25, 2017 7:40 am
by rbodleyscott
hjc wrote:This seems like it might be a thread where people know the answer: what is the maximum number of local variables that can be declared within a function? I've seen reference in scripts to not exceeding a maximum, re-using (with care!) variables due to this constraint.

Edit - never mind, I think the answer is 32.
I think it is probably 32, but if you want to check FUNCTION AutoDeploy() has the maximum number.