Page 1 of 1

Multiple Commanders Bug, Major Commander Problems

Posted: 16 Jan 2008, 00:17
by Argh
AI developers:

Now that I'm deploying the very first version of P.U.R.E. with multiple Commanders on frame 1, it has come to my attention that AIs cannot handle this properly. KAIK refuses to use the two secondary Commanders, and does not issue orders. AAI uses the secondary commander, but then crashes Spring.

No debugging symbols are in the stacktrace. All I know is that AAI is crashing, and KAIK never seems to check its inventory and find the Commander, which I find a bit strange.

Tested taking the commanders and giving them a single structure they could build, that would give them E/M and allow them to build the rest of the economy. Doesn't work. Both AAI and KAIK sit around, refusing to give orders to the Commanders.

This is really borked. If the AI cannot find a mine, which is obviously what it's waiting for, then it should build whatever's available, not sit around. Likewise, for multiple builders available on Frame 1- AIs should be taking stock of what's available, not assuming that there's only one Commander, imo- this is a lot of OTA-centric thinking that's coming home to roost :P

Re: Multiple Commanders Bug, Major Commander Problems

Posted: 16 Jan 2008, 02:05
by Kloot
Your chances of getting this fixed would be a lot higher if
you provided an actual mod sample for certain AI devs to
work with, walls of text on their own don't lend themselves
to debugging very well. ;)

Re: Multiple Commanders Bug, Major Commander Problems

Posted: 16 Jan 2008, 02:51
by Argh
Oh, I know. Sorry for assuming you were omnipotent ;)

I'll pm you a link, including to the world builder demo (tho, since I don't have a working grid solver yet, it's terribly crude still :oops: ), so that the neutral units issues can get looked at. Same for Submarine, et al.

Re: Multiple Commanders Bug, Major Commander Problems

Posted: 16 Jan 2008, 15:52
by submarine
Can you send me the link as well? (I have not received a pm of you so far)

I'm not really surpised that AAI crashes, it stores a pinter to the commander (which is deleted after a unit of category "COMMANDER" dies); I didnt not think about mods with multiple coms at that time. If you send me a link until friday I hope to be able to fix it over the weekend

Re: Multiple Commanders Bug, Major Commander Problems

Posted: 16 Jan 2008, 22:12
by AF
Does NTai have this issue too?

One problem with AIs and initial units is that unless AIs actively check for the initial units theyre never told. The initial commander does not follow the unitcreated finished cycle.

How and wether this affects your lua gadget spawned units in frame 1 I dont know.

Re: Multiple Commanders Bug, Major Commander Problems

Posted: 17 Jan 2008, 01:26
by Argh
One problem with AIs and initial units is that unless AIs actively check for the initial units theyre never told. The initial commander does not follow the unitcreated finished cycle.
I'm sure this is what's causing this. Every couple of SlowUpdates, AIs should actively check their inventories, imo.

Re: Multiple Commanders Bug, Major Commander Problems

Posted: 17 Jan 2008, 16:16
by AF
No because after the initial inventory checke very unit spawning follows the same system:

UnitCreated()
UnitFinished()

The exceptions being anything spawned at the start such as commanders.

In my opinion this is an engine interface bug, and changing the interface could break the AIs too by either stopping the units ever reaching the AIs systems or having twin entries.

Then there are AIs that delay their loading till a later frame to lessen slowdown.

Re: Multiple Commanders Bug, Major Commander Problems

Posted: 17 Jan 2008, 19:18
by SinbadEV
I'm a noob when it comes to this kind of things but couldn't you fake the

UnitCreated()
UnitFinished()

calls from the lua start script or something?