NTai XE10.1b
Moderators: hoijui, Moderators
I said I'd post something about how to make a config for NTai but there isn't really much to say. Basically, each unit has one or more tasklists that it reads to decide what to do. It also decides what to do based on some other stuff, but it mostly reads the tasklist. Here is how to make a basic starting config for AA.
1) Make a new game with an NTai bot with the mod you're using.
2) Open NTai Toolkit. Choose the AA.cfg in the NTai folder in open config.
3) Choose the tasklists tab and enter a name in the New Tasklist box, say com1. Click Create New Tasklist.
4) Most of the time you'll want to use the universal keywords, which means you say generally what to do while NTai decides the specifics. I have a list which says b_power,b_power,b_mex,b_mex,b_factory,b_defence.
5) Choose the units tab and scroll to armcom. Click on com1 in the Normal Tasklists box.
6) If you start the game with NTai as ARM, you should see it will build something similar to what was put down (ie solar for b_power).
7) You can now make another tasklist for the Vechile Plant. Call it vp1 and add b_scout, armcv, armcv, b_assault, b_assault, b_assault. Look for armvp in the units list and choose vp1 as its tasklist. Ingame it should now build a Jeffy, some con units and some tanks.
8) You can now add extra stuff and tweak the settings around. Cons will automatically assist each other and will follow whatever tasklist you give them. NTai automatically stops a lot of the stupid behaviour that sometimes happens in other AIs.
Not really sure what else to say :\
1) Make a new game with an NTai bot with the mod you're using.
2) Open NTai Toolkit. Choose the AA.cfg in the NTai folder in open config.
3) Choose the tasklists tab and enter a name in the New Tasklist box, say com1. Click Create New Tasklist.
4) Most of the time you'll want to use the universal keywords, which means you say generally what to do while NTai decides the specifics. I have a list which says b_power,b_power,b_mex,b_mex,b_factory,b_defence.
5) Choose the units tab and scroll to armcom. Click on com1 in the Normal Tasklists box.
6) If you start the game with NTai as ARM, you should see it will build something similar to what was put down (ie solar for b_power).
7) You can now make another tasklist for the Vechile Plant. Call it vp1 and add b_scout, armcv, armcv, b_assault, b_assault, b_assault. Look for armvp in the units list and choose vp1 as its tasklist. Ingame it should now build a Jeffy, some con units and some tanks.
8) You can now add extra stuff and tweak the settings around. Cons will automatically assist each other and will follow whatever tasklist you give them. NTai automatically stops a lot of the stupid behaviour that sometimes happens in other AIs.
Not really sure what else to say :\
- DarkOppressor
- Posts: 59
- Joined: 14 Mar 2006, 07:53
Ok I can make this much much simplertombom wrote:I said I'd post something about how to make a config for NTai but there isn't really much to say. Basically, each unit has one or more tasklists that it reads to decide what to do. It also decides what to do based on some other stuff, but it mostly reads the tasklist. Here is how to make a basic starting config for AA.
1) Make a new game with an NTai bot with the mod you're using.
2) Open NTai Toolkit. Choose the AA.cfg in the NTai folder in open config.
3) Choose the tasklists tab and enter a name in the New Tasklist box, say com1. Click Create New Tasklist.
4) Most of the time you'll want to use the universal keywords, which means you say generally what to do while NTai decides the specifics. I have a list which says b_power,b_power,b_mex,b_mex,b_factory,b_defence.
5) Choose the units tab and scroll to armcom. Click on com1 in the Normal Tasklists box.
6) If you start the game with NTai as ARM, you should see it will build something similar to what was put down (ie solar for b_power).
7) You can now make another tasklist for the Vechile Plant. Call it vp1 and add b_scout, armcv, armcv, b_assault, b_assault, b_assault. Look for armvp in the units list and choose vp1 as its tasklist. Ingame it should now build a Jeffy, some con units and some tanks.
You can now add extra stuff and tweak the settings around. Cons will automatically assist each other and will follow whatever tasklist you give them. NTai automatically stops a lot of the stupid behaviour that sometimes happens in other AIs.
Not really sure what else to say :\
When NTai sees a builder it looks in a config and asks it for a tasklist (you can think of it as a build order if you want). It randomly picks one of these 'tasklists' you assigned the unit, then loads them all into the unit. The unit then follows this list skipping any it cant do. When the list si empty it randomly picks another tasklist and starts again.
You'll also want to go through and set all the scouters and attackers.
The Quickset page will let you see a big list of all the units and just check which ones are scouters and attackers all at once.
Troubleshooting:
Number 1:
Ecnomics and not building stuff you told it to
First of all NTai has an antistall algorithm, that can tell wether the AI can afford something or not, sort of like "If this is $5 and I have $4 in my pocket, can I afford it?". The problem is Springs resources arent working the way they should do, so turn this antistall algorithm off (uncheck Antistall algorithm on the global page), then make it cheat so it wont stall. Give it an initial handicap of say 60, that way you dont have to spend ages playtesting different tasklists to stop it running out of resources.
That 1 tip accounts for the majority of problems and issues people are having.
Number 2:
Look at the logs.
If it mentions the word "unfeasable" then its NTais antistaller algorithm saying "No we cant afford this lets skip it." Try turning Antistall algorithm off or making your AI config build mroe resources.
If it mentions "UpVector", its building placement, and Spring says it cant find a place to put whatever NTai wants to build. The best thign todo si to goto the global page/tab and reduce the values for spacing.
You should also report NTai crashes by showing me full copies of logs of every NTai running. Email them with a description to NTai'@'darkstars.co.uk
logs can be found in AU/NTai/Logs/
Number 3:
Building Spacing values and not building things you told it to.
Most people dont realize that Springs building algorithm sees spacing totally different. If we're building a krogoth gantry you assume a spacing value of 2 means I want 2 squares of free space around wherever it gets built. This is wrong. It actually means I want two krogoth gantries worth os free space around it. This is a lot. So 2 means 2*the size of a gantry footprint which is 16 not 2. So keep spacing values small.
Number 3:
Using configs from earlier versions of NTai and NTai Toolkit
This can cause errors due to syntax errors that where fixed in newer versions of toolkit.
Number 4:
Commanders waltzing into enemy territory
One of the universal keywords is b_retreat. When a unit sees this it will retreat to the nearest factory, aka return to base.
Thanks for the help tom and AF, but I'm still a little confused
I really like Nanoblobs, but the Lord (commander) doesn't build buildings. Instead, it only builds units. Well it does build only one building: the autofac, but that's not the point. I'm a little confused as to how I can actually create a tasklist that does things in the following way:
Lord
- build about say...20 sheep
- build a few autofacs
- build more sheep when there is a net loss of energy
- randomly build a few autofacs as and when it feels like it
- randomly build sheep as and when it feels like it
Autofacs
- randomly build military vehicles
I wouldn't mind sharing my configs with the community after I get more experience with NTai heh
I really like Nanoblobs, but the Lord (commander) doesn't build buildings. Instead, it only builds units. Well it does build only one building: the autofac, but that's not the point. I'm a little confused as to how I can actually create a tasklist that does things in the following way:
Lord
- build about say...20 sheep
- build a few autofacs
- build more sheep when there is a net loss of energy
- randomly build a few autofacs as and when it feels like it
- randomly build sheep as and when it feels like it
Autofacs
- randomly build military vehicles
I wouldn't mind sharing my configs with the community after I get more experience with NTai heh
- Lindir The Green
- Posts: 815
- Joined: 04 May 2005, 15:09
OK, here's how I'd do that:
In the Lord tasklist:
put 20 sheep, then a few autofacs, then a bunch of B_RULES.
B_RULE is cool because it does different stuff depending on what percentage of different resources stored you have. And you can set those percentages to whatever you want. For example, if in the B_RULE area you set the energy variable to 0.4, whenever it does a B_RULE it will check to see if the energy stored is below 40%, and if it is it will do a B_ENERGY. It does similar stuff for B_MEX, B_METAL_MAKER, B_FACTORY, ect.
In the Autofacs:
B_ASSAULT, B_ASSAULT, B_RAND_ASSAULT, repeat
In the Lord tasklist:
put 20 sheep, then a few autofacs, then a bunch of B_RULES.
B_RULE is cool because it does different stuff depending on what percentage of different resources stored you have. And you can set those percentages to whatever you want. For example, if in the B_RULE area you set the energy variable to 0.4, whenever it does a B_RULE it will check to see if the energy stored is below 40%, and if it is it will do a B_ENERGY. It does similar stuff for B_MEX, B_METAL_MAKER, B_FACTORY, ect.
In the Autofacs:
B_ASSAULT, B_ASSAULT, B_RAND_ASSAULT, repeat
The nanoblobz economy and spring unreliable resource system combien to make Antistall algorithms next to impossile. Turn fof the Antistall algorithm for nanoblobz, past experience says that you wont get anywhere with it turned on.
The same is true of any mods where litle storage is involved or the game mechanics involve lots of spamming, such as Nanoblobz or CvC.
The same is true of any mods where litle storage is involved or the game mechanics involve lots of spamming, such as Nanoblobz or CvC.
Can someone help me debug NTai? I cant get mingwq32 to debug as now it just hangs before it even starts spring, Visual studio 2005 builds say incorrect AI dll then crash, and all builds of spring crash randomly on my PC due to nvidia driver bugs.
Ontop of that I have no configs to test NTai with, nothing, zilch, any NTai I tried to test with would sit there and do nothing.
Thus untill nvidia fix their drivers, and spring finally accepts NTai in Visual studio 2005 builds, I'm seriously f*cked when it comes to progress on correcting NTai bugs, or even progressing with NTai at all.
Anyone interested just say so and I'll upload the source code.
Ontop of that I have no configs to test NTai with, nothing, zilch, any NTai I tried to test with would sit there and do nothing.
Thus untill nvidia fix their drivers, and spring finally accepts NTai in Visual studio 2005 builds, I'm seriously f*cked when it comes to progress on correcting NTai bugs, or even progressing with NTai at all.
Anyone interested just say so and I'll upload the source code.
The reason you get incorrect GlobalAI errors when building with VS is because of ABI differences between GCC and the VS compiler (unless of course you build all of Spring with VS as well), and those aren't going to disappear no matter how many times you press the compile button.
Is the NTAI source Linux-compatible?
Is the NTAI source Linux-compatible?
yah its linux compatible as far as I'm aware, and I know about ABI differences.
However what puzzles me is that this error is with a VS2005 build of NTai + VS2005 build of spring. They should hook up but they dont.
I would use the C API but the C API is incomplete and has inomplete C++ wrappers, no cheat interface, little to no documentation, and no groupAI interface
However what puzzles me is that this error is with a VS2005 build of NTai + VS2005 build of spring. They should hook up but they dont.
I would use the C API but the C API is incomplete and has inomplete C++ wrappers, no cheat interface, little to no documentation, and no groupAI interface
for whom ever wishes to find the line or cause of the crashbug:
http://www.darkstars.co.uk/randomfiles/AI.zip
http://www.darkstars.co.uk/randomfiles/AI.zip