Okay I have questions.
First, you explained DC's, but not the ahead firing weapons like hedgehog. Do these weapons also work the same way?
Yes. The code looks at ASW combat as a sub-species of Ship_Ship combat. It looks for specific appropriate “Devices” such as device.type = ASW (or device type 20), nothing more. Then it looks at the CSV strings for the Ship, to determine the weapon suite, and then just plops the “Num” value into the “How many shots” variable, it iterates and proceeds.
A hedgehog, mousetrap, or whatever, is a device type 20, so a call to DT_ASW will return the weapon parameters without regard to whether they are a Mk-6 DC, a Hedgehog, or a cherry bomb. It’s all in the Editor values.
If so then would it make sense to make a hedgehog pattern equal to the number fired?
Woof!! That’s the question, isn’t it? Ok, this one deserves a big answer, so I’ll post it as an addendum to this; lots of implications for this puppy.
Depth charges have no facing, so we could mod load outs on ships that mimic standard patterns instead of using 'weapon mounts', and have appropriate reloads, usually expressed in x standard patterns?
This one also deserves a big answer in a separate reply, Woof! Your questions are good!
Does the ASW task force exhibit any significant effectiveness is asw than say surface combat or escort task force?
Oh yes. An ASW TF has a significantly better chance to detect a sub, and therefore ‘shoot first’. A SurfCom or Escort TF isn’t “looking”, so maybe the sub gets a torp off, but once the code gets into Ship_Ship, it’s the same algorithm. The difference is in the “detection” routines.
Do the various ship classes have any effect on asw effectiveness? Some ships were built with asw as primary purpose, such as DE's, Frigates, Corvettes, etc. (no that Frigates or Corvettes are actually modeled in the game).
No. The code just looks at what classes of ships are allowed into an ASW TF and then looks at their “weapons”. A motorboat, listed in Class DE, with 50 K-guns, will be gnarly.
What are the values in a submarine that affect asw, and how do they do this?
Woof! Well for detection, the code is random (big divisor when sub is in ‘shallow water). For combat, the code compares the accuracy (acc) of the attacking weapon against a number of factors; underwater speed (which is a functional calculation of cruise speed), the maneuverability metric, and the leader rating. The bigger the speed, maneuver, and leader, the better the ability to get a “sub avoids the pattern’ result.
More questions later.
Bring ‘em on, pal.