Author Topic: Shock damage in C#  (Read 1256 times)

0 Members and 1 Guest are viewing this topic.

Offline nakorkren (OP)

  • Lt. Commander
  • ********
  • n
  • Posts: 217
  • Thanked: 194 times
  • Gold Supporter Gold Supporter : Support the forums with a Gold subscription
    2021 Supporter 2021 Supporter : Donate for 2021
Shock damage in C#
« on: October 16, 2022, 11:29:53 AM »
I attempted to calculate the "probabilistic" shock damage an attack would cause, based on initial damage and target size in HS, according to the rules for shock damage published by Steve for C#, which are as follows:

Quote
Shock Damage in C# Aurora will operate as follows
The chance of shock damage is equal to: Damage Caused to armour / Size of Ship in HS. For example a 9 point warhead vs a 6000 ton ship has a 7.5% chance of shock damage. A 16 point energy impact vs 10,000 ton ship has * an 8% chance of shock damage.
Any damage with less than a 5% chance is ignored as too small (i.e. any damage where the strength is less than 5% of the ship HS)
If shock damage occurs, the shock damage is rolled randomly up to 20% of armour damage
Where the armour damage is easily divisible by 5, for example a 15 point warhead, there is a random roll from 1 to max shock damage (1-3 in this case). Where the armour damage is not divisible by 5, the max shock damage is the amount divisible by 5 (rounded) down plus a percentage chance of an extra 1 max shock damage equal to the percentage of 5 remaining. For example, a 12 point warhead would be assigned 2 max shock damage approximately 60% of the time and 3 max shock damage 40% of the time.

Date 30.12.2018

The result of my calculations is shown in the plot below. My take-away is that shock damage can be safely ignored because at a tech level where you can create large damage weapons (big beams, or small enough missiles with high-tech warheads that you can still get them past the PD) any ship small enough to be impacted will be destroyed in so few shots that the shock damage is pretty much irrelevant.

Please check my work (see code posted in spoiler below), but if my conclusion is correct, I'd love to see shock damage get a small bump. Maybe make it exponential instead of linear (divide by 5), the way it was back in VB6?

Code: [Select]
clear all;
close all;
ship_size_tons=[250,500,1000,2000,4000,8000,16000,32000,64000];
ship_size_HS=ship_size_tons/50;
missile_dmg=[1:50];
ship_size_size=length(ship_size_HS);
missile_dmg_size=length(missile_dmg);
shock_chance=zeros(ship_size_size,missile_dmg_size);

shock_dmg_max=floor(missile_dmg./5);
shock_dmg_rem=rem(missile_dmg./5,1);
shock_dmg=zeros(1,missile_dmg_size);
for i=1:missile_dmg_size
    if shock_dmg_max(i) < 1
        shock_dmg(i)=shock_dmg_rem(i);
    else
        temp_a=1:shock_dmg_max(i);
        temp_b=1:shock_dmg_max(i)+1;
        shock_dmg(i)=sum(temp_a)/(length(temp_a))*(1-shock_dmg_rem(i))+sum(temp_b)/(length(temp_b))*(shock_dmg_rem(i));
    end
end
% shock_dmg

for k=1:ship_size_size
    shock_chance(k,:)=min(1,missile_dmg/ship_size_HS(k));
end
for a=1:ship_size_size
    for b=1:missile_dmg_size   
        if shock_chance(a,b)<0.05
            shock_chance(a,b)=0;
        end
    end
end

shock_dmg_calc=shock_chance;
for a=1:ship_size_size
    shock_dmg_calc(a,:)=shock_dmg_calc(a,:).*shock_dmg;
end

% shock_dmg_calc
figure;
hold on;
for i=1:ship_size_size
    plot(missile_dmg,shock_chance(i,:));
end
title('Chance of inflicting shock damage as a function of damage and target size');
legend('250 tons','500 tons','1000 tons','2000 tons','4000 tons','8000 tons','16000 tons','32000 tons','64000 tons');
xlabel('Missile damage');
ylabel('% Chance of causing shock damage');
grid on;

figure;
hold on;
for i=1:ship_size_size
    plot(missile_dmg,shock_dmg_calc(i,:));
