Here are some examples:
The ability command a SCV needs to build a building is "TerranBuild". The command index is what determines the type of building.
The ability command an Engineering Bay uses to research anything is "EngineeringBayResearch". The command index determines what is researched.
The ability command a Bunker uses to load or unload units is "BunkerTransport". The command index determines if it's a single unload, a complete unload or a load.
I'm afraid you will not be able to modify the Blizzard AI to make them use your map in the way you want it. The scripts don't tell the AI where to expand, only when it should. Neither does the script control where the buildings are build. Only when to build which building. So you will not have control over that either.
Do you know the way that your units will take to a certain point? (e.g. can you determine the path a unit will take) Or can you only find out the pathing cost to this point?
I have written a function that calculates this, but it uses the pathing costs to determine the shortest path. And since those pathing costs ignore units and force fields, it doesn't help in this regard.
An invisible dummy unit that would collide with force fields would help to figure out if a choke is completely blocked or not. But this dummy should not collide with other ground units because that could disrupt normal gameplay.
My choke detection logic only responds to cliff edges, ramps and destructibles. Not buildings or force fields. So there is no need to update it constantly.
The pathing algorithms available will respond to buildings blocking paths, so I will be able to detect that.
But I do not have any tools to detect temp path blockers like units or force fields. Do you?
I have tested the trigger and it works. So I will be able to detect the effect being used, just not the effect it has on pathing.
I just started working on my Protoss AI and the use of their special abilities. The guardian shield was easy to implement.
But I'm stuck now on the force fields. It's easy to make a Sentry cast a force field at a random location, but that location needs to be well considered. One of the most important things it needs to check is the presence of existing force fields and what they exactly block.
There are several pathing related native functions. Some ignore buildings and destructibles and others don't. I expected those that don't to also take into account any force fields because a ground unit needs to path around it. But apparently this is not the case.
As it stands now, I have no way of checking if there is a force field blocking a ramp. All the pathing functions pretend the force field doesn't exist.
I could probably manage to catch force field casts with a trigger and store the location and time of cast somewhere so I have at least something, but that will still make it pretty hard to get any decent force field code working.
Does anyone have any helpful information on this matter?
I did a comparison on all galaxy files contained in the new patch mpq with the old ones to find new native functions:
(i've added new constants as well if they are required for any of the new functions)
0
@FuzzYD: Go
Your assumption about the unit abilities is correct. The default index is 0.
However, I do not have experience with abilities in custom maps like Dota, so I can't tell you anything about the setup there.
0
Here are some examples: The ability command a SCV needs to build a building is "TerranBuild". The command index is what determines the type of building.
The ability command an Engineering Bay uses to research anything is "EngineeringBayResearch". The command index determines what is researched.
The ability command a Bunker uses to load or unload units is "BunkerTransport". The command index determines if it's a single unload, a complete unload or a load.
0
I'm afraid you will not be able to modify the Blizzard AI to make them use your map in the way you want it. The scripts don't tell the AI where to expand, only when it should. Neither does the script control where the buildings are build. Only when to build which building. So you will not have control over that either.
0
I have written a function that calculates this, but it uses the pathing costs to determine the shortest path. And since those pathing costs ignore units and force fields, it doesn't help in this regard.
An invisible dummy unit that would collide with force fields would help to figure out if a choke is completely blocked or not. But this dummy should not collide with other ground units because that could disrupt normal gameplay.
0
@SouLCarveRR: Go
My choke detection logic only responds to cliff edges, ramps and destructibles. Not buildings or force fields. So there is no need to update it constantly.
The pathing algorithms available will respond to buildings blocking paths, so I will be able to detect that.
But I do not have any tools to detect temp path blockers like units or force fields. Do you?
I have tested the trigger and it works. So I will be able to detect the effect being used, just not the effect it has on pathing.
0
I just started working on my Protoss AI and the use of their special abilities. The guardian shield was easy to implement.
But I'm stuck now on the force fields. It's easy to make a Sentry cast a force field at a random location, but that location needs to be well considered. One of the most important things it needs to check is the presence of existing force fields and what they exactly block.
There are several pathing related native functions. Some ignore buildings and destructibles and others don't. I expected those that don't to also take into account any force fields because a ground unit needs to path around it. But apparently this is not the case.
As it stands now, I have no way of checking if there is a force field blocking a ramp. All the pathing functions pretend the force field doesn't exist.
I could probably manage to catch force field casts with a trigger and store the location and time of cast somewhere so I have at least something, but that will still make it pretty hard to get any decent force field code working.
Does anyone have any helpful information on this matter?
0
Woops... Apologies about that, you are completely right. :)
But using X and Y or a Point works exactly the same for me. :)
0
I'm using Notepad++
http://www.blackward.com/eagleai/images/notepadss.jpg
0
@s3rius: Go
I see you listing functions that are already present in the native galaxy library:
And you are absolutely correct about the + operator being overloaded on points. Thanks for that.
0
Here are some of mine:
0
There simply isn't a script pause function for a specific player.
So make a boolean that is checked at the start of your script that returns when the boolean is set to true.
0
I did a comparison on all galaxy files contained in the new patch mpq with the old ones to find new native functions: (i've added new constants as well if they are required for any of the new functions)
0
CliffLevel returns an int, so is sufficient for cliffs, but if you want subtle height differences as well (on a ramp for example), use:
PointPathingCliffLevel( Point(x,y) )
Also, if you want to make a new point based on another one, the following functions should help:
PointWithOffset( point orgpos, fixed x, fixed y )
PointWithOffsetPolar( point orgpos, fixed distance, fixed angle )
0
@zeldarules28: Go
What exactly? For general development updates of the AI, please check www.eagleai.net. I'm posting daily updates...
0
To play with a custom AI you can either use the SC2AllIn1 launcher or make a custom map with the new scripts imported.