|
|
#1 |
|
User
Join Date: Nov 2009
Posts: 80
|
I'm currently trying to develop my own version of AI and is seeking some guidance here since there don't seem to have other forum section dedicated to AI development. I'm still new to warcraft III modding, thus not knowing all the features of Jass and vJass, but do have some general programming knowledge.
Currently i feel that it is so limited that can be done using natives from common.ai and don't really know what exactly how some natives works. I've read a few threads from this forum and found that you guys have been writing your own natives. Mind tell me how to write own natives and make it usable by my AI? |
|
|
|
| Sponsored Links - Login to hide this ad! |
|
|
|
|
#2 |
|
Great Sage
Project Leader: AMAI
Join Date: Jun 2003
Posts: 688
![]() ![]()
|
@leric: We modify the common.ai and human.ai, orc.ai etc scripts for AMAI. Common.ai is the control hub of all AI and the functions you make or define in it yourself you can use in all those racial ai files which is the start point of ai. Thats pretty much all there is too it.
__________________Native functions are a different barrel of fish. These are the hardcoded unmodifiable functions that are part of the game engine. We dont touch these but new ones can apparently be made using the grimoire tool on wc3 campaigns resource section. Native functions are all stored in the Common.j and can be used by any warcraft scripts. AI specific natives are single lines stored at the top of the common.ai file and can only be used by ai. |
|
|
|
|
|
#3 |
|
User
Join Date: Nov 2009
Posts: 80
|
Have you been making the AI to pass information around to another AI? I've learnt that gamecache works for it, but also heard that there is a fix 255 instance are allow in the gamecache and they are slow in multiplayer games. From the files in AMAI, i notice blizzard.j have been modified. So does that mean we can modify blizzard.j and common.j? and how we do it? I'm try to add globals in these files so that sharing of variables between AI is available.
Does the user made natives using grimore tools stored inside the map file or i will require to install these files into the .mpq? Did you mean AMAI have not been using any self made natives? Lastly, is there a place to read the usage of each natives? Sometimes the natives name are just not self explanatory enough. Like there is a instance GetGoldOwned(), there is another GetGold() function which return the controller gold which confuses the existence of this natives. If you have such a list with simple or detailed explanation on the natives, i hope that you can share it. I've less than 2 months time left to create the AI for my college project. |
|
|
|
|
|
#4 | ||
|
User
Respected User
Join Date: Oct 2002
Posts: 1,296
|
Quote:
There are two ways to transfer information to other AIs iirc. The simple one is the alliance target which is shared between the AIs in an alliance. The other one is sending commands with the native CommandAI and reading it with GetLastCommand and similar natives. Since it has been some time, I might have forgotten some ways though or there might have been new ways found in the meantime. AMAI changes blizzard.j to give the chance to control the AI somewhat to the user via a command interface. Quote:
|
||
|
|
|
|
|
#5 |
|
User
Join Date: Nov 2009
Posts: 80
|
Thanks for the response both of you.
I'll go check more on about CommandAI(). Since you've used it, is it good for synchronizing variables? Any manual for me to read the natives usage? Any tutorial as well? Some of the common.j natives doesn't seem to work especially the String Utility API. You guys face such problem? Is there alternatives? I've not been using JNGP effectively due to it says unable find the directory. Is there any good tools to check AI script? Both JassCraft and JNGP gives me alot declaration problems since those globals in common.ai is not taken for checking. I also receive error such as comparing two different primitive but it is actually integer comparing with integer. Last edited by leric : 12-10-2009 at 10:46 AM. |
|
|
|
|
|
#6 |
|
User
Join Date: Nov 2009
Posts: 80
|
How to force the AI to display text as chat message to allies and all? I do not want to use DisplayTextToPlayer().
|
|
|
|
|
|
#7 |
|
User
Respected User
Join Date: Oct 2002
Posts: 1,296
|
As far as I remember there is no direct way to use the chat message system for scripts.
|
|
|
|
|
|
#9 |
|
User
Join Date: Nov 2009
Posts: 80
|
what is SetGroupsFlee() for? i don't see difference between true or false value put in it.
|
|
|
|
|
|
#11 |
|
User
Join Date: Nov 2009
Posts: 80
|
Is there a way for me to register a building e.g: Tree of Life as a town?
I am trying own spot as town so expansion doesn't have to be near goldmine or those expansion spot chosen by blizzard's AI. I'm only able to ask the unit to build directly on which part of the map but the game doesn't register it as another town so whenever i want a building to be build near this expansion it will build in the initial base and also it doesn't admit that there is a second town exist. |
|
|
|
|
|
#12 |
|
User
Join Date: Nov 2009
Posts: 80
|
i've seen the manipulation of captains in AMAI. mind share on how to correctly manipulate them in order to ask the ai to attack and so on? currently i'm having problem that the captains makes my unit retreat to the base whenever i'm out of the base.
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
|
Donate |