Tuesday, May 6, 2008

It's Alive, Aliiiiiiive!

I stared into the Abyss of AI and found it staring back! Once they released me from the asylum, I discovered that the AI editor isn't used for custom maps at all. An AI system for this map would need to be totally trigger driven (!!!) which means lots of work.

During my research I also came to realize how important it would be to have some "automated testers" and also how important AI is for a finished product. I decided that it would expand the scope of the map significantly but it would be worth it. I was really happy to learn that heroes will use custom skills fairly well on their own, which removed a big chunk of control logic from the scope.

The AI has a sort of hierarchy of needs that goes like this:
  1. Stay Alive
  2. Defend Gates
  3. Navigate
  4. Spend money
  5. Level-up
I'd estimate the progress in each of those areas to be:

  1. Stay Alive - 80% - needs melee hero adjustment
  2. Defend Gates - 0%
  3. Navigate - 80% - 1 bug where heroes lose move orders
  4. Spend money - 60% - works for the black kingdom, only a little for free peoples
  5. Level-up -100%
Melee heroes (1) have a hard time staying alive since they are so aggressive. I'll put in some logic to have them stand back and soak free XP at lower levels. Defending gates (2) should be straight forward. There is one navigation bug (3) left where custom trigger skills are overriding move orders. Spending money (4) works for the demon gate upgrade system and potions. The Free People money system is next on my list to put in. I had to think long and hard about the leveling system (5), but it is now working for each hero. Both spending and leveling will require updates as new items and heroes are implemented, but it doesn't take much and the rest of the AI should stay autonomous (ha).