Entropy Avatar Entropy Avatar

HUGE Off-type Defence Bug

HUGE Off-type Defence Bug

Off-type Defences are broken.

I created a scenario where a huge ship with 199 mass-driver attack and 84 hitpoints attacks a ship with 14 beam attack, 345 beam-defence and 92 hitpoints.

floor(sqrt(345)) = 18. A ship with 199 attack can expect to do about 100 damage per round, or around 82 damage through the shields. The mass-driver ship should mostly kill the defender in one round, requiring at most two rounds to finish it off. In contrast, the beam ship could only expect to do about 7 damage per round.

Over nine of these one-on-one combats, the defending beam ship won eight! The attacker, with 199 attack and facing *no* matching defence only did about 0-12 damage per round!

What is going on?

Some have suggested that off-type defences aren't degrading. That seems to be fairly consistent with what I'm seeing here. I thikn the attacker was using mass-driver guns with an individual attack rating of 7. Rolling 0-7 against 0-18, even 25 times, would only generate a handful of points of damage.

I created a save-file for the scenario, which I'll send to the bugs email shortly. Once I finish boggling at the results...
30,498 views 52 replies
Reply #26 Top
IMO off type defense should offer NO PROTECTION against an attack. If I have armor and they have missiles, then my armor should be useless, period. Why go through the trouble of introducing three very different defense techs if they in essence impart similar defenses?
In the real world (anyone get a good chuckle from that?)a cop's body armor isn't going to do him much good against someone armed with a Taser, is it? Or how about a perp using tear gas... will the cop's body armor protect him? No. Similar situation here to me. If I'm tossing missiles at the enemy and his laser barrier is stopping them, I think maybe it's time to hire some new engineers.
Reply #27 Top
....to make defenses senseless again? or introduce another exploit: built lowtech ships of different weapon types. depending on which defenses the ai uses, simply use the ships with the off-type weapon. you will win with cheaper ships which require less technology.....its rather unlikely the ai will built balanced ships and research every defense tech equally.
Reply #28 Top


In the real world (anyone get a good chuckle from that?)a cop's body armor isn't going to do him much good against someone armed with a Taser, is it?


I'm pretty sure it would, actually. A Taser relies on sending the current through your body. I'd expect that body armor or a heavy leather jacket or something similar would be pretty effective protection by insulating you. Of course, they could still Taser you on the hand or neck, but the body armor doesn't prevent them from shooting you there either.

Also, it's hard to imagine that armor plating on a ship wouldn't be at least somewhat effective against all types of weapon. Similarly, shields and ECM (though not point defenses) could be expected to have some effect on off-type weapons.

The sqrt() defense is kind of a neat mechanism. For maximum modability, I would probably prefer that each defence module simply be rated in 3 categories (with fractional points allowed), but it's ok as is, assuming they fix the bug.
Reply #29 Top
IMO off type defense should offer NO PROTECTION against an attack. If I have armor and they have missiles, then my armor should be useless, period. Why go through the trouble of introducing three very different defense techs if they in essence impart similar defenses?


The idea is that your defences should not be absolutely useless against attacks of a different type than they're supposed to defend against. You can't predict what the enemy is going to send at you if he has ships fitted with different weapons, or if you have more than one enemy each with different weapons. You yourself may not be able to employ lots of defence against all the weapons, so instead you concentrate on the one that is most prevalent at the moment.
Reply #30 Top
I like the current cost and size of defense, otherwise large fleet attack values were too dominant. For some reason there seems to be an issue with off type defense, so we have not gotten to see the new intended game balance. I don't want them to revert to the old system (which may well have also had this bug, it just didn't show up as much because the AI used def less) - just get the system to working how it is supposed to.
Reply #31 Top
So has anyone noticed if this 'issue' was resolved yet or not? I haven't had a chance to play yet since updating the update last night.
Reply #32 Top
It's still on the fix list, I read.
Reply #33 Top
Yeah, and I've done some more testing, I'm pretty sure I know what is going on.

The problem is that non matching defense is being reduced by sqrt(value-dam) rather than sqrt(value)-dam for non matching weapons. Just to use the two examples we have already posted on this:

a 199 gun attack against a 345 beam defense... the guns will do about 100 damage per round, but the ship never loses defense, because it is still left with about sqrt(245) defense at the end... if it was being reduced at sqrt(value)-dam the attacker would do about 75 damage per round and the defense would be reduced to zero after the first 26 damage done by the guns.

