1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

AI Ignoring Conditions

Discussion in 'World Editor Help Zone' started by Kam, Jan 13, 2012.

  1. Kam

    Kam

    Joined:
    Aug 3, 2004
    Messages:
    2,630
    Resources:
    23
    Models:
    8
    Icons:
    2
    Maps:
    13
    Resources:
    23
    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.
     

    Attached Files:

    Last edited: Jan 13, 2012
  2. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    it can only ignore if the condition is false, if its null then it cant ignore it or stalemate...
     
  3. Kam

    Kam

    Joined:
    Aug 3, 2004
    Messages:
    2,630
    Resources:
    23
    Models:
    8
    Icons:
    2
    Maps:
    13
    Resources:
    23
    So how would the above be restructured?
     
  4. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    check your Tech1 maybe its true...what is Tech1?...
     
  5. Kam

    Kam

    Joined:
    Aug 3, 2004
    Messages:
    2,630
    Resources:
    23
    Models:
    8
    Icons:
    2
    Maps:
    13
    Resources:
    23
    Tech 1 Only is a unit.
     
  6. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    wait I didnt see that you created 3 footman, 1 with the condition 2 without so oviously
    it will create 2 footman since Tech1 is false...
     
  7. Kam

    Kam

    Joined:
    Aug 3, 2004
    Messages:
    2,630
    Resources:
    23
    Models:
    8
    Icons:
    2
    Maps:
    13
    Resources:
    23
    I'm not sure I understand. I have only created two footmen priorities.

    When I test this in game it makes two Footmen. It is ignoring the condition for a Tech 1 Only to exist.
     
    Last edited: Jan 13, 2012
  8. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    sorry my mistake, I read it wrong, I thought it was like this...
    Footmen = 1
    Footmen = 2 <<< correct
    Total: 3 <<< wrong

    check your map maybe your condition is true or you have a Tech1 somewhere...
     
  9. Kam

    Kam

    Joined:
    Aug 3, 2004
    Messages:
    2,630
    Resources:
    23
    Models:
    8
    Icons:
    2
    Maps:
    13
    Resources:
    23
    I don't, that's the issue. The only way that unit gets added is through triggers that require commands to be entered.
     
  10. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    that's really not possible, give me the object data and the ai file and I'll take a look tonight...
    gotta go, I have work...
     
  11. Kino

    Kino

    Joined:
    Oct 12, 2008
    Messages:
    1,677
    Resources:
    18
    Models:
    5
    Maps:
    13
    Resources:
    18
    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.
     
  12. Kam

    Kam

    Joined:
    Aug 3, 2004
    Messages:
    2,630
    Resources:
    23
    Models:
    8
    Icons:
    2
    Maps:
    13
    Resources:
    23
    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.
     

    Attached Files:

    Last edited: Jan 14, 2012
  13. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    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
     

    Attached Files:

    • AI.w3m
      File size:
      22.5 KB
      Views:
      36
  14. Kam

    Kam

    Joined:
    Aug 3, 2004
    Messages:
    2,630
    Resources:
    23
    Models:
    8
    Icons:
    2
    Maps:
    13
    Resources:
    23
    It still trains 2.
     
  15. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    I dont think so coz Ive tested it & it looks fine, but there are a lot of things that will work,
    like this...

    Total number of Tech1 completed greater than 0 and Total number of footman completed greater than 0
     
  16. Kam

    Kam

    Joined:
    Aug 3, 2004
    Messages:
    2,630
    Resources:
    23
    Models:
    8
    Icons:
    2
    Maps:
    13
    Resources:
    23
    I downloaded the map you posted, opened it in the editor, hit Ctrl+F9 and got two footmen:

    So is this a version issue or something?

    World Editor: 1.21b 6052
    Game: 1.26.06401
    Using NewGen
     

    Attached Files:

  17. moyackx

    moyackx

    Joined:
    Feb 15, 2006
    Messages:
    791
    Resources:
    7
    Maps:
    4
    Spells:
    2
    Tutorials:
    1
    Resources:
    7
    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
     

    Attached Files:

  18. Kam

    Kam

    Joined:
    Aug 3, 2004
    Messages:
    2,630
    Resources:
    23
    Models:
    8
    Icons:
    2
    Maps:
    13
    Resources:
    23
    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.
     
  19. moyackx

    moyackx

    Joined:
    Feb 15, 2006
    Messages:
    791
    Resources:
    7
    Maps:
    4
    Spells:
    2
    Tutorials:
    1
    Resources:
    7
    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.
     
  20. Kam

    Kam

    Joined:
    Aug 3, 2004
    Messages:
    2,630
    Resources:
    23
    Models:
    8
    Icons:
    2
    Maps:
    13
    Resources:
    23
    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?