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 poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  4. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  5. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    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.

A question about the AI editor

Discussion in 'World Editor Help Zone' started by Windu, Oct 22, 2016.

  1. Windu

    Windu

    Joined:
    Nov 26, 2005
    Messages:
    706
    Resources:
    0
    Resources:
    0
    Hi, recently I've been learning what the AI editor can do and can't do. I have managed to set up a decent AI that can rebuild its units and structures and attack properly.

    My question is: Can I make the AI do more things simultaneously? For example if I kill all of its units, it will start making only peons and after all 15 peons are done than it starts making grunts. Same with training units, it might have 2 barracks, 2 spirit lounges and 1 beastiary but only trains from 2 of them at a time. Can I make the AI use all its available training facilities to match its building priorities?
     
  2. Unregret

    Unregret

    Joined:
    Jun 15, 2016
    Messages:
    748
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Hold on a minute, you confused me. You said you made a decent AI then after that you also said you can't make it properly.

    You should try to add more conditions for training each units to suit you need. I really do not understand what you need. Make a private conversation with me, maybe i can help.
     
  3. Nowow

    Nowow

    Joined:
    Jun 15, 2016
    Messages:
    426
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    You can make an ai that does things simultaneously, but not with the ai editor.

    The build order which you create in the ai editor actually goes to an integer array which stores your building priorities. Another internal function called iirc BuildLoop then goes over the array and orders to produce the buildings/units/upgrades in the list one by one, when necessary (i.e. when it's not built and the player has enough resources and all).

    Directly regarding your question: the ai operates on something called "threads". What threads do, is they allow simultaneous actions by the ai. Your building priorities list is being updated periodically, and the building function checks for things that need producing periodically as well. These two functions operate on different threads, allowing for simultaneous action.

    I suppose you could try simulating another building priorities array by seeing how the ai functions do it, but it won't be easy...