The test was vanilla v1.2.
First of all I checked the output to see what would make prereq:CannotFulfillPrereqs() returns TRUE. Looks like I was wrong about what this does.
Space Marines:-
prereq:CannotFulfillPrereqs() returns TRUE:-
1. For Commander if the AI already has one on the field. May also apply to Librarian but the AI did not get to build one in this test.
2. For all squads (including the Librarian) that have HQ Addon 1 as a (primary)prerequisite if the AI is building the HQ Addon 1. Before and after it is built the function returns FALSE.
Orks:-
prereq:CannotFulfillPrereqs() returns TRUE:-
1. Where the squad has a total population requirement that is not fulfilled.
2. For BigMek if the AI already has one on the field. May also apply to Warboss but the AI did not get to build one in this test.
Eldar:-
prereq:CannotFulfillPrereqs() returns TRUE:-
1. For Farseer if the AI already has one on the field.
2. For ALL squads where the Eldar lose their HQ. This could explain why AIs do not build another HQ when the original is destroyed.
Chaos:-
prereq:CannotFulfillPrereqs() returns TRUE:-
1. For Chaos Lord and Sorceror if the AI already has one on the field.
2. 2. For all squads (except the Sorceror) that have HQ Addon 1 or 2 as a (primary) prerequisite if the AI is building the HQ Addon 1 or 2. Before and after it is built the function returns FALSE.
NOTES: While the HQ Addon is being built the prereq_fulfilled flag for the addon goes from being TRUE (ie. we can build this addon now) to being FALSE (ie. we cannot build this now). This does NOT happen to Building-type prerequisites, where the prereq_fulfilled flag stays TRUE while building is underway. Not known if the same is true of Research-type prerequisites as the Eldar AI did not get this far!
It seems it is only HQ Addons being built that cause squads with that addon (apart from the Chaos Sorceror for some reason) as a prereq to go from prereq:CannotFulfillPrereqs() returns FALSE to prereq:CannotFulfillPrereqs() returns TRUE. Building Building-type prerequisites does not cause this effect. Not known if the same is true of Research-type prerequisites as the Eldar AI did not get this far! They got whipped quite frankly
I cannot post the logs themselves as they are each between 500kb and 1 Meg in size. If you want them PM me and I will email them to you. There is more stuff in there worth mining.
I did not manage to get the scripts to report on Addon prerequisites, just Squad, Building and Research prerequisites. I will try again and see if this is possible.
Flenser
Edited by Flenser, 24 June 2005 - 12:49 PM.