| 10-03-2003, 06:14 AM | #1 |
Greetings. I'm just wrapping up the last touches on a multiplayer map which involves 12 players. Because I've seen similar maps where one of the player teams is completely crippled if a player leaves, I'm trying to develop a simple AI using what little I can strangle out of the AI Editor and some GUI triggers. So far, I have succeeded in making the computer train, resurrect, and pick skills for custom heros. However, I want to make the heros buy items from stores (although I confess to relative ignorance regarding how they choose items to buy, considering the item "priority" and their available budget), and I want the computer player to select upgrades for normal units. I think that these elements should be relatively easy to implement, but I haven't had any success with the AI Editor yet, and I get the impression that I just don't understand it enough to know whether or not I'm making any progress. So, how can I create an AI that only tells a computer that it's okay to buy items, and that it should research upgrades? Also, can I cause this AI to start during the game (in response to a player leaving, for example)? Or, do the AI scripts need to be loaded during Map Init or somesuch? Is there a good way to add a "If (Player) is in (Player Group)" condition to a trigger? There doesn't seem to be such a condition available in the standard TFT WE, and I'm not interested in starting to work with either UMSWE or WEU at this time. However, I'm given to understand that elements of a GUI trigger can be added with other Jass triggers, so if you happen to know what a condition like that would be, and how to add it, please pass that along. Lastly, what behaviors should I give my computers with the triggers that I'm making? I could order them to send each unit that they generate headlong to another enemy's base, or to the common fighting ground, but that wouldn't work very well, strategically. I imagine that I'll want to come up with a way to reserve a certain number of units, and once that number is met, send them to a goal. They'll want to have a hero. How should I think about this trigger in order to create it properly (read: efficiently, and effectively)? Do you have other recommendations about the sort of intelligence I should give the computer? Thanks for helping me out in any way, if you can. I know this was a long and wordy message, but if good comes of it, I'll have a finished map and the world will be a slightly better place. And if I invent a time machine someday in the future, I'll come back and give you money. :dance: |
| 10-03-2003, 10:56 AM | #2 | ||||
Quote:
Quote:
Quote:
Quote:
|
| 10-03-2003, 05:12 PM | #3 |
Hm, there's two types of units that each race could have, but the can only have one of the two. Does that sabotage using the AI system for attacks? Also, I didn't build the hero using the AI; I did it with triggers. Will it then be recognized as "first hero"? I would have done it with the AI, but I couldn't seem to refer to the custom heros, and even when I imported the custom object data, it still wouldn't let me set up a list of my custom skills for them to select. Granted, that's no longer a problem. A few small triggers took care of it. But I don't really know how the AI responds to things like an independently chosen hero, and not having a certain kind of unit at all in its attack group. Also, if I can, I wouldn't mind making one AI that works for all four races, since all it'd be doing is buy items, research upgrades, and now maybe attacking. Can I include the upgrades for each race, and expect that it will skip the ones that it can't research? |
| 10-07-2003, 11:46 PM | #4 |
I'm going to set up an AI that should buy items, research upgrades, and form attack groups universally. I'm going to include all the upgrades and attack group unit types from all four races, since the AI might be content to take only the unit type and upgrade option that it has, and not try to get any of the others (since it can't). I haven't heard anyone say whether or not this will work, so we'll see what happens. Does anyone know of a way to get the location of a map ping by a player? If possible, I'd like to have the computer attack that. Also, when the computer decides to attack, will it ping the map like it does in melee games? What are some good methods for testing whether and how quickly the elements of an AI are working? And, can you tell me whether you think it likely that an AI script can be run for a non-computer player? If it can't, I'm going to have to come up with triggers to emulate the AI attack behaviors. Does someone happen to know ways to make the standard GUI triggers act like AI behaviors? |
| 10-08-2003, 06:51 AM | #5 |
Well, I've added such Trigger Actions to new WEU but it won't be finished within the next few weeks. It uses AI commands with the AMAI scripts of AIAndy and Zalamandar to order an AI Player to attack certain players, locations or a selected unit. Well, if you don't want to use an advanced editor just look up the order numbers youself in AMAI common ai, they should be commented. Then just use the action AI - Send command to Player (AI Player), whichever command For example command nr 12 with data 3 sent to player 0 would order Player1 to attack Player4. There are many other commands to stop attacks and to set the ai mode and such... BUT: when choosing this method you'll have to use the AMAI scripts and cannot use your own scripts but these are really highly customizable. |
| 10-10-2003, 10:00 PM | #6 |
Aight. I constructed an AI like the one I mentioned above. No luck. Allow me to walk you through what it looks like, and if you see what's wrong, please tell me. This is for a map where the player is not responsible for building his/her units. Rather, they are spawned periodically near each player's main building. The player picks the unit that is spawned, and then only that unit is ever created for that player (excepting the hero). Here's my AI in the editor, showing the General tab. |
| 10-10-2003, 10:04 PM | #7 |
The Heros Tab is set to do nothing, since the heros are chosen and created by some standard triggers. Here's the Building Tab. |
| 10-10-2003, 10:06 PM | #8 |
The Attacking Tab. I added all the possible unit types, trusting that it would not attempt to use types it didn't have. I don't see anywhere any way to tell it to wait until it has a certain number of units, or suchlike. |
| 10-10-2003, 10:11 PM | #9 |
And here are the applicable elements of the trigger that initializes it. So, where did I turn to the dark side? |
| 10-11-2003, 10:55 AM | #10 |
You can make it wait for a number of units with minimum forces on the attack tab. I'd try to not put the AI in a subfolder with a space in it. Rather put the AI in the Scipts\ subfolder. Apart from that I don't know what could be wrong. |
| 10-11-2003, 01:31 PM | #11 |
The AI editor is very tricky, I made some and had many pbs. It is possible that a AI created with the AI editor only manage units created by the AI. And if you dont add a creep target he wont do anything. |
| 10-11-2003, 04:22 PM | #12 |
There are no creeps. If I set minimum units for each possible unit, will it try to wait until it has that number for each kind of unit? I'd want it to wait until it has a certain number of any of the units. |
| 10-11-2003, 09:17 PM | #13 |
It should be at least possible with conditions on the attack targets. |
| 10-11-2003, 11:27 PM | #14 |
Hm, I'm not familiar with the conditions at all. I'll have to monkey around with the options to see what they do. Any assistance in pointing me in the right direction is appreciated. |
| 10-11-2003, 11:46 PM | #15 |
Well, conditions are pretty simple in the AI editor. At any given time they are either true or false. If they are false the thing they are associated with will not be done. When you now put a condition like sum of the amount of all the different units > 8 on all attack targets then he will only attack when he has that many units. |
