Airships: Conquer the Skies

Airships: Conquer the Skies

26 ratings
How to make your custom AI Faction
By HEU3BECTEH
I will write about the process of making your own AI Faction what I know myself, mostly from personal experience and experiments.
   
Award
Favorite
Favorited
Unfavorite
Basic mod structure
The first thing you will need is your Faction's ships and buildings designs. It would be better if you will plan how they will be divided into tiers beforehand.

To make a mod you create a folder in your user's AirshipsGame directory mod subdirectory (for me it is D:\Users\*username*\AppData\Roaming\AirshipsGame\mods). Name it whatever you want, it is better if it will represent your mod's ID and content.

In that folder of your mod there should be...
1) "info.json" file with descriptions, for example:
{ "id": "h_ai_fraction", "name": { "en": "HEU3BECTEH's AI faction", "ru": "Фракция ИИ от HEU3BECTEH" }, "description": { "en": "Adds AI faction with ships and buildings from the Conquest collection by HEU3BECTEH.", "ru": "Добавляет фракцию ИИ с воздушными кораблями и зданиями из коллекции Conquest collection by HEU3BECTEH." } }
2) "logo.png" - that will be your mod's logo, recomended resolution is 512*512px.
3) Directories for your designs, you can find them in your user's AirshipsGame directory: "buildings", "landships", "ships". You include only the ones used in your Faction and it may be better to rename them to easily organize and type in your .json structure.
4) "ConstructionStrategy" directory, containing "strategies.json" files with your Faction's Construction Strategies, the file(s) itself may be named any way, "h_strategies.json", for example.

You probably already have your designs. If not, just create them ingame. I recommend, if you will make multiple ships for every tier, making them all (or almost all, with some requiring more tech) available with one tech simultaneously. That will help your Faction to build more than one design at a time (with the way the game works now, it is not so easy to prevent that).
Maybe that Tech Tree will help you:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1491957508
Construction Strategy
When you have your designs in the corresponding subfolders, you can start making your Faction's Construction Strategies, "strategies.json" containing the list of factons, you can find the default ones in "...\Steam\steamapps\common\Airships Conquer the Skies\data\ConstructionStrategy" folder.

Here is an example of some "NewFactionName" Faction:
[ { "name": "NewFactionName", "charges": [ "GEAR", "WHEEL" ], "shipTiers": [ [ "ShipOneLvl3","ShipTwoLvl2" ], [ "ShipOneLvl2","ShipTwoLvl1" ], [ "ShipOneLvl1" ] ], "shipUpgradeSequences": [ [ "ShipOneLvl1", "ShipOneLvl2", "ShipOneLvl3" ], [ "ShipTwoLvl1", "ShipTwoLvl2" ] ], "landshipTiers": [ ], "landshipUpgradeSequences": [ ], "buildingTiers": [ [ "BuildingLvl3" ], [ "BuildingLvl2" ], [ "BuildingLvl1" ] ], "buildingUpgradeSequences": [ [ "BuildingLvl1", "BuildingLvl2", "BuildingLvl3" ] ], "techs": [ "GUNNERY", "RIFLING", "EXPLOSIVES", "MILITARY_TRAINING", "FIRE_SAFETY", "MACHINERY", "ENERGISED_SUSPENDIUM", "OPTICS", "GYROSCOPES", "METALLURGY" ] } ]
"name" - just name your Faction whatever you want.
"charges" - charges (icon/heraldry) to be used by your Faction, I am just leaving it blank (no '"charges": [ ],' at all). You can find the list of charges at "...\Airships Conquer the Skies\data\Charge\charges.json".
"shipTiers" - that is your ship building priority. The higher the better. AI will prioritize building ships from the first line, then from the second, then it will build ships from the last list if it will be unable (no required Tech) to build more advanced ones. What I find very tricky is that AI seems to be checking the designs themselves, so it will consider two ships with different names being one ship if their designs are the same. So it is difficult to build ship from the tier below together with the next tier ships. For AI to use multiple designs at the same time they should be unique for every tier. And you can not repeat one design on multiple tiers, because AI will see it as high-tier ship and skip the first tier at all, building only one ship from the second. That is strange and seems pointless to me that the game sees it like that, but that is the case anyway. AI tends to prioritize only one ship above all others, if you are not careful enough. You should prevent the scenario when on a tier one ship is available before all others.
"shipUpgradeSequences" - AI can upgrade ships in that sequence. As far as I get it, it tries to Upgrade before building something from scratch.
Same with landships and buildings.
Designs are typed without ".json" file extension, so "ShipOneLvl2" will refer to "ShipOneLvl2.json" file in "ships" folder of your mod.
"techs" - the order in which AI will do researching. Some first technologies will be available for it from the beginning. You can find the list of techs at "...\Airships Conquer the Skies\data\Tech\tech.json":
"GUNNERY", "RIFLING", "EXPLOSIVES", "MILITARY_TRAINING", "MACHINERY", "ENERGISED_SUSPENDIUM", "FIRE_SAFETY", "ADVANCED_EXPLOSIVES", "AERIAL_TACTICS", "AERIAL_CORPS", "LANDSHIPS", "OPTICS", "HIGH_PRESSURE_SUSPENDIUM", "HEAVY_WOODEN_ARMOUR", "METALLURGY", "GYROSCOPES", "MACHINING", "ELITE_INFANTRY", "FASTER_CANNON_RELOAD", "MARTIAL_CASTE", "FORTIFICATIONS", "SCIENTIFIC_SUSPENDIUM_MINING", "COMBUSTIBLES", "HEAVY_CANNON", "HEAVIER_THAN_AIR_FLIGHT", "EFFICIENT_AMMO_STORAGE", "ARTICULATED_MACHINERY", "CYBERNETICS", "ANTI_AIR_TACTICS", "ADVANCED_METALLURGY", "ADVANCED_FLIGHT", "AUTOMATED_LOADING_SYSTEMS", "SUSPENDIUM_CANNON", "COMPUTERS", "BIOMIMETICS", "OPTIMAL_DISTANCE_FUZE", "SHAPED_HULLS", "ROBOTICS", "RETICULATED_PLATING", (against "SHAPED_HULLS" in "BIOSTRUCTURES" group) "SAFER_AMMO_STORAGE", (against "EFFICIENT_AMMO_STORAGE" in "AMMO_STORAGE" group) "SAFER_CANNONS", (against "FASTER_CANNON_RELOAD" in "LOADING_DRILLS" group) "UNIVERSAL_CONSCRIPTION", (against "MARTIAL_CASTE" in "MILITARY_ORGANISATION" group) "SAFETY_FUZES", (against "OPTIMAL_DISTANCE_FUZE" in "ADVANCED_FUZES" group)
It seems that AI does not care about the Tech Tree itself, it can research any Tech, skipping required for that Techs. Maybe it can even research both Techs from one group, I did not test it.
You can add multiple Factions in one "strategies.json" file, but do not forget to separate them with comma (after "}").
You can make a simple Faction with one tier (all ships on one tier) or one ship Upgrade Sequence designs (one ship at a tier), if it is problematic to organize working tiers.
Use examples
The easiest thing may be to download some Faction mod as example and do the things similarly. You can use my Faction mod for that:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1531759591
You can find the default Factions in "...\Steam\steamapps\common\Airships Conquer the Skies\data\ConstructionStrategy" folder. By the way, you may want to move "strategies.json" from there when you will test your Faction, because in other case you will have to deal with the low probability of your Faction appearing.

Best regards.
14 Comments
Dageo 1 Apr, 2021 @ 3:16pm 
Found the issue (i swapped spaces with "_" in the strategies file, thanks for the help, great tutorial!
HEU3BECTEH  [author] 1 Apr, 2021 @ 2:23pm 
@Dageo I do not remember well enough, but it could be related to the tech requirements of buildings.
Dageo 1 Apr, 2021 @ 9:16am 
I removed every other faction from the strategies.json file to see but when i start a conquest now all the other empires dont have any buildings and do not produce any ships...
HEU3BECTEH  [author] 31 Mar, 2021 @ 10:13am 
@Dageo I guess it could be random.
Dageo 31 Mar, 2021 @ 10:03am 
Is there an easy way to check if your faction works properly? I started a dozen big maps but didn't see the charge i assigned to it or does it just get a random heraldy charge in conquest?
xxXXKILL99XXxx 22 Jul, 2020 @ 8:01pm 
meat
Kerbo 12 Apr, 2020 @ 4:55pm 
neat
HEU3BECTEH  [author] 4 Apr, 2020 @ 12:14am 
@Benderbej You are welcome!
Yep, factions are on the Workshop (:
Benderbej 3 Apr, 2020 @ 2:30pm 
have added two custom faction mods

1) Plato Empire Devided
2) Cuttheads clan

enjoy guyz)) thank you unknown for your guide))
NVG_Syalin 8 Jan, 2020 @ 6:25am 
Thank you, that was actually one of the many problems, the other big one being that I put buildings in the ships folder. I looked at the airships data folder and ships, landships, and buildings all have separate folders.