Also, I had a 10/10/10 defense starbase attacked by several fleets with 78 missile attack and take no damage. BUT, 78 missiles will only do about 34 damage... and it will actually take 30 damage, not 16, to knock out the defense. I did take damage in the first round, and after that by destroying ships I was reducing the attackers rating 72... 66... etc, so that they were never able to overcome the defense.

With large attack values you can still do damage, but overall this makes defense (too) powerful. The fix could be simple, depending on exactly how the code is written, because you just need to move the parenthesis for the formula to work "right". Depending on how the method calls and values are being passed/referenced, however, this could also be a more difficult fix.
Reply #34 Top
I guess it really depends. If you can easily pass in a parameter which says 'this defence is being damaged by an off-type weapon' or determine such from existing parameters then it's not necessarily a hard fix.

Also because of the effect of a large off-type defence, it may be that a better strategy for selecting a weapon to fire is needed if the attacker has on-type weapons available, as I mentioned earlier.

One thing not discussed so far here is that despite taking hull damage, ships continue to enjoy the benefits of fully-charged weapons and defences if they survive the combat round. If instead this hull damage were to cripple a ship for one round so that it can't fight as effectively as before (reduced weapons) then not only would it be an example of how superior firepower wins out, it might actually mean that for one turn at least, that ship is no longer the prime target according to the Att/(Def+HP) formula.

I realise that I'm going beyond discussing bug fixes and into the realm of feature requests, but I thought it was worth asking if I could buy one, get one free
Reply #35 Top
Wyndstar, I suspect you are correct about what is going on.

Assuming that's the case, the solution may not be as easy as moving some brackets, however. The root issue is: when I apply 10 mass-driver damage to a ship with 100 shields, what should happen to it's defences in each category?

The current answer seems to be: 100 - 10 = 90 shields left, the other two defences are each therefore sqrt(90). So hitting 100/0/0 with 0/10/0 changes it to 90/9/9. Of course, this makes off-type defences much more powerful than one would think.

You could say that 10 mass-driver damage, if it strikes the shields, reduces shields by the square of the value, so hitting 100/0/0 with 0/10/0 changes it to 0/0/0. Hitting 100/5/0 with 0/10/0 would move it to: 75/0/0. This would make mixed-damage ships unreasonably strong, I think, as a ship without mixed defences would first have it's shields stripped by mass-drivers, then take full damage from lasers.

An alternative is to have basically independent *effective* defences in each category. So a 100/0/0 ship is really 100/10/10, and if I hit it with 0/10/0 damage it changes to 100/0/10. There is a minor drawback here in that different damage types do not support each other, and penetrating his shields with your mass drivers doesn't help your lasers against his shields.

Perhaps a better solution: you have independent effective defences, and each weapon hits all of those defences. So a 100/0/0 defence ship has effective defences of 100/10/10. When hit by 0/10/0 damage, the effective defences become 90/0/0. So the next 0/10/0 will not be blocked, but will reduce effective defences to 80/0/0.

Reply #36 Top
An alternative is to have basically independent *effective* defences in each category. So a 100/0/0 ship is really 100/10/10, and if I hit it with 0/10/0 damage it changes to 100/0/10. There is a minor drawback here in that different damage types do not support each other, and penetrating his shields with your mass drivers doesn't help your lasers against his shields.


My understand from the thread on the new combat system during the beta is that this is how the system currently "works".

The problem is that if you hit a 100/10/10 (note, this is actually a ship that appears to have 100/0/0 in the game, sqrt values are calculated but never displayed) with a 0/10/0, it goes to 100/9/10 NOT 100/0/10, because the game is taking sqrt(100-10), so sqrt(90) and coming up with a 9.

The developers SPECIFICALLY mentioned that reduced defense is not reduced against other kinds of attacks. If this rule was changed, I agree that mixed weapon ships would become too powerful. Knocking out a lot of point defense with your missles had no effect on the sqrt of point defense against lasers, was I think the example used.

Under the current system, off type weapons are still more effective, just only slightly, because 10+9+8+7+6+5+4+3+2+1 < 100, so as you gradually reduce that huge defense over time you will do more damage than someone who has to completely knock it out first. On average anyway, there are of course scenarios where off type weapons do no more damage under this system (especially if using weapons with a real low range, from the early part of the tech tree).

