Jump to content

[1.1] BDArmory v0.11.0.1 (+compatibility, fixes) - Apr 23


BahamutoD

Recommended Posts

Do drones need a radar or something? I tried making a drone AI enemy with no radar or targeting pod (It only uses sidewinders and hidden vulcans) but it wouldn't launch when I nosedived a plane less than a km in front of it then did a loop. Peace mode was off and they were on opposite teams. Guard mode was on and the AI pilot was on standby. I guess it's more realistic but I'm not sure if its a feature or a bug.

EDIT: Connecting it to a large radar with data link worked although I also practically landed on its runway that time.

Don't need radar, but make sure the weapon manager has a decent range set & full field of view. If you haven't put a weapon manager part on, then it does need that yes.

Link to comment
Share on other sites

cannonShellPower -- The cs for the module on github says this is 'cannon explosion impulse', is it an arbitrary value or is it a real value measured in N/kN? Does the impulse decrease with the square of distance like a real explosive or is it a constant value all the way to the end of the cannonShellRadius?

I think it's exactly what it says on the tin. cannonShellPower is an impulse (it uses ForceMode.Impulse in Unity) and is measured in kilonewton seconds (kN·s).

Objects experience the cannonShellPower impulse at the explosion's centre and decreases the farther away from the explosion. The impulse decrease is neither linear nor inverse square:

[TABLE=class: grid, width: 500, align: center]

[TR]

[TD=align: center]Distance from explosion / blast radius

[/TD]

[TD=align: center]Percent of maximum impulse

[/TD]

[/TR]

[TR]

[TD=align: center]0[/TD]

[TD=align: center]100%[/TD]

[/TR]

[TR]

[TD=align: center]0.1[/TD]

[TD=align: center]99%[/TD]

[/TR]

[TR]

[TD=align: center]0.2[/TD]

[TD=align: center]96%[/TD]

[/TR]

[TR]

[TD=align: center]0.3[/TD]

[TD=align: center]91%[/TD]

[/TR]

[TR]

[TD=align: center]0.4[/TD]

[TD=align: center]84%[/TD]

[/TR]

[TR]

[TD=align: center]0.5[/TD]

[TD=align: center]75%[/TD]

[/TR]

[TR]

[TD=align: center]0.6[/TD]

[TD=align: center]64%[/TD]

[/TR]

[TR]

[TD=align: center]0.7[/TD]

[TD=align: center]51%[/TD]

[/TR]

[TR]

[TD=align: center]0.8[/TD]

[TD=align: center]36%[/TD]

[/TR]

[TR]

[TD=align: center]0.9[/TD]

[TD=align: center]19%[/TD]

[/TR]

[TR]

[TD=align: center]1.0[/TD]

[TD=align: center]0%[/TD]

[/TR]

[/TABLE]

Impulse is change in momentum:

J = m·(ÃŽâ€v)

where

  • J is impulse in kN·s
  • m is mass in tonnes
  • ÃŽâ€v is change in velocity in m/s

If the impulse is divided by mass, we get the change in velocity. An object that is 4 tonnes that experiences an impulse of 20 kN·s will have a change in velocity of 5 m/s.

Link to comment
Share on other sites

I know this may have been mentioned but... couldn't you just hit the source code and figure it out?

wouldn't be the first time I've looked through the git to see what something does.

I have no experience with proper programming, but since Acea has kindly pointed me to the part that does explosion damage, I think I've sort of figured it out:


