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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Join the 6th Melee Mapping Contest for a chance to have your map featured in this year's Hive Cup!
    Dismiss Notice
  4. Shoot to thrill, play to kill. Sate your hunger with the 33rd Modeling Contest!
    Dismiss Notice
  5. Do you hear boss music? It's the 17th Mini Mapping Contest!
    Dismiss Notice
  6. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  7. 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.

The Unit AI

Discussion in 'The Oakwood Forest' started by Sephalo, Aug 20, 2012.

  1. Sephalo

    Sephalo

    Joined:
    Oct 12, 2007
    Messages:
    1,791
    Resources:
    0
    Resources:
    0
    The unit AI is a thing I've been working on for a while, but it's getting pretty neat right now.

    Currently every area has a list of things that will keep that area alive. All of those things will start running whenever a player enters the area (to avoid letting units do things when nobody can see it anyway.)

    I devided the AI things into subgroups in the map. Not that it matters. It's just the way I handle things and keep it easy to manage. It currently takes nearly no time to add/remove/change something to the AI for units in a specific area.
    Here are the subgroups:
    - Battlegroups
    - Hero AI
    - Small Chat Sounds
    - Events
    - Misc

    Battlegroups:
    Battlegroups are groups of units that are ordered to walk a certain path and attack enemies. With a nice system I can order units to walk a specific path with lots of (random) variations in it while they will attack enemies when they come across them. Battlegroups always start with a sound. So per example, if a group of footmen starts to move, their captain will call out something like "To Arms!!!".

    Hero AI:
    There are multiple Hero's in every area. Usually they're questgivers, which means they would have to stay where they are or always return to that spot when they're done with an order. With this I can make sure Hero's will always return to their initial spot while they don't force this too much. They prioritise enemies above standing ground.
    I also added various abilities to each hero. Most NPC's also have a healing ability to heal nearby players that need it.

    Small Chat Sounds:
    When you click on a computer owner unit you will always hear a sound.
    If it's an enemy, it's usually a taunting sound. If it's an ally it's usually something friendly.;-)

    Events:
    Every area has specific events that will be available as soon as a player enters the area. Some events order units/hero's to behave different.

    Misc:
    Some things don't happen at every area. Per example: A goblin Thief quest giver is hiding somewere (invisible) next to a tree. Whenever enemies approach him he will remain hidden unless they're low health. Whenever an ally approaches he will become visible; allowing the player to talk to him.
    Some quest givers also only stand at a specific spot at night. So some quests cannot be done at day or night time.. Think about some undead classes per example. Some of them would highly prefer the night.;-)


    I might come with some movies/screenshots about the battlegroup movement soon.