There is not anything wrong (that we know of) with the prereq system for v1.2 but (a) it is good to know what a working version looks like and (b) there may be some useful data in here for the future.
My main question is why the prereq info does not match the LUA files? Where is the AI getting this info from if not the LUA files? Is it hard-coded? I doubt it, but it would be interesting to view the output of a mod and match that with the LUA files for the mod.
Here is the output for Steel Legions mod:-
AI 0 Prerequisites for steel_legion_squad_pioneer
AI 0
AI 0 Prerequisites for steel_legion_squad_soldier
AI 0
AI 0 Prerequisites for
AI 0
AI 0 Prerequisites for steel_legion_squad_rough_rider
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_relay_station
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_lieutenant
AI 0
AI 0 Prerequisites for steel_legion_squad_tank_cyclops
AI 0
AI 0 Prerequisites for steel_legion_squad_stormtrooper
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0
AI 0 Prerequisites for
AI 0
AI 0 Prerequisites for steel_legion_squad_soldier_heavy_weapon
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_heavy_weapons_research
AI 0 Build Type: 3
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_relay_station
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_yarrick
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_barracks_salamander
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_relay_station
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_tank_fabric
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_tank_fabric_addon
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_tank_trojan
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_tank_chimera
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_barracks_chimera
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_tank_sentinel
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_barracks_sentinel
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_tank_hellhound
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_tank_salamander
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_barracks_salamander
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_tank_thunderer
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_barracks_chimera
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_barracks_sentinel
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_leman_casis_research
AI 0 Build Type: 3
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_relay_station
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_tank_fabric
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_tank_fabric_addon
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_tank_destroyer
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_barracks_chimera
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_barracks_sentinel
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_leman_casis_research
AI 0 Build Type: 3
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_relay_station
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_tank_fabric
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_tank_fabric_addon
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_tank_leman_russ
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_barracks_chimera
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_barracks_sentinel
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_leman_casis_research
AI 0 Build Type: 3
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_leman_turret_research
AI 0 Build Type: 3
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_relay_station
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_tank_fabric
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_tank_fabric_addon
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_tank_vanquisher
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_barracks_chimera
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_barracks_sentinel
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_leman_casis_research
AI 0 Build Type: 3
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_leman_turret_research
AI 0 Build Type: 3
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_relay_station
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_tank_fabric
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_tank_fabric_addon
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_tank_demolisher
AI 0 Type of data: userdata
AI 0 Name: steel_legion_airport
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_airport_addon
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_relay_station
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_tank_fabric
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_tank_executioner
AI 0 Type of data: userdata
AI 0 Name: relic_struct
AI 0 Build Type: 0
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_airport
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_airport_addon
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_relay_station
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_tank_fabric
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0
AI 0 Prerequisites for steel_legion_squad_tank_basilisk
AI 0 Type of data: userdata
AI 0 Name: steel_legion_airport
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_airport_addon
AI 0 Build Type: 4
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_ammunition_bunker
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: true
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_relay_station
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
AI 0
AI 0 Type of data: userdata
AI 0 Name: steel_legion_tank_fabric
AI 0 Build Type: 2
AI 0 Prereq Fulfilled?: false
I think I understand. Some LUA squad files have no prereq information, but those squads can only be built from certain buildings. The AI will look at the building that produces the squad and check the unfulfilled prereqs for it. It seems it also lists the unfulfilled prereqs for those prereqs as well - or at least the buildings at any rate. This must explain why, eg, Horrors and Possessed have no prereq info in their LUA files. The AI looks to the prereq info for the sacrificial circle and uses that instead.
Still does not explain everything - eg. the Squiggoth. What is up with that? The AI does not seem aware that a relic or an hq_addon is required. No doubt there are others. Is the v1.2 prereq code less than perfect?
It would be an interesting exercise to run this again under v1.3. If anyone has v1.3 running (I do not and would prefer not to update) can they insert the code given at the start of this post into the file buildorderstrategy.ai and then, at the end of function BuildOrderStrategy:__init( info ) super( info ) make the following change:-
self:WaitOnNextPlan()
self:Prereq()
Post the output here.
Thanks,
Flenser