Multiple Commanders Bug, Major Commander Problems

Multiple Commanders Bug, Major Commander Problems

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Multiple Commanders Bug, Major Commander Problems

Post 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
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Multiple Commanders Bug, Major Commander Problems

Post 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. ;)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Multiple Commanders Bug, Major Commander Problems

Post 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.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: Multiple Commanders Bug, Major Commander Problems

Post 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
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Multiple Commanders Bug, Major Commander Problems

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Multiple Commanders Bug, Major Commander Problems

Post 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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Multiple Commanders Bug, Major Commander Problems

Post 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.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Multiple Commanders Bug, Major Commander Problems

Post 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?
Post Reply

Return to “AI”