AI capabilities

Post Reply
woolymuffler
Posts: 25
Joined: Tue Dec 26, 2017 4:48 pm

AI capabilities

Post by woolymuffler »

I'm still trying to get a handle on the scripting; from the manual on AI scripting:

12.2.10. Diplomacy
This event handles AI diplomacy allocation on a turn-by-turn basis.
12.2.11. Research
This event handles AI research allocation on a turn-by-turn basis.

Does this mean that the AI does not do research or diplomacy without scripted events? I'm hoping this falls more under pushing the AI in certain directions and assistance for the AI rather than it not being able to do unscripted research and diplomacy.
User avatar
BillRunacre
Posts: 6823
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: AI capabilities

Post by BillRunacre »

Without these scripts it won't undertake any diplomacy or research.

The reason being that the game's editor is so versatile that it's much better for it to be guided by scripts than for it to have an inbuilt logic in these areas, because that inbuilt logic could make sense for (say) our official campaigns but might not for some mods.
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
woolymuffler
Posts: 25
Joined: Tue Dec 26, 2017 4:48 pm

Re: AI capabilities

Post by woolymuffler »

Ah, extremely good information to know. Are there any other categories (like new unit purchases for instance) where the AI will only do scripted actions?
woolymuffler
Posts: 25
Joined: Tue Dec 26, 2017 4:48 pm

Re: AI capabilities

Post by woolymuffler »

And following on from this, are research and diplomacy events discarded permanently (if the AI lacks the funds and SKIP_FUNDS_CHECK isn't active) or will it try again on later turns until it has the funds (assuming all trigger conditions are still met)?
User avatar
Hubert Cater
Posts: 6063
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: AI capabilities

Post by Hubert Cater »

woolymuffler wrote: Thu Aug 25, 2022 11:20 am Ah, extremely good information to know. Are there any other categories (like new unit purchases for instance) where the AI will only do scripted actions?
The only things the AI will do on its own is OFFENSIVE and DEFENSIVE planning, but even these are on a tactical level based on map weighting, e.g. if the defender area is weak the AI will go on the offensive there, if the current AI area is weak, it will automatically go on the defensive on its own. In fact DEFENSIVE planning is always automatic, while OFFENSIVE planning can be overwritten with scripts as needed.

Everything else needs to be scripted for the reasons Bill described above, and these include all the AI script types, e.g. PURCHASES, RESEARCH, DIPLOMACY, TRANSPORT, AMPHIBIOUS, FLEET, GUARD planning and so on.
User avatar
Hubert Cater
Posts: 6063
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: AI capabilities

Post by Hubert Cater »

woolymuffler wrote: Thu Aug 25, 2022 1:00 pm And following on from this, are research and diplomacy events discarded permanently (if the AI lacks the funds and SKIP_FUNDS_CHECK isn't active) or will it try again on later turns until it has the funds (assuming all trigger conditions are still met)?
Depends on the #TYPE= setting, e.g. 2 will keep on repeating, 1 will keep trying until it is successful and then it will be removed, 0 is a one time try and then removed.
woolymuffler
Posts: 25
Joined: Tue Dec 26, 2017 4:48 pm

Re: AI capabilities

Post by woolymuffler »

Thanks! This is fantastic information.
woolymuffler
Posts: 25
Joined: Tue Dec 26, 2017 4:48 pm

Re: AI capabilities

Post by woolymuffler »

Does the AI sack/replace generals without scripting?

I assume it is able to handle replacement of destroyed units without scripting as I don't see how that could be scripted (you don't know for sure which units will be destroyed).
User avatar
Hubert Cater
Posts: 6063
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: AI capabilities

Post by Hubert Cater »

Right now the AI does not sack/replace generals and there are no scripts for it either.
User avatar
Hubert Cater
Posts: 6063
Joined: Mon Jul 22, 2013 11:42 am
Contact:

Re: AI capabilities

Post by Hubert Cater »

It does indeed handle the rebuild of destroyed units on its own, looking to purchase those before any other units as they are available at a discount and the AI tries to take advantage of that as well.
Post Reply

Return to “MODS and Scenarios”