end
title('Probabalistic shock damage as a function of damage and target size');
legend('250 tons','500 tons','1000 tons','2000 tons','4000 tons','8000 tons','16000 tons','32000 tons','64000 tons');
xlabel('Initial Damage');
ylabel('Probabalistic shock damage');
grid on;
% ax = ancestor(gca, 'axes');
% ax.XAxis.Exponent = 0;
 

Offline nuclearslurpee

  • Admiral of the Fleet
  • ***********
  • Posts: 2981
  • Thanked: 2242 times
  • Radioactive frozen beverage.
Re: Shock damage in C#
« Reply #1 on: October 16, 2022, 02:12:55 PM »
I think mechanically it is very difficult to make shock damage work effectively without causing other mechanical issues.

Currently we have the issue that shock damage is negligible for large ships, but absolutely crippling for smaller ships, which is one of several issues making ground support fighter worse than useless. That suggests that we probably want to tighten the shock damage distribution somewhat.

However, if we make shock damage more effective against larger ships, the question is what kind of counterplay do we have? There are basically two options: (1) fight outside of the enemy's range, which will be a buff in favor of missiles (probably a good thing, they need help) and will also reinforce the speed/range tactical superiority that is already something of an exploit (arguable, but I would say neutral or bad depending on what you want to accomplish); or (2) use shields (I would say bad, as shield superiority to armor beyond the early tech levels is already very well established, we don't need even more reasons to trivialize the shield vs armor decision).

So if we change shock damage, it is not sufficient to make it "more", we need to use this change to somehow introduce "more interesting" in terms of gameplay decisions.

