NTai Toolkit v0.18 UPDATE :: Adv GUI Config Builder for NTai

NTai Toolkit v0.18 UPDATE :: Adv GUI Config Builder for NTai

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

Moderators: hoijui, Moderators

Post Reply
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

NTai Toolkit v0.18 UPDATE :: Adv GUI Config Builder for NTai

Post by AF »

Image

Point and click skirmish AI config builder
Build your ideal custom AI battleplan and test it out
Designed for use by total noobs

No coding required
No textediting required

NTaiToolkit requires .Net 2.0 framework as it's a C# program.

In order to open a config in NTai toolkit you must first run NTai with the mod. This will generate a default empty config which you can open in NTaiToolkit. This is necessary for getting unitnames.

Extract into *springfolder*/AI/

note:: This is intended for users to create buildtrees for the NTai release, and is not intended for general usage as an AI.

note :: only run one instance of NTai at any one time in this version, multiple instances fo NTai will cause a boost::spritit parser exception altho it will continue as normal afterwards.

Download 0.18 here
Download 0.17 Source code here

Any feedback or questions would be greatly appreciated.
Last edited by AF on 19 Dec 2006, 06:37, edited 5 times in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

V0.16

- Rearranged a lot of GUI components slightly to make it prettier and give room for explanations and titles
- New Tasklist button now autchanges the current tasklist to the one just made
- Fixed a bug with loading unit names that instead showed universal buidl keywords
- Made unitnames also show ingame unit name and descriptions
- Added lots of expanations and hints as to howto use the program
- Added the C# source and VS project, require VS 2005 to open.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

V0.17

- Fixed a bug where eacg unitname was being displayed 3 times
- Fixed a bad crashcheck function that prevented anything being done with the tasklists.

Superfast bugfix releases ftw!
Axel
Posts: 14
Joined: 11 Jun 2006, 23:29

Post by Axel »

Hello, tried to use NTai Toolkit but to no avail. Can you supply us with a basic walkthrough on how to make good TDF files for a mod (for example EE)??
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Ok

Start a game of EE with an NTai. You dont have to play it cus it wont do anything, this is just so NTai can see the mod and generate a blank config for you.

So exit the game once the commanders appear and the NTai messages have shown up in the console.

Now Open NTai Toolkit and goto the /springfolder/AI/NTai/ folder and open the EE config that NTai made, not the one in the configs folder the one in the main NTai folder.

Now goto the tasklists page and create a new tasklist, say URCComlist, and add a few things to it say a mex a reactor another mex then a hub.

Then go into the units tab, and find the URC commander. At the side there'll be a tab control saying normal tasklists and cheat task lists. in these check the URCComlist we made earlier.

Now go back to the main page, press save, and start another EE game with a URC NTai. If all has worked right it should build the mex, reactor and hub we told it to build.

If we the go back into NTai toolkit and make a URCComList2 tasklist where it instead builds a reactor a hub and then 3 mexes, then check that tasklist too for the URC commander then you'll get a 50/50 chance. Half the time it'll use URCComList, and the other half it'll use URCComList2.

So now we have a URC commander in EE that has 2 posible tasklists to follow.

Now repeat the above for the hubs factories and builders, and you'll have a rather nifty little EE config.

Once you have the builders and factories/hubs sorted you can go about messing with the other values.

I suggest you tell NTai to autodetect scouters and attackers to save time, by checking the option in the Global Config tab (dont worry it has a label attatched to it saying thats what it does).

For the rest of you repeat the above with all the other mods.

And be sure to send me what you've made to share!

And if anyone has suggestions on howto make things easier please tell me!

I'm also considering making a helper AI so that rather than picking things from a list in NTai toolkit you instead laod a groupAI and press a record button then you just queue up in a row what you want it to do then it saves it to a file, so you can then just import into Toolkit as a tasklist and assign it a name.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

V0.18

-Added descriptions to the universal keywords in the tasklist page
-Fixed some bugs decimator found
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Post by knorke »

When I edit a config, save it and load it again, all tasklists and changes are gone.

But there are still in the file.
This is my config:

Code: Select all

[AI]
{
	author=knorke;
	version=0.1;
	message=itsucks;

	use_mod_default_if_absent=1;

	defence_spacing=7;
	power_spacing=6;
	factory_spacing=4;
	default_spacing=5;

	dynamic_selection=1;
	spacemod=0;
	hard_target=0;

	antistall=3;
	interpolate_tag=B_RULE_EXTREME_NOFACT;
	MaxStallTimeMobile=0;
	MaxStallTimeImmobile=0;

	roam= ;
	hold_fire=,gdaaat2,gdadvhfact2,gdlhelis2,gdltankc2,gdltankl2,gdltankrad2;
	fire_at_will= ,gdcom2,gdlhelimg2,gdltanki2,gdltankr2,gdltanks2;

	NoAntiStall=;
	AlwaysAntiStall=;
	singlebuild=;
	solobuild=;

}

