CreateGroup function

CreateGroup function

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

Moderators: hoijui, Moderators

Post Reply
User avatar
tow_dragon
Posts: 45
Joined: 05 May 2006, 13:53

CreateGroup function

Post by tow_dragon »

I have a big problem. I don't know how to use this function. please give me some examples. When I had tried some arguments, Spring crashed. Help!!!
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Try not to use groups, assigning groupAI's to units isnt that good an action, and since I seem to be the only other person to have tried it, and I tried it nearly a year ago with the central build groupAI and TAI the results wherent nice at all.
User avatar
Rafal99
Posts: 162
Joined: 14 Jan 2006, 04:09

Post by Rafal99 »

CreateGroup() and probably other group functions are bugged in the current release of Spring, and they crash if you try to use them. Although it was fixed and will work properly in the next Spring release.
Download and compile Spring source from the SVN if you want to use those functions now.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Building units in the next svn release is borked. There are better ways of doing what can be done with creategroup() so use the current source for 0.72b1 instead.
User avatar
Rafal99
Posts: 162
Joined: 14 Jan 2006, 04:09

Post by Rafal99 »

Why do you think building units is borked? I don't have any problems running an ai with Spring from the SVN.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Neither AAI nor NTai work with the latest SVN build for me or submarine or hollowsoul and a few others as far as we're aware when using the AAI 0.7 or the NTai in the svn regardless fo linux/windows.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

Actually AAI kinda works in svn.
Suffers from building buildings ontop of units (or other buildings). Need to change the cases for some of the conf files /directorys though.

Tried latest NTAI from svn still same :( no power buildings & just spams Construction units & defense buildings :(

Oh well back to tagged released with AAI & NTAI 7.5 for me
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hollowsoul, can you change the define in include.h to turn on extreme logging then create a quick game and send me the log?

I think it's uncommenting TNLOG that'll do it.

That code still works in 0.72b1, I'm guessing something changed either in the CommandAI/UnitAI or something changed in UnitDef.
User avatar
Rafal99
Posts: 162
Joined: 14 Jan 2006, 04:09

Post by Rafal99 »

There are many additions in UnitDef and WeaponDef since last release (limited fuel for example), that can make current AIs uncompatible.

There is also some bugs fixed:
- attack commands are now cancelled when enemy goes outside los, which may affect some AI's attack systems
- CanBuildAt can no longer detect enemy buildings outside los, which probably is cause of "building on top buildings" bug.
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

Rafal99 wrote:There is also some bugs fixed:
- Attack commands are now cancelled when enemy goes outside los, which may affect some AI's attack systems
I can see aircraft targeting being completely screwed up (they├óÔé¼Ôäóre constantly getting in and out of LOS), same with any microing behaviour that keeps units at max range.
- CanBuildAt can no longer detect enemy buildings outside los, which probably is cause of "building on top buildings" bug.
This if anything will worsen that bug. Enemy building exists (mex, hidden camera near its base, anything really), AI doesn├óÔé¼Ôäót detect it, tries to build on top of enemy (that bug if you look was usually only limited to allied units). In fact i cant possibly see how this can help the problem, since all it does is limit the amount of info received. Its a step forward but if i can keep the old one (possibly in the cheat interface) it would be appreciated.

I could be wrong, but it seems like this will break normal human gameplay (the attack bit certainly will, bombers forgetting their targets etc), possibly most AIs and certainly KAI, which just means ill have to write extra code just to bring the old functionality back(KAI probably has half of the spring code in it anyways so i guess a couple hundred lines wont hurt much :?). Now if the current SVN really breaks AIs, cant we just have the interface commands properly added (handlecommand is starting to get bloated), and be able to keep the old commands as well has having the new ones in case of attack and canbuildat?
I find handlecommand overrated, it seems each release breaks the AIs anyways, and devs are likely to re-release to make use of any new features added. With AIs in the svn handlecommand just looks like an ugly fix to a problem that doesn├óÔé¼Ôäót even exist, though I├óÔé¼Ôäóm speaking for myself here i guess...
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

That's because it's not the full solution, the other part is for all the information passing through an API like handlecommand and getproperty, and the AIs stopping to use springs internal headers and the UnitDef* structure.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

- attack commands are now cancelled when enemy goes outside los, which may affect some AI's attack systems
If UnitIdle() isnt called when the enemy goes out of LOS then this will be a disaster for NTai.

Also I'd like to see more information on what changed in UnitDef that could break the AI's
User avatar
Rafal99
Posts: 162
Joined: 14 Jan 2006, 04:09

Post by Rafal99 »

krogothe wrote:
Rafal99 wrote:There is also some bugs fixed:
- Attack commands are now cancelled when enemy goes outside los, which may affect some AI's attack systems
I can see aircraft targeting being completely screwed up (they├óÔé¼Ôäóre constantly getting in and out of LOS), same with any microing behaviour that keeps units at max range.
Oops, my mistake: Attack commands are cancelled when enemy goes outside radar.
But probably this will broke a lot of stuff anyway. Devs are thinking about better solution to it.

krogothe wrote:Now if the current SVN really breaks AIs, cant we just have the interface commands properly added (handlecommand is starting to get bloated),
I am working on a small patch to the interface (i have wrote one already), and i am thinking about moving some stuff outside of GetValue() funtion, which is bloated the most. I am also planning to add GetValue(), GetProperty() and HandleCommand() functions to CAICheats too. First of all, i will need to ask the devs if they agree.
But now (in 2 hours exactly) i am going on vacation for a week, so i will continue the work when i go back.

And btw you can write a patch too! :wink:
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

pah, another excuse to delay 0.73b1 and not figure out why AI's are broken *lets wait till rafar's back and finsihes his patch*
Post Reply

Return to “AI”