| 01-02-2007, 04:26 PM | #1 |
im writing an ai for my project. its not technically an aos, but the general behaviour of the players is similar. i have some questions. #1-are there known formulas that decide when a computer player will use thier spells? #2-if so, it it possible to edit these formulas? #3-if not, is it possible to make it so the ai will only cast spells when my ai functions tells them to? #4- are there any good resources or tutorials? (other then the one by blade.dk) |
| 01-02-2007, 04:36 PM | #2 |
Blizzard's AI will automatically cast spells unless they're based off of channel, from what I can tell. Formulas? You just have to decide when you want your hero to cast the spell and make that a condition. If you have a large AoE spell, would your hero use it on a single target or on a group of 3 or more enemies? Should your hero cast heal on an ally when the caster has even lower % hp than the ally? It's really just a series of conditions from what I can tell. Anyways, good luck on the AI, they're pretty annoying to make sometimes. |
| 01-02-2007, 04:38 PM | #3 |
1. There is an internal, harcoded AI engine with a fixed behaviour for the spells. 2. No, unfortunatelly :( 3. Yes, it's the only solution 4. I did one campaign AI tutorial, but I'm not sure if it can help you in your project. |
| 01-02-2007, 04:38 PM | #4 |
1: The normal War3 AI uses each spell based on how that spell would have been used in it's unedited form. If you base a spell off chain-lightning and give it to an AI controlled unit, that unit will think it is casting chain-lightning regardless if that spell has been modified to be something entirely different. Only experience with War3 will give you an impression of which spells units cast at which times, but they will generally throw out everything they got if they have the mana for it and certain conditions are matched. Warstomp and Thunder Clap for example is cast when a certain number of units are nearby and so on. 2: You cannot modify this in any way. 3: You can always "Issue Order" to make a unit cast a spell. Additionally, if you give a unit no spells that it would cast by itself, then you're order issuing would be the only way to make them cast. |
| 01-02-2007, 04:52 PM | #5 |
how do i stop the "internal, harcoded AI engine with a fixed behaviour for the spells."? i want my system to be the only thing making them cast spells. i made a hero arena once, and i couldnt figure out how to make ai units ONLY obey my system. i ended up having to make a system to tell my units to stop when they attempted to cast the spell without my systems permission XD. edit: what if instead of ordering attack-move, i could order my ai to move, and make another system for attacking. but that already sounds worse then just ordering the unit to stop when it is casting its spells without being ordered to. |
| 01-02-2007, 05:06 PM | #6 |
Are you triggering your map in GUI or with JASS?? Have you checked if your triggers load an AI system like Trigger: melee game - Init computer players (sorry, I don't remamber the correct name :P) |
| 01-02-2007, 05:33 PM | #7 |
my map is totally jass, thanks a lot. it turns out i was still a GUIer when i made that arena, so my previous difficulties are explained. |
| 01-02-2007, 05:43 PM | #8 |
Ok, so let's try something. Forcing to use a dummy AI. Create an dummy.ai file with this text only: JASS:function main takes nothing returns nothing // Dummy AI endfunction Add the file to the map. And then, in the map initialization trigger, force to all computer players to use this ai. With that we ensure the computer player won't use even the basic abilities. Tell me how it works. |
| 01-02-2007, 09:15 PM | #9 |
... moyack. Ok umm vesuvan doppleganger I think that if you use moyack solution, it is easier to trigger everything. Take a peek at moyack's or Blades AI JASS tuts, it might help you with lets say for ability learning and AI behaviors. -Av3n |
| 01-02-2007, 09:16 PM | #10 |
thank you, i think my question has been answered. its working fine so far. |
| 01-03-2007, 03:19 AM | #11 |
One thing you may want to do, is.. I hate to say it, but, look at the DotaAI map that recently was released. It has a fantastic AoS AI that is very well programmed. |
| 01-03-2007, 03:57 AM | #12 |
DotA has a custom AI? What on earth did they do? The DotA AI acts exactly like the normal in-game AI would. |
| 01-03-2007, 06:25 AM | #13 |
It has a very strategic Ai system from what I've played. It is programmed just like a player, and loves to use the hit and run / wait and hide techniques players do. |
| 01-03-2007, 08:19 AM | #14 |
Wait, we're talking about the AI behind the spawned units right? Or did DotA gain an AI for Heros while i wasn't looking? |
| 01-03-2007, 11:20 AM | #15 |
DotA in the AI version has one of the most impressive Hero AI I ever seen, the heroes can help you, detect weak heroes and use the shop in a smart way. Even they talk to you. |