An interesting physics insight here is that you can estimate the impulse or impact force as F = E*D, where E is the damage energy (=armor damage) and D is the average penetration depth. Since Aurora uses a range of triangular damage depth (i.e., penetration) distributions characterized by gradients, G (lasers have G=3, railguns and particle beams havd G=2, particle lances have G=infty, and all other weapons have G=1), you can write that the force is very approximately F = 0.5*sqrt(E/G) if we neglect the effect of armor thickness vs tech level (otherwise, shock damage would increase against better armor which is just a ludicrous mechanic - let's assume high-level armor is also better at damping shock damage due to copious quantities of handwavium). This actually introduces an interesting mechanic, as high-penetration weapons will do less shock damage.

Naturally I have pictures:


and the same plot with a shorter y-axis:


Here I've simplified to SD = min(E/M,1)*(0.20*E/2)*0.5*sqrt(E/G) to smooth things out and get rid of some odd boundary cases. We can see that the effect is principally to increase shock damage across the board in most relevant cases. There is some reduction of shock damage for smaller ships which could help GSFs a little bit but it's not a huge effect.

We could tighten up the distribution over ship sizes by changing M --> sqrt(100*M), where the factor of 100 is arbitrary and preserves the same shock damage for a 100-HS ship.


and the same plot with a shorter y-axis:


This brings the curves closer together which I think amplifies a bit more the effect of damage gradient i.e. weapon type. Fighters are now much less vulnerable to shock damage against ground AA as well which I think is a noticeable change.

In addition I think regardless of how you change it, if shock damage is bumped up we need to make a couple of ancillary changes - these are aimed at bringing shields into line a bit since they are already so much better than armor at mid-to-high tech levels, and their value against shock damage would only widen this gap:
  • Shield/armor balance needs to be brought closer. Ideally this would be done by rescaling the armor tech values, which currently increment by around +20% per level instead of the +25% that is most common in Aurora. I have tried making this change in the DB, but it interacts badly with ground forces since the weapon damage tech values are not accessible in the DB.
  • Mesons need a clean-up to be more generally viable, as they would be a great anti-shield counter if they weren't so terrible in every other way. I think the fact that Mesons require advancing in three tech lines, versus two for most other weapon types, is a serious problem; additionally, the penetration tech levels can be buffed somewhat - I think the meson mechanics are fine but the numerical values are just too low, combined with the crippling RP cost for such a niche weapon.
  • Not really a related change, but the RP cost of plasma weapons could probably be pushed back up, as their high shock damage plus benefit for ground forces is probably too good at the current very low RP cost (alternatively, make GU attack tech separate from weapon type, which would solve several problems).
Finally, as a side note the changes I suggest would imply that particle lances do no shock damage, which I think is probably reasonable as they are devastating enough already.
« Last Edit: October 16, 2022, 09:04:44 PM by nuclearslurpee »
 
The following users thanked this post: Mayne

Offline Pedroig

  • Lt. Commander
  • ********
  • P
  • Posts: 239
  • Thanked: 67 times
Re: Shock damage in C#
« Reply #2 on: October 16, 2022, 02:50:00 PM »
Without going through all the math presented, I think nuke is on the right track.

Particle Lances do no shock damage.  The "baseline" shock damage should be based upon Railgun model, with lasers doing less (half or sqrt) and missiles doing more (double or squared) with a limit of armour thickness being the max shock damage which can be done.

Don't mind the shield interaction really, though putting them on the Reactor load would "even out" the disparity in the mid-late levels, and would further restrict recharge rates, thus making them really just an anti-alpha tool.
si vis pacem, para bellum
 

Offline nakorkren (OP)

  • Lt. Commander
  • ********
  • n
  • Posts: 217
  • Thanked: 194 times
  • Gold Supporter Gold Supporter : Support the forums with a Gold subscription
    2021 Supporter 2021 Supporter : Donate for 2021
Re: Shock damage in C#
« Reply #3 on: October 16, 2022, 03:26:43 PM »
Qualitatively, I like Nuke's idea of high-damage low-penetration weapons (large missiles and carronades) getting a relative increase in performance, particularly since large missiles are heavily disadvantaged by PD mechanics and from an RP perspective, I'd like to see large missiles be a more viable option.

Quantitatively, looking across my chart along the line where you expect (in the statistics sense of the word) to achieve 1 point of shock damage, you're already penetrating a typical medium amount of armor. E.g. a 500t fighter getting hit by a str 8wh capable of penetrating 2 layers of armor, 1000t FAC hit by a strt 12 WH penetrating 3 layers of armor, 2000t hit by str 18HW penetrating 4 layers of armor, etc. It's not until you get to an 8000t destroyer that you start expecting to see shock damage before penetration damage from the same missile blast. And that's assuming you're using missiles or carronades and not a laser which will have much more penetration. Moral of the story, I think we should be seeing shock well before penetration for a G1 (missile/carronade) weapon, but right now that's not the case until you get to bigger ships.

Nuke, regarding your comment that shock is devastating against small ships... I've never really observed this, which is part of what spurred me to go do the math. Can you give an example? Are you talking about vs fighters, FACs, or small (<8k) destroyers? Does the combat message/log let you know somehow that it was shock damage that knocked out your component, vs damage that penetrated?

 
The following users thanked this post: superstrijder15

Offline nakorkren (OP)

  • Lt. Commander
  • ********
  • n
  • Posts: 217
  • Thanked: 194 times
  • Gold Supporter Gold Supporter : Support the forums with a Gold subscription
    2021 Supporter 2021 Supporter : Donate for 2021
Re: Shock damage in C#
« Reply #4 on: October 16, 2022, 03:53:35 PM »
To answer my own question, I just did some runs with 8000t destroyers shooting Str 25 warheads, and am getting decent results i.e. Str 1 internal damage every few shots despite no armor penetration.

When you get hit by something that does shock damage, the message just says "Damage per Hit 25   Penetrating Hits 1", but does not indicate that it didn't technically penetrate, it was actually shock damage. I will add a suggestion to the suggestion thread asking that hits which cause internal damage via shock rather than penetration say so, instead of lumping them together. That may help players recognize when shock is playing a factor in combat, at least when it applies to themselves getting hit.

The attacker who succeeds at causing shock damage despite not penetrating sees "Total Hits 1    Penetrating Hits 1", which I would argue is inconsistent and misleading since it didn't actually penetrate and you as the attacker would have no way of knowing that it did internal shock damage. However, in the interest of having fun game (rather than being a slave to realism), I would recommend that the attacker get the same summary as the defender i.e. something like "Total Hits 1   Penetrating Hits 0   Concussive Hits 1", just without the detail that the defender gets about what was actually damaged internally.
 
The following users thanked this post: superstrijder15

Offline Jorgen_CAB

  • Admiral of the Fleet
  • ***********
  • J
  • Posts: 2837
  • Thanked: 673 times
Re: Shock damage in C#
« Reply #5 on: October 16, 2022, 04:58:56 PM »
With the introduction of damage control being more effective on the next version I think you could make larger ships take more shock damage as described but also make damage control mitigate it more than regular damage. Perhaps allow damage control to more easily repair shock damage somehow.

Say if the damage control roll is successful it repairs the damage at half cost, it is fails but within a certain limit you pay normal cost. If it fails by more the damage is done normally.
« Last Edit: October 16, 2022, 05:01:29 PM by Jorgen_CAB »
 
The following users thanked this post: Mayne, nuclearslurpee

Offline nuclearslurpee

  • Admiral of the Fleet
  • ***********
  • Posts: 2981
  • Thanked: 2242 times
  • Radioactive frozen beverage.
Re: Shock damage in C#
« Reply #6 on: October 16, 2022, 05:07:56 PM »
Nuke, regarding your comment that shock is devastating against small ships... I've never really observed this, which is part of what spurred me to go do the math. Can you give an example? Are you talking about vs fighters, FACs, or small (<8k) destroyers? Does the combat message/log let you know somehow that it was shock damage that knocked out your component, vs damage that penetrated?

The way that shock damage is related to mass/size means that putting armor on a small ship (fighter-size) is often basically useless since shock damage will cripple the ship even if the damage doesn't penetrate. Not that fighter armor is terribly useful in most cases, but if you look at for example a 15-damage 1-gradient hit (missile, plasma, ground AA), in principle a 500-ton fighter with 3x5 armor could survive that hit at the cost of all its armor, instead what will happen in practice is 2 points of shock damage, guaranteed I believe, which will usually cripple or destroy the fighter. This is most commonly going to come up in the case of GSFs vs ground-based AA, which deals damage in a gradient-1 pattern - usually in space combat, small ships will be overkilled as number of BFCs is the limiting factor rather than weapon damage/volume of fire.

So in my view, it makes sense to tighten up the distribution, so that on one hand small ships can take hits from weapons at least up to a certain damage level without being immediately crippled, and on the other hand shock damage actually has a real effect against larger ships which are not usually going to be crippled by a few shock damage points. Right now, shock is basically a "win-more" mechanic because it really only comes into play against targets that you can already overkill in a dozen ways. So my goal, especially with the 1/sqrt(M) factor, is not to increase shock damage against small targets but rather to make it more relevant against a wider range of targets, so it becomes a mechanic we actually play with instead of largely ignoring.

One thing I do want to point out is that these high-damage hits are coming at later tech levels, when they are going up against greater thickness of armor. For example, for 1 point of shock damage against a 32,000-ton battleship using the latter plots, you would need a 30-damage plasma carronade, which means 35 cm (actually 32 damage) at the 8k RP mark - gradient 1 for plasma means 5 layers of penetration. At this tech level you would typically also be seeing armor tech of 8 or 10 points per HS, so thickness of 6-10 armor on a ship of that size would be pretty reasonable even if you're not the kind of player who builds spinal lasers with 3x boosted engines and 25 armor layers and calls them a navy. In this case, a volley of carronade fire against such a ship would not be likely to penetrate the armor, but would deal several internal hits and probably take out several non-essential components (truly important things like engines on such large ships will have higher HTK and not be likely to take out in this way).


With the introduction of damage control being more effective on the next version I think you could make larger ships take more shock damage as described but also make damage control mitigate it more than regular damage. Perhaps allow damage control to more easily repair shock damage somehow.

Say if the damage control roll is successful it repairs the damage at half cost, it is fails but within a certain limit you pay normal cost. If it fails by more the damage is done normally.

This would be a great interaction as well, since it gives players counterplay against shock damage - of course, if you put several DC modules on your big ship that still means taking off a few weapons or a couple layers of armor to meet your tonnage requirement, so it is a real consideration and not an automatic decision.
« Last Edit: October 16, 2022, 05:09:29 PM by nuclearslurpee »
 
The following users thanked this post: Mayne

Offline El Pip

  • Lieutenant
  • *******
  • E
  • Posts: 197
  • Thanked: 165 times
Re: Shock damage in C#
« Reply #7 on: October 17, 2022, 03:08:51 AM »
How could anyone not be impressed and convinced by such an #EffortPost? Bravo Mister Slurpee, let us hope our benevolent game writing overlord see this and agrees.