What file do I need to edit to change how the computer lays out its base, like how much distance between buildings or the pattern?
When you run the "test map" option from the editor what level of difficulty script does it use for the AI? Easy, hard, insane?
I ask only because the annoying publish map thing gives me document dependency header file errors all the time (randomly) and regardless it's a lot faster to just test the map from the editor rather than logging in, creating game, etc. Also, the script seems magical. What I mean by that is when I changed each zerg script Zerg0.galaxy, Zerg1.galaxy, etc. one by one to see which one the editor's test map uses. I told each one to not call on the techup function (which builds buildings) and removed any build building command references from zerg0 to zerg5, yet the AI will still builds an extractor, a spawning pool, a roach warren, and a hydralisk den after all were edited out. I also tried it on battle.net and with each different skill selected it still built the same stuff. I have no idea what's telling it to build these buildings yet it does.
How would I start an AI script from scratch, yet keeping all the usual tactical info, requirements, attack info, etc? All I'm looking to do is make different build orders that I can test from the editor but can't even get that started. If anyone has an idea please help.
I'm looking into AI right now and there's not much info out there, it seems. There's a forum here: http://darkblizz.org/Forum2/land-of-ai/ but it looks like no one posts in it anymore. Still there's a lot there that's useful, though I would save your queries for SC2Mapster.
When running "Test map" it doesn't use a specific AI, I believe, but in a melee map the AI is dependent upon the game difficulty, and in a triggered map you are supposed to tell it via triggers how difficult to make the AI (and the parameters of this differ between campaign and melee AIs).
I'm curious how you overrided the scripts, e.g. Zerg0.galaxy. My suspicion is that they are not actually overridable, and for that reason the changes that you made were ignored altogether. With the new AI Editor it looks like we do not need to override the AI, because we can create our own scripts. As far as I can tell, the "Custom Script" for an AI personality replaces the Zerg0.galaxy, etc., in addition to the main racial AI (Zerg.galaxy), and it is designed to be run when an AI personality is initialized for a player via triggers.
That being said, where I am stuck at the moment is figuring out how to supplant the constant variables representing different unit types (like c_PU_Zealot). I cannot find where the variables are declared, but I guess if they refer to simple Game Links then I can replace them by declaring variables of my own, or using a String to Game Link function.
if you want a computer to do nothing/over ride any built in ai just remove this trigger:
Melee - Start the melee AI for all computer players
when you do that the AI for computer units is gone and it will just sit there. then just create your own idea on what the computer should/could do for ya.
Thanks, tdhsst, but it's not as simple as that. If you do not start any AI, then the units will not have any tactical AI (which tells them when and how to use abilities, the best way to win engagements, etc.). The ideal goal is to use much of Blizzards' built-in AI code for handling the fundamentals, including handling an economy and preparing attack waves. To hand-code every single action of that an AI takes, including building each and every structure at a precise moment and a precise location, would be excessive, plus lacking in flexibility. Now you're right that the "Start Melee AI" action will not be used in a good custom AI, but that does not mean that the AI will not be started at all. Instead it is started through the "Start AI Personality" action, which supplant the melee AI start code but will do many of the same things, and refer to the same body of Blizzard AI functions.
After looking into it more I am much closer to utilizing patch 1.5's AI module and answering Captaintoottoot's questions. The constant variables representing unit types are stored in Core.SC2Mod\Base.SC2Data\TriggerLibs\RequirementsAI.galaxy . Build order (what Captaintootoot was looking for) should be in the difficulty-level-specific AI, such as Terran0.galaxy. I think the build orders should therefore be put into the AI Personality's custom script, but I need to test things out before I can give specific directions.
What file do I need to edit to change how the computer lays out its base, like how much distance between buildings or the pattern?
When you run the "test map" option from the editor what level of difficulty script does it use for the AI? Easy, hard, insane?
I ask only because the annoying publish map thing gives me document dependency header file errors all the time (randomly) and regardless it's a lot faster to just test the map from the editor rather than logging in, creating game, etc. Also, the script seems magical. What I mean by that is when I changed each zerg script Zerg0.galaxy, Zerg1.galaxy, etc. one by one to see which one the editor's test map uses. I told each one to not call on the techup function (which builds buildings) and removed any build building command references from zerg0 to zerg5, yet the AI will still builds an extractor, a spawning pool, a roach warren, and a hydralisk den after all were edited out. I also tried it on battle.net and with each different skill selected it still built the same stuff. I have no idea what's telling it to build these buildings yet it does.
How would I start an AI script from scratch, yet keeping all the usual tactical info, requirements, attack info, etc? All I'm looking to do is make different build orders that I can test from the editor but can't even get that started. If anyone has an idea please help.
I'm looking into AI right now and there's not much info out there, it seems. There's a forum here: http://darkblizz.org/Forum2/land-of-ai/ but it looks like no one posts in it anymore. Still there's a lot there that's useful, though I would save your queries for SC2Mapster.
When running "Test map" it doesn't use a specific AI, I believe, but in a melee map the AI is dependent upon the game difficulty, and in a triggered map you are supposed to tell it via triggers how difficult to make the AI (and the parameters of this differ between campaign and melee AIs).
I'm curious how you overrided the scripts, e.g. Zerg0.galaxy. My suspicion is that they are not actually overridable, and for that reason the changes that you made were ignored altogether. With the new AI Editor it looks like we do not need to override the AI, because we can create our own scripts. As far as I can tell, the "Custom Script" for an AI personality replaces the Zerg0.galaxy, etc., in addition to the main racial AI (Zerg.galaxy), and it is designed to be run when an AI personality is initialized for a player via triggers.
That being said, where I am stuck at the moment is figuring out how to supplant the constant variables representing different unit types (like c_PU_Zealot). I cannot find where the variables are declared, but I guess if they refer to simple Game Links then I can replace them by declaring variables of my own, or using a String to Game Link function.
@TrenchaunT:
if you want a computer to do nothing/over ride any built in ai just remove this trigger:
Melee - Start the melee AI for all computer players
when you do that the AI for computer units is gone and it will just sit there. then just create your own idea on what the computer should/could do for ya.
@tdhsst: Go
Thanks, tdhsst, but it's not as simple as that. If you do not start any AI, then the units will not have any tactical AI (which tells them when and how to use abilities, the best way to win engagements, etc.). The ideal goal is to use much of Blizzards' built-in AI code for handling the fundamentals, including handling an economy and preparing attack waves. To hand-code every single action of that an AI takes, including building each and every structure at a precise moment and a precise location, would be excessive, plus lacking in flexibility. Now you're right that the "Start Melee AI" action will not be used in a good custom AI, but that does not mean that the AI will not be started at all. Instead it is started through the "Start AI Personality" action, which supplant the melee AI start code but will do many of the same things, and refer to the same body of Blizzard AI functions.
After looking into it more I am much closer to utilizing patch 1.5's AI module and answering Captaintoottoot's questions. The constant variables representing unit types are stored in Core.SC2Mod\Base.SC2Data\TriggerLibs\RequirementsAI.galaxy . Build order (what Captaintootoot was looking for) should be in the difficulty-level-specific AI, such as Terran0.galaxy. I think the build orders should therefore be put into the AI Personality's custom script, but I need to test things out before I can give specific directions.
Nice post. I like it. Thanks for sharing these information. Keep it up.