NTai XE10.1b - Page 6

NTai XE10.1b

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

Post by Argh »

I'll try that out asap, sounds great AF, good work :-)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Hands Argh the 200th cookie handed out *sparks fly and glitter and confetti cover argh, as he's presented with a trophy by two dazzling young ladies, and a cheesy american gameshow host with buck teeth, a snazzy suit, and mouldy toupee*
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

ahk, to get XE working like 0.29d you need to either extract the text files from NTAI XE.sdz and place them in a makeshift NTAI folder in your spring fodler (not c:\program files\taspring\aidll\globalai\NTAI, but C:\Program files\TASpring\NTAI\

That or you stick the NTAI fodler in NTAIXE.sdz into the XTA_SE_v66.sdz and repackage it.

I reccomend you do the latter if your going to experiment with other mods...
User avatar
sintri
Posts: 55
Joined: 30 Nov 2005, 18:38

Post by sintri »

0.29d disappeared from the file universe
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

It should still be there, unless me doing an upgrade on ti buggered it, the link at darkstars.co.uk not working fullstop?!

=s

Eitherway if you get the textfiles in the XE in the right place then it should work the same as 0.29d but with a little change in construction kbots/vehicles sicne their build trees where flattened out...

Ahk krogothes released v2 of his mex class, I may be forced todo an XE 2 ahk ahk ahk ahk

Otherwise I've bene doing more research into figuring out howto implement a voronoi diagram system in NTAI
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hmmm

Whois experimenting with XE atm? What mods have been verified to work with it that didnt work with 0.29d?

Also about a possible XE 2 what would you want definable in it? Simple small thigns that would go a long way.. I already have several additions to make

- triangle markers for certain things
- experimental GUI interface/debug console
- V2 Krogothes metal class
- A change to how NTAI spaces water buildings (yes NTAI supports using water untis and has doen sicne v0.27 or lets say the last 15 versions of NTAI)
- A bit that shows a surprise goodie if anybody makes a TA:FF buildtree and blasts the myth that XE is incompatible with mods that use flying builders
- Saving image files to a format other than TGA

But do you want this? I'm getting worried by the lack fo responses and feedback, all I have is a yay from Argh, an I'll get on ti from smoth, and a report on mex placement on PCB being better with NTAI than OTAI....
User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post by Maelstrom »

Oh ill have a go with the FF build tree. Ive only ever played FF once, but ill have a go anyways :P
Rescue Toaster
Posts: 1
Joined: 10 Feb 2006, 03:45

Post by Rescue Toaster »

I copied the NTAI subfolder (and its contents) into xta_se_v066.sdz, but the AI still won't build anything.

That is to say, xta_se_v066.sdz contains a folder named NTAI (along with all it's other folders) and inside that are all the files. I start a game on any map w/ NTAI XE set as the AI, either core or arm, it builds nothing and just stands there.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

I tried to do a buildtree for SWTA, but AI commander won't build anything. I rechecked several times that all the units mentioned in the buildtree were valid, that scouters.txt and attackers.txt were present - no luck.
NTAI folder was places inside the mod archive, then I placed it in the main Spring folder - still no luck. Log says something about "failed loading unitdefs" several times (maybe not exactly that, can't check it now as I'm at work), and if I try to use supplied XTA NTAI buildtree with XTA, same thing happens - CORE commander just stands there doing nothing, logs says the same.
I'll post logs and my attempted SWTA buildtree later if that's needed.
User avatar
GrOuNd_ZeRo
Posts: 1370
Joined: 30 Apr 2005, 01:10

Post by GrOuNd_ZeRo »

The log states the following when trying XTA:

InitAI finished
[00:00] Assigner::Unitfinished
[00:00] unit given build queue of zeroCORCOM

it builds nothing, it occasionally moves, either to metal patches or some other spot but builds nothing, no real error messages, but the zeroCORCOM is quite odd...there might be an error on how NTAI reads these text files, I am guessing AF didn't test his creation yet :P
User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post by Maelstrom »

Or forgot to include the instructions on how to install it correctly.

Or, for that matter, any documentation at all...
jolt8me
Posts: 17
Joined: 03 Feb 2006, 13:34

Post by jolt8me »

i tried it out also. It didnt build anything. just sat there. If it had worked i would have said something. thats why i didnt post anything eventhough i tried it.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I've sene that, i playtested an hour ago and got the same results so I went to the release version fo XE and same results, very annoying since I playtested this and got good results.

So I added lots and lots of checking and found that when unitfile says CORALAB, CORALAB is not what the AI reads once it's gone through the whole process, it was followed by random letters signifying a memory management error, however my code hadnt changed sicne the test where I'd gotten it working fine.

For XE 2 I am thinking I will make it load from an NTAI folder in the spring fodler in the format NTAI\modname\unitname.txt if I cant figure out what's gone wrong =s.

The onyl thing that is different between the version i released and the version I playtested was the removal of an algorithm i had that prevented untis being built if they where in silly situations such as a factory when in nanostall of the format

bool feasible(UnitDef* ud, int builder){

/* commented out code */
return true;
}

which should affect it since it has always been commented out and always returning true since 0.28.7 (the algorithm isnt commented out in the source I released though, it being the onyl difference between the source and release).

I'll have a fix tomorrow with a few extras to make up.
User avatar
GrOuNd_ZeRo
Posts: 1370
Joined: 30 Apr 2005, 01:10

Post by GrOuNd_ZeRo »

No no no! you have to fix it now...Noowww...!

hehe, well I apriciate you making a version that works on all.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

mwha, I have so little time elft online (1 minute), And I gotta integrate krogs metal class again
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

This version laods from NTAI\modname\unitname.txt as can eb seen.

The installer will do all the nasty stuff for you and you can edit them midgame and the units that the AI builds onwards will get the new buildtree rather than the old one.

A few logging tweaks, aswell as krogothes v2 of his metal class.

Although, dotn delete modfolders without removing their entries from modfolders.txt otherwise you risk crashes, and dotn add entries without adding folders either.

unitname.txt being non-case sensitive unles sudner *nix.

You can also add a build queue to a unit type that didnt have one midgame and all existing units will be assigned and they should burst into life
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

NTAI buildtrees

Stick that in your NTAI folder, it contains a full nanoblobz buildtree (untested), an incomplete Gundam buildtree (tested), a copy of the XTA buildtree for XTA pimped edition, and the same for AA 1.42 which needs a lot of tweaking. SWTA and WD have skeleton buildtrees which dotn do anything.


Notes on making buildtrees

I've noticed there are several big no nos

- Having a buildtree with a single unitname listed, it'll lead to the unit being given the order over and voer again, which in a factory would elad to somethign like 5 per second being queued.
- Bad unitnames, unitnames inside the textfiles are case sensitive, and very finnicky, they have to be perfect
- Plan far far ahead if it isnt a factory, units will only get one build queue, make ti last
- Scouters.txt crash, never resave scouters.txt to include a new unitname if there are already units of that type on the battlefield. As soon as that unit finishes a command and becomes idle it'll crash if it's been added to scouters.txt while it was moving.

Also on speed metal, you'll get horrendous lag in the first 20 seconds, but you'll be fine afterwards. It's todo with those rotating triangle markers over the mex spots at the beginning
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Strange building placement

Post by yuritch »

I tried NTAI XE 2 with my SWTA buildtree and it mostly works, except for 1 thing: AI builds EVERY BUILDING on top of metal patches! (this includes power generators and factories too, alongside with mexes).
Another problem is that AI often abandons unfinished buildings: Con. Droid starts to build a Vehicle Plant (or anything that takes more that 20 seconds to build), then abandons it and goes to build a mex (or whatever is next in its buildtree).
Map: Comet Catcher, mod: StarWars01.sd7. If you need my buildtree, I can probably upload this too.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hmmm, the very nature of how the NTAI buildsystem is completely different to OTAI/AAI/JCAI fundamentally in concept. That is why I have never suffered from that bug befor using the current system (some of you who remember NTAI 0.1 will know that the simplistic build system there did this).

As for building ontop of mexes, there is nothing I cna do really without coding a building algorithm and the onyl one I have instantly available is OTAI's algorithm, btu I've seen OTAI build solar on a mex spot on altored divide, so ti isnt perfect, and I havent the time to sort it out in this version since it's a 0.3 feature that has yet to be finalized.

hmm now I reread, can you check that SWTA hasnt setup every building to be a metal extractor with tiny radius and extracting ability? Or that they have some mex related tdf?
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

I checked all SWTA FBIs and the only ones to have ExtractsMetal are both side's mexes and adv. mexes. Maybe there are some other tags responsible for this?
The problem is not that AI builds SOME buildings on metal spots, it's that it builds ALL its buildings there. Only when there aren't any free spots nearby it starts to build things near them. So far I have seen all buildings (power, factories, radars) except defences built on metal spots. AI tries to place defences away from metal spots, but builders usually abandon them before they are ready.
I uploaded my SWTA buildtree (Empire only, should build everything useful to it, still far from optimal) and 3 SWTA FBIs as examples of mex and not-mex SWTA buildings: Imperial mex, Imperial Barracks and Imperial Fusion Generator (they have fusion as base power plant, like OTA solar). The archive is here, link should be valid for a week.
Post Reply

Return to “AI”