Well, implementing a scaling % system is as easy as using one single stacking behavior. Since it stacks multiplicatively, you can stack it as high as you want, a 5% damage reduction behavior would never give you a 100% reduction, it would always reduce the remaining damage by another 5% for each new stack.
Recreating the WC3 system accurately is a little more complicated, because the calculation formula is different.
Like this?
0 Armor - 0% DR
1 Armor - 5% DR
2 Armor - 9.75% DR
3 Armor - 14.26% DR
4 Armor - 18.55% DR
5 Armor - 22.62% DR
Compared to WC3's
1 Armor - 5.66% DR
2 Armor - 10.71% DR
3 Armor - 15.25% DR
4 Armor - 19.35% DR
5 Armor - 23.08% DR
Hmm interesting, what does WC3's armor do that this couldn't. other than be the exact thing?
If it does work like this, then ill defiantly use the simpler version
Okay, this is a proof of concept for another WC3 armor system, involving a combination of data and triggers. It uses the same principle like my pre-1.4 system, however the involved calculations are a little more complicated now.
I will use a damage reduction buff and reduce the effect of the actual armor to zero. I will use a hidden attribute to keep track of the armor changes of a unit accurately. I will calculate the amount of armor reduction desired for the current amount of armor, and apply the according amount of stacks of the damage reduction behaviors.
This means, that, depending on the amount of behaviors and stacks I use, there will be discrepancies in the desired and the actual damage reduction.
Since all damage reduction buffs stack multiplicatively now, I decided to go for 2 different buffs with individual stack counts, to get a decent precision without ridiculous amounts of stacks required.
The values for these are educated guesses or result of experimenting, the optimal values might be different:
I picked one behavior with a reduction of 0.5% and 45 stacks and another one with 20% reduction and also 45 stacks. This results in a precision of about 0.5% and a maximum armor reduction of 1-(.8^45*.995^45)=99,9965%.
The testmap includes a damage test, one unit fires on another unit with modifiable armor. Select the target and enter a number in the chat to set the armor for that unit (255 max armor). The map displays the desired damage reduction, following the exact WC3 formula.
It also displays the damage dealt to the unit, calculates the actual reduction as well as the error compared to the formula.
Keep in mind, that triggers are only required, if the armor of a unit changes; however, because of the post-1.4 stacking mechanics, calculating the amount of needed behavior stacks involves costly functions like Log() and Pow(), so you might want to watch out for too frequent armor changes for many units. Also, negative armor is not supported for now. Also, the code is not really readable, as stated, it is only a proof of concept for people to decide, if this is actually worth bothering.
So having a hero with a Devotion Aura walking around changing armor of 30 to 70 units, and an inner fire buff being placed randomly on a small army wouldn't be good :D?
Is their anyway to place the Damage Reduction on the armor tab of the unit, when you hover over it?
Very nice, do you think with the introduction of Blizzard DOTA with the upcoming expansion they will have their own implication of a scaling %?
You could make it so every damage effect is reduced by a certain "percentage" for each armor point the target has, so as an example you can make the 10 damage attack be reduced by 1 for each armor point, and the 5000 damage attack be reduced by 50 or whatever you want.
This way you could say each armor point reduces damage by some amount (fixed percentage if you want), instead of reducing the standard amount (1 damage for each armor ponit).
Ya but its not exactly the same because as armor goes damage reduce slowly goes down each armor as seen here
As you may know, the armor system in SC2 is static, not percentage. An armor of 10 means you take -10 damage from every attack. This has implications for scaling attacks, and attack speed becomes a major factor. I investigated this when I started my tower defense project, because a static armor system just doesn't work when level 1 towers deal 10 damage and level 5 towers deal 5000 damage.
Now, you can do something with behaviors, but it won't be as comprehensive as you would like. Armor becomes irrelevant, and you'd have to use behaviors with a Combat: Damage Response where the unit with the behavior takes less damage. It may even be possible to control whether or not the behavior is used based on validators to check the attacking unit type (so you can have different units with different attack types), but that's going to require a lot of proof of concept testing. Either way, using a behavior system won't give the player as much feedback or satisfaction.
Exactly, if your map goes out of bounds of original health damage attack speed of SC2 then you need to tweak and think of fancy ways to make it work.
Warcraft 3's armor system was clean and nice.
Basically I have a behavior that will produce units on the barracks, It will only produce(and is suppose to) a certain amount, and no more.
So to prevent a player from clicking to train additional units I removed "Train Marine" ability from the command card
Now when the Unit is being produced the icon next to the building/status bar in on the barracks is a blue icon. Basically the "Train Marine" ability being placed in the command card gives the icon to what its training (logical, but doesn't help me)
What I need is a way to have the behavior train marines and without the player being able to click the ability to add more.
This is the requirement of the behavior to keep it to 4 marines per barracks, more barracks, more marines but the player can just click to add more than intended.
Any ideas, either in having the barracks have the Train Marine ability, and then with a behavior prevent more from being produced, or by having the ability removed from the command card and still have the icon while being produced..
Well i want it to be visable, and it is, its just the Marine Icon next to the training bar on the barraks is a blue box, if i make the ability on the Command card a passive.
If i Change back to an active ability, the Marine icon returns but the player is able to click it to train more than intended. So making it a passive seemed like the best bet, but the icon missing is the only problem
I changed the max que to 1 so one barracks wouldn't hog all the marines and have them count towards the max
One thing i can't figure out is, i changed the Command Card on the barracks, basically removed everything except rally and Train Marine, i then changed train marine to a passive. The only thing is the actual ability with the time bar on the barracks for the marine has no picture and can't figure out how to add that.
If i change the Train Marine ability back to normal on the command card the picture returns.
The other option is to remove the qued marine if the max is already obtained, if the player clicks it.
Ok lets back up to behavior, just a bran new one, or duplicate one. Dont know what to do with it, but i think i can figure out the train unit ability (already thier :D)
I played around in WC3 Editor and got a basic understanding of triggers. In SC2 thiers a whole new system that i'm trying to learn slowly.
But if anyone wants to help would be greatly appreciated give me a head start in learning this.
In my game a player builds a building and the building itself will automatically start creating a set unit up to a maximum set number. If that unit dies the building will then make a another.
For example Player builds a Barracks. Barracks starts producing marines until 4 marines are in the battle field. Then they stop, the player should be able to click on the barracks and see whats building but cant build more than 4.
If a second barracks goes down, the 2 work together building marines until 8 are on the battle field.
Basically Make the Sci-Vessel Nano repair ability repair shields, the actually ability can only change how much energy it cost to repair and how much is repaired, but to life only.
Well i know their is an upgrade, but the upgrade just changes certain properties i looked at what it changes but i get lost at that point (the whole upgrade section is out of my league). I wanted to make it base, from the start
0
Lets say a use a simple 4% DR per armor like discussed earlier, how would you implement negative armor
0
@Kueken531: Go
So having the max armor a unit would have at like 15-25 the difference is minor
0
Like this? 0 Armor - 0% DR 1 Armor - 5% DR 2 Armor - 9.75% DR 3 Armor - 14.26% DR 4 Armor - 18.55% DR 5 Armor - 22.62% DR
Compared to WC3's
1 Armor - 5.66% DR 2 Armor - 10.71% DR 3 Armor - 15.25% DR 4 Armor - 19.35% DR 5 Armor - 23.08% DR
Hmm interesting, what does WC3's armor do that this couldn't. other than be the exact thing? If it does work like this, then ill defiantly use the simpler version
0
So having a hero with a Devotion Aura walking around changing armor of 30 to 70 units, and an inner fire buff being placed randomly on a small army wouldn't be good :D?
Is their anyway to place the Damage Reduction on the armor tab of the unit, when you hover over it?
Very nice, do you think with the introduction of Blizzard DOTA with the upcoming expansion they will have their own implication of a scaling %?
0
Ya but its not exactly the same because as armor goes damage reduce slowly goes down each armor as seen here
http://classic.battle.net/war3/pdf/armorattackdefense.pdf
0
Exactly, if your map goes out of bounds of original health damage attack speed of SC2 then you need to tweak and think of fancy ways to make it work. Warcraft 3's armor system was clean and nice.
http://classic.battle.net/war3/pdf/armorattackdefense.pdf
0
This tutorial is somewhat outdated and seems messy but its a start.
http://www.sc2mapster.com/forums/resources/tutorials/9853-triggers-data-warcraft-3-armor-system/
Any one else have any suggestions?
0
Are their any, or is it possible to have them instead of importing each one individual Warcraft series (RTS/WoW), SC1, Diablo Series
0
Basically I have a behavior that will produce units on the barracks, It will only produce(and is suppose to) a certain amount, and no more. So to prevent a player from clicking to train additional units I removed "Train Marine" ability from the command card
Now when the Unit is being produced the icon next to the building/status bar in on the barracks is a blue icon. Basically the "Train Marine" ability being placed in the command card gives the icon to what its training (logical, but doesn't help me)
What I need is a way to have the behavior train marines and without the player being able to click the ability to add more.
CountUnit(Marine,QueuedOrBetter) < (CountUnit(Barracks,Total) * 4)
This is the requirement of the behavior to keep it to 4 marines per barracks, more barracks, more marines but the player can just click to add more than intended.
Any ideas, either in having the barracks have the Train Marine ability, and then with a behavior prevent more from being produced, or by having the ability removed from the command card and still have the icon while being produced..
0
Well i want it to be visable, and it is, its just the Marine Icon next to the training bar on the barraks is a blue box, if i make the ability on the Command card a passive.
If i Change back to an active ability, the Marine icon returns but the player is able to click it to train more than intended. So making it a passive seemed like the best bet, but the icon missing is the only problem
0
Worked perfect thank you!
I changed the max que to 1 so one barracks wouldn't hog all the marines and have them count towards the max
One thing i can't figure out is, i changed the Command Card on the barracks, basically removed everything except rally and Train Marine, i then changed train marine to a passive. The only thing is the actual ability with the time bar on the barracks for the marine has no picture and can't figure out how to add that.
If i change the Train Marine ability back to normal on the command card the picture returns.
The other option is to remove the qued marine if the max is already obtained, if the player clicks it.
0
Ok lets back up to behavior, just a bran new one, or duplicate one. Dont know what to do with it, but i think i can figure out the train unit ability (already thier :D)
0
I played around in WC3 Editor and got a basic understanding of triggers. In SC2 thiers a whole new system that i'm trying to learn slowly.
But if anyone wants to help would be greatly appreciated give me a head start in learning this.
In my game a player builds a building and the building itself will automatically start creating a set unit up to a maximum set number. If that unit dies the building will then make a another.
For example Player builds a Barracks. Barracks starts producing marines until 4 marines are in the battle field. Then they stop, the player should be able to click on the barracks and see whats building but cant build more than 4.
If a second barracks goes down, the 2 work together building marines until 8 are on the battle field.
Where should I start?
0
Basically Make the Sci-Vessel Nano repair ability repair shields, the actually ability can only change how much energy it cost to repair and how much is repaired, but to life only.
Any one have an easy solution?
0
Well i know their is an upgrade, but the upgrade just changes certain properties i looked at what it changes but i get lost at that point (the whole upgrade section is out of my league). I wanted to make it base, from the start