Because of all of this, I think we would actually see a dramatic increase in the effectiveness of off type weapons if you just "moved the bracket". But in a former life, before I was a lawyer, I used to be a programer, so I know it might not be as easy as it sounds.

I'm guessing the code looks something like (int)(math.rnd()*(ArmorVal+sqrt(SheildVal)+sqrt(MissileVal))) - (int)(math.rnd()*Ship.Weapon.WeaponDamVal) for actually doing damage, but there is probably a second formula/method for reducing the defence after that... with a call like DefValue = ArmorVal+SheildVal+MissileVal-ActualDamVal. That call should probably be more like ArmorVal+sqrt(SheildVal)+sqrt(MissileVal)-ActualDamVal.

What would make it hard is if they were trying to be all clever and object oriented and never defined a seperate memory location to hold DefValue, and instead it is made up of a bunch of references to other memory locations (i.e. ArmorVal, SheildVal, MissileVal). In this case it becomes much more complicated because you are 1 only reducing these values temporarily against one weapon type and 2 you need to "hard code" in the extra square root reductions to those memory locations.

All of this is really conjecture though, I have never looked at their code. And I don't do that kind of work anymore. What I do know through reverse engineering is how the resultant formula is implemented in the game. And that is non-matching armor is being reduced by its actual value, not by its sqrt value.

Hope that makes sense.
Reply #37 Top
Perhaps another solution is for off-type defences to only act against an attacker's weapon (and thus be degraded by it) when the on-type defence has failed or didn't exist in the first place.

This makes on-type defences useful in that they prevent the other defences from being degraded by off-type fire while active, and it also means that the attacker can continue to select weapon based on which defence is weakest without being frustrated by large off-type defences, or need to bring some weapons to the battle merely to saturate a particular kind of defence.
Reply #38 Top
Not much to add myself but:

I ran some simulations and my analysis also supports the Wyndstar's claims that off-armor is being reduced before the square root is taken.

I also agree with Wyndstar's position that fixing the mechanics so that all armor types are independently calculated and degraded would be most like how the combat system was described as working. Until it is adjusted to reflect how it was documented it seems unwise to change it further. And as previously stated balance does not effect reality or physics but enjoyment. Until we know what it feels like to play with the current stated design, other actions would seem hasty.
Reply #39 Top
If defence degradation were fixed only to fit the available documentation, it still wouldn't work because the firing pattern (for ships with more than one weapon) doesn't account for the off-type effect. When you're faced with the question 'Do I first fire my ten phasors or my five photon torpedoes to cause the most damage?' the answer should be straightforward to work out given the relevant numbers.
Reply #40 Top
If defence degradation were fixed only to fit the available documentation, it still wouldn't work because the firing pattern (for ships with more than one weapon) doesn't account for the off-type effect. When you're faced with the question 'Do I first fire my ten phasors or my five photon torpedoes to cause the most damage?' the answer should be straightforward to work out given the relevant numbers.


Um, this would work fine in the current system, the order of the weapons is irrelevant. Say you are going against a ship with 40 point defense, with your stated ship.

This means you have an attack of 30 beam (for your ten phasors) and 25 missile (for your 5 photon torpedos). Every weapon type and defense is figured independently.

So (if the system were working as documented):

If you fired the phasors first:
Your 30 beam attack would be facing 6 defense [sqrt(40)], and on average you would do 9 damage, or 15-6. The defenders beam defense would have been reduced from 6 to 0.
Your 25 missile attack would be facing 40 defense [straight missile def value], and on average you would do 0 damage, or 13-40. The defenders missile defense would have been reduced from 40 to 27.

If you fired photon torpedoes first:
Your 25 missile attack would be facing 40 defense [straight missile def value], and on average you would do 0 damage, or 13-40. The defenders missile defense would have been reduced from 40 to 27.
Your 30 beam attack would be facing 6 defense [sqrt(40)], and on average you would do 9 damage, or 15-6. The defenders beam defense would have been reduced from 6 to 0.

Under both scenarios you do 9 damage on average, if everything were working right. As it stands, you probably would do 0 damage, but the system is not working (I believe) as the developers intended.

