So I need to set up a tome system in you can buy 12 different tome 'packs':
Strength +1, Strength +10, Strength +50
Intelligence +1, Intelligence +10, Intelligence +50
Agility +1, Agility +10, Agility +50
All +1, All +10, All +50
I am using a pylon as the shop. I have the ability shop interact and shop buy and the buying system seems to work with potions, and I can also spend money on tomes, but I have no earthly idea how to make buying the tome increase the attribute. I assume I need to make an inventory with 12 slots where the items stack and each one applies a buff to a behavior... But I've been trying that for hours upon hours now and I can't seem to get it to work. Any ideas how to get the game to stack each tome, and increase that attribute for each tome (charge)?
I've messed around with triggers but I would prefer not to go that route, I'm sure there is a practical way in the data editor...
I have a map running, that uses a tome system aswell, and first i tried to recreate these WC3 like tomes, that just increase you attributes as soon as you pick them up, like an instant usable item (like these healing items, or mineral/vespene items from the campaign.)
Then, after it did not work, i made my tome system based on triggers and behaviors - but never thought about your idea, what would make it totally easy.
Give me some minutes, i'll try to figure something out and post my results here - probably i can rework my own tome system that way and help you with your´s at the same time.
Bad news - SC2 seems not to support stacking of simple non-charge items.
Damn, i hoped this would work easily but it simply does not. What a stupid thing not to allow stacking of simple items.
Who knows, HotS will probably change that - but for now it seems not possible.
I tried that library but on normal items it just removes them, and items with charges do not add the attribute with every charge - at least as far as i know.
Please, if you find a solution to this yourself, or ask that threads creator and he is able to help you, let me know how it works.
Whichever is easier! I would love for the tome to just be consumed when bought and the attribute immediately changed but I had no idea how to do that either. So I tried where the hero holds the tomes and the buff is applied depending on how many he holds, but stacking is extremely difficult and I cant make the number of charges affect the total attribute increase... PLUS, the unit creating the item is the pylon, not my hero, so I'm having trouble with that as well...
Your thoughts Khalanil1? Consumed on buy would be great if you could show me how to do that!
The hard part is when the unit dies to keep the buff although for single hero maps this would be easy using a death persistent effect that counts them and then reapplies them to the revived unit.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
So I've determined the easier way would be to have the item consumed immediately upon buying it and applying the permanent buff. That sounds beautiful, although I have no earthly idea how to do that! Anyone know of how to actually do this?
The hard part is when the unit dies to keep the buff although for single hero maps this would be easy using a death persistent effect that counts them and then reapplies them to the revived unit.
The way i fixed that problem on multi-hero maps is buying the behavior instead of an item, and counting plus saving how often that player bought that behaviour into some variable.
After death it just reapplies the number he bought that behaviour times the behaviour itself.
That death persistent thing.. how does that work actually or why does it not work on multi-hero maps?
I would like to even just do that! You use the ability type "train" to create the items right? Because I currently have my pylon 'training' strength +1 tomes, and putting them in my hero's inventory. The problem is in the triggers, because the trigger returns the pylon since its whats actually training the unit (item). How do I get my hero's strength to rise when the pylon is whats actually training the item. I know trigger questions are another forum but I figure its okay since this is an extenuation of the original question..
Just Khalanil is fine. Somehow, I managed to take my usual name on Curse but am unable to use it.
The reason I ask is that consuming tomes would probably require use of buffs, which will be lost upon hero death unless you're using a hero death prevention behavior.
Can you have items provide a passive buff to the heroes holding them? I haven't worked much with items yet, so I don't know much about them. If that's the case, getting a tome to provide attributes should be a piece of cake.
Well similar to PatchOne's last comment, I could count the number of charges into some variable, saving that so if the hero dies, that number can be brought back.. My main problem is I can;t figure out how to instantly consume them, adding to the current buff. And sure items can create a passive buff, but that would require an inventory with thousands of slots, since stacking is apparently near to impossible with this editor...
Ah, I understand you now. You're wanting to have tomes stack as items. I recommend the consumable method. If you're wanting the tome to be consumed on purchase as opposed to consume on use, PatchOne's solution is the one I would use. If you're allowing experience sharing among your heroes, I would use triggers; if you're not, I recommend the hero death prevention behavior to preserve behaviors after hero "death".
Yeah I've made it to the point where I believe instant consumption is the right way to go... But I have no idea how to actually do this! I can't even make my potions consume (they work, they just don't deplete!)... I suppose I will post a thread on my problems in that regard in the trigger editor as I feel guilty asking here..
Yeah I've made it to the point where I believe instant consumption is the right way to go... But I have no idea how to actually do this! I can't even make my potions consume (they work, they just don't deplete!)... I suppose I will post a thread on my problems in that regard in the trigger editor as I feel guilty asking here..
Your potions have a charge component to their cost, and the flag "Destroy when depleted" is checked?
Yeah I have it set to cost(charge max = 10, charge start = 1, charge use = 1). And the flag destroy when depleted is checked. I intended it to be you buy one up to a max of 10, and then use each one individually... But instead, when I buy it from the shop, it automatically gives me 10, and then I can click it infinitely and it will stay at 10...
I am not selling or buying items at all - Just the behavior.
But also, i am not using a building as shop, i am using a dialog based "interface" to do the vendor stuff.
I am pretty sure you can do this with a real shop aswell, just make a dummy upgrade and on upgrade progress finish you apply that behavior.
A small example of my triggers...
The "Strength" button event (on used dialog item):
This checks if the player has 20 minerals, if so it will subtract them, add one "Strength 1" behavior to that unit from some dummy building as giving unit.
Then it sets the array variable of "strength" and "player_hero_stats" for the triggering player to plus 1 (arithmetic, a=a+1)
And then on my revive trigger i just reapply them like this:
killedUnit is set inside that trigger and is just that unit that died, our hero.
So in the end it saves or increases a variable by a several kind of numbers for different tomes you buy (+5 if you buy a +5 tome, obviously) and in the end that variable has sometzhing like, lets say 56 or something, and here it just applies 56 times that behavior again.
Even if my triggering is veeery, i'd say lowskilled, this might help you with your problem, if you are trying this way aswell.
To be honest, I'm a very low skilled editor! haha so don't be too harsh on yourself.. I would have never thought to just have an unlimited upgrade! That's so much easier than item stacking.. I'm fairly certain I could do my instant consumable idea, but that would take a long time of messing around, whereas I'm quite familiar with upgrades... This will definitely help, at least for now so I can get a beta version up and running!
Regardless, I await your response too khalanil about the potions!
So I need to set up a tome system in you can buy 12 different tome 'packs': Strength +1, Strength +10, Strength +50 Intelligence +1, Intelligence +10, Intelligence +50 Agility +1, Agility +10, Agility +50 All +1, All +10, All +50
I am using a pylon as the shop. I have the ability shop interact and shop buy and the buying system seems to work with potions, and I can also spend money on tomes, but I have no earthly idea how to make buying the tome increase the attribute. I assume I need to make an inventory with 12 slots where the items stack and each one applies a buff to a behavior... But I've been trying that for hours upon hours now and I can't seem to get it to work. Any ideas how to get the game to stack each tome, and increase that attribute for each tome (charge)?
I've messed around with triggers but I would prefer not to go that route, I'm sure there is a practical way in the data editor...
Oh wow, that is so simple!
I have a map running, that uses a tome system aswell, and first i tried to recreate these WC3 like tomes, that just increase you attributes as soon as you pick them up, like an instant usable item (like these healing items, or mineral/vespene items from the campaign.)
Then, after it did not work, i made my tome system based on triggers and behaviors - but never thought about your idea, what would make it totally easy.
Give me some minutes, i'll try to figure something out and post my results here - probably i can rework my own tome system that way and help you with your´s at the same time.
@PatchOne: Go
Thanks that would be awesome!
Hey again.
Bad news - SC2 seems not to support stacking of simple non-charge items.
Damn, i hoped this would work easily but it simply does not. What a stupid thing not to allow stacking of simple items. Who knows, HotS will probably change that - but for now it seems not possible.
You might however ask this threads creator for any advice on this one: http://www.sc2mapster.com/forums/resources/trigger-libraries/5636-library-galaxy-item-utility-library/#posts
I tried that library but on normal items it just removes them, and items with charges do not add the attribute with every charge - at least as far as i know.
Please, if you find a solution to this yourself, or ask that threads creator and he is able to help you, let me know how it works.
Regards PatchOne
@nickthegreat2468: Go
Are you wanting the hero to hold the tomes and have a passive attribute buff that way, or go the traditional route of the consumable tomes?
@Khalanil1: Go
Whichever is easier! I would love for the tome to just be consumed when bought and the attribute immediately changed but I had no idea how to do that either. So I tried where the hero holds the tomes and the buff is applied depending on how many he holds, but stacking is extremely difficult and I cant make the number of charges affect the total attribute increase... PLUS, the unit creating the item is the pylon, not my hero, so I'm having trouble with that as well... Your thoughts Khalanil1? Consumed on buy would be great if you could show me how to do that!
The hard part is when the unit dies to keep the buff although for single hero maps this would be easy using a death persistent effect that counts them and then reapplies them to the revived unit.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
So I've determined the easier way would be to have the item consumed immediately upon buying it and applying the permanent buff. That sounds beautiful, although I have no earthly idea how to do that! Anyone know of how to actually do this?
The way i fixed that problem on multi-hero maps is buying the behavior instead of an item, and counting plus saving how often that player bought that behaviour into some variable. After death it just reapplies the number he bought that behaviour times the behaviour itself.
That death persistent thing.. how does that work actually or why does it not work on multi-hero maps?
Try Valerian's Hero Death prevention.
@PatchOne: Go
I would like to even just do that! You use the ability type "train" to create the items right? Because I currently have my pylon 'training' strength +1 tomes, and putting them in my hero's inventory. The problem is in the triggers, because the trigger returns the pylon since its whats actually training the unit (item). How do I get my hero's strength to rise when the pylon is whats actually training the item. I know trigger questions are another forum but I figure its okay since this is an extenuation of the original question..
@nickthegreat2468: Go
Just Khalanil is fine. Somehow, I managed to take my usual name on Curse but am unable to use it.
The reason I ask is that consuming tomes would probably require use of buffs, which will be lost upon hero death unless you're using a hero death prevention behavior.
Can you have items provide a passive buff to the heroes holding them? I haven't worked much with items yet, so I don't know much about them. If that's the case, getting a tome to provide attributes should be a piece of cake.
@Khalanil1: Go
Well similar to PatchOne's last comment, I could count the number of charges into some variable, saving that so if the hero dies, that number can be brought back.. My main problem is I can;t figure out how to instantly consume them, adding to the current buff. And sure items can create a passive buff, but that would require an inventory with thousands of slots, since stacking is apparently near to impossible with this editor...
@nickthegreat2468: Go
Ah, I understand you now. You're wanting to have tomes stack as items. I recommend the consumable method. If you're wanting the tome to be consumed on purchase as opposed to consume on use, PatchOne's solution is the one I would use. If you're allowing experience sharing among your heroes, I would use triggers; if you're not, I recommend the hero death prevention behavior to preserve behaviors after hero "death".
@Khalanil1: Go
Yeah I've made it to the point where I believe instant consumption is the right way to go... But I have no idea how to actually do this! I can't even make my potions consume (they work, they just don't deplete!)... I suppose I will post a thread on my problems in that regard in the trigger editor as I feel guilty asking here..
Your potions have a charge component to their cost, and the flag "Destroy when depleted" is checked?
@Khalanil1: Go
Yeah I have it set to cost(charge max = 10, charge start = 1, charge use = 1). And the flag destroy when depleted is checked. I intended it to be you buy one up to a max of 10, and then use each one individually... But instead, when I buy it from the shop, it automatically gives me 10, and then I can click it infinitely and it will stay at 10...
About my tome system...
I am not selling or buying items at all - Just the behavior. But also, i am not using a building as shop, i am using a dialog based "interface" to do the vendor stuff.
I am pretty sure you can do this with a real shop aswell, just make a dummy upgrade and on upgrade progress finish you apply that behavior.
A small example of my triggers...
The "Strength" button event (on used dialog item):
This checks if the player has 20 minerals, if so it will subtract them, add one "Strength 1" behavior to that unit from some dummy building as giving unit. Then it sets the array variable of "strength" and "player_hero_stats" for the triggering player to plus 1 (arithmetic, a=a+1)
And then on my revive trigger i just reapply them like this:
killedUnit is set inside that trigger and is just that unit that died, our hero.
So in the end it saves or increases a variable by a several kind of numbers for different tomes you buy (+5 if you buy a +5 tome, obviously) and in the end that variable has sometzhing like, lets say 56 or something, and here it just applies 56 times that behavior again.
Even if my triggering is veeery, i'd say lowskilled, this might help you with your problem, if you are trying this way aswell.
@PatchOne: Go
To be honest, I'm a very low skilled editor! haha so don't be too harsh on yourself.. I would have never thought to just have an unlimited upgrade! That's so much easier than item stacking.. I'm fairly certain I could do my instant consumable idea, but that would take a long time of messing around, whereas I'm quite familiar with upgrades... This will definitely help, at least for now so I can get a beta version up and running!
Regardless, I await your response too khalanil about the potions!
@nickthegreat2468: Go
I'll take a look at it in the editor. There might be some editor bugginess hindering you.