Foreword: This tutorial is intended for use in maps where a limited number of heroes with arrangement-sensitive inventories are revived. If your map has 1000 reviving heroes, this is not a feasible method and I recommend searching for the arrangement-insensitive method or waiting for Blizzard to really fix it this time. To use the following method with a number of heroes with a known maximum limit (say, 1 hero per player with up to 12 players), simply make the arrays used into 2D arrays and change the triggers to track which hero is in question.
Setting Up and Understanding Your Item Containers
For the purpose of this tutorial, we'll assume that you already know how to make a hero (or regular unit) with one or two working inventories. The item containers applied to a hero are numbered in the order they are listed in the Inventory ability you gave your hero. Items queried by triggers in the first listed item container return a container value of (integer) 1. Items in the second return a container value of (integer) 2. Similarly, item slots begin at 1 and count upwards at an increment of 1. Both containers may have slots that are of the same number, so container 1 may have a slot 3 and container 2 may also have a slot 3. Here's a picture of an item container with 16 consecutive item slots:
Let's take a look at how these slots are numbered:
As you might see, it would be very simple to keep track of items in such an item container using a simple Unit Type array of the same size. The values of an size 16 array are at indexes 0-15 while the items in this size 16 container are at 1-16. You could simply store the type of item at slot X in array[X-1].
Let's see how you would declare a global variable array that would hold a simple size 16 container:
However, we have a dilemma! Some item containers look much fancier, and why shouldn't they? Let's take a look at the kind of fancy inventories we're used to:
There are 9 slots in this container. However, the numbering of slots in a container counts slots that do not exist. Let's take a look at how the previous container's visible and invisible slots are numbered:
As you can see, that creates a bit of a problem if you wanted to store the contents in an array while tracking the slot number the item came from by the array index used to store it. Index 0 can no longer necessarily correspond to Slot 1! But have no fear, we have a solution at our hands.
The Inventory Key
Let's declare two arrays. This first one will be the unit-type array that we'll save the contents of the container into, just like the array we declared for the simple size 16 container except this is for a size 9 container. This second array is what I refer to as the inventory key for that container:
At map initialization, you'll want to set its values (with a one-to-one correspondence) to the item slots of your complex container, like so (the order of the slots doesn't matter as long as each array index points to a unique item slot):
Now when you want to find what item slot is being stored in a specified array index value of your unit-type array, you can use this key!
In a simple container, you could find the item slot stored in an array index by calculating Index+1. For example, at (Index = 0) we are storing the Unit-Type found at Slot (0 + 1), or Slot 1.
In a complex container, you can do the same thing by using the key to find equipmentKey[Index]. In my inventory key initialized above, we find the slot at index 0 of equipmentKey is Slot 9.
We will want to be able to find the reverse as well. How do we find where the Unit-Type of Slot 49 is being stored? We create a function that takes an Integer (the Slot that we know, which is 49) and returns a different Integer (the Index value that we want, which is where Unit-Type at 49 is being stored):
If done right, Reverse Equipment Key(49) will return the Integer value 4. Now that we have the tools to read and write out of our simple and/or complex Unit-Type arrays, let's DO something with them!
Taking Snapshots of (Saving) Your Inventory
The following trigger will activate whenever our hero does just about anything with an item short of using a charge (storing charges is feasible but beyond the scope of this tutorial). It will first blank out everything it knows about the arrays to make sure there are no ghost items (items that have since been removed from the inventory). The minimal wait time delay between the previous action and the next action is vital, as it prevents the trigger from writing items that are being removed from the inventory as if they were still present. It will then pick every item, find which container it is in, and read its Unit Type into the appropriate place in the corresponding array.
We will see in the following section why the global boolean value reference is necessary. Make sure when you declare it the it is defaulted to "false". You may also place it under the conditions at the head of the trigger. It's in its own If-Then-Else here purely for debugging purposes.
Restoring the Inventory to Its Rightful Place
Run the following actions immediately after your hero has been revived. The boolean flag mentioned before is toggled here to prevent snapshots (saves) to be triggered while items are being placed into the hero's inventory, otherwise the snapshot trigger would blank out the arrays and all items after the first would be lost.
Whew, done. You've now got a hero whose gear is returned to him in correct order whenever it is revived.
An example map is not currently forthcoming as this was made while integrating it into my own privately developed map. If someone else successfully completes the tutorial in a small example map and is willing to share it, I will absolutely post it here.
I do not request any credit if you use this method in your map. I feel that it is merely a work-around to something Blizzard will eventually fix and not worthy of mention. If you absolutely cannot not give me credit, that's fine too.
Just so long as the contest doesn't give you a long list of "WoW" bosses, then I'm fine with that.
Btw, it is Blizzard's nature to assimilate other people's stuff into their games... Even the kitchen sink.
/sarcasm
You're definitely coming off as forcing your opinion on others. Let people be creative in whatever way they choose, intimating your opinion onto them as suggestion or law isn't right.
I always absolutely loved how visually pleasing Planetary Boss Minis are. My only gripe with them, if any, is the universal strategy of "Run away and spawn Broodlings". I like a little more variety and new challenges in my playstyle.
For "old trigger way" I was meaning the full drop system made by triggers, including the item creation on unit death :D
The problem being discussed is one of "remembering" items through death, not creating loot. The Data Editor and Trigger Editor both work well for dropping loot, it's really your choice.
On another note, I used the "pick all dropped items up and hide them for the revive" method as well. However, that doesn't remember the order of the items and jumbling everything back into an inventory without care for the player's decisions can be annoying depending on how complex your equipment layout is. Figuring Blizzard's not going to be taking another shot at fixing this any time in the near future, I devised a better system that saves items as they should be saved, exactly where they were.
The general idea is that you have a unit-type array for each inventory a hero has, each array having size equal to the number of slots in its corresponding inventory. Whenever a unit gains, loses, exhausts, or drops (you'd think this last one would be included in "loses" but it isn't) an item, set every value of all the arrays he owns to No Game Link. You then pick each unit held as an item by the manipulating hero and read it into the array at an index value equal to its (slot - 1). When you revive the hero, simply go through each array and if a value isn't equal to "No Game Link", create a unit of the unit type and pop it into the slot corresponding to the index value it's found at in the container the array relates to.
NOTE: When writing to the array after an item manipulation event, (Wait .1 game seconds) or so at the beginning of the trigger. The game likes to jump the gun on what to write into your array, but if you give it that slight delay it'll take a proper "snapshot" of the current inventory.
If your item container has empty spaces between item slots, those are counted as slots by the editor and do complicate things. For example, if your inventory has [Item 1], then two empty spaces, then [Item 2], your array index 0 should point to 1 as usual, but array index 1 should point to 4 (skipping 2 and 3). You can bypass this dilemma with the clever use of a static array to act as a "key". The key array for this inventory would look like this:
keyArray[2] = { 1, 4 }
And if you need to do the reverse and find the related index value to a given item slot, a function that takes the item slot as a parameter and does something like this should suffice:
Function FindKeyArrayIndexValueByGivenItemSlot
For Each Int counter = 0 to lastIndex, do {
If (keyArray[counter] == GivenItemSlot) {return counter}
It can seem like a complicated process, but it is very much worth it for that professional feel. It is NOT necessary if each item you have only has one possible inventory slot to go in.
P.S. Turn "Drop On Death" off if you go this route.
I was having a conversation with a friend about bosses. He says that WoW bosses are like any other but I think they aren't that creative. Something about WoW style bosses just bore me. Bosses like in Metal Gear Solid, Batman AA, or even Phantasy Star Online just appeal to me more because it's just one on one or not a whole army against one guy. The bosses are more interactive, with PSO being the least so. WoW feel too simple since imo they just stand there and cast spells from time to time. Such simple AI compared to other bosses imo.
I'd like you to say hi to boss events like C'Thun, Kael'thas, Lady Vashj, Mimiron, Yogg-Saron, and Professor Putricide. These bosses all had very fun mechanics that did not involve very much standing still, even for the boss. Of course, since WoW is an online game played with multiple people there are fudged areas to account for the need to communicate and the fact of latency.
Single player games, requiring neither, have the luxury of being able to be very primal and touch upon your timings and instincts rather than your brain. I assure you though, it has very little to do with the complexity of the "AI".
Items have been fixed to not always drop on death. BUT if an item has any "equip" or "carry" behaviors, those will NOT be applied on the hero after reviving. The item needs to be removed from the inventory and then reequipped for the behaviors to be applied again. Already posted a bug report on the bnet forums.
EDIT (more changes):
Blizz has apparently added "color" versions of ability icons that were previously "black and white". From a quick look, it seems that only the multiplayer ability icons have been given color versions.
Are you sure your item woes are fixed? When my heroes die now, the items just vanish permanently even if Drop On Death is not flagged. This is with all triggers disabled.
Edit: Also, the default leaderboard seems to be a little funky. The box containing the title is half missing on my map, dunno if it's just me.
Since the release I've been working on a personal project that exactly follows these guidelines. It's a hero defense that makes obscene use of custom boss encounters. I don't like releasing maps I'm currently plugging away at (I test and work on this map about twice per week) nor are my video editing skills up to par so I shan't be competing.
But sharing fun stuff is never a bad idea anyways! So take some inspiration from Bluefrex Hero Defense, publicly playable at your own risk (bring some friends, it's no fun alone), illustrated by this replay footage from a tuning session between four available friends from the original Bluefrex WoW guild:
If you are brave enough to go play it after seeing how good my video skills are, take these because it's dangerous to go alone:
skip: ends a boss encounter
bxhq: restores the tower to full health
I won't post the boss strats because the fun is in learning! There's lots of in-game help anyways. Good luck on the contest; I look forward to being inspired by your creations!
1st of all, this is solo contest like the rest ? I done like that. Also, WoW only ? Cant we be creative ? I mean, its like like that cant be made in sc2...
I'm pretty sure he just meant WoW-esque, not that they need to be copies of WoW bosses like the Thaddius video may lead you to believe.
I'm setting the camera distance to 55 (zoomed out a bit) so that more of the play area can be seen by the player. However, I noticed that when I do this, I can no longer hear any combat sound effects (gun fire, attacks, death, flames, etc.).
Does anyone know a solution to this? Have the camera zoomed out without messing up the sound effects?
Data Editor
Advanced
Game UI Data
Default SC2 UI Settings
Sound - Sound Data+
Change the numbers to be bigger until you're hearing what you want to hear. There's a lot of variables in there so you'll have to experiment for yourself, but it's the right place.
I was able to get the spider mine to unburrow (by turning off the hidden and visible requirements in the spider mine burrow and unburrow ability) when some dark templars run over the mines but they just sit there. When the dts get out of range, the mines reburrow. So it seems its detecting them, but not moving towards the target and then suciding/damage.
A trigger work around you could try is to change ownership of the spider mine to an computer ally with No share vision and just have the detector behavior on (or include a condition to do this only when it has acquired a cloak unit.). Also, I didn't see any validators relating to must have sight or exclude cloak units while working on this.
I am sure we're just over looking something simple. Hopefully someone else see it and can call us "noobs" for missing it :)
As I stated earlier and Cinicraft repeated, did you try changing those filters on the WEAPON of the Spider Mine in addition to the burrow/unburrow abilities?
Hey gang. Remember how you used to be able to cast Chrono Boost and Spawn Larvae on units by clicking the ability onto the wireframe in the default Blizzard UI? I've been curious as to whether or not you can link a dialog item to a specific unit in that way. So that, say, if I have a marine I could heal him with a medic by choosing the medic heal and clicking it onto a portrait of the marine in a dialog box, ordering the medic to run to that marine and heal him.
I want to make a trigger when players run out of lives it ends the game in defeat. Ive been trying different things but nothing is working. Anyone know how I could go about doing this.
In the trigger where you reduce the player's life by 1, check after the reduction if his number of lives has reached 0. If so, end the game in defeat.
0
Foreword: This tutorial is intended for use in maps where a limited number of heroes with arrangement-sensitive inventories are revived. If your map has 1000 reviving heroes, this is not a feasible method and I recommend searching for the arrangement-insensitive method or waiting for Blizzard to really fix it this time. To use the following method with a number of heroes with a known maximum limit (say, 1 hero per player with up to 12 players), simply make the arrays used into 2D arrays and change the triggers to track which hero is in question.
Setting Up and Understanding Your Item Containers
For the purpose of this tutorial, we'll assume that you already know how to make a hero (or regular unit) with one or two working inventories. The item containers applied to a hero are numbered in the order they are listed in the Inventory ability you gave your hero. Items queried by triggers in the first listed item container return a container value of (integer) 1. Items in the second return a container value of (integer) 2. Similarly, item slots begin at 1 and count upwards at an increment of 1. Both containers may have slots that are of the same number, so container 1 may have a slot 3 and container 2 may also have a slot 3. Here's a picture of an item container with 16 consecutive item slots:
Let's take a look at how these slots are numbered:
As you might see, it would be very simple to keep track of items in such an item container using a simple Unit Type array of the same size. The values of an size 16 array are at indexes 0-15 while the items in this size 16 container are at 1-16. You could simply store the type of item at slot X in array[X-1].
Let's see how you would declare a global variable array that would hold a simple size 16 container:
However, we have a dilemma! Some item containers look much fancier, and why shouldn't they? Let's take a look at the kind of fancy inventories we're used to:
There are 9 slots in this container. However, the numbering of slots in a container counts slots that do not exist. Let's take a look at how the previous container's visible and invisible slots are numbered:
As you can see, that creates a bit of a problem if you wanted to store the contents in an array while tracking the slot number the item came from by the array index used to store it. Index 0 can no longer necessarily correspond to Slot 1! But have no fear, we have a solution at our hands.
The Inventory Key
Let's declare two arrays. This first one will be the unit-type array that we'll save the contents of the container into, just like the array we declared for the simple size 16 container except this is for a size 9 container. This second array is what I refer to as the inventory key for that container:
At map initialization, you'll want to set its values (with a one-to-one correspondence) to the item slots of your complex container, like so (the order of the slots doesn't matter as long as each array index points to a unique item slot):
Now when you want to find what item slot is being stored in a specified array index value of your unit-type array, you can use this key!
We will want to be able to find the reverse as well. How do we find where the Unit-Type of Slot 49 is being stored? We create a function that takes an Integer (the Slot that we know, which is 49) and returns a different Integer (the Index value that we want, which is where Unit-Type at 49 is being stored):
If done right, Reverse Equipment Key(49) will return the Integer value 4. Now that we have the tools to read and write out of our simple and/or complex Unit-Type arrays, let's DO something with them!
Taking Snapshots of (Saving) Your Inventory
The following trigger will activate whenever our hero does just about anything with an item short of using a charge (storing charges is feasible but beyond the scope of this tutorial). It will first blank out everything it knows about the arrays to make sure there are no ghost items (items that have since been removed from the inventory). The minimal wait time delay between the previous action and the next action is vital, as it prevents the trigger from writing items that are being removed from the inventory as if they were still present. It will then pick every item, find which container it is in, and read its Unit Type into the appropriate place in the corresponding array.
We will see in the following section why the global boolean value reference is necessary. Make sure when you declare it the it is defaulted to "false". You may also place it under the conditions at the head of the trigger. It's in its own If-Then-Else here purely for debugging purposes.
Restoring the Inventory to Its Rightful Place
Run the following actions immediately after your hero has been revived. The boolean flag mentioned before is toggled here to prevent snapshots (saves) to be triggered while items are being placed into the hero's inventory, otherwise the snapshot trigger would blank out the arrays and all items after the first would be lost.
Whew, done. You've now got a hero whose gear is returned to him in correct order whenever it is revived.
An example map is not currently forthcoming as this was made while integrating it into my own privately developed map. If someone else successfully completes the tutorial in a small example map and is willing to share it, I will absolutely post it here.
I do not request any credit if you use this method in your map. I feel that it is merely a work-around to something Blizzard will eventually fix and not worthy of mention. If you absolutely cannot not give me credit, that's fine too.
0
You're definitely coming off as forcing your opinion on others. Let people be creative in whatever way they choose, intimating your opinion onto them as suggestion or law isn't right.
0
I always absolutely loved how visually pleasing Planetary Boss Minis are. My only gripe with them, if any, is the universal strategy of "Run away and spawn Broodlings". I like a little more variety and new challenges in my playstyle.
10/10 on all the work that goes into them.
0
The problem being discussed is one of "remembering" items through death, not creating loot. The Data Editor and Trigger Editor both work well for dropping loot, it's really your choice.
On another note, I used the "pick all dropped items up and hide them for the revive" method as well. However, that doesn't remember the order of the items and jumbling everything back into an inventory without care for the player's decisions can be annoying depending on how complex your equipment layout is. Figuring Blizzard's not going to be taking another shot at fixing this any time in the near future, I devised a better system that saves items as they should be saved, exactly where they were.
The general idea is that you have a unit-type array for each inventory a hero has, each array having size equal to the number of slots in its corresponding inventory. Whenever a unit gains, loses, exhausts, or drops (you'd think this last one would be included in "loses" but it isn't) an item, set every value of all the arrays he owns to No Game Link. You then pick each unit held as an item by the manipulating hero and read it into the array at an index value equal to its (slot - 1). When you revive the hero, simply go through each array and if a value isn't equal to "No Game Link", create a unit of the unit type and pop it into the slot corresponding to the index value it's found at in the container the array relates to.
NOTE: When writing to the array after an item manipulation event, (Wait .1 game seconds) or so at the beginning of the trigger. The game likes to jump the gun on what to write into your array, but if you give it that slight delay it'll take a proper "snapshot" of the current inventory.
If your item container has empty spaces between item slots, those are counted as slots by the editor and do complicate things. For example, if your inventory has [Item 1], then two empty spaces, then [Item 2], your array index 0 should point to 1 as usual, but array index 1 should point to 4 (skipping 2 and 3). You can bypass this dilemma with the clever use of a static array to act as a "key". The key array for this inventory would look like this:
keyArray[2] = { 1, 4 }
And if you need to do the reverse and find the related index value to a given item slot, a function that takes the item slot as a parameter and does something like this should suffice:
Function FindKeyArrayIndexValueByGivenItemSlot
For Each Int counter = 0 to lastIndex, do {
If (keyArray[counter] == GivenItemSlot) {return counter}
}
So instead of reading your unit-type array like:
unitTypeArray[index]
You would do:
unitTypeArray[ FindKeyArrayIndexValueByGivenItemSlot( GivenItemSlot ) ]
It can seem like a complicated process, but it is very much worth it for that professional feel. It is NOT necessary if each item you have only has one possible inventory slot to go in.
P.S. Turn "Drop On Death" off if you go this route.
0
I'd like you to say hi to boss events like C'Thun, Kael'thas, Lady Vashj, Mimiron, Yogg-Saron, and Professor Putricide. These bosses all had very fun mechanics that did not involve very much standing still, even for the boss. Of course, since WoW is an online game played with multiple people there are fudged areas to account for the need to communicate and the fact of latency.
Single player games, requiring neither, have the luxury of being able to be very primal and touch upon your timings and instincts rather than your brain. I assure you though, it has very little to do with the complexity of the "AI".
0
Are you sure your item woes are fixed? When my heroes die now, the items just vanish permanently even if Drop On Death is not flagged. This is with all triggers disabled.
Edit: Also, the default leaderboard seems to be a little funky. The box containing the title is half missing on my map, dunno if it's just me.
0
Since the release I've been working on a personal project that exactly follows these guidelines. It's a hero defense that makes obscene use of custom boss encounters. I don't like releasing maps I'm currently plugging away at (I test and work on this map about twice per week) nor are my video editing skills up to par so I shan't be competing.
But sharing fun stuff is never a bad idea anyways! So take some inspiration from Bluefrex Hero Defense, publicly playable at your own risk (bring some friends, it's no fun alone), illustrated by this replay footage from a tuning session between four available friends from the original Bluefrex WoW guild:
If you are brave enough to go play it after seeing how good my video skills are, take these because it's dangerous to go alone:
skip: ends a boss encounter
bxhq: restores the tower to full health
I won't post the boss strats because the fun is in learning! There's lots of in-game help anyways. Good luck on the contest; I look forward to being inspired by your creations!
0
I'm pretty sure he just meant WoW-esque, not that they need to be copies of WoW bosses like the Thaddius video may lead you to believe.
0
@urashimakt: Go
Still plugging away at this one.
0
Once you're in the Data Editor, there's a dropdown menu near the top. Click it and scroll to Actors, it'll bring up a new tab for you.
0
Data Editor
Advanced
Game UI Data
Default SC2 UI Settings
Sound - Sound Data+
Change the numbers to be bigger until you're hearing what you want to hear. There's a lot of variables in there so you'll have to experiment for yourself, but it's the right place.
0
As I stated earlier and Cinicraft repeated, did you try changing those filters on the WEAPON of the Spider Mine in addition to the burrow/unburrow abilities?
0
Hey gang. Remember how you used to be able to cast Chrono Boost and Spawn Larvae on units by clicking the ability onto the wireframe in the default Blizzard UI? I've been curious as to whether or not you can link a dialog item to a specific unit in that way. So that, say, if I have a marine I could heal him with a medic by choosing the medic heal and clicking it onto a portrait of the marine in a dialog box, ordering the medic to run to that marine and heal him.
Any thoughts would be greatly appreciated.
0
In the trigger where you reduce the player's life by 1, check after the reduction if his number of lives has reached 0. If so, end the game in defeat.
0
Didn't notice the event, I suppose.