• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

AI Ignoring Conditions

Status
Not open for further replies.
What would cause the AI to ignore conditions placed on priorities?

Attached is an example.

It trains two footmen despite one of the footmen having a requirement for another unit that has not been trained.

Tech 1 Only is a unit.
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    46.9 KB · Views: 130
Last edited:
Level 24
Joined
Oct 12, 2008
Messages
1,783
I honestly think its due a very trivial bug.

Im gonna suggest something as simple as change the condition from "greater than" to "greater than or equal to" and of course changing the number to 1 up from 0.
Sounds stupid I know, but the wc3 engine is known for random senseless bugs so its worth a try I guess.
 
So the wording of the conditions seems to make no difference. I discovered that it is actually following the conditions correctly. I discovered that the second Footman priority is actually causing the AI to build 2 units after the second barracks is complete.

Why is the order causing the AI to build 2?

Edit: Attached an example. It should only make one Footman as the second has a requirement that is impossible to fulfill.
 

Attachments

  • 1.w3x
    22.4 KB · Views: 66
  • Untitled.gif
    Untitled.gif
    36.7 KB · Views: 145
Last edited:
now I know the problem, coz the LAST footmen is created after 2 barracks is
complete, the other footmen will be created as well coz NO FOOTMEN IS STILL
AVAILABLE after the 2 barracks is completed, so they will be trained at the same
time therefore you should change the...

Total number of barracks completed greater than 1 to >>> Total number of barracks greater than 1

in other words, erase the COMPLETED
 

Attachments

  • AI.w3m
    22.5 KB · Views: 55
Level 15
Joined
Feb 15, 2006
Messages
851
The AI process works in this way:

the building priorities is check periodically (every second), and it check the priorities, as more the order is in the top, the more chances is that this building will be done, before everything else.

Yes, it seems a "bug" in the AI, just you have to lower the footman condition and that's ready :)

Check the example attached
 

Attachments

  • human test.zip
    499 bytes · Views: 51
Level 15
Joined
Feb 15, 2006
Messages
851
Can't open that, unknown method?

Also one of the things I'm doing is restricting unit production based on there being a single special dummy unit on the map for the player that is only added via triggers.
One question is why you require that? if it's for controlling the to train or doing something you can do it with something really intended for that purpose and is the send AI command.
 
Level 15
Joined
Feb 15, 2006
Messages
851
I have game modes that disable tech levels and so each AI file has 3 variations of the build queues and use the dummy units to restrict.

Will you re-attach the file?
hmmmm, then you can do this perfectly with the trigger SendCommand to AI.

It takes 2 arguments: command and data, both integers.

for example you define:

Commands: 2= reach tier 2; 3= reach tier 3
Data: 1 = enable; 0 = disable

So if you want that any AI reach level 3 then send via triggers this command at map init:

AI-Send AI command (3, 1)

Iv'e checked the file and it open properly.
 
Status
Not open for further replies.
Top