How to get AI to train custom units?

nabbig2

New Member
Reaction score
43
I have made it so that the AI trains a peasant and builds a barracks. I also ordered it to train a custom unit from the barracks, but it doesn't train it. Why not?
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
> Why not?

Techtree requirements?
Insufficient resources?
General AI stupidity?
Doesn't want to?
Not enough food?

You could upload your AI file for me to take a look at.
I wouldn't have to see the whole map.
 

waaaks!

Zinctified
Reaction score
255
> Why not?

Techtree requirements?
Insufficient resources?
General AI stupidity?
Doesn't want to?
Not enough food?

You could upload your AI file for me to take a look at.
I wouldn't have to see the whole map.
u can try this

but we trigger our ai :p thats why its really hard

try ordering a player to train a unit
 

denmax

You can change this now in User CP.
Reaction score
155
Another thing would be, it is ordered to make the unit without Condition to.. (in gold and lumber)

Or, your barracks doesn't build it, at all..
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
> how can I fix it?

I often find that re-arranging priorities helps.
For unknown reasons....
 

nabbig2

New Member
Reaction score
43
> how can I fix it?

I often find that re-arranging priorities helps.
For unknown reasons....

So, you mean moving the priority of training the unit up? Wouldn't you have to build the barracks first?

Anyway, I tried that and it has no effect.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
> you mean moving the priority of training the unit up? Wouldn't you have to build the barracks first?

Not necessarily up.
And definitely not before the barracks has been built.
Did you make sure that particular unit is built from the barracks?
Did you import the custom unit into the AI?
 

nabbig2

New Member
Reaction score
43
> you mean moving the priority of training the unit up? Wouldn't you have to build the barracks first?

Not necessarily up.
And definitely not before the barracks has been built.
Did you make sure that particular unit is built from the barracks?
Did you import the custom unit into the AI?

Okay, I moved it back down.

I think I have imported the custom unit into the AI, but I'm not sure.
How do you do that? Thanks again, I'm new to this.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
You have to export the unit data from the map where you created the custom unit.
Then you find the Import button on the General Tab of the AI Editor and import the unit data you just exported.

My AI tutorial covers how to do that in greater detail if you get stuck.
 

nabbig2

New Member
Reaction score
43
You have to export the unit data from the map where you created the custom unit.
Then you find the Import button on the General Tab of the AI Editor and import the unit data you just exported.

My AI tutorial covers how to do that in greater detail if you get stuck.

Okay, I've imported the object data, but it still doesn't train the unit. Here, I'll upload the ai script I am using.

http://files-upload.com/files/680880/AI_creature_wars_version_1 for checking.wai

I have an idea. Well, the peasant builds a barracks. I also imported the data of the barracks, which can train the unit. So, by selecting barracks, that would be the barracks that can train the custom unit, right?
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
1. Please don't double-post. Edit your previous post. Thanks!

2. > by selecting barracks, that would be the barracks that can train the custom unit, right?

Not necessarily. The game doesn't really care what you name things.
You may have the wrong unit there.
 

nabbig2

New Member
Reaction score
43
1. Please don't double-post. Edit your previous post. Thanks!

2. > by selecting barracks, that would be the barracks that can train the custom unit, right?

Not necessarily. The game doesn't really care what you name things.
You may have the wrong unit there.

Okay, sorry for double posting.

Well, I didn't name the barracks differently. All I did was add another custom unit that can be trained from a barracks. I imported the barracks (it is not a custom unit, it just is edited), and I imported the custom unit.
It seems to work fine with training units like footmen, but it doesn't work with my custom unit.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
Yes, well.
I think it's possible you could have gotten the wrong barracks.
Can you find another one from which to choose?
If so, try that one instead.
 

nabbig2

New Member
Reaction score
43
Yes, well.
I think it's possible you could have gotten the wrong barracks.
Can you find another one from which to choose?
If so, try that one instead.

There isn't another barracks to choose from. I think it's because I didn't make the barracks as a new unit, I just edited it.

But I think it has to do with importing the unit data. I exported the unit's data by doing "export object data", and then imported it back, just like it said on your tutorial. I don't know what is wrong...:banghead:
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
Ok, it seems that I can't see your custom units when I open up your AI.

Could you upload the whole map, please?
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
It would seem that your map is protected. Or corrupted.
Either way, I can't open it in my editor.
 

nabbig2

New Member
Reaction score
43
It would seem that your map is protected. Or corrupted.
Either way, I can't open it in my editor.

Wow...that's weird, I haven't done anything to it. I just upload the warcraft file.

Is there a difference between the blue and the brown types or something?
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
> Is there a difference between the blue and the brown types or something?

Yes, but that won't prevent me from opening it.
Brown means it's a Reign of Chaos map.
Blue means it's a Frozen Throne map.

Make absolutely sure you can open it in your editor, and try uploading again.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top