i've tried a few times at modifying the melee ai galaxy to work with SC2BW but i can't even get the things to load
all i end up with is script load failed errors.
i've searched everywhere for information on this but can't find any.
i guess what im asking is how exactly do i at the very least import the standard blizzard meleeai galaxy files and have them WORK so i can start making changes to them
If you import any .galaxy script in the Editor (should be in a TriggerLibs dir), it should overwrite the default script from the game. This works fine for me. You can start with only one script file to start with and see if it works.
Extract the MeleeAI.galaxy file from the MPQ archives and place it somewhere on your hard drive in a TriggerLibs dir. Open the import manager in the Editor and set the import dir to where the TriggerLibs dir is located. When you select the script file to import you can see it is placed in the internal TriggerLibs dir as well.
This should change absolutely nothing, but also produce 0 errors. Once you have managed that, you can add more script files and start making minor modifications.
Alright, new guy here with a not-so-different question.
I've extracted MeleeAI.galaxy and put it into a new TriggerLibs folder on my desktop.
I modified MeleeAI to have a simple TriggerDebugOutput(1, StringToText("Hello, world!"), true); inside it.
I open the editor, and bring up the Import window.
Then, Data -> Import Files
I click the "browse" button and navigate to the TriggerLibs folder on my desktop, this results in a window with:
[x]TriggerLibs
- - - - - - - [x]MeleeAI.galaxy
Both checked.
I click okay.
MeleeAI.galaxy appears in the files, and I save my custom map.
I do not get a script error, but my printout doesn't run. - I can introduce clear errors into my script,
and I don't get any messages when I test my map.
I can only assume my script is not being loaded.
MTops, you said I'd be able to see my script placed in the internal TriggerLibs directory,
but I don't see that at all - instead it floats in a list of files below the locales and Base.SC2Data folders.
Should I be putting this into Base.SC2Data? I'll go try it now, but I expect to get another syntax error like before.
You may need some of the files that dont seem important such as the RequirementsAI.galaxy. This file contains all constants that all the other files refer to for units, buildings, upgrades, and abilities.
http://www.sc2mapster.com/assets/official-galaxy-scripts/ <-This link will tell you which file does what.
File Path:
StarcratII\Mods\Liberty.SC2Mod\Base.SC2DATA(MPQ file)\TriggerLibs(File within the MPQ)
Edit: If you don't have the triggerlibs file in your map, make a new folder in the map named 'TriggerLibs'.
If you can't make a folder on your desktop named 'TriggerLibs' and place the file into this folder. Than select scan desktop (make sure you dont have any really big folders) than select the files within the new folder.
Another way would be to import all the files, then select them all and right click. Then choose the option to move files. Check new path, and put in this : 'Base.SC2DATA\TriggerLibs'
If you are trying to control custom units(with some custom abilties) with your ai files, you must have the requirementAI.Galaxy to state your const for each unit/ability. Also the Terran0-5, Zerg0-5, Protoss0-5 are the build orders. Since the units you have made havent been implemented into each for build orders, your units will 100% wont be made unless trigger does it. With the use of meleeAI.galaxy and AI.Galaxy, scipting codes would be easier to understand than looking at the ones in other files.
I totally forgot about the tactPro(Ter/Zerg)Ai.Galaxy. These files control how you ability is used effectively.
[Should I make a new thread for my question? I really don't want to hijack this guy's thread, just worried that our questions overlap too much to warrent another.]
Alright I made a folder at the same directory level as Base.SC2Data
In it, I have placed:
MeleeAI.galaxy
RequirementsAI.galaxy
I'm not using any custom units, I'm just trying to alter the MeleeAI script to trigger a debug output as a first step in alteration. It's my "Hello World" equivalent for Galaxy.
I get a syntax error on load up when testing my script.
Possibly relevant information:
-I've set Players 1 and 2 to Computer players
-I've set the difficulty level of the AIs to Very Easy
The MeleeAI.Galaxy are just functions that 100% work (i think).
Since you dont have any custom units, the requirements wont be needed.
What is hello world?, I would like to know what you are trying to do before i say anything else.
HSUAI, I had a similar problem when I tried to import the Green Tea AI scripts to my map. It turns out that veering off of the instructions even the tiniest bit can cause problems.
What I did wrong:
When I imported my files, the game defaulted to the directory that already contained them and a bunch of other stuff (my Starcraft II folder). I unchecked everything but the folder I was trying to grab.
Problematic Results:
This somehow added my Green Tea 0.82 folder as the root; which is incorrect. This looked correct at first, but I had the same problem as you it acted as if nothing had changed. Then I added it following their directions and I noticed an immediate difference. The TriggerLibs folder became the root and the file names were now green in the import editor.
Hope this helps.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
If you import any .galaxy script in the Editor (should be in a TriggerLibs dir), it should overwrite the default script from the game. This works fine for me. You can start with only one script file to start with and see if it works.
Extract the MeleeAI.galaxy file from the MPQ archives and place it somewhere on your hard drive in a TriggerLibs dir. Open the import manager in the Editor and set the import dir to where the TriggerLibs dir is located. When you select the script file to import you can see it is placed in the internal TriggerLibs dir as well.
This should change absolutely nothing, but also produce 0 errors. Once you have managed that, you can add more script files and start making minor modifications.
Alright, new guy here with a not-so-different question.
I've extracted MeleeAI.galaxy and put it into a new TriggerLibs folder on my desktop.
I modified MeleeAI to have a simple TriggerDebugOutput(1, StringToText("Hello, world!"), true); inside it.
I open the editor, and bring up the Import window.
Then, Data -> Import Files
I click the "browse" button and navigate to the TriggerLibs folder on my desktop, this results in a window with:
[x]TriggerLibs
Both checked.
I click okay.
MeleeAI.galaxy appears in the files, and I save my custom map.
I do not get a script error, but my printout doesn't run. - I can introduce clear errors into my script, and I don't get any messages when I test my map.
I can only assume my script is not being loaded.
MTops, you said I'd be able to see my script placed in the internal TriggerLibs directory, but I don't see that at all - instead it floats in a list of files below the locales and Base.SC2Data folders.
Should I be putting this into Base.SC2Data? I'll go try it now, but I expect to get another syntax error like before.
This modding system sure is strange.
Note: I'm trying to write my own AI.
You may need some of the files that dont seem important such as the RequirementsAI.galaxy. This file contains all constants that all the other files refer to for units, buildings, upgrades, and abilities. http://www.sc2mapster.com/assets/official-galaxy-scripts/ <-This link will tell you which file does what.
File Path:
StarcratII\Mods\Liberty.SC2Mod\Base.SC2DATA(MPQ file)\TriggerLibs(File within the MPQ)
Edit: If you don't have the triggerlibs file in your map, make a new folder in the map named 'TriggerLibs'.
If you can't make a folder on your desktop named 'TriggerLibs' and place the file into this folder. Than select scan desktop (make sure you dont have any really big folders) than select the files within the new folder.
Another way would be to import all the files, then select them all and right click. Then choose the option to move files. Check new path, and put in this : 'Base.SC2DATA\TriggerLibs'
How to work Requirement Files:
First copy a const that states a Unit:
const string c_PU_Archon = "Archon"; (Unit)
const string c_PB_Assimilator = "Assimilator"; (Building)
const string c_PR_StalkerBlink = "BlinkTech"; (Upgrade)
const string c_MK_ForceField = "Abil/ForceField/AI";(Marker)
const string c_BF_GuardianShield = "GuardianShield"; (Buff)
const string c_EF_EMPArea = "EMPSearch"; (Effect)
const string c_WE_SpineCrawler = "ImpalerTentacle"; (Weapon)
const string c_AB_Blink = "Blink"; (Ability
const int e_unitAttributeHover = 8; (Attribute)
const int c_objTypeIsResearch = 2;
(Object Type The c_PU_Archon is the constant. The "Archon" is the ID (NOT NAME) of the unit/ability/building/effect/upgrade.
@DarkFireDragoon:
it needs all of them?
i assumed if you didn't import them it would simply use the default ai files? this is not the case?
If you are trying to control custom units(with some custom abilties) with your ai files, you must have the requirementAI.Galaxy to state your const for each unit/ability. Also the Terran0-5, Zerg0-5, Protoss0-5 are the build orders. Since the units you have made havent been implemented into each for build orders, your units will 100% wont be made unless trigger does it. With the use of meleeAI.galaxy and AI.Galaxy, scipting codes would be easier to understand than looking at the ones in other files.
I totally forgot about the tactPro(Ter/Zerg)Ai.Galaxy. These files control how you ability is used effectively.
Needed ones:requirementsAI.Galaxy, Terran0-5, Zerg0-5, Protoss0-5, TactProAI, TactTerAI, TactZergAi
[Should I make a new thread for my question? I really don't want to hijack this guy's thread, just worried that our questions overlap too much to warrent another.]
Alright I made a folder at the same directory level as Base.SC2Data
In it, I have placed:
MeleeAI.galaxy RequirementsAI.galaxy
I'm not using any custom units, I'm just trying to alter the MeleeAI script to trigger a debug output as a first step in alteration. It's my "Hello World" equivalent for Galaxy.
I get a syntax error on load up when testing my script.
Possibly relevant information:
-I've set Players 1 and 2 to Computer players -I've set the difficulty level of the AIs to Very Easy
The MeleeAI.Galaxy are just functions that 100% work (i think). Since you dont have any custom units, the requirements wont be needed. What is hello world?, I would like to know what you are trying to do before i say anything else.
Hello, World! is the first program a lot of people ever write in their programming career.
In C+ + it's:
std::cout << "Hello World!\n";
Java:
System.out.println("Hello World!");
C#:
Console.writeln("Hello World!");
And in Galaxy it's:
TriggerDebugOutput(1, StringToText("Hello, World!"), true);
All it does it print the words "Hello World" to the console.
In this case, as a starting point, all I want is for my Script to print "Hello World" by using TriggerDebugOutput.
Eventually I'll be putting in some AI algorithms, maybe use a bankfile for Machine Learning, etc.
Well I've narrowed my main syntax error down to this line in AI.galaxy (A file I never modified, mind you)
c_techCountQueuedOrBetter is never defined in this file, nor in any file it includes.
What the heck, Blizzard?
Anyone know what I should do next?
Idk bout this sry, i havent been doing anything with my ai lately.
Thanks anyways man, I'll keep looking.
HSUAI, I had a similar problem when I tried to import the Green Tea AI scripts to my map. It turns out that veering off of the instructions even the tiniest bit can cause problems.
What I did wrong: When I imported my files, the game defaulted to the directory that already contained them and a bunch of other stuff (my Starcraft II folder). I unchecked everything but the folder I was trying to grab.
Problematic Results: This somehow added my Green Tea 0.82 folder as the root; which is incorrect. This looked correct at first, but I had the same problem as you it acted as if nothing had changed. Then I added it following their directions and I noticed an immediate difference. The TriggerLibs folder became the root and the file names were now green in the import editor.
Hope this helps.