It's set to .5 because the default bases have a 5x5 footprint. So the point in the middle of the tile is the middle of the 5x5 grid for the base placement.
ooooo
ooooo
ooxoo
ooooo
ooooo
If the top left were 1,1 and the bottom right was 5,5 the middle of the 'x' is 2.5, 2.5.
My map needed a bit of math trickery to intercept the position of an action's execute destination then do some calculations to see that if using my custom teleporters would get the unit to where it wanted to be faster than the normal pathing algorithm. Now, one of the "problems" I ran into was that if a unit fired off one of my custom ranged abilites near a teleporter, it would make the unit use the teleporter even if the target destination was within range when the action was first fired. (This ended up in stuff happening like, standing near one teleporter pad, targetting the other, and firing a grenade. The trigger would intercept that it was on the "other side" of the teleporter and make the unit go through, and fire the grenade next to itself, rather than just firing the grenade across the teleporter gap because the target was well within range in the first place.
So, enough of the "why" babble, and down to the simple fact that I needed to pull the abilities range data from the ability itself to check if the unit should take the teleporter in the first place.
Step 1: Identitfying the name of the field you want to get.
I wanted the "Range" field from an ability, so, open up the Import window, then check off that "Show Reserved" button.
Convienient! "<Range value="7"/>" appears on... CAbilEffectTarget entries... but not my CAbilBehavior ones... hmmm.
Catch #1: If you notice, on an "Effect - Target" ability, under the "Range" field, if you have entires in there, they appear in brackets... like "(7)". What that means, is that for the field "Range", the data is stored as an array. So, the real name of the field we want to "get" is "Range[0]".
The first time I entered this in, it compiled fine. But when it was running in a game, every time it checked an order, it would throw an error. I *think* I figured out why... someone else could confirm why, but here goes:
Catch #2: The field "Range" is NOT defined by default in the default CAbilEffectTarget. When I entered "Field Path:" I just typed it in happily with the "Value" button selected. Nothing worked.
What ended up working is:
- Click the "Field Path" to edit it.
- Click the "Source" over to "Custom Script".
- Type in: "Range[0]" (This NEEDS the quotes around it when you type it in)
- Do NOT press enter. Click OK.
For some reason, pressing enter just made it throw errors all the time for me. (Perhaps there's some sort of pre-validation of the field name against the default definition of the ability or something when you enter it in the other ways?)
Suddenly, things started working.... kinda.
Catch #3: Doing it this way will throw an error if the ability you are checking does NOT have a "Range" defined.
Explanation of the IF statement: To get around errors being thrown all the time, I just put two checks in before I did the catalog call. The first condition is a substring check to see if the abilities ID starts with "CTB", which is what I start the id of all my abilities for this map with. I just want to check my custom abilities. The second condition is to check if the ability is the type that actually has a target.
Well, I think that's it... just something to think about when you're having problems pulling a value from a catalog entry and can't seem to get it to work no matter what you do.
Hope this helps someone out, if you're having problems pulling data from an object, check the default definition of whatever you're trying to get data from to see if the variable you want is defined in it. If not, give this approach a shot and see if it works out. ;)
Anyone know how to go about making the AI in a melee 4v4 game want to "control" set regions (on top of the usual attack/defend routine)?
This is for my Team Obliteration map where a secondary objective of controlling 6 towers to make the "Obliterator" start attacking the opposing team is an essential part of the gameplay. It'd be nice to be able to add computer AI's and have them want to attack/hold these points. (Getting 7 friends together isn't always possible. ;) )
Basic concept: 4v4 map, limited resources (no expansions), top vs. bottom. Controlling the Xel'Naga towers powers the "Obliterator", when the progress bar reaches full, it activates and starts firing at the opposing team. The more towers one side controlls, the faster the progress bar moves. Of course, towers "can" just be ignore and you can go for killing the other team outright.
Questions:
Is drone rushing viable? Defendable?
Does the capture "speed" make for shorter/longer games?
With the speed of the game, should expansions be added in?
Any other comments, or bugs/etc, please feel free to tell me here or email me at [email protected].
The map is uploaded to battle.net and available publically, just search for "team obl" when creating a custom game.
Blue - Start positions (Top vs. bottom)
Green - Capture Towers
Obliterator in the middle.
0
@BumpInTheNight: Go
Afaik, the "prefix" and "suffix" stuff are only ever shown in the editor. That's why it says "Editor - " in front of it.
Perhaps preface the id's of stuff with your mod's name?
0
@obliviron: Go
It's set to .5 because the default bases have a 5x5 footprint. So the point in the middle of the tile is the middle of the 5x5 grid for the base placement.
ooooo
ooooo
ooxoo
ooooo
ooooo
If the top left were 1,1 and the bottom right was 5,5 the middle of the 'x' is 2.5, 2.5.
0
@jmzg: Go
It'll say where the problem is... I had this with trying to put "gmail.com" in the map description.
Apparently you're not allowed to put "gm" in the description at all.
Take a look at error box, it'll tell you what's invalid.
0
My map needed a bit of math trickery to intercept the position of an action's execute destination then do some calculations to see that if using my custom teleporters would get the unit to where it wanted to be faster than the normal pathing algorithm. Now, one of the "problems" I ran into was that if a unit fired off one of my custom ranged abilites near a teleporter, it would make the unit use the teleporter even if the target destination was within range when the action was first fired. (This ended up in stuff happening like, standing near one teleporter pad, targetting the other, and firing a grenade. The trigger would intercept that it was on the "other side" of the teleporter and make the unit go through, and fire the grenade next to itself, rather than just firing the grenade across the teleporter gap because the target was well within range in the first place.
So, enough of the "why" babble, and down to the simple fact that I needed to pull the abilities range data from the ability itself to check if the unit should take the teleporter in the first place.
Step 1: Identitfying the name of the field you want to get.
Catch #1: If you notice, on an "Effect - Target" ability, under the "Range" field, if you have entires in there, they appear in brackets... like "(7)". What that means, is that for the field "Range", the data is stored as an array. So, the real name of the field we want to "get" is "Range[0]".
Step 2: Variable setup
I'll need that link string to check something later, and of course range is the final range of the ability.
Step 3: Get the game link string for the ability you want
I wanted the game link text for an ability that was passed in through a (Triggering order) into my trigger:
Which is in the editor:
Step 4: Pulling the value from the ability catalog
I'm just going to paste the final incantation of it, then explain:
Now the "fun" line there, which the the set variable.
The first time I entered this in, it compiled fine. But when it was running in a game, every time it checked an order, it would throw an error. I *think* I figured out why... someone else could confirm why, but here goes:
Catch #2: The field "Range" is NOT defined by default in the default CAbilEffectTarget. When I entered "Field Path:" I just typed it in happily with the "Value" button selected. Nothing worked. What ended up working is:
- Click the "Field Path" to edit it. - Click the "Source" over to "Custom Script". - Type in: "Range[0]" (This NEEDS the quotes around it when you type it in) - Do NOT press enter. Click OK.
For some reason, pressing enter just made it throw errors all the time for me. (Perhaps there's some sort of pre-validation of the field name against the default definition of the ability or something when you enter it in the other ways?)
Suddenly, things started working.... kinda.
Catch #3: Doing it this way will throw an error if the ability you are checking does NOT have a "Range" defined.
Explanation of the IF statement: To get around errors being thrown all the time, I just put two checks in before I did the catalog call. The first condition is a substring check to see if the abilities ID starts with "CTB", which is what I start the id of all my abilities for this map with. I just want to check my custom abilities. The second condition is to check if the ability is the type that actually has a target.
Well, I think that's it... just something to think about when you're having problems pulling a value from a catalog entry and can't seem to get it to work no matter what you do.
Hope this helps someone out, if you're having problems pulling data from an object, check the default definition of whatever you're trying to get data from to see if the variable you want is defined in it. If not, give this approach a shot and see if it works out. ;)
0
Anyone know how to go about making the AI in a melee 4v4 game want to "control" set regions (on top of the usual attack/defend routine)?
This is for my Team Obliteration map where a secondary objective of controlling 6 towers to make the "Obliterator" start attacking the opposing team is an essential part of the gameplay. It'd be nice to be able to add computer AI's and have them want to attack/hold these points. (Getting 7 friends together isn't always possible. ;) )
0
I'm looking for testing/suggestions on this map.
Basic concept: 4v4 map, limited resources (no expansions), top vs. bottom. Controlling the Xel'Naga towers powers the "Obliterator", when the progress bar reaches full, it activates and starts firing at the opposing team. The more towers one side controlls, the faster the progress bar moves. Of course, towers "can" just be ignore and you can go for killing the other team outright.
Questions:
Any other comments, or bugs/etc, please feel free to tell me here or email me at [email protected].
The map is uploaded to battle.net and available publically, just search for "team obl" when creating a custom game.
Blue - Start positions (Top vs. bottom)
Green - Capture Towers
Obliterator in the middle.