Kael said:
I once planned to have a whole line of defences. I imagined countries would be able to build walls around their empires complete with guard towers and gates. But the problem with it is that the AI doesnt understand appropriate use of them. So I couldnt make the improvements that strategic (hence the random sentry towers instead of the ability to build them).
I like sentry towers, and I would like it if they could be built...so I was pondering this problem. I had a couple of Ideas that I felt just might allow the AI to build sentry towers and forts in a sensible manner.
Start with NON-graphical fort and sentry tower bonuses in the map script.
Place them on hills and other flavorful choke points as the map script allows.
Next, lie to the AI by giving these bonuses yields that would be available with the appropriate improvement.
Thus, the AI would be inclined to build forts or towers on appropriate sqaures...
In a script, on some event such as "complete improvement" trigger a terraforming event that changes the tile from the NON-graphical sentry tower bonus, to the graphical versions of the same bonus.
In the case of a plain fort, simply remove the underlying blank fort bonus bonus once the fort is built.
I might suggest further that the sentry tower bonus again lie to the AI and tell it that it will be improved with a fort, and again, via a script, the sentry tower bonus would be removed upon completion of a fort and replaced with the sentry tower/fort improvement...and I would suggest that this improvement actulally give a production yield like a mine or windmill might so that the AI won't be inclined to replace the improvement it just finnished making.
For plain old forts (that didn't start on a sentry tower bonus), with no sentry towers, again, once the AI has been tricked into building a fort there, have the plain old fort give a yield like a mine or workshop would.
Players would be able to build sentry towers where-ever they liked as they wouldn't even see the blank sentry tower and fort bonuses, but upon building a sentry tower improvement, it would become, via a script a graphical sentry tower bomus, allowing one (AI's too) to then build a fort around it.
I obviously haven't looked at the AI very much, but since there is already terraforming code in the mod, and there are lot's of events in the python it seemed like this thing wouldn't be that difficult.
I have some ability to program, and I'd be happy to try to program it and test it myself if I thought my code might have some chance of being integrated back into the mod.
Of course, if the design team has explored such a path already they can also save me from wasting time on this by letting me know it won't work right.