Question: Why do we need modifiers when you can achieve the same effect by simply manipulating the armour value of the target?
Now I know that might seem like an odd question but bear with me.
At face value the answer to that question seems simple, we need modifiers because we want the same weapon to deal different amounts of damage vs different types of target, however the answer isn’t quiet that simple, because if it was then you could achieve that by manipulating the armour value of the target in question.
So for example say the machine gun does 12 damage per shot and of has a rate of fire of 150 which equates to 1800 per minute if we want that weapon to only deal 2 damage per shot or 300 damage per minute then you would simply set the armour value of the target to 1500
However there is a flaw in doing things that way say you are using a bunker buster that does 125 damage per shot and say you want the bunker buster to deal 100 damage per shot per shot vs a bunker but only 50 damage per shot vs a tower, in this circumstance you can't simply increase the armour of the tower because that would throw off other weapons making them weaker against towers than they should be, so therefore we need a modifier which allows us to manipulate the damage we deal.
So that’s case closed right?
Wrong!
Given all the back and fourth we have had about damage calculations and understanding the math involved and about balancing it got me wondering is there an easier way to go about this, which brings me back to my original question.
Why do we need modifiers when you can achieve the same effect by simply manipulating the armour value of the target?
Well as we have already established things are not quiet that cut and dry and we need modifiers to allow us to manipulate the damage we deal so we can't just get rid of them, HOWEVER .... !!! There is still room here for making things simpler.
Now currently the damage calculations look like this
Code: Select all
((damage x modifier) - armour) x ROF
The problem with this however is that it can cause weird calculations that would result in weapons doing no damage or negative damage, which then requires a fail safe in order to deal with situations like this and that fail safe is the one third rule which looks like this.
Code: Select all
damage x modifier x 1/3 or 0.333333333
However what if we flipped things around and instead of applying the modifier to the weapons damage, what if we applied it to the targets armour?
Now given that flipping the damage calculations round like this would require a bit of work to implement you may well be asking why would you want to do this ?
Well actually there are several reason you might want to do this.
1.) it makes the damage calculations easier to understand
2.) it makes the damage calculations easier to do
3.) it makes the damage calculations more precise
4.) You don’t have to deal with weird calculations that result in no damage or negative damage
5.) you don’t need the one third rule.
6.) Most importantly it makes balancing easier.
So what would this look like?
Well instead of the damage calculations being
Code: Select all
((damage x modifier) - armour) x ROF
or
Code: Select all
damage x modifier x 1/3 or 0.333333333
where the damage calculation would result in damage being less then one third of the weapons base damage.
It would become
Code: Select all
Armour = base armour x modifier
Actually damage dealt = damage x ROF - armour
So already that is much easier to understand
So what would the modifier look like? Something like this perhaps.
Code: Select all
Structure modifier.json
{
"BUNKER":{
"bullet":
"shell":
"rocket":
"laser":
"artillery":
"bunker buster":
"flame":
}
"HARD":{
"bullet":
"shell":
"rocket":
"laser":
"artillery":
"bunker buster":
"flame":
}
"MEDIUM":{
"bullet":
"shell":
"rocket":
"laser":
"artillery":
"bunker buster":
"flame":
}
"SOFT":{
"bullet":
"shell":
"rocket":
"laser":
"artillery":
"bunker buster":
"flame":
}
}
so what about vehicles
Code: Select all
Weapon modifier.json
{
"legs":{
"bullet":
"shell":
"rocket":
"laser":
"artillery":
"bunker buster":
"flame":
}
"wheels":{
"bullet":
"shell":
"rocket":
"laser":
"artillery":
"bunker buster":
"flame":
}
"halftracks":{
"bullet":
"shell":
"rocket":
"laser":
"artillery":
"bunker buster":
"flame":
}
"tracks":{
"bullet":
"shell":
"rocket":
"laser":
"artillery":
"bunker buster":
"flame":
}
"hover":{
"bullet":
"shell":
"rocket":
"laser":
"artillery":
"bunker buster":
"flame":
}
"vtol":{
"bullet":
"missiles":
"shells":
}
}
So how would this work in practice? Let's take a bunker as an example and let's use a bunker buster and a machine-gun since we know bunkers are strong against bullets but weak against bunker busters
let's also assume the following values
Machine gun
Damage 30
Rate of fire 107
Bunker buster
Damage 125
Rate of fire 10
Bunker
Health 300
Armour 500
Modifier
Code: Select all
"bunker":{
"bullet":513
"bunker buster": 1
}
Bunker Buster
Armour
500 x 0.1 = 50
Damage
125x10-50 = 1200 per min
1200/10= 120 per shot
Machine gun
Armour
500x5.13=2565
Damage
30x107-2565 = 645 per min
645/107=6.028037383 (rounded to 6) per shot
so you can see from this simple example doing the damage calculations this way gives you the same result as the current system but is way way simpler to work with.
now I'll grant you that implementing this would require a bit of work not least for the fact that currently the modifiers are hard coded instead of being loaded dynamically and of course doing this would brake the game and you would have to rebalance every weapon for both the player and the computer but ultimately we are already doing this anyway so maybe its something worth thinking about.