[COLOR=#333333]ExplosionHeatMultiplier = [/COLOR][COLOR=#0086b3]2800

[/COLOR]heatDamage = ExplosionHeatMultiplier * power * distanceFactor/part.crashTolerance;


part.temperature += heatDamage

So distanceFactor is some sort of square root function of distance to the explosions point of origin, ExplosionHeatMultiplier is a constant, and power must be derived from blastPower in the config... yet I can't find the relationship between power and blastPower. It must be in the cs files somewhere...

Anyways, the proper damage equation would look something like:


heatDamage = ExplosionHeatMultiplier/part.crashTolerance*(power/distanceFactor)

We would also add in the weapon config warheadType: HighExplosive, BlastFragmentation, ContinuousRod; and distanceFactor would include a function of the warheadType rather than be just a pure square of the distance.

So, knowing that raw R0 damage is 2800 * power, all we would need to do is figure out what that equates to in joules and we'll have our basis for calculating our power for our warheads.

So, a bit more research reveals that the formula for kinetic projectiles is:


float heatDamage = (rb.mass/hitPart.crashTolerance) * rb.velocity.magnitude * 50 * BDArmorySettings.DMG_MULTIPLIER;

[COLOR=#333333]heatDamage = heatDamage/[/COLOR][COLOR=#0086B3]8
[/COLOR]
[COLOR=#333333]hitPart.temperature += heatDamage[/COLOR]

I'm not exactly sure if there is a difference between velocity and rb.velocity.magnitude at R0 when the vessel is at V0 and the target is also V0; DMG_MULTIPLIER = 6000; and with that info, it's probably safe to say that we have all that we need. A bit of maths finds our projectile heat damage calculations are: mass * velocity * 3750, so a 1 joule projectile (1kg @ 1m/s) would have a heat damage of 3750... thus 1J = 3750! :cool:

Thus 2800/3750 = ~0.75 joules per point of power!

And if we can just figure out the relationship between power and blastPower, we would have an actual measurement from which to derive our blastPower ratings!

Woohoo! :D

Anyways, I'll have to finish digging around laters as I've got to get dinner ready.

<critical infos>

Heh, got ninja'd (sorta) while posting. THAT is exactly the kind of info we need! I'd post more but duty calls! +1 from me!

Edited by Scoundrel
Link to comment
Share on other sites

I cant seem to convince the AI that rocket pods are a weapon to use. Just to test things, I made some planes with only rocket pods as weapons (still had a weapon manager), and even then it wouldnt fire them. Does the AI not shoot rockets, or is it just waiting for such a good shot that it just seems that way?

Link to comment
Share on other sites

This mod is great, but it's have only one GPS and it's bomb :( I can help you if you just write how do rockets and it's all. For me it's too to hard to know what are types of rockets, in description should be short inscription like: AA, AG, GA, GPG (A- air G - ground). But mod still is great :)

Link to comment
Share on other sites

Wait, is the guard's field of view calculated from weapon manager's position? I've always been hiding mine inside the vessel...

- - - Updated - - -

This mod is great, but it's have only one GPS and it's bomb :( I can help you if you just write how do rockets and it's all. For me it's too to hard to know what are types of rockets, in description should be short inscription like: AA, AG, GA, GPG (A- air G - ground). But mod still is great :)

Weapons actually replicate their real life conuterparts, so you can google the names and find out the details. Also, Baha (author) has videos on his channel that pretty much explain everything.

Link to comment
Share on other sites

@Scoundrel: there is an error on that formula, mass*velocity is not power, nor energy (which is what it should be) it's momentum.

The energy of the bullets are on the order of kilojoules, if the formula was used as it is using energy everything would be superoverpowered.

That is not a minor problem, the units don't keep up after that point which can cause major deviations on what should be happening.

The whole formula needs to be rebalanced to calculate (mass*velocity^2)/2 times a new balancing constant.

The main problem that this causes is that big caliber weapons become underpowered, among other problems.

So right now it's actually 3750 = 1 N*s

So you end up havig 0.75 m/s per point of power, point of power should be adimensional (power / power) but is actually a velocity value.

And "power" should be renamed energy :P

Edited by tetryds
Link to comment
Share on other sites

@Scoundrel: there is an error on that formula... The whole formula needs to be rebalanced to calculate (mass*velocity^2)/2 times a new balancing constant... And "power" should be renamed energy :P

Yeah I'm not sure where my head was yesterday... oh wait, it was 5 drinks in to a glorious 21 year old Glenfiddich as I prepared a magnificent Michelin-starred quality roast with perfectly done gravy, potatoes and puddings. :D

Anyways, you don't want to use energy calculations. Momentum is what is used to calculate terminal effects: RHA penetration calculations are based on mass*velocity*sectional density*one or more constants, and the spalling/fragmentation effects are derived from that.

The energy of the bullets are on the order of kilojoules, if the formula was used as it is using energy everything would be superoverpowered.

Maybe, but as I said, we don't want to use energy. There appears to be a straight conversion from momentum into heat, and that is perfect for our purposes. We would just need to derive blastPower from the mass*velocity of the gases of the warhead, and correct the formula to take into account the warhead type. A bit of an oversimplification, sure, but it would be relatively realistic enough for our purposes. I'll see if I can find time to do some calculations of the various munitions and see what numbers I can cook up.

Link to comment
Share on other sites

Anyways, you don't want to use energy calculations. Momentum is what is used to calculate terminal effects: RHA penetration calculations are based on mass*velocity*sectional density*one or more constants, and the spalling/fragmentation effects are derived from that.

Yes, as I also said before and you said now, momentum is important for penetration.

But remember that we are handling energy here, there is a direct conversion into heat, if you convert momentum into energy using some magic constant the results are going to be physically inaccurate.

I don't see how that can be perfect for our purposes as it deviates too much from the actual energy values when you pick a large range of weapons with different bullet mass and velocity, there are huge inconsistencies.

What could be done though, would be calculating a perfect inelastic collision and applying the dispersed energy as heat.

This would be the case for a bullet that penetrates and doesn't bounce off, being completely absorbed by the target part.

But remember that we are not talking a specific kind of ammunition, such effects would have to be handled separately, what we want right now is a way to turn energy into energy.

So, if we have to assume something to be used on all cases, we have to use something that is true for all cases, regardless of the warhead type.

Such effects would be applied on the top of that, if/when different types of ammo happen.

But for now, all we have are cannon and ballistic, I am not sure if the cannon projectile damage behaves like the ballistic one, but it should, then explode.

Edit: I think it would be better if we for example added piercing damage as a separate factor, where a constant multiplies the momentum and adds to the collision damage, or explosion, or whatever else, it would be part of the damage dealt in heat but not all of it.

Edited by tetryds
Link to comment
Share on other sites

Thanks to the creators of Aviator Arsenal, KAX, and SXT I can create all the WW2 Aircraft I want! But failed to produce a B-17, but close though:D

Javascript is disabled. View full album

EDIT: P.S. I don't know how to embed an imgur album on here

Edited by tetryds
you don't need to link it, click edit to see how it's done :)
Link to comment
Share on other sites

Yes, as I also said before and you said now, momentum is important for penetration.

But remember that we are handling energy here, there is a direct conversion into heat, if you convert momentum into energy using some magic constant the results are going to be physically inaccurate.

Except that damage isn't based on heat generated; it uses KSP heat mechanic in place of damage, because there is no % damage state for parts (yet).

Link to comment
Share on other sites

Except that damage isn't based on heat generated; it uses KSP heat mechanic in place of damage, because there is no % damage state for parts (yet).

Edit: So, if you use energy instead you add a v/2 factor to the damage, given that you will balance it out later with a constant, you could say that you have an extra v that affects the final damage values.

The big deal with this is that many weapons sacrifice projectile mass to gain in velocity.

Now, what ends up happening is that a weapon that does not trade mass for velocity is always better than one which does.

When talking about replicas, it means that the Berezin UBZ will always hit much harder than the Browning M2.

And since it also has a higher firerate, the final force (momentum/s) is much, much greater than the one of the Browning.

But comparing the power generated by both weapons, the power generated by the Berezin is not that much greater than the Browning.

Using energy evens out the damage and power of real life weapons, you continue having different damage values but trading mass for speed actually means something.

@Bluejay0013: No problem :)

Edited by tetryds
Link to comment
Share on other sites

Edit: So, if you use energy instead you add a v/2 factor to the damage, given that you will balance it out later with a constant, you could say that you have an extra v that affects the final damage values.

Erm, that sounds like a rationalization for an unnecessary change to the damage mechanics. Momentum is acceptable as any other, IMHO. :)

