| 11-10-2002, 07:15 AM | #1 |
I try to make the High Elves and the Chaos Orcs playable races by human player and by computer. I know how to extract the AI files from the mpq file but i don't know what to replace in theses in order to the AI to use the chaos grunt or Sylvanas Windrunner. If someone can help me please it would be great, because with the triggers I only have partial results (the computer only build chaos grunts...) |
| 11-10-2002, 10:51 AM | #2 |
I will try and look in to this as soon as I can. Preparing for the Release of the Commander. You say make them playable by the human, have you gotten that part to work? Is the computer a fixed player or will the human be able to pick how many pople or what, or is this a Stroy, kinds map? Thanks |
| 11-10-2002, 03:45 PM | #3 |
Look into common.ai . At the top of that file you will find a list of constants that are defined so you don't have to use the 4-letter-codes for unit types. Look there for the names of the units you want to replace. Then replace them in the race-specific AIs. But that will only work that simple if the tech trees of your new races are about the same as the one of the original race you replace. Else there will have to be further modifications. |
| 11-11-2002, 05:15 AM | #4 |
Thank you for your answer AIandy I will try this and tell you if it works with my unit changes. to DKslayer, I modified some of the units in the editor and use some triggers and a human is able to use the chaos orcs or the high elves. The computers will be fixed (the map is mean to be a 5 humans vs 7 cpu map) so I can make some triggers specifically for them. As for changing the names of the units i want to replace it will probably works with the chaos orcs but since i created a new customised worker for them i don't know its name for the ai file (like GRUNT for grunt or CHAOS_GRUNT for the chaos grunt..) if only someone could create an ai editor where we could replace an unit by another... (like tell the cpu to use Sylvanas instead of the Lountain king as a hero) I lok forward for your next posts and i thank you again for helping me |
| 11-20-2002, 09:56 AM | #5 | |
Quote:
You can also use custom created units in AI's. To find out what your custom unit's 4 letter ID is just make a trigger like this: Event Unit enters (SOME REGION) Trigger Display to (All Players) the text: (String((Unit-Type of (Entering Unit)))) It is something like: custom_???? in which the ???? is the 4 letter unit code that you have to write in your .ai. Martinez Oops... forgot to say that you must give your unit a constant name in the common.ai. For example your unit's code is ???? then in common.ai you must write down: constant integer UNITNAMETHATWILLBEUSEDINYOURAIS = '????' |
| 11-20-2002, 10:17 AM | #6 |
Adding a new constant to common.ai is not necessary. You can use the 4-letter-codes in the build orders directly. You can also add the constant to the globals in your specific AI script, so you don't have to modify common.ai. |
| 11-20-2002, 12:06 PM | #7 |
I tried to put the code into the order itself but then it didn't work (maybe i'm doing sth wrong). And you're right - you can put the constant into the .ai (not editing common.ai) BUT for example if you would like to use much more custom units it would be usefull I think to edit the common.ai. Martinez |
| 11-20-2002, 01:19 PM | #8 |
It's important not to forget the ' . e.g. call SetBuildUnit(1,'hc01') should make the AI build 1 unit with the 4-letter-code hc01. |
| 11-20-2002, 02:02 PM | #9 |
If you think it would help you to edit the commmon.ai you can do that and import it into your map. Then only that map is affected by the changed common.ai. Although remember that any time you save your map in WE it deletes imported files so you will have to reimport it. You will need to place it into the Script\ Folder. GoodLuck DKSlayer |
| 11-20-2002, 04:09 PM | #10 |
Yeah, but it sure would help with Campaign Creating when you add the common.ai to the War3Patch.mpq - then it would affect all maps! :D |
| 11-24-2002, 06:24 AM | #11 |
Thank you now I will be able to use my elven worker. So far, i have been able to make the cpu to use the chaos orcs and some of the elven units. I have some problems with the corrupt tree for the corrupt elves, the cpu don't use it for some raison. An other problem is that it seems I cannot change the heros, if I do that the ai doesn't work. But by working on the ai, I noted a new problem: the ai is very poor. I hope that your guys wil soon create new ai much more smart which can be use for new races, because currently even with the powerful chaos grunts the cpu can be easily defeated. Now I wonder if it would be possible to add custom races as if they were the classic first four? I know that it would be difficult, but it would add new strategy to WAR3. |
| 11-24-2002, 11:22 AM | #12 |
I am currently working on a strong AI with Zalamander. It will use different strategies and choose these depending on enemy and ally race and even depending on the choice of AI allies. It is quite good already but since much of that strength comes from optimization, it will not necessarily be as good when applied on a new race. Adding custom races to the original 4 instead of replacing one is quite difficult because the menu that allows you to choose your race has only 4 (or 5, if you count random) entries and it is not extendable AFAIK. What might work at least for computers is if you abuse the Computer (Easy) setting. You could add a part to the Orc Melee AI that replaces the Orc start buildings with Chaos Orc start buildings and units when the easy melee setting is chosen and then starts the chaos orc AI instead of the orc AI (put both in the same file). For humans that will not work (you don't have the difficulty setting available) but you could abuse colors for that although that will restrict the numbers of players that can play the specific race. You would then have to modify the melee initialization part in blizzard.j so it would put chaos orc start stuff there instead of orc stuff. The advantage of all this is that it does not require to modify the maps. If you want to modify the map instead, dialog boxes at the start are probably easier to use. |
| 02-08-2003, 06:37 PM | #13 |
Hello guys! I didn't have internet since a couple of monthes, so I didn't play to WAR3; Now that the addon is announced, and thaht the dragon hawk will be added to the Alliance, I think it would be best for my High elves project to wait the release of the addon, in order to be able to make a far better map that I can currently. By the way, someone now a link where I can find more information on the new units revealed? |
| 02-08-2003, 08:29 PM | #14 |
Some time ago I have already done some AI that uses custom units and even custom spells in the appropriate situation, it's really easy. For example I used darky's time stop spell for testing purpose and the computer really used it.:ggani: |
| 02-08-2003, 11:41 PM | #15 |
How do you do it? I never succeed in making the cpu use Sylvanas Windrunner for exemple. Ordinary units are ok, but custom heroes sadly not :-) I will try again this week probably. |
