Hi guys, how do I make the AI use transports such as, ovies with all the upgrades necessary, to transport units from, say a level 3 cliff down to a level 1 cliff?
Currently when the AI tries to rebuild bullies and there's no pathing towards the point, the units gets stuck.
Is there something I should set for the AI in trigger so it will use transports well?
Transporting attack waves, etc?
Rollback Post to RevisionRollBack
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
The AI needs automatic use of transports enabled (it's one of the headers in the melee AI, I think). (edit - I'm pretty sure you can just inject this as custom script and replace the Player with the player number. There may also be a GUI equivalent.)
If you use Swarm campaign dependencies, ovies don't have transport capabilities. You need to add them in the data editor under Overlord in units. If you use waypoints in the attack wave, you can choose "Force Transport" to make the AI drop at a location at your choosing. However, getting something like drones to drop on ground may require an "Issue Order...".
Alternatively, program drop pods to drop drones at your bully location.
I can use it by searching it when making an action. It's a function, so maybe that's why it's hidden.
buildAI.galaxy also answers my question on the difference between AIStart campaign mode and Start Campaign AI.
Basically, AI - Start Campaign AI is a function that sets up the ai using AIStart(player, bool, apm) and a bunch of stuff like AISetDifficulty.
Edit:
---------------------------------------
This works:
AI Advanced - Set Defense Radii(3, 20.0, 25.0, 20.0)
Set defense radii makes the AI respond a lot further than default. Calls for help and threat range are there. Check it out.
Currently checking other constants, also using Wave Set Type, where type is the constant c_waveStateDropAttack. I'm trying to see if this is somewhat similar to setting a waypoint forcing transports.
Setting trigger waves to melee wavetypes results in very weird behavior. Often, they'll "deactivate" and the units cannot be added to another attack wave, and just sit around and do nothing forever. I researched into that heavily earlier in the year. The only solution I could conjure to have a good campaign AI is a heavily modified melee AI.
I saw it happen. Some units just sit there, and the AI makes another bunch of units for the wave. On one occasion, the units started moving again, then stopped.
I can't seem to notice much of a difference though with the AISetDifficulties via Trigger. Only that sometimes the AI retreats its units. My waves are attacking unit a target unit group. When scourges are used, they retreat when the group is destroyed. If mutalisk, I saw them retreat, then move to attack again.
Also, I've noticed the AI ignoring attackers sometimes when en route to a waypoint.
What do you mean modified melee AI? Do you mean editing the galaxy files, or running the melee AI and trigger commands along side it via triggers?
Rollback Post to RevisionRollBack
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
Retreating and running scared can also be turned off via those headers (and may be in the AI Advanced difficulty options).
AI ignoring attackers is a bug from warcraft 3. Since no doubt sc2 recycles that code, many such problems remain. It seems to have to do with the captain unit system. Since the AI was never tested, and Blizzard never cared about such bugs that I reported vigorously in wc3's days, it would fall upon us to conjure some kind of solution. But I don't know if that's possible to fix without making an entire new attack system. I'm hoping Sreg can figure that one out. Another guy (I think turtles?) was making an attack wave engine as well, via triggers.
My AI is modified galaxy files. I pulled them all out of the patch files and core and threw them into a dependency and went from there. Unfortunately, I haven't gotten very far with actually fixing any of its innumerable problems, but I do understand a little more about it than I did just watching melee or messing with the triggers.
/edit
I will PM you my research post from the staff forum on CC. It covers my notations throughout my research earlier this year. However, note that most of it is later ignored or irrelevant when I started talking more with Jade.
If/when he has a major demonstrable update for me I will continue my research (and thus continue work on the campaign, which is pointless without that AI). Though, due to the tremendous performance problems, I'm sure at the very least I will have to drop the teamplay aspect of the campaign... ugh...
Yes. I've read through them. I will look into them melee AI. I'm guessing out of my crack right now, but it seems the melee AI when running it for a player will setup certain things like states, stocks, automatically assigns new units to a variable called main wave or something.
They say it's not possible to modify the galaxy files for the ai without using a loader to be able to use them. Some third-party thing like the all-in thing.
Have you checked out GTAI (GreenTea AI)? The developer of that melee AI had some success utilizing the default functions of the AI.
Rollback Post to RevisionRollBack
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
They say it's not possible to modify the galaxy files for the ai without using a loader to be able to use them. Some third-party thing like the all-in thing.
Who said that? Lol... I just loaded them into a mod file. A loader is entirely unnecessary.
@ GreenTea
I did but found nothing that aided my cause.
/edit
God, this forum software is almost as bad as Stardock's.
I actually tried setting it as a custom script, but I've came with nothing, so far. When trying to make an island expo, the transport won't even move the worker to the place.
But also, I've always shown some interest in Galaxy, but I don't even know where to even start at, how to make a script and everything...
DC, do you know programming? If not, you will have to learn it. I know a little from school. I was a dirty programmer.
Start by downloading MPQ editor, and extract these AI files:
(placing each batch on separate folders will avoid conflicts upon extract. Some files seem to be updates as the expansions go)
You can open the files via a text editor. I use notepad ++ and grepwin for fast searching.
========================
My current idea is to create my own functions via trigger. Here's what i'd do for attack waves:
1. A variable (probably array) to hold unit group(s)
2. A function (or action definitions) that takes an AI player, Unit Group, Target Player, a set of waypoints, some options as parameter
The waypoints:
1. Home Gather location
2. Target Gather location
3. Waypoint 1
4. Waypoint 2
5. Target Point
------------------------
The Function:
Will utilize commands like issue order
will attack move units to each waypoint, each time waiting until all units are in a circle region of size N at point ( wp1, wp2) before moving on
will send back units once option is true to Home gather location
(this will probably a while loop, which will terminate once either all the units in the unit group is dead, an option becomes true, or that the group has been sent home and is actually there.)
----------------------
Function #2 (Action definition 2): Unit Control
- haven't thought of exact execution of this yet, but essentially the AI should micro when the specified unit group gets in contact with enemies at a circle region of size N at point center of unit group
(this will also probably be a while loop. Probably running until options are true, unit group is dead, time has expired, etc)
Feel free to take this on when you want. I'm in a stage of developing the maps for a campaign where this isn't really needed yet..
Mesk,
I don't recall who, but I'm certain I've read it from here. :D
----edit---
Using the editor for testing, the difficulty must at most be set at Hard (preferences>test document) or the AI will not do attack waves. So far this is what I ran into, the ai not making or executing attack waves. Probably because the AI engine for campaign doesn't have things for beyond Hard.
You can also setup the difficulty level your map will actually play under when running it offline via drag-and-drop over to SC2Switcher.exe This can be done via the data editor>gameplay data>(basic)UI: Difficulty Level.
4 is for hard. So I use 4 so the campaign AI will at least work.
Why 4, or hard is because I've seen these in the galaxy files:
== AI.galaxy ==
c_campExpert = 4
== BaseAI.galaxy ==
under "void AICampaignStart (int player) {}"
Well, I've literally been cracking my head split open with this code, but so far came with zilch. I so much wanted for the transports to act on their own, but without any knowledge, I can't even make them move.
And, before you ask, no EivindL, I don't want and won't use drop-pods as cop-outs for island expos. I wanted that, when people played these aforementioned maps, they saw transports actually lifting units and workers, not gimmicks cutting corners. That's rude, but that's the truth.
Rollback Post to RevisionRollBack
The Light will blind you. Step away from it!!!
To post a comment, please login or register a new account.
Hi guys, how do I make the AI use transports such as, ovies with all the upgrades necessary, to transport units from, say a level 3 cliff down to a level 1 cliff?
Currently when the AI tries to rebuild bullies and there's no pathing towards the point, the units gets stuck.
Is there something I should set for the AI in trigger so it will use transports well?
Transporting attack waves, etc?
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
The AI needs automatic use of transports enabled (it's one of the headers in the melee AI, I think). (edit - I'm pretty sure you can just inject this as custom script and replace the Player with the player number. There may also be a GUI equivalent.)
AISetDifficulty(player, c_diffAutoTransport, true);
Triggered attack waves can have waypoints set to to Force Transports.
Melee drop attacks are broken.
If you use Swarm campaign dependencies, ovies don't have transport capabilities. You need to add them in the data editor under Overlord in units. If you use waypoints in the attack wave, you can choose "Force Transport" to make the AI drop at a location at your choosing. However, getting something like drones to drop on ground may require an "Issue Order...".
Alternatively, program drop pods to drop drones at your bully location.
There are a bunch of constants in the AI.galaxy
I'm gonna try it now.
edit:
Also found this in buildAI.galaxy
AISetDefenseRadii()
I can use it by searching it when making an action. It's a function, so maybe that's why it's hidden.
buildAI.galaxy also answers my question on the difference between AIStart campaign mode and Start Campaign AI.
Basically, AI - Start Campaign AI is a function that sets up the ai using AIStart(player, bool, apm) and a bunch of stuff like AISetDifficulty.
Edit:
---------------------------------------
This works:
AI Advanced - Set Defense Radii(3, 20.0, 25.0, 20.0)
Set defense radii makes the AI respond a lot further than default. Calls for help and threat range are there. Check it out.
Currently checking other constants, also using Wave Set Type, where type is the constant c_waveStateDropAttack. I'm trying to see if this is somewhat similar to setting a waypoint forcing transports.
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
Setting trigger waves to melee wavetypes results in very weird behavior. Often, they'll "deactivate" and the units cannot be added to another attack wave, and just sit around and do nothing forever. I researched into that heavily earlier in the year. The only solution I could conjure to have a good campaign AI is a heavily modified melee AI.
I saw it happen. Some units just sit there, and the AI makes another bunch of units for the wave. On one occasion, the units started moving again, then stopped.
I can't seem to notice much of a difference though with the AISetDifficulties via Trigger. Only that sometimes the AI retreats its units. My waves are attacking unit a target unit group. When scourges are used, they retreat when the group is destroyed. If mutalisk, I saw them retreat, then move to attack again.
Also, I've noticed the AI ignoring attackers sometimes when en route to a waypoint.
What do you mean modified melee AI? Do you mean editing the galaxy files, or running the melee AI and trigger commands along side it via triggers?
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
Retreating and running scared can also be turned off via those headers (and may be in the AI Advanced difficulty options).
AI ignoring attackers is a bug from warcraft 3. Since no doubt sc2 recycles that code, many such problems remain. It seems to have to do with the captain unit system. Since the AI was never tested, and Blizzard never cared about such bugs that I reported vigorously in wc3's days, it would fall upon us to conjure some kind of solution. But I don't know if that's possible to fix without making an entire new attack system. I'm hoping Sreg can figure that one out. Another guy (I think turtles?) was making an attack wave engine as well, via triggers.
My AI is modified galaxy files. I pulled them all out of the patch files and core and threw them into a dependency and went from there. Unfortunately, I haven't gotten very far with actually fixing any of its innumerable problems, but I do understand a little more about it than I did just watching melee or messing with the triggers.
/edit
I will PM you my research post from the staff forum on CC. It covers my notations throughout my research earlier this year. However, note that most of it is later ignored or irrelevant when I started talking more with Jade.
If/when he has a major demonstrable update for me I will continue my research (and thus continue work on the campaign, which is pointless without that AI). Though, due to the tremendous performance problems, I'm sure at the very least I will have to drop the teamplay aspect of the campaign... ugh...
Sounds great. I'll be looking into your files for sure.
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
I fear the information is not very conclusive (hence why I don't publish any of it), but it may give you further insight into your observations.
Yes. I've read through them. I will look into them melee AI. I'm guessing out of my crack right now, but it seems the melee AI when running it for a player will setup certain things like states, stocks, automatically assigns new units to a variable called main wave or something.
They say it's not possible to modify the galaxy files for the ai without using a loader to be able to use them. Some third-party thing like the all-in thing.
Have you checked out GTAI (GreenTea AI)? The developer of that melee AI had some success utilizing the default functions of the AI.
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
@EivindL: Go
I'm using Starbow mod 1.9 currently as a dependency. The campaign for starbow.
Thanks for the tip. :D
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
Who said that? Lol... I just loaded them into a mod file. A loader is entirely unnecessary.
@ GreenTea
I did but found nothing that aided my cause.
/edit
God, this forum software is almost as bad as Stardock's.
I actually tried setting it as a custom script, but I've came with nothing, so far. When trying to make an island expo, the transport won't even move the worker to the place.
But also, I've always shown some interest in Galaxy, but I don't even know where to even start at, how to make a script and everything...
DC, do you know programming? If not, you will have to learn it. I know a little from school. I was a dirty programmer.
Start by downloading MPQ editor, and extract these AI files:
(placing each batch on separate folders will avoid conflicts upon extract. Some files seem to be updates as the expansions go)
Core.Sc2Mod > Base.Sc2Data > Triggerlibs
Liberty.Sc2Mod > Base.Sc2Data > Triggerlibs
Swarm.Sc2Mod > Base.Sc2Data > Triggerlibs
You can open the files via a text editor. I use notepad ++ and grepwin for fast searching.
========================
My current idea is to create my own functions via trigger. Here's what i'd do for attack waves:
1. A variable (probably array) to hold unit group(s)
2. A function (or action definitions) that takes an AI player, Unit Group, Target Player, a set of waypoints, some options as parameter
The waypoints:
1. Home Gather location
2. Target Gather location
3. Waypoint 1
4. Waypoint 2
5. Target Point
------------------------
The Function:
Will utilize commands like issue order
will attack move units to each waypoint, each time waiting until all units are in a circle region of size N at point ( wp1, wp2) before moving on
will send back units once option is true to Home gather location
(this will probably a while loop, which will terminate once either all the units in the unit group is dead, an option becomes true, or that the group has been sent home and is actually there.)
----------------------
Function #2 (Action definition 2): Unit Control
- haven't thought of exact execution of this yet, but essentially the AI should micro when the specified unit group gets in contact with enemies at a circle region of size N at point center of unit group
(this will also probably be a while loop. Probably running until options are true, unit group is dead, time has expired, etc)
Feel free to take this on when you want. I'm in a stage of developing the maps for a campaign where this isn't really needed yet..
Mesk,
I don't recall who, but I'm certain I've read it from here. :D
----edit---
Using the editor for testing, the difficulty must at most be set at Hard (preferences>test document) or the AI will not do attack waves. So far this is what I ran into, the ai not making or executing attack waves. Probably because the AI engine for campaign doesn't have things for beyond Hard.
You can also setup the difficulty level your map will actually play under when running it offline via drag-and-drop over to SC2Switcher.exe This can be done via the data editor>gameplay data>(basic)UI: Difficulty Level.
4 is for hard. So I use 4 so the campaign AI will at least work.
Why 4, or hard is because I've seen these in the galaxy files:
== AI.galaxy ==
c_campExpert = 4
== BaseAI.galaxy ==
under "void AICampaignStart (int player) {}"
AISetDifficulty(player, c_diffFleeDamage, (diff >= c_campExpert));
AISetDifficulty(player, c_diffSpotChangelings, (diff >= c_campExpert));
AISetDifficulty(player, c_diffRepairDamage, (diff >= c_campAdvanced));
AISetDifficulty(player, c_diffDefendWithPeons, (diff >= c_campAdvanced));
AISetDifficulty(player, c_diffNormalTargetPrio, (diff >= c_campAdvanced));
AISetDifficulty(player, c_diffFleeDanger, (diff >= c_campAdvanced));
AISetDifficulty(player, c_diffTargetSpawners, (diff >= c_campNormal));
Just a heads up.
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
Yeah, I ran into difficulty problems as well. As it turns out, the hots attack wave triggers don't support them all, either.
Sc2switcher wouldn't load dependencies for me. Makes me wonder how I'll even get my campaign to work...
Are they in your mods folder, and are referenced from there? Mine works.
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
Yep. Just wouldn't load 'em.
That's weird.
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
There are few things associated with sc2 I wouldn't be inclined to group in the description of "weird".
Well, I've literally been cracking my head split open with this code, but so far came with zilch. I so much wanted for the transports to act on their own, but without any knowledge, I can't even make them move.
And, before you ask, no EivindL, I don't want and won't use drop-pods as cop-outs for island expos. I wanted that, when people played these aforementioned maps, they saw transports actually lifting units and workers, not gimmicks cutting corners. That's rude, but that's the truth.