Posted by: El Pip
« 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.
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?
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.
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
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;