When talking about replicas, it means that the Berezin UBZ will always hit much harder than the Browning M2.

Yup. In fact it does. In real life... though not at long ranges where the superior ballistics coefficient of the M8 API not only brings the .50 M2 on par with the Berezin UBZ's 12.7x108mm API BS round for hitting power, but possesses superior windage (1mrad vs 1.3mrads for the API BS), drop (704.2cm vs 861.7cm), and time to 1000m (1.358 seconds vs 1.583 seconds), meaning the .50BMG has a slightly higher Pk at typical to extended engagement ranges. At close in ranges, the UBZ's marginally inferior ballistics aren't particularly relevant, and is a decidedly superior weapon system.

Using energy evens out the damage and power of real life weapons, you continue having different damage values but trading mass for speed actually means something.

It does mean something... just not what you think it means. Faster rounds are more likely to connect with targets, making them more accurate. You are trading the likelihood of connecting with a target for the likelihood of doing significant damage with a single strike, because terminal ballistics and exterior ballistics are not mutually exclusive. :D

Link to comment
Share on other sites

Terminal balistics is an interesting beast heck if you get sometbing moving fast enough a three mm piece of aluminum placed 40cm above a second piece can stop the projectile

- - - Updated - - -

Another odd and mostly unrelated armor thing is that modern APCs such as the Stryker and BTR-90 are armored against 14.5mm rounds but almost no modern vehicle weapons use those rounds and even antimaterial rifles have largely switched to 20mm

Link to comment
Share on other sites

Why don't you add Fire button at Weapon manager interface? I've use fire with abort button, but I always wanted to do every sequence at weapon manager interface.

Is there any reason that Weapon manager interface cannot integrate fire button?

Link to comment
Share on other sites

Yup. In fact it does. In real life... though not at long ranges where the superior ballistics coefficient of the M8 API not only brings the .50 M2 on par with the Berezin UBK's 12.7x108mm API BS round for hitting power, but possesses superior windage (1mrad vs 1.3mrads for the API BS), drop (704.2cm vs 861.7cm), and time to 1000m (1.358 seconds vs 1.583 seconds), meaning the .50BMG has a slightly higher Pk at typical to extended engagement ranges. At close in ranges, the UBK's marginally inferior ballistics aren't particularly relevant, and is a decidedly superior weapon system.

Yes, but that is real life, BDArmory does not add atmospheric drag to the projectiles, nor any other damage effect that would come from different types of ammunition rather than make it explosive and the BerezinUBK continues being more powerful at every range.

The range at which the Browning M2 would become "superior" is impracticable for dogfighting on KSP, the aiming error overcomes the bullet dispersion, you end up having a higher chance of hit if you use a weapon that is not so precise.

This leads to highly accurate weapons being useful only for taking down ground targets or slow/low maneuverability ones.

It does mean something... just not what you think it means. Faster rounds are more likely to connect with targets, making them more accurate. You are trading the likelihood of connecting with a target for the likelihood of doing significant damage with a single strike, because terminal ballistics and exterior ballistics are not mutually exclusive. :D

Please, please don't assume I did not calculate all that when balancing my weapons.

The big problem is, even after balancing by nerfing it's accuracy and forcing it to prematurely overheat, the BerezinUBK is a better weapon at every single circumstance.

What you have on KSP is that a round that connects will apply all of it's damage to one single part, and there is no atmospheric drag on the bullets.

This means that for long ranges, all you have to do with the BerezinUBK is spray at the target, every hit will cause significant damage.

Whereas with the Browning M2 you need to consistently hit one single part in order to cause as much damage, and even though it is more accurate it's hard to connect several rounds to the same part.

If you try to nerf the Berezin so much that it stops being overpowered at longer (750~1000m) ranges you render the weapon useless at every range.

I am not saying that you cannot balance it, it is balanced on AviatorArsenal, but even being balanced it only makes sense to use the Browning M2 if you can use more of it than the Berezin, you need to artificially force another layer of balance on weapons of the same caliber in a challenge for example.

The problem with this is that it should be a design choice rather than something artificial like it has to be.

(The factor is around 3 Browning M2 for every 2 BerezinUBK)

So, I am waiting to see what you can come up with, but looking at my numbers and from extensive ingame testing, the current implementation has problems.

If you want to fix it by adding atmospheric drag or whatever else, I am up to it, the calculation of damage is not the only thing that would require some tweaks.

Another thing I want to discuss is the impulse generated by explosives, IMO explosions should generate a fair amount of damage (heat) to the parts within it's blast radius but not as much impulse.

I am not sure how BDArmory applies it, but it's very common to send tanks flying away with small bombs, armor is often useless against them even when it's not a direct hit.

Edited by tetryds
Link to comment
Share on other sites

Yes, but that is real life

Which is exactly my point. :P

The range at which the Browning M2 would become "superior" is impracticable for dogfighting on KSP, the aiming error overcomes the bullet dispersion, you end up having a higher chance of hit if you use a weapon that is not so precise.

Yes and no... the more accurate your gunsights, the more precise you want your weapon system; the average engagement ranges for ww2 dogfights was between 50 and 300 yards; and the results of those early dogfights revealed the lack of efficacy of machineguns and pushed aircraft armament towards cannons. The only reason the US weren't running 20mm in WW2 was because they never managed to make the Hispano reliable... even the Colt Mk 12 cannon had a shocking amount of failures, so much so that everyone but Argentina and Brazil swapped them out of their A-4s for DEFAs and ADENs. But I digress.

My point is that yes, the Browning is inferior to the UBK for hitting power... just like the UBK is inferior to anything 20mm and up. :D

Please, please don't assume I did not calculate all that when balancing my weapons.

I have no idea what you're talking about. I thought we were talking about energy vs momentum for damage. What does this have to do with your weapons? :huh:

The big problem is... you render the weapon useless at every range.

I still don't see your point. The UBK had reliability issues under hard maneuvering, was designed to be disposable, was limited in burst length (this was due to the soft steel used in the barrel; even with case hardened steel, the M2 required an inconel sleeve to maintain its rate of fire), wasn't nearly as precise... yet had superior terminal ballistics because the round is heavier. But the biggest reason Americans used the M2 rather than the UBK? Because the UBK isn't American. Remove the sovereignty issues, and yes, the UBK is the better choice if the only criteria is damage dealt. I'm not disagreeing with you on that point. :)

I am not saying that you cannot balance it, it is balanced on AviatorArsenal... it should be a design choice rather than something artificial like it has to be.

Um... you realize that if you want to "balance" the guns and you don't care that it's not realistic, then you should just give them the exact same stats? I know then that the counter is "but if there's no difference...", but it seems to me like you're arguing for a single point of change to support a rationalization for a decision, rather than pushing for more factors of difference.

If we were serious about aircraft guns, we'd add a GLimit trait that if the gun is fired beyond that G limit then it becomes jammed and is out for the remainder of the fight. We would add BallisticCoefficients. We would even take it a step further and include a general Reliability trait (misfires/squibs, jamming) and use accurate dispersion values rather than "I think it needs dispersion X because of balance." We would need shell types (AP, API, HEAT, HEI, SAPHEI, etc) for the cannons. If we did that, we would find plenty of reasons to take one gun over another, depending on our priorities.

I am a huge fan of using real world traits and real world solutions when all that has to be added is a few additional factors. Then we can use these realistic numbers and calculations to create realistic armour, and we don't have to mess around with observational and anecdotal evidence to emulate reality when we can more easily and simply simulate it. :D

So, I am waiting to see what you can come up with, but looking at my numbers and from extensive ingame testing, the current implementation has problems. If you want to fix it by adding atmospheric drag or whatever else, I am up to it, the calculation of damage is not the only thing that would require some tweaks.

I wouldn't say problems so much as I would say shortcomings... but yeah, I agree that most of the realism issues with BDA could be solved with just a few adjustments and the addition of a handful of factors.

Another thing I want to discuss is the impulse generated by explosives... it's very common to send tanks flying away with small bombs, armor is often useless against them even when it's not a direct hit.

Heh, maybe we could solve it with thermodynamics: rather than apply 100% of the explosive force as force, we transfer a % into heat? We really need to differentiate warhead types.

Link to comment
Share on other sites

Is there any possible way to make a napalm, or incendiaries in general, work? I was thinking it could explode, and the explosion effect would stick around for a bit. It would also generate heat in the blast radius, softening targets for other weapons.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...