When armor is reduced, it doesn't reduce the base value of the armor, just the value of the armor against that weapon type all by itself. 100 defense becomes 100/10/10, or 100/0/0 against beams with no carry over to other types, 0/10/0 against missiles with no carry over to other types, and 0/0/10 against guns with no carry over to other types.

Having weapon of one type reduce the defense for weapons of another type is an interesting idea, but goes against how the devs said the system should work. I think using this idea would make mixed weapon type ships too powerful. In any case, I think we should see the system working as documented before we try and change the system.
Reply #41 Top
Watch out... if the off type defenses degrade defenses more than the on type ones, then the firing order DOES matter, because if the on type ones fire first, they'll be absorbed, whereas if the offtype ones fire first, they'll rip up the defense so that the on type ones don't get deflected. Either one might be the desired effect, but it does need to be considered.
Reply #42 Top
When armor is reduced, it doesn't reduce the base value of the armor, just the value of the armor against that weapon type all by itself. 100 defense becomes 100/10/10, or 100/0/0 against beams with no carry over to other types, 0/10/0 against missiles with no carry over to other types, and 0/0/10 against guns with no carry over to other types.

Having weapon of one type reduce the defense for weapons of another type is an interesting idea, but goes against how the devs said the system should work. I think using this idea would make mixed weapon type ships too powerful. In any case, I think we should see the system working as documented before we try and change the system.


I'm sorry for the misunderstanding here, I had actually thought that damage to defence should carry over when considering other weapons in the same round. So the off-type effect is because that square root value added to other defences is not degraded when on-type weapons are fired at that defence?

Oh well, glad it only took this long to figure it out
Reply #43 Top
So the off-type effect is because that square root value added to other defences is not degraded when on-type weapons are fired at that defence?


No, no and no.

It was never intended this way. Simply look at the beta report forum. there is a sticky thread about this. Defense values are calculated completely separated for each weapon type.

The bug seems to be that the defense value is not calculated and then degraded, instead it is deagraded b4 the sqr function takes effect. which leads to the effect that the off type defenses are only degraded roughly by the square root of the damages absorbed by the defense, instead of the full.
Reply #44 Top
It was never intended this way. Simply look at the beta report forum. there is a sticky thread about this. Defense values are calculated completely separated for each weapon type.


As I said before, I've read that thread. I wouldn't have a clue about anything here without having first done so.

To recap and provide an example, if you have a ship with a shield rating of 25, a point-defence rating of 81, and an armour rating of 4, the overall ratings that weapons will have to penetrate are 36 (25 + sqrt(81) + sqrt(4)) 87 (sqrt(25) + 81 + sqrt(4)) and 18 (sqrt(25) + sqrt(81) + 4) - and, as we've just clarified, each defence is degraded by just the on-type weapon, at least that's what should happen.

As Wyndstar has patiently explained, the off-type defence (the square root value of the other two defencs) which is added in as I've just done above, is not degraded in the combat round per the documentation we've read, but as you said the damage is applied to the original full off-type value, and then the square root is taken to calculate the new degraded defence. For all practical considerations, this means that a reasonably strong off-type defence such as the strong point-defence above, can absorb far more damage than it was supposed to.

This is why I was originally saying that saturating a particularly strong defence with on-type fire (by firing a lot of missiles at the ship in the above example) would be a valid tactic if it actually worked but, because defences are tracked independently, that idea is on the shelf.

In the above example, if you wanted to try and penetrate the armour and cause catastrophic damage, you would need to score somewhere close to 110 points (25 + 81 + 4) with your mass drivers instead of the much lower value of 18.

On the right track now?
Reply #46 Top
So this big STILL hasnt been fixed yet? WHats going on stardock? If you wont fix it then let us revert back to the old patch versions!

Mag
Reply #47 Top
Calm down. It'll be fixed in the next patch, which will hopefully come swiftly. Reverting to an old patch won't help, unfortunately, as the same bug was presumably present... but just never noticed, as the defenses weren't worth the cost.
Reply #48 Top

So this big STILL hasnt been fixed yet? WHats going on stardock? If you wont fix it then let us revert back to the old patch versions!


It's likely the bug existed since DA was in beta, so going back to previous releases won't help. At least, people were complaining that off-type defences seemed a little powerful for some time.
Reply #49 Top
Has this bug been fixed in 1.6 or in 1.7? How is/will this (be) fixed?
Reply #50 Top
Yes, it's fixed. Though some would argue there are other imbalances in the combat system.

drrider