[TASKLISTS]
{
	[NORMAL]
	{
		builder=;
		commander=startup;
		hub=;
		factory=;
		gdcom2=startup;
	}
	[CHEAT]
	{
		builder=list1;
		commander=list1;
		hub=list1;
		factory=list1;
	}
	[LISTS]
	{
		list1=b_rule,b_rule;
		startup=b_mex,b_power,b_hub - ee or nota style construction hubs,b_mex - build metal extractors,b_fortification - build a wall or barrier;
	}
}

[ECONOMY]
{
	[RULES]
	{
		power=0.7;
		mex=0.7;
		factorymetal=0.95;
		factoryenergy=0.95;
		factorymetalgap=10;
		energystorage=0.7;
		metalstorage=0.7;
		makermetal=0.5;
		makerenergy=0.7;
		[EXTREME]
		{
			power=0.3;
			mex=0.3;
			factorymetal=0.99;
			factoryenergy=0.99;
			factorymetalgap=0.7;
			energystorage=0.7;
			metalstorage=0.7;
			makermetal=0.3;
			makerenergy=0.8;
		}
	}
}
[Resource]
{
	[ConstructionRepairRanges]
	{
	}
	[ConstructionExclusionRange]
	{
		gdcom2=0;
	}
	[MaxEnergy]
	{
	}
	[MinEnergy]
	{
	}
}

The (GD) commander just sits there and says "cheating enabled"
I dont want it to use cheating.

It is impossible to find a unit in the list, the list should be sorted by tech-levels if that is possible.
Being able to change the size of the window would be helpfull too.

Otherwise nice tool, but not very noobfriendly :wink:
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

but cheating isnt enabled, irs just something jelmer made it say whenever an AI requests a cheat interrface, regardless of wether its used.

In the mean time:

startup=b_mex,b_power,b_hub - ee or nota style construction hubs,b_mex - build metal extractors,b_fortification - build a wall or barrier;

only b_hub and b_mex should have been saved, the full description is a waste.

And can you send em the NTai logs of the game where the EE commander was doing nothing?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Post by knorke »

Using the posted config it does that:
:: NTAI XE9.3 Log File
:: Programmed and maintained by AF
:: Copyright (C) 2006 AF
:: Released under the GPL 2.0 Liscence
:: Game started: 20.11.2006 19:21:4

:: Expand and Exterminate v 0.171
:: E&E Battle for the Blue Planet v0.171
:: First instance of NTAI
:: knorke
[-] < Frame: 0 >Section game\player1 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player2 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player3 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player4 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player5 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player6 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player7 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player8 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player9 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player10 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player11 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player12 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player13 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player14 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player15 missing in file buffer
:: spring_engine
[-] < Frame: 0 >Section game\player16 missing in file buffer
:: spring_engine
:: AI DLL's in game
:: AI/Bot-libs/TestGlobalAI.dll : AI :: 0
:: AI/Bot-libs/NTai.dll : AI :: 1
[-] < Frame: 0 >Section game\team2 missing in file buffer
[-] < Frame: 0 >Section game\team3 missing in file buffer
[-] < Frame: 0 >Section game\team4 missing in file buffer
[-] < Frame: 0 >Section game\team5 missing in file buffer
[-] < Frame: 0 >Section game\team6 missing in file buffer
[-] < Frame: 0 >Section game\team7 missing in file buffer
[-] < Frame: 0 >Section game\team8 missing in file buffer
[-] < Frame: 0 >Section game\team9 missing in file buffer
[-] < Frame: 0 >Section game\team10 missing in file buffer
[-] < Frame: 0 >Section game\team11 missing in file buffer
[-] < Frame: 0 >Section game\team12 missing in file buffer
[-] < Frame: 0 >Section game\team13 missing in file buffer
[-] < Frame: 0 >Section game\team14 missing in file buffer
[-] < Frame: 0 >Section game\team15 missing in file buffer
[-] < Frame: 0 >Section game\team16 missing in file buffer

[-] < Frame: 0 >logging started
KAI Metal Class by Krogothe
Metal Spots loaded from file
Metal Spots Found 58
:: Found 58 Metal Spots
[-] < Frame: 0 >Order Router constructed
[-] < Frame: 0 >DTHandler constructed
[-] < Frame: 0 >RadarHandler constructed
[-] < Frame: 0 >Planning constructed
[-] < Frame: 0 >Assigner constructed
[-] < Frame: 0 >Scouter constructed
[-] < Frame: 0 >Economy constructed
[-] < Frame: 0 >Manufacturer constructed
[-] < Frame: 0 >Chaser constructed
[-] < Frame: 0 >Initialisising
[-] < Frame: 0 >error, ntai.tdf doesnt exist, therefore the NTai data required to run NTai probably doesnt exist. Please check AI/NTai/NTai/ has NTai.tdf and other AI data and folders....
[-] < Frame: 0 >Mod TDF loaded
[-] < Frame: 0 >Mod TDF loaded
[-] < Frame: 0 >abstract == true
[-] < Frame: 0 >values filled
[-] < Frame: 0 >Arrays filled
:: Using abstract buildtree

[-] < Frame: 0 >Loading unit data
[-] < Frame: 0 >error in Global InitAI, cannot continue
[-] < Frame: 0 >boost::spirit::parser_error
spring's infolog:
Map: Tangerine.smf
Mod: "Expand_and_Exterminate_v_0.171.sd7" from Expand_and_Exterminate_v_0.171.sd7
Number of damage types: 15
TA Spring 0.74b1
Player knorke joined as 0
Switching to rotatable overhead camera
AI/Bot-libs/TestGlobalAI.dll has C++ interface
AI/Bot-libs/NTai.dll has C++ interface
AI has enabled cheating.
GlobalAI1: [-]error, ntai.tdf doesnt exist, therefore the NTai data required to run NTai probably doesnt exist. Please check AI/NTai/NTai/ has NTai.tdf and other AI data and folders....
GlobalAI1: error in Global InitAI, cannot continue
GlobalAI1: boost::spirit::parser_error
GlobalAI1: Error :: InitAI() in XE9.3 failed, please notify AF at once
GlobalAI1: Error :: http://www.darkstars.co.uk
[knorke] move you stupid dozer!
Use Shift+esc to quit
User exited
Path cache hits 0 0%
Path cache hits 0 0%
The only error I see is "ntai.tdf doesnt exist" but I think you told me to ignore that one.
only b_hub and b_mex should have been saved, the full description is a waste.
I didnt do that, I ony used the toolkit to create/edit the config.
tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Post by tombom »

AF wrote:In the mean time:

startup=b_mex,b_power,b_hub - ee or nota style construction hubs,b_mex - build metal extractors,b_fortification - build a wall or barrier;

only b_hub and b_mex should have been saved, the full description is a waste.
The toolkit saves descriptions for everything. I guess when you add stuff from the list it's just copying the item from the list, not the actual name bit.
User avatar
Erom
Posts: 1115
Joined: 25 Apr 2006, 05:08

Post by Erom »

Neat tool AF. Working on an XTA Core config now.

Ugh, same problem as knorke. I set everything up, click save, wait a few moments, quit the program. Then try to run a game, get no action from NTai, and when I reopen the Toolkit, the units have no tasklists assinged to them and the tasklists I created are all gone.

This will be really awesome once you work out the kinks, I think. Also seconded on the ability to resize the window, and to maybe have which units you have assinged tasklists too be a different color in the list? That would be awesome.
tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Post by tombom »

For some reason you always need more than one NTai in game. The first one fails with
[-] < Frame: 0 >Loading unit data
[-] < Frame: 0 >error in Global InitAI, cannot continue
[-] < Frame: 0 >boost::spirit::parser_error
The second one works. Not sure why.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Post by knorke »

Thats the info I was waiting for :shock:
Also sometimes when I load my config all tasklists are deleted which is very annoying.

At least the com is moving now.
But kinda stupid to build a hub on a metalspot and then get stuck because you want to build a mex there :shock:
User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

Now my buildtree, which was completely finished and working well, yet again needs major compatibility modifications.

:roll: :evil:
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Ok I had made an error in how I saved tasklists and stuff. I tried to prevent it writting out tags that had no contents and inadvertently stopped it from writting those tags alltogether.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I found a bug in how Toolkit generates the configs, if you produce a tasklist with no contents then it doesn append a semicolon creating a syntax error which then prevents the first NTai from loading. And since one optimization of NTai is to make the first NTai load everything then share it with the second and third, it may be impacting the seond and third NTais.
Post Reply

Return to “AI”