• 🏆 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] An AI like samurai brawl map. I'll be specific this time

Status
Not open for further replies.
Level 4
Joined
Jan 1, 2016
Messages
77
Alright, i'm making an Arena map, the map is a deathmatch where you have different arenas to choose, different custom heroes and spells, i want to add bots to make it more complete. I want to make a AI like samurai brawl map, an AI that you can select the difficult (easy normal and insane), use spells, attack, recognize allies, choose heroes, recognize enemies, spawn in the selected arena, play the selected mode etc. Like a human but as an AI. Make everything a human player can.

I wont make buy itens, build structures, collect gold, nothing of this. My map is based on the Deathmatch. You have arenas, you have modes (free for all, team and boss mode), you have heroes. You must to select one arena, one hero, one mode and fight. And is that what i want to the AI make. Could you help me?

If you checked samurai brawl map, so you understand what i want. Please help me, i know you guys know how to make all of this with your eyes closed.
 
Level 4
Joined
Jan 1, 2016
Messages
77
Thanks! This will give me a kickstart, they can now use spells, now i must to know how to make the other functions.
 
Using the default AI is a bit difficult to work with. If you want levels of difficulty--then they aren't really tailored for that (wc3's 'insane', 'normal', and 'easy' difficulties have to do with how much tech they upgrade, how many heroes, and their income handicap etc.).

The best way is to do it with triggers.

Start off with the easy mode, since you can make a really basic AI for that and it should suffice. For a deathmatch, you can just make him run around random points in the map (Unit - Issue point order -> the location would be "Random point in <region>"). You can make him attack-move so that he attacks anyone nearby.

The next step would be casting spells. Offensive spells are easy, and you can just periodically cast them if there is a target nearby (you can use the timer event 'Every X seconds', pick units in range, and cast a spell depending on what type of hero it is).

Try going through those basic steps first. Defensive abilities and stuff might be a bit more difficult or require more sophisticated coding. If you're new to triggers, just check out some of our tutorials and experiment. Coding an AI can be pretty fun! :) It will take time to perfect, but hopefully this'll give you some intuition. You chose a pretty good map theme for an AI, good luck!
 
Level 4
Joined
Jan 1, 2016
Messages
77
Using the default AI is a bit difficult to work with. If you want levels of difficulty--then they aren't really tailored for that (wc3's 'insane', 'normal', and 'easy' difficulties have to do with how much tech they upgrade, how many heroes, and their income handicap etc.).

The best way is to do it with triggers.

Start off with the easy mode, since you can make a really basic AI for that and it should suffice. For a deathmatch, you can just make him run around random points in the map (Unit - Issue point order -> the location would be "Random point in <region>"). You can make him attack-move so that he attacks anyone nearby.

The next step would be casting spells. Offensive spells are easy, and you can just periodically cast them if there is a target nearby (you can use the timer event 'Every X seconds', pick units in range, and cast a spell depending on what type of hero it is).

Try going through those basic steps first. Defensive abilities and stuff might be a bit more difficult or require more sophisticated coding. If you're new to triggers, just check out some of our tutorials and experiment. Coding an AI can be pretty fun! :) It will take time to perfect, but hopefully this'll give you some intuition. You chose a pretty good map theme for an AI, good luck!

Yeh, the map is simple, basically i want make them walk (or run), use spells, attack and defend (defensive spells, in case). Just this. If y ou have something more to tell, bring it on!
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
Make an Aeon of Strife (MOBA for todays kids) AI as that is basically the same as what you want after altering the "laning" part. I think there are many such demo maps in the spells section as well as a few tutorials scattered around the place. I have also written many posts about the subject, however finding them may be difficult.

You break the problem down into different parts. Generally you want a tactical part which handles the micro and a strategic part which handles the macro. Tactical part does ability casting, dodging, last hitting or any other micro related mechanics. Strategic part does overall game strategy, such as teaming up, hunting the weak, retreating to reheal or every part which has to do with actually choosing where to move the hero to.

Tactical can be implemented by polling. A good rate is every 0.2 seconds or so. Look for valid ability targets or other interactions based on the overall strategy being used (eg use blink to run if going to heal, otherwise use it to chase if assassinating heroes).

Strategic part can be viewed pretty much as a state machine where each state represents overall global activity. States are changed once certain conditions are met. When inside a certain state periodically do something to keep inside that state (eg move hero to creep spots if leveling or move hero to enemy heroes if hunting).

Resulting AI is far from perfect but can possibly beat inept 20 APM newbies. The tactical AI might also allow them to pull of "trick shots" because it is potentially faster at thinking than real humans. A good example of this is in Heroes of the Storm (SC2 engine) where playing as Murky the AI will have no problem killing your pufferfish due to their near instant targeting yet real humans will struggle. Another example from the same game is AI Nova instantly snipping any hero that comes into range no matter how suddenly they do so (eg trading snipes with another Nova).
 
Status
Not open for further replies.
Top