Page 2 of 3

Posted: 25 Nov 2005, 00:43
by genblood
I've tried your latest build 28b5 and the commander still just
stands around and do nothing. I'm using the latest build of
TA Spring and the map I'm using is Appleville-Two.

Posted: 25 Nov 2005, 19:52
by AF
Have you tried on another map and checked AIlog.htm?

I'm trying to track down a memory leak, not coming along too well with having todo ICT coursework.

Posted: 26 Nov 2005, 17:24
by AF
Image

Downlaod here

As you can see I got building workign again. Somehtign someone said about virtualdesctructors got me thinking so i added virtual to every destructor and hey presto NTAI started buildign ok again, and ontop of that ti attempted to build as much of tis build tree as possible, much mroe than before.

I also ntoed that there appeared to be a mistake in the attack code

Code: Select all

int* ux = NULL;
int unum - G->cb->Getenemyuntis(ux);
should have been

Code: Select all

int* ux = new int[10000];
int unum - G->cb->Getenemyuntis(ux);
I also changed the Global class so now agents can access Global ai callback, AI callback and cheat interface.

I also added code from the cursor groupAI for debugging purposes.
The likelihood of cosntruction untis sitting there doing nothign has gone down a lot, I added code that kicks them abck into life if they idle around when they're nto supposed to.

This doesnt take effect hwoever in the case of the onyl existign bug I know of. For some reason fi cains metal class returns a fail then the tasks system generates an exception and the unit stalls and does nothing till the player intervenes.

I also modified the comamdners build tree to suit the new changes. NTAI will build 2 kbot labs at the start instead of one and builds more metal generating structures to compensate. NTAI will also build adv solar collectors when running under AA. If someone could look at the build tree and suggest changes for AA, just add a line and change the name, if its an AA unti and it isnt an AA game then NTAI ignores it.

Posted: 27 Nov 2005, 17:23
by AF
NTAI beta 7

Downlaod here

This version has tweaked attack code that draws results from the cheat interface. It has also had its build code modified to use any race I define a build tree for. To show this I've added lvl1 & lvl2 support for both Arm and TLL. I gave a preliminary version to aGorm yesterday to show this, but it didnt have all the checks this version had and had the beta 6 attack code. It also had only basic lvl 1 support which has been extended.

In the mean time I'll be looking for more mod support, perhaps I shall look inot WD and SWTA, but so far I've heard nothing about any mod support save from noize and caydr, of which kbots will build adv solar collectors in AA and the build tree has been modified so it doesnt stall in AA either (as a result it wont stall in OTA or UH either).

Also note that th mex bug may not occur as much but it is prolific on the map alaska, which I'm working on.

Posted: 27 Nov 2005, 18:08
by Keiichi
I just tried beta7 on 4b_facility. NTAI was core and just building mexes and not building any form of energy generating objects (except for a mini fusion after 40 minutes).

And it did not attack in any form, but was happy building units until reaching the unit limit.

Also it never build any VecPlant or any plane, though it produced aircraft plants.

(Same result also on s2s)

Posted: 27 Nov 2005, 18:14
by AF
NTAI TLL built solar generators on Alaska this morning.., I'll take a look into it, maybe if you could pass on the AILog.htm? A copy of AILog.htm is far mroe useful than any description you give withotur eferring to source code.

Posted: 27 Nov 2005, 18:31
by Keiichi
I think i got the interesting part of it for you :

[42:51] unitdef loading failed Tunit::AddTaskCORSOL
[42:51] unitdef loading failed Tunit::AddTaskCORSOL
[42:51] unitdef loading failed Tunit::AddTaskCORSOL
[42:51] unitdef loading failed Tunit::AddTaskCORSOL
[42:51] unitdef loading failed Tunit::AddTaskCORSOL
[42:51] unitdef loading failed Tunit::AddTaskCORSOL
[42:51] unitdef loading failed Tunit::AddTaskCORSOL
[42:51] unitdef loading failed Tunit::AddTaskCORADVSOL
[42:51] unitdef loading failed Tunit::AddTaskCORSOL
[42:51] unitdef loading failed Tunit::AddTaskCORSOL
[42:51] unitdef loading failed Tunit::AddTaskCORSOL

[52:43] enemy entered LOS yet it isnt giving good co-ordinates?=s
[52:43] enemy entered LOS yet it isnt giving good co-ordinates?=s

Entire log here.

Posted: 27 Nov 2005, 18:32
by AF
aha

my mistake it should be CORSOLAR

*goes to recompile*

Posted: 27 Nov 2005, 18:37
by AF
http://www.fileuniverse.com/?p=showitem&ID=1887

Fixed, this problem didnt affect Arm and TLL though

Posted: 27 Nov 2005, 21:48
by Targ Collective
Well, the good news is that Core build solars now. The bad news is NTAI just spent two hours or so pumping out units on my machine, without sending them to attack.

Scouts were not part of the problem, of course, they (as always) scattered properly. NTAI didn't seem to register the fact that my Commander was standing around doing nothing all day and just built Kbots. I can only assume that it kept building its first attack force without sending it at any point, possbly due to an unclosed loop or something.

Posted: 28 Nov 2005, 08:53
by Keiichi
Not exactly.

The problem is this

G->cb->GetUnitPos(enemy);

in Chaser.cpp giving no coords (ZeroVector) to the Ai. So it never knows where you are.

Posted: 28 Nov 2005, 11:59
by Targ Collective
Might be an idea to revert to the attack code you were using beforehand, Alantai, in that case. At least we know for certain it will work, even if it does lock onto 0,0,0...

Is it possible that in voiding these co-ordinates, your AI has gone inert?

Posted: 28 Nov 2005, 12:24
by Keiichi
Alantai is just ignoring these faulty coords in the newer versions. At least (without looking at the old versions) thats the only difference in the attack codes i think.

Posted: 28 Nov 2005, 15:21
by Targ Collective
Apparently .cheat is supposed to enable the attack code. I'm not sure how this works, and I spent the whole game in Observer mode so I'm a bit confused...

Posted: 28 Nov 2005, 20:18
by AF
The attack code in the version i released last was hacked.

The attack code as ti stands now ignroes the sights array compeltely, and goes for the cheat itnerface. Thus if the suer ahs typed .cheats it gets given an array foe very enemy unit on the map in LOS or not. It then uses the cheat interface again to detect the position and send the untis there.

The problem was the attack code should work but in theory it does, in implementation it needs to be far more robust.

For that sake I am curious as to how I will replace the code.

Image

Posted: 28 Nov 2005, 20:22
by NOiZE
i tried it on a few maps,

Comet catcher
Painted desert

And they always just stand there doing notting

Posted: 28 Nov 2005, 20:25
by AF
Take cotnrol fo the comander manually and tell ti to stop several times, does ti burst into life? Check the AILog.htm for me and se eif it has somethign about cains metal class. The majority of stops in the code seem to be coming from mishandling of an error message cains class gives.

Posted: 29 Nov 2005, 05:27
by DeathHawk
NOiZE wrote:i tried it on a few maps,

Comet catcher
Painted desert

And they always just stand there doing notting

I tested it on those exact same maps and the same thing happends to me and i also tried using Differnt teams like ARM and TLL all The commanders Just sit there

Posted: 29 Nov 2005, 06:24
by Keiichi
I can confirm it on Cometcatcher. The com builds a mex and a solar and then stops.
Here is the (probably) the reason for it :

[00:37] nearest metal patch returned bad
[00:37] Exception, UnitIdle

If you enable cheats before it has finished its first building everything runs fine.

Posted: 29 Nov 2005, 09:36
by Keiichi
Some other problems :

[02:23] unitdef loading failed Tunit::AddTaskCORADVSOL

[02:40] error unitdef failed e e├é┬¿e├é┬¿e├é┬░e├é┬░e├é┬©e├é┬©e├âÔé¼e├âÔé¼e├â╦åe├â╦åe├â┬Ée├â┬Ée├â╦£e├â╦£e├â┬áe├â┬áe├â┬¿e├â┬¿e├â┬░e├â┬░e├â┬©e├â┬©e