• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Create an AI for ARENA map with GUI/Triggers system

Status
Not open for further replies.
Level 4
Joined
Jan 1, 2016
Messages
77
How can i create an AI for my arena MAP?
I want the AI to enter in game, select a hero (Using the Circle of power system, where you have an spirit and you should walk into a circle, like ANGEL ARENA map), walk, attack, use defensive and agressive spells.

"AI or Artificial Intelligence is something that in my opinion (IMO) should be present in every map." - Sentrywiz in hiveworkshop tutorials.

I agree with this quote, but i can't make it true, only with help! Anyone could teach me? Step by step.


with the GUI system.
 
Level 10
Joined
Feb 22, 2008
Messages
619
Teach you step by step how to make an AI in GUI?
That's an interesting proposition, but there is lots of information already present on The Hive for you to use!

In the thread How to create a fully work AI?, Dr Super Good gives a great big reply that I'm sure you would find insightful, along with later comments.
Without delving into that thread, I would simply say that you need to create a system for assessing surroundings and responding to them periodically. My advice would be to read Dr Super Good's comments and come back with a more specific goal.
 
Last edited:
Level 12
Joined
May 22, 2015
Messages
1,051
I think it's the same guy. He made an angry thread talking about IcemanBo which I assume got him banned. His join date is this month and he is called FiremanBO haha.

Anyway, I have been mulling over the possibility of adding AI to my hero defense map. I read some stuff about AI systems and it is not too hard to get started.

You'd want a main decision loop that basically assigns the AI a goal. At first, this loop can just tell them one thing all the time. However, for my map, a few of these goals would be:
- Go get items (go to the shop area and spend money if there)
- Farm (find a spot to kill lots of enemies)
- Protect the king (in my map, you lose if the king dies)
- Fight a boss (there are bosses that spawn in various lanes so players should be trying to help kill them)
- General combat (I plan to add a danger assessment where the AI tries to find out if it's in a bad spot and where a safer spot is - this would be based on enemies and allies nearby and probably general distance from the fountain)

As an example, maybe the first check should be if there is a boss to fight. The AI should not farm if there is a boss. If there is a boss, they should move to where the boss is, and then general combat can take over. If there are no bosses, they should check if they have a lot of money. If they do, they should go buy items. If they don't have a lot of money and there are no bosses, then they should farm.

Actually, the real first thing should be to check if the king is in danger. If he is, the AI should do everything they can to help protect the king - even if they will die.

This doesn't even get into properly levelling the hero and choosing items etc.

Most of the time, especially in earlier stages of the development, the AI is just going to attack move towards enemies / bosses and move when going to get items and stuff. I probably won't even add special intelligence for when to cast spells. It will only work for probably one class until later (I will choose the class I think is easiest to code). Then I can expand from there.

It is a lot of work, but it is very iterative. If you set up the basic system as I have described, you can add to it and modify it to make the AI better and better. However, you can't just make a perfect AI from scratch. It will take time. Just get started and ask questions / post triggers as you go and get stuck or need guidance. You have to get your hands dirty for this.
 
Status
Not open for further replies.
Top