I found a bug in patch2.pack's "gun_type_to_projectile" folder I'd like to adress.
If you look at the the attached .jpeg you'll see that some of the naval guns have an extra projectile (6 instead of 5 for the cannons, 4 instead of 3 gor the 32lb carronade) and I'll try now to explain while this trows the naval battles out of proportion in both, battle and campaign.
I know there have been different attempts to deal with the overly strong 6lb gun, but I didn't see the explanation I'm about to give anywhere in the forum, so I'm not trying the steal anyones laurels.
The firepower for each individual naval battery is calculated by cumulating the damage of all the projectiles this battery is able to use, completely different from land batteries which display the damage of the shot as the units firepower.
Firepower is not multiplied by the number of guns in both cases, at least not in a way we can see in the unit card.
This might have to do with the fact that there is no rifled cannons and improved grape are not (properly) enabled, I simply don't know.
However - the game adds up the damage of the following 3 for carronades:
shot, chain, grape
and
the following 5 for cannons:
shot, shot_rifled, chain, grape, improved_grape
while the first 3 might use the long range (lr) for guns from 6lb to 18lb.
Note that the damages for shot and shot_rifled are always the same, while grape and improved_grape are always 0.99 and will be rounded.
I found the line following in taw's decompiled luac-file "patch-ui-templates-template.unitcard_tooltip.luac"
Spoiler for patch-ui-templates-template.unitcard_tooltip.luac (cut out):
The script in patch.pack might be different from later patches, since it doesn't say how artillery is supposed to be displayed.
I'll write a PM to taw to ask if he can help out with that matter, my knowledge about scripting is next to nothing, while my decompiling skill appears to have a negative value.
I deleted the additional entries and this is the result for the batteries
Spoiler for Firepower of Individual Batteries:
So you see by adding an extra 42lb_shot_rifled to the 6lb gun, the firepower of the 6lb battery is 102 (22+80)
The firepower of each is the cumulated firepower of each battery (gun_type 1 to 7), regardless of where these batteries are located ( bow chasers or main battery) and how many guns are in this battery.
Adding more batteries to a ship does increase the firepower of this ship, but the number or guns will not change.
Maybe another thing to be checked with the scripting, since there is some mentioning of displaying guns, men etc.
These are the changes some of the ships:
Spoiler for Firepower of Ships:
You see, the ships were unbalanced before and they are unbalanced now, but to a far lesser degree.
The 3rd_rate, as I found in the naval_stats_table, does not only carry more, but heavier batteries than the 2nd rate, compared to the 1_rate the snd_rate carries more, but lighter guns. Brig and Sloop just seem to have a accidental gun-swap.
What I need to know now is how to create a mod or patch that overwrites the additional values rather the deleting them.
I already worked on a new unit_naval_stats table and am almost done a quick fix (gun placement in the slots might be off as well, thats more boring clicking in db_editor), changes and additions in guns_to_projectiles and gun damages are to minor to bother asking for help....
... but I'm open for any suggestion.