For the same mod as the other map, I'm also not sure how to go about solving this point: I'm looking to have a given stackable buff produce different damage increases depending on what unit it is.
Neither 'percentage' nor 'flat' damage buffs work here, since what I'm looking for is a damage buff that would provide the same effective damage (DPS) buff to every unit. This gets messed up because of cooldown. Flat-rate doesn't work: a +1 buff on a marine is worth way more than a +1 buff on a thor, for example. Percentage also doesn't work: a +10% buff on a Thor is worth way more than a 10% buff on a marine (even if we account for its slower cooldown).
Given the differential in cooldown, what I'd need would be, for example, +1 for the marine, but +1.5 for the thor (since the Thor has approximately 50% slower firing rate). Seems like I'd need to plug these values in manually, which I don't mind, but I just don't know how to do this. It doesn't seem like there's a way for buffs to just have different effects on different weapons - which, if I could, would be great (though you can add and remove weapons?).
No clue on how to do this. I thought I had a couple of ways to go about it but they all seem to fall flat... =/
Assuming the game can track fractions of hitpoints a percentage buff will do what you want. Test it with a 10% damage buff, firing 10 shots at the target.
Of course damage bonuses will mess with armor scaling. What some maps do instead is apply a percentage attack speed buff, which gives the same dps increase but keeps armor mitigation intact.
Just tested it: percentage buff is percentage of damage value - there's no adjustment for cooldown. =/
10% setting gives +0.6 to marine (6 damage normally), and +3 to Thor (30 damage normally). That's 500% more damage for the Thor even though the marine only has a 50% faster firing rate.
Buffing attack speed has the same problem: a 10% faster cooldown for a Thor increases DPS by way more than a 10% faster cooldown for a marine. For illustration, If you take extremes:
10 damage every 1 second (A), vs 1000 damage every 2 seconds [effectively 500 DPS] (B). Cut attack speed in half for both. The first now does 10 damage every .5 seconds, which is 20 damage per second; this is 10DPS more than before. The second now does 1000 damage every second, which is 500DPS more than before.
Oh, you want the flat dps increase to be the same!
I doubt there's a simple solution for that, at least not for data because you have to do math with several field values. Unless this buff gets applied and removed a lot throughout the game it's probably much better to use triggers and just hardcode the buff amount for each unit. Don't forget you'd have to factor in the random delay range etc. to get the actual dps (some stock units have an asymmetric random range so their average cooldown ends up higher than the Period value on the weapon - see Battlecruiser)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
For the same mod as the other map, I'm also not sure how to go about solving this point: I'm looking to have a given stackable buff produce different damage increases depending on what unit it is.
Neither 'percentage' nor 'flat' damage buffs work here, since what I'm looking for is a damage buff that would provide the same effective damage (DPS) buff to every unit. This gets messed up because of cooldown. Flat-rate doesn't work: a +1 buff on a marine is worth way more than a +1 buff on a thor, for example. Percentage also doesn't work: a +10% buff on a Thor is worth way more than a 10% buff on a marine (even if we account for its slower cooldown).
Given the differential in cooldown, what I'd need would be, for example, +1 for the marine, but +1.5 for the thor (since the Thor has approximately 50% slower firing rate). Seems like I'd need to plug these values in manually, which I don't mind, but I just don't know how to do this. It doesn't seem like there's a way for buffs to just have different effects on different weapons - which, if I could, would be great (though you can add and remove weapons?).
No clue on how to do this. I thought I had a couple of ways to go about it but they all seem to fall flat... =/
Assuming the game can track fractions of hitpoints a percentage buff will do what you want. Test it with a 10% damage buff, firing 10 shots at the target.
Of course damage bonuses will mess with armor scaling. What some maps do instead is apply a percentage attack speed buff, which gives the same dps increase but keeps armor mitigation intact.
@Photoloss: Go
Just tested it: percentage buff is percentage of damage value - there's no adjustment for cooldown. =/
10% setting gives +0.6 to marine (6 damage normally), and +3 to Thor (30 damage normally). That's 500% more damage for the Thor even though the marine only has a 50% faster firing rate.
Buffing attack speed has the same problem: a 10% faster cooldown for a Thor increases DPS by way more than a 10% faster cooldown for a marine. For illustration, If you take extremes:
10 damage every 1 second (A), vs 1000 damage every 2 seconds [effectively 500 DPS] (B). Cut attack speed in half for both. The first now does 10 damage every .5 seconds, which is 20 damage per second; this is 10DPS more than before. The second now does 1000 damage every second, which is 500DPS more than before.
Oh, you want the flat dps increase to be the same!
I doubt there's a simple solution for that, at least not for data because you have to do math with several field values. Unless this buff gets applied and removed a lot throughout the game it's probably much better to use triggers and just hardcode the buff amount for each unit. Don't forget you'd have to factor in the random delay range etc. to get the actual dps (some stock units have an asymmetric random range so their average cooldown ends up higher than the Period value on the weapon - see Battlecruiser)