AI - Updated: March 18, 2023.
This section will cover various AI issues and how to best to troubleshoot them using example scenarios.
In an fashion, an assumption will be made that the developer trying to debug their Dawn of War AI has a "modest" understanding of LUA coding and basic scripting logic but this cannot always be the case.
Master AI Documentation
Find attached below the master documented which I created a decade+ ago which will make you go through step-by-step the AI workflow and give you an understanding how the basic script logic works and relates to the various parts. Please consult the attached text file to get a good broad overview of scripting AI in Dawn of War.
This document will be updated if required but I find if you have any concerns how to do something in the LUA logic for your project's AI chances are another project has likely done something similar and you can "adopt its scripts" for use within your own. This, of course, depends on whether it suits your needs "as is" or if "new features" are required to be added to it.
Common AI issues
Note: Please ensure you are first running the game in -DEV mode as per instructions in the first message of this thread.
In this section, there are two logs you will need to consult: warnings.txt found in both [root Soulstorm folder] and [root Soulstorm folder]\logfiles\[last game run instance] and ailog.txt in [root Soulstorm folder]\logfiles\[last game run instance]. The ailog.txt, however, should largely be consulted first since most of the following warnings will be dumped there first.
We will break down Dawn of War AI errors based on the .ai files which should be examined causing problem.
Also, throughout the course of this section we will be using the Ultramarines faction mod project as an example.
Loader.ai
This file is located in your project's [Mod Name]\Data\ai\races\[Faction AI race root folder]
Hint #1:
Failed to import lua file 'Data:AI/Races/ultra_marine_race/Tactics/UltraMarineMyCoolUnitTactic.ai'
*ALERT: failed to import 'Races/ultra_marine_race/Tactics/UltraMarineMyCoolUnitTactic.ai', file failed to open
Lua Races/ultra_marine_race/Loader.ai Ln 36 (LoadRace)
Lua Races/RaceLoader.ai Ln 94 (?)
Lua Core/cpu_manager.ai Ln 405 (Initialize)
Lua DATA:AI/default.ai Ln 115 (InitializeAI)
main DATA:AI/default.ai Ln 133 ((null))
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: Check your Loader.ai file (example above is "Races/ultra_marine_race/Loader.ai Ln 36") and see what line is loading which missing .ai file. This means you are trying to load an invalid .ai file.
Hint #2:
CpuManager: No unit stats available for: ultra_marine_squad_builder!!! Using default tactic...
Warning: ultra_marine_squad_builder has no unit strength!
*ALERT: MilitaryManager:Update() threw exception (lua runtime error)
Lua Core/cpu_manager.ai Ln 1564 (?)
Lua Core/cpu_manager.ai Ln 419 (Initialize)
Lua DATA:AI/default.ai Ln 115 (InitializeAI)
main DATA:AI/default.ai Ln 133 ((null))
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: A syntax error exists and must be corrected first before any of the rest of your .ai files are loaded since the Loader.ai is the focal point to which all other .ai files in your project are called from.
Hint #3:
*ALERT: [string "Races/ultra_marine_race/Loader.ai"]:118: attempt to perform arithmetic on global `a' (a nil value)
Solution: Using the example, at Line 118 of the Loader.ai the script logic was expecting a numeric value but found an invalid letter "a" instead.
Hint #4:
*ALERT: [string "Core/utility.ai"]:93: Assertion failed at Races/RaceLoader.ai, line 69
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: Incomplete or invalid line found in your Loader.ai. Please correct the syntax so the command is valid.
[Faction name]unitstats.ai
This file is located in your project's [Mod Name]\Data\ai\races\[Faction AI race root folder]\info
Hint #1:
*ALERT: AIStats:LoadUnitStats() threw exception (cannot find entity blueprint 'ultra_marine_scout')
Lua Core/cpu_manager.ai Ln 413 (Initialize)
Lua DATA:AI/default.ai Ln 115 (InitializeAI)
main DATA:AI/default.ai Ln 133 ((null))
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: Check your Unitstats.ai file and ensure all your EBPS and SBPS units match up correctly. The above example means the SBPS entity in your unitstats.ai is not accurated linked to the expected EBPS entity (which they should be in your project's AE code).
Hint #2:
AI Unit Stats: 'ultra_marine_squad_builder' -- invalid ebp name 'ultra_marine_builde'!
*ALERT: AIStats:LoadUnitStats() threw exception (cannot find entity blueprint 'ultra_marine_builde')
Lua Core/cpu_manager.ai Ln 413 (Initialize)
Lua DATA:AI/default.ai Ln 115 (InitializeAI)
main DATA:AI/default.ai Ln 133 ((null))
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: Check your Unitstats.ai file and ensure the EBPS name that was flagged is actually named correct and is valid for this entry + associated properly with its SBPS entity.
Hint #3:
*ALERT: AIStats:LoadUnitStats() threw exception (unable to make cast)
Lua Core/cpu_manager.ai Ln 413 (Initialize)
Lua DATA:AI/default.ai Ln 115 (InitializeAI)
main DATA:AI/default.ai Ln 133 ((null))
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: This one is specifically related to your Unitstats.ai file which could mean a EBPS/SBPS entity is missing Effectiveness values or something invalid located only in Unitstats.ai.
Hint #4:
Warning: ultra_marine_squad_honour_guard has no unit strength!
Solution: This one is specifically related to your Unitstats.ai file where near the top of this .ai file you are missing this required line:
UnitStrengths.ultra_marine_squad_honour_guard = XXXX
where XXXX is the assigned ArmyStrength value in comparison to other units in vanilla or faction mod projects.
Hint #5:
*ALERT: [string "Races/ultra_marine_race/Info/UltraMarineUnitstats.ai"]:8: unexpected symbol near `='
Lua Races/ultra_marine_race/Loader.ai Ln 44 (LoadGlobalInfo)
Lua Races/RaceLoader.ai Ln 81 (?)
Lua Core/cpu_manager.ai Ln 400 (Initialize)
Lua DATA:AI/default.ai Ln 115 (InitializeAI)
main DATA:AI/default.ai Ln 133 ((null))
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: A general missing syntax error where a character is missing that was expected to complete the line. In this case it is in the Unitstats.ai file where this line:
UnitStrengths.ultra_marine_squad_cool_crew =
has to be:
UnitStrengths.ultra_marine_squad_cool_crew = 35
This is because a value was expected to close this particular line.
Hint #6:
*ALERT: no static 'UC_LightInfantryMd' in class 'UnitStatsAI'
main Races/ultra_marine_race/Info/UltraMarineUnitstats.ai Ln 43 ((null))
C =[C] Ln -1 (import)
Lua Races/ultra_marine_race/Loader.ai Ln 44 (LoadGlobalInfo)
Lua Races/RaceLoader.ai Ln 81 (?)
Lua Core/cpu_manager.ai Ln 400 (Initialize)
Lua DATA:AI/default.ai Ln 115 (InitializeAI)
main DATA:AI/default.ai Ln 133 ((null))
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: Check your Unitstats.ai file and ensure one of your Class types (based on the line reported above, as example) is corrected as there are standard Class Types the game uses.
Hint #7:
'ultra_marine_scout': upgrade 'ultra_marine_marine_shotgun' is an invalid upgrade for this entity type!
Solution: In your faction mod's AI Unitstats.ai the hardpoint associated with the unit is not valid based on the loaded EBPS unit. Please ensure your AI is updated here with the correct weapon\ names assigned to the EBPS unit.
[Faction name]buildbasestrategy.ai
This file is located in your project's [Mod Name]\Data\ai\races\[Faction AI race root folder]\strategies
Hint #1:
Cannot get prerequisites: Trying to build an invalid research: ultra_marine_support_research
Cannot get prerequisites: Trying to build an invalid addon: ultra_marine_captain_upgrade
Solution: Check that your AE project actually uses these entities and they can be buildable even by a human player. If the above research and addon are part of your project BUT non-buildable in-game then the above warnings will be dumped. In this instance, the AI should not be asked to build the above research or addon.
Hint #2:
*ALERT: [string "Core/utility.ai"]:93: Assertion failed at Core/Strategies/Strategy.ai, line 31
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: Syntax error in your project's BuildBaseStrategy .ai file likely related to a misspelled declaration not following process or accidental capitalization.
[Faction name]buildbasestrategyinfo.ai
This file is located in your project's [Mod Name]\Data\ai\races\[Faction AI race root folder]\strategies
Hint #1:
Trying to add a limit to a non-existant squad: ultra_marine_squad_honour_guar
Solution: Check your [race name]strategyinfo.ai file to see if such a squad is actually a valid one. As example, go to ultramarinestrategyinfo.ai and note the "SquadLimits" section for this specific error:
ultra_marine_squad_honour_guar = 1,
In this case, based on the Ultramarines faction AI's Unitstats.ai file the correct valid SBPS squad name is actually:
ultra_marine_squad_honour_guard = 1,
So use only valid SBPS squad names here.
Hint #2:
*ALERT: [string "Core/utility.ai"]:93: Assertion failed at Core/Strategies/BuildOrderStrategy.ai, line 211
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: Syntax error in your project's BuildBaseStrategyInfo .ai file likely related to a misspelled declaration not following process or accidental capitalization.
[Faction name]tactic .ai files
These files are located in your project's [Mod Name]\Data\ai\races\[Faction AI race root folder]\tactics
Hint #1:
*ALERT: MilitaryManager:Update() threw exception (lua runtime error)
Lua Core/cpu_manager.ai Ln 1564 (?)
Lua Core/cpu_manager.ai Ln 419 (Initialize)
Lua DATA:AI/default.ai Ln 115 (InitializeAI)
main DATA:AI/default.ai Ln 133 ((null))
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
or
*ALERT: MilitaryManager:Update() threw exception (lua runtime error)
Lua Core/cpu_manager.ai Ln 1564 (?)
Lua Core/cpu_manager.ai Ln 1416 (Update)
Lua DATA:AI/default.ai Ln 53 (AI_Think)
Solution: This error generally means there is a syntax framework error in a loaded .ai of yours. It can be caused by something like this:
function UltraMarineBuilderTactic:__init( quad_ai ) super( squad_ai )
The correct syntax should be:
function UltraMarineBuilderTactic:__init( squad_ai ) super( squad_ai )
Be mindful of your script logic and keep to conventions. If you cannot find it, comment out large sections of your loader.ai especially in the CreateTactic(oSquadAI) section. This will allow you to better troubleshoot which .ai file is causing the problem.
Hint #2:
*ALERT: [string "Races/ultra_marine_race/Tactics/UltraMarineInfantryTactic.ai"]:155: `)' expected near `then'
Lua Races/ultra_marine_race/Loader.ai Ln 27 (LoadRace)
Lua Races/RaceLoader.ai Ln 94 (?)
Lua Core/cpu_manager.ai Ln 405 (Initialize)
Lua DATA:AI/default.ai Ln 115 (InitializeAI)
main DATA:AI/default.ai Ln 133 ((null))
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: Locate this .ai file (example above is the .ai file mentioned in your loader.ai at this part "Races/ultra_marine_race/Loader.ai Ln 36") and correct the missing ")" required to properly secure the Function.
Hint #3:
*ALERT: [string "Races/ultra_marine_race/Tactics/UltraMarine..."]:153: stack overflow: [string "Races/ultra_marine_race/Tactics/UltraMarine..."]:153
[string "Races/ultra_marine_race/Tactics/UltraMarine..."]:163
Solution: Stack Overflows are likely caused by a unit that has the same ability applied twice or more which basically overflows the AI's buffer trying to preform duplicate tasks. ie. [My_Mod]InfantryTactic has frag_grenades ability active while the same named ability is called in an attachable commander unit with same abilities.
Best to keep ability names exclusive from generic abilities, disable any InitAbilities/DoAbilities, or disable the AI attachment logic.
Hint #4:
Warning: Ability ID in function DoAbility of player 1001 not defined!
Solution: In one of your AI Tactic files there is a DoAbility script which has broken logic that is undeclared and missing being bound to an actual ability name attached to your EBPS unit.
As an example in this Ultramarine Commander Tactic .ai file this is incorrect:
function UltraMarineCommanderTactic:InitAbilities()
end
function UltraMarineCommanderTactic:DoAbilities()
Ability.DoAbility( self.squad_ai, UltraMarineCommander.nuke_id, Ability.Filters.IsInCombat )
end
Notice there is no actual AE ability name being declared/assigned in the InitAbilities() section leaving that ability "UltraMarineCommander.nuke_id" in DoAbilities() orphaned, thus, generating the warning message(s).
To fix this we must assign "UltraMarineCommander.nuke_id" to a EBPS unit's proper AE ability name as follows:
function UltraMarineCommanderTactic:InitAbilities()
if (UltraMarineCommander.nuke_id == nil) then
UltraMarineCommander.nuke_id = cpu_manager.stats:GetAbilityID( "ultra_marine_nuke" )
end
end
function UltraMarineCommanderTactic:DoAbilities()
Ability.DoAbility( self.squad_ai, UltraMarineCommander.nuke_id, Ability.Filters.IsInCombat )
end
Now it is properly assigned, however, be careful that "ultra_marine_nuke" is actually the real AE ability name assigned to this EBPS unit assigned this tactic .ai file otherwise the game will Crash to Desktop (CTD). More on this below.
Note: The "Player 1001" basically means the error is being reported for Player1 (Player0 tends to be Slot 0 where a human player traditionally starts in a 1vs1 skirmish games).
Hint #5:
*ALERT: expected class to derive from or a newline
Lua Races/ultra_marine_race/Loader.ai Ln 32 (LoadRace)
Lua Races/RaceLoader.ai Ln 94 (?)
Lua Core/cpu_manager.ai Ln 405 (Initialize)
Lua DATA:AI/default.ai Ln 115 (InitializeAI)
main DATA:AI/default.ai Ln 133 ((null))
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: Check your Loader.ai file (example above is "Races/ultra_marine_race/Loader.ai Ln 32") and see what line is loading which .ai file. It is likely a bad .ai with incorrect declared values like a Tactic file with invalid syntax which is incorrect for your project.
An example that can cause this is from a loaded Tactic .ai:
This is incorrect:
class 'UltraMarineCommanderTactic' (UltraMarinInfantryTactic)
while this is correct:
class 'UltraMarineCommanderTactic' (UltraMarineInfantryTactic)
Note that the corrected name is derived from the loaded ultramarineinfantrytactic.ai (which uses "UltraMarineInfantryTactic" internally) so your project should use something unique and propagated to your other Infantry-based tactic files.
Misc / Generic AI Errors
Below are some odd and end AI warnings/errors to watch for.
Hint #1:
*ALERT: [string "Races/ultra_marine_race/Strategies/UltraMarineBuildBaseSt..."]:400: `end' expected (to close `function' at line 227) near `<eof>'
Lua Races/ultra_marine_race/Loader.ai Ln 23 (LoadRace)
Lua Races/RaceLoader.ai Ln 94 (?)
Lua Core/cpu_manager.ai Ln 405 (Initialize)
Lua DATA:AI/default.ai Ln 115 (InitializeAI)
main DATA:AI/default.ai Ln 133 ((null))
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: Locate this .ai file (example above is the .ai file mentioned in your loader.ai at this part "Races/ultra_marine_race/Loader.ai Ln 36") and correct the missing "end" required to close the function.
Hint #2:
RaceLoader: Create build base strategy of race AI ultra_marine_race...
*ALERT: [string "Races/ultra_marine_race/Loader.ai"]:53: attempt to call global `MarineBuildBaseStrategy' (a nil value)
*ALERT: [string "Races/ultra_marine_race/Strategies/Ultra..."]:247: attempt to index global `tBuildType' (a nil value)
Error loading script file 'DATA:AI/default.ai' for race 'ultra_marine_race'!
Solution: Not properly declared functions or values. Need to ensure they are valid and have a link to script logic. As example for Ultramarines.. "MarineBuildBaseStrategy" should have been "UltraMarineBuildBaseStrategy" as "MarineBuildBaseStrategy" is not valid for the Ultramarines project since "UltraMarineBuildBaseStrategy" is already declared in both the project's loader.ai and the its UltraMarineBuildBaseStrategy.ai file.
For the missing link to `tBuildType' that is due because the call was not first declared so it would need this before any kind of tBuildType is asked for.
local tBuildType = CpuBuildType()
It can then be associated with an Addon or Research, etc..
Added: March 18, 2023
Hint #3:
*ALERT: AIStats:LoadUnitStats() threw exception (not a table inside stats table)
Lua Core/cpu_manager.ai Ln 413 (Initialize)
Lua DATA:AI/default.ai Ln 115 (InitializeAI)
main DATA:AI/default.ai Ln 133 ((null))
Solution: Check your entire AI path that it is valid. The above error will occur if your faction's AI is not in the correct folder path. ie.
This is incorrect:
Data\ai\ultra_marine_race\
This is correct:
Data\ai\races\ultra_marine_race\
So ensure your full AI path in the project is in the correct standard that is expected.
Cause of "most" AI (Crash to Desktop) CTDs
These are more elusive and frustrating as if a severe AI issue is found the game will crash to desktop without warning.
There is a method to firmly determine if its a BuildStrategy or Tactic causing the mysterious CTD but that is covered in the AI dox in the attachment below.
In this case, let's cover some basic Dawn of War CTDs and perhaps where to look to fix them.
Hint #1: Invalid or misspelled names of key declarations like those in Unitstats.ai. As example in the ultramarines Unitstats.ai:
UltraMarineUnitStats =
{
race = "ultra_marine_race",
If any of the above have a spelling mistake will cause a CTD.
Hint #2: Giving a unit an ability in its own tactic file that it does not have OR the ability itself is misspelled in the unit's tactic file.
As example:
If in your unit's EBPS in the ability section:
GameData["ability_ext"]["abilities"]["ability_01"] = "abilities\\ultra_marine_rally.lua"
But then in this unit's loaded Tactic .ai file you have this:
function UltraMarineCommanderTactic:InitAbilities()
if (UltraMarineCommander.rally_id == nil) then
UltraMarineCommander.rally_id = cpu_manager.stats:GetAbilityID( "ultra_marine_rall" )
end
end
When this unit shows up on the map for the first time the entire game will CTD.
The correct syntax is:
function UltraMarineCommanderTactic:InitAbilities()
if (UltraMarineCommander.rally_id == nil) then
UltraMarineCommander.rally_id = cpu_manager.stats:GetAbilityID( "ultra_marine_rally" )
end
end
So it is critical to ensure all your declared and valid abilities for an EBPS unit have a tactic associated.
Hint #3: Any invalid abilities placed in your project's generic Infantry Tactic .ai file under this section.. once more, using Ultramarines as an example:
function UltraMarineInfantryTactic:AddTargetAbilities()
table.insert(InfantryTactic.TargetAbilities, { nil, "ultra_marine_cool_bombs", Ability.Filters.CloseInfantryEnemy, 1, 0 })
end
If the mod project OR any loaded mod project (including vanilla factions) do not have this ability anywhere the game will immediate CTD when the first Infantry unit is created on the battlefield for your project.
It is important to ensure all ability names are valid as well as their context of use / proper function is coded correctly so the AI can use their abilities to the best of their potential.
Hint #4: Any hard-coded Build Order items in your project's BuildBaseStrategyInfo .ai file within the "BuildPrograms" section must be 100% accurate.
If a single one of these is misspelled or not present and then called in the loaded Tier (below showing only Tier1 items) then the game will immediately CTD.
Using Ultramarines as an example these are all valid units:
{ 1, 220, 50, 0, 1, "Unit", "ultra_marine_squad_commander" },
{ 1, 100, 0, 0, 1, "Unit", "ultra_marine_squad_scout" }, -- Force a capturing squad
{ 1, 190, 0, 0, 1, "Unit", "ultra_marine_squad_marine" },
{ 1, 400, 0, 0, 1, "Building", "ultra_marine_hq" },
{ 1, 150, 0, 700, 1, "Research", "ultra_marine_squad_cap_research" },
{ 1, 250, 150, 900, 1, "Research", "ultra_marine_tier2_research" },
However if in, say, Tier2 there is a bad item like the following research when the AI reaches Tier2 it will immediately crash as the AI scans all forthcoming items in the current Tier first but cannot compensate here if even one is invalid, thus, will crash.
{ 2, 150, 0, 650, 1, "Research", "ultra_marine_i_am_cool_research" },
So its absolutely paramount to ensure all items under "BuildPrograms" are accurate.
Hint #5: Under your project's BuildBaseStrategy .ai there are various obstacles to avoid crashing. The main ones are sections which call Buildings and their Addons directly. We will use the Ultramarines project as an example.
At the top of your project's BuildBaseStrategy .ai file it is critical to ensure all Detector Units (used to spot enemy Infiltrated units) are valid. Make sure all SBPS units in your project are the correct name AND can actually find infiltrators.
function UltraMarineBuildBaseStrategy:__init( baseinfo ) super( baseinfo )
self:AddDetectorUnit("ultra_marine_squad_very_cool_unit")
This can especially be tested against a vanilla Tau enemy as they have early Tier1 infantry which are shrouded.
So be aware the above must be a valid SBPS unit in your project and should be able to detect enemy infiltrators.
Next, this is declaring all valid Buildings for your project:
function UltraMarineBuildBaseStrategy:GetBuildingName( sType )
Here, the most critical buildings that are mandatory by the AI to be declared are the HQ, Generators, Large Generator, Listening Post, and Vehicle Buildings. Both Mines and Turrets are optional and can generally be omitted if your project does not use them.
There are some projects which have no Generators, Large Generators or Vehicle Buildings so there are methods to "trick the AI" not to build such placeholder structures while the player sees nothing themselves in the game's UI so it appears clean.
This one declares all valid building Addons within your project:
function UltraMarineBuildBaseStrategy:GetAddonBuilding( sType )
Every building that has an addon must be declared here especially if the addon is called for anywhere directly by your project's AI in a build order sequence or dynamically.
Do not use an addon name or associate it with a valid building unless they are both valid to one another otherwise the game will immediately crash.
Another section is where dynamic builds can be undertaken:
function UltraMarineBuildBaseStrategy:BuildFlexible()
If you are ever using squad quantities used as a prereq to build a research or addon, etc then make sure all squad names are valid. A single invalid one will crash the game.
Once more, an example from the ultramarine's project:
Note the invalid squad name declared in the array:
function UltraMarineBuildBaseStrategy:BuildFlexible()
-- Dynamic research item syntax: ResearchName, MinTier, RequisitionCost, PowerCost, MinSquadCap, MinSupportCap, SquadName, SquadMinCount
local iBasicInfantrySquads = self:CountSquads("ultra_marine_squad_scout") + self:CountSquads("ultra_marine_squad_marine") + self:CountSquads("ultra_marine_squad_dumb_doofus")
-- Compute tier 1 researches
if (self.tierLevel >= 1) then
if (iBasicInfantrySquads >= 1) then
self:DynamicResearch("ultra_marine_tier2_research", 1, 250, 150, 0, 0, nil, 0)
end
end
That one invalid squad name will crash the game in Tier1 so ensure all declared squad SBPS names are valid.
The same goes for all other buildable items like Researches, Addons, and Buildings. If any of those are also invalid you will likely crash the game in the Tier they are called. Examples of invalid dynamic calls:
self:DynamicResearch("ultra_marine_pathetic_research", 1, 150, 100, 0, 0, nil, 0)
self:DynamicAddon("ultra_marine_silly_addon_1", 100, 1, 100, 100, 0, 0, nil, nil, false)
self:DynamicBuild("ultra_marine_dumb_hq", 2, 1, 100, 100, 0, 0)
Note: you will not crash the game if such items are actually loaded in the project in their respective AE folders but if they are simply never buildable or unobtainable then you likely get the error mentioned before:
Cannot get prerequisites: Trying to build an invalid research: ultra_marine_cool_support_research
Cannot get prerequisites: Trying to build an invalid addon: ultra_marine_captain_upgrade
The above research and addon are actually part of the project but cannot ever be built since they are unavailable for anything to build them since they are not active.
If you feel such items should be buildable an exception might be to add these to a bypass like these examples in your BuildBaseStrategy .ai in this function:
function UltraMarineBuildBaseStrategy:__init( baseinfo ) super( baseinfo )
-- dark40k - set items that need bypass for CpuPrerequisites
CpuPrerequisites2.AddSpecialItem("ultra_marine_cool_support_research", CpuPrerequisites.BT_Research)
CpuPrerequisites2.AddSpecialItem("ultra_marine_captain_upgrade", CpuPrerequisites.BT_Addon)
Other items like _Squad and _Building are also covered for exceptions. That is, however, a seperate topic and should be covered in the AI dox attached.
Other Common AI issues
Here are lesser problematic common AI issues.
In this section, there are two logs you will need to consult: warnings.txt found in both [root Soulstorm folder] and [root Soulstorm folder]\logfiles\[last game run instance] and ailog.txt in [root Soulstorm folder]\logfiles\[last game run instance].
Hint #1:
info is null:false bad ability name: all_run!
info is null:false bad ability name: all_autorepair
info is null:false bad ability name: all_bumpertank
Solution: False-Positive STEAM-only AI warning. This does not impact the AI itself. These warnings never show up for the older/legacy CD/DVD versions.