Today, Developers talked about how we can assign our units Objectives that they will perform for us, and how to mod these. They also gave a summary of the starting situation in the Balkans and Dacia. Here are the details;
Unit Objectives
As you may have noticed in our streams automation is now an integral part of playing the game, should you want to. Unit objectives are a way to outsource the management of some armies to the AI, essentially using the same things that the AI itself uses to control its armies and navies. You can at any time select an objective for each army or navy under player control (or several units at once, in which case the objective applies separately to each one currently), which enables AI for said unit, making it automatically take actions almost as if it was controlled by an AI country.
We don’t see this as something you use for your main armies but it can be useful for any secondary armies or forces left behind to control or defend your country. Split/merging/consolidation/abilities are not used by objective units except specifically where it's a necessity.
The design goal with objectives to simplify the codebase on our end, expose unit behavior to modders in a modular fashion, and ultimately to provide the player with a greater amount of variation in NPC behavior.
While you may not want to sign away control of all of your armies to the AI the AI objectives makes it possible for you to let the AI handle some of your armies, while you focus on others.
Available objectives
- Naval Landing: Functionally similar to EU4 auto transport. If there is at least one available navy which has had Naval Landing selected, clicking to an inaccessible city with an army will make this navy pick up that army and ship it to that city.
- Independent Operations: Will turn on the regular army AI for this unit. Making it operate freely, attacking enemy armies, occupying enemy cities, etc.
- Defend Border: Regular AI as above but stays within country's borders, effectively just doing defensive tasks.
- Reconnaissance: Patrols across the country's borders reporting enemy movements.
- Fight Rebels: Army will focus on destroying any armies owned by the Rebel tag (Slave Revolt stacks).
- Keep in Reserve: Avoid contact with enemies while staying within country borders. Mostly because a common experience is MP is forgetting troops you're currently not using and having them destroyed when looking elsewhere.
- Hunt Fleets: Search and destroy enemy fleets.
- The player select a new objective from the GUI (requires interface_allow trigger to evaluate to true to be listed).
- The objective is automatically switched to due to having a priority above zero (requires allow trigger to evaluate to true).
- Code is hardcoded to switch to certain objectives (e.g. naval landings).
While at this, I should explain that the regular utility function’s output aside from some other nonlocal factors will depend on what objective is currently is selected, whether the AI is enabled for the country (ai in console), and what role the army has been assigned by AI. A brief mention on unit roles: Armies are casually assigned as either siege armies or hunter killers where the latter will prioritize killing enemy armies more highly than besieging in the default configuration.
There is another concept you will probably come across while modding unit AI: Threat, which can be checked with the unit_threat trigger. The threat value is an influence map (sorry, another AI term) calculation. Currently it can only be seen in the Release D version in Steam by typing “ai.map threat” in console (will sort this out, we have a problem with engine hiding most debug commands in release). A threat value of 1.0 is an enemy the same size as the unit is fairly close, a value of 10 that enemies nearby are 10 times as strong, etc. A screenshot I had lying around from an old version:
So what objectives does the AI currently use? Only objective_null (the default, represents having no objective at all and means the unit is player controlled or controlled by regular AI) and objective_naval_landing which is used for AI naval transport and player autotransport. Objectives linked to code like naval landing has a lot of hardcoded magic inside it and will probably be quite difficult to modify in a sensible manner other than minor tweaks to the utility function.
Finally, a note on performance: When you script unit AI all bets are off whether you will be able to run it without causing performance degradation of the game. Tweaking the following defines can be useful:
MAX_UNITS_PER_TURN = 200
TACTICAL_DEPTH = 60
Use the "timing show" and "ai.pawns" console commands to find out what is causing slowness and how responsive the unit AI is. The AI has an internal execution time allocation system to process important units more frequently than non-important ones (as by size, vicinity to human players, time since last processing, etc.)
Thank you for listening. This is a merely a part of the AI and I haven’t touched into all details, but hopefully one that you will be able to create great mods despite the opaqueness.
Dacia & The Balkans
Lastly we turn to one of the last regions so far not covered by our Development Diaries. The Balkans!
Much like many of the regions we have covered in these diaries the Balkans and the greater Danubian region in the time of Imperator was primarily dominated by tribal entities. This is a region with strong influences from both the Hellenic world, and subject to a great influx of Celts. More directly this is a region that would come under pressure from the expanding Roman Republic and which was the frequent scene for Macedonian excursions, first under Alexander and the Argeads, but also from the successor kings such as Lysimachos in Thrace. It was also through this region that the Celtic peoples that settled in central Anatolia, the Galatians, came migrating, clashing with both locals and greeks alike.
The native inhabitants of the region, Illyrians in the west and Dacians in the east are divided into many smaller tribal states. As in other regions we have covered, a successful tribe may aspire to form a tribal federation, Dacia or Illyria.
Starting Countries:
- Getia: The game’s largest Tribal state of Getians. Comparatively strong in its region but less densely populated that some of the neighbors to its south.
- Tyrgetia: Small Getian tribe on the river Tyras (right next to a Hellenic City on the estuary state mentioned in an earlier diary).
- Moesia: Settled tribe in Upper Thrace, medium power in the region and a potential danger to the kingdom of Thrace to its south and east. Not much is known about the Moesians before the end of this era when they encounter the Romans.
- Triballia: Settled tribe along the Danube. In frequent conflict with the Getians and the Macedonians, both before and after our era.
- Dardania: One of the stronger kingdoms of this region, Dardania has a history of meddling in the politics of all surrounding, including Macedon, which they have at times been a de facto had quite strong influence over. More recently however it has been a subject under Macedon. With Alexander’s death however Dardania is free and, like Taulantia to its south, quite likely to once again end up at odds with Macedon.
- Dindaria
- Tilataeia
- Scordiscia
- Cotinia
- Armistia
- Daorsia
- Pieria
- Delmatia
- Libernia
- Ditionia
- Oxuaioia
- Scordiscia
- Breucia
- Deuria
- Ditionia
- Libernia
- Cataria
- Cotinia
- Iapodia
- Istria
- Abria
- Potulatensia
- Bastia
- Ratacensia
- Buridavensia
- Caucoensia
- Ansamensia
- Appulia
- Albocensia
- Saldensia
Responses (0 )