Jump to content
Game-Labs Forum

Hidden mechanics and weapon damage degradation


pandakraut

Recommended Posts

  • 1 month later...

ArtilleryWeaponCurves EDITED.xlsx

Thank you @pandakraut for your spreadsheets. I've made some editing to them. However, it seems that I've missed or misunderstood something. what I did is that I multiplied every art weapon base damage by its range degradation in different ranges. Finally made a chart for all the data.
The problem is that I don't get the actual "damage range" for some weapons like the 3" ordnance. Can you please tell what have I missed...
also  is the shell type multiplier considered and calculated in the "Range Degradation"?
and are there other multipliers that I should apply for my chart to be correct?

 

InfantryWeaponCurves EDIT 2 fire rate.xlsx
 

Also, this is another chart i made adding damage and fire rate factors of each weapon. Is it correct or does it need editing?

 

thank you again

  • Like 1
Link to comment
Share on other sites

The range degradation is just one part of the damage formula where everything gets multiplied together. There are enough factors that I didn't add them into the spreadsheet as many of them are hard to get a standard value for and things tend to get misleading.

Base Damage Calculation is Weapon damage * Random value between AccuracyLow / 100 and Accuracy High / 100. Range degradation, unit size degradation, efficiency damage multiplier, altitude damage multiplier, fortification damage multiplier, terrain damage multiplier, any modifiers from shell/canister, etc. Firearms and canister/shell also modify the random low value.

The damage range between accuracy low and high is what I display in the UI mod, you could try graphing average damage with the degradation applied but that doesn't represent the high variance weapons very well.

Check out some of Technosarge's work for accounting for the reload speed. When evaluating weapons I put very little stock into that attribute.

Link to comment
Share on other sites

Thank you so much for your quick answer.

4 hours ago, pandakraut said:

Base Damage Calculation is Weapon damage * Random value between AccuracyLow / 100 and Accuracy High / 100.

So, if I got this right, the "Damage Degradation" is applied to the "Base Damage Calculation". I mean that the "Damage degradation" has nothing to do with the Accuracylow/high, they are totally different factors. And the Degradation of certain range is applied after calculating the Base Damage. Right?

 

4 hours ago, pandakraut said:

unit size degradation

In the mod you fixed that, right? So we don't have this factor now...

 

4 hours ago, pandakraut said:

efficiency damage multiplier, altitude damage multiplier

We know how other factors work ,at least we have an approximate number. Can you please give us a hint on how the "efficiency/ firearms" multipliers are calculated? As the altitude is not displayed in the game it may be difficult to measure its effects, however can you tell us how big could its effect be (I mean can it make the output damage be 200% for example)?

 

4 hours ago, pandakraut said:

Check out some of Technosarge's work for accounting for the reload speed.

I searched his profile but couldn't find which post you mean. It would be nice if you can guide me to the post.

Edited by Taqtaq
  • Like 1
Link to comment
Share on other sites

Some other questions:😅

1- How does "Condition" work? I mean is it like:
a- if the unit has some condition ,despite of its percentage, then it will perform at max efficiency (max efficiency related to "condition" factor of course)?
OR b- its percentage makes difference ,so a unit with 80% condition will perform better than a the same unit with 40% condition,? And if it's so, how much does it affect the unit's total performance? is it like that a unit with 50% condition will perform half effective to its performance if it was at 100% condition?

2- Does "morale" affect a unit's performance? how much? (if it's possible to give a percentage. If not, give me any clue on how big/small is its effect)

3- What is the exact (or approximate) bonus damage for attacking a unit in its flanks or rear? (is the bonus different for the flank and the rear?)

Thank you

Edited by Taqtaq
  • Like 1
Link to comment
Share on other sites

This is the artillery analysis after applying the Average Damage and the shell/canister multipliers. So I have calculated these factors:
1- average damage.
2- range degradation.
3- fire rate.
4- shell and canister multipliers.

ArtilleryWeaponCurves EDITED 2.xlsx

 

Looks like the best guns to be positioned right behind infantry are:
1- 24 how
2- Napoleon
3- 3in 10pdr ordnance/ or Tredegar.

Link to comment
Share on other sites

10 hours ago, pandakraut said:

Base Damage Calculation is Weapon damage * Random value between AccuracyLow / 100 and Accuracy High / 100.

Is this "Random value" TOTALLY random??😅 I mean: is the probability of shooting the max damage equal to the probability of shooting the min damage equal to the .... mid average damage and so on?
or there is less chance to shoot the min or the max damage and the chance increases as we go for the average  between min and max?

The reason I'm asking is that ,as you know, some weapons have huge difference between min to max damage (like 2-20).So, I'm thinking of calculating the damage another way to more value the min damage (as it's assured) and less value the max damage (as it depends on chance and the mercy of randomness). For example, we can calculate this kind of damage like this:

damage*AccuracyLow+ 0.5 (or less)*damage*AccuracyHigh

 

What's your opinion?

  • Like 1
Link to comment
Share on other sites

8 hours ago, Taqtaq said:

So, if I got this right, the "Damage Degradation" is applied to the "Base Damage Calculation". I mean that the "Damage degradation" has nothing to do with the Accuracylow/high, they are totally different factors. And the Degradation of certain range is applied after calculating the Base Damage. Right?

Correct, it's all just a lot of things getting multiplied together

8 hours ago, Taqtaq said:

In the mod you fixed that, right? So we don't have this factor now...

 

Both the UI and AI Customizations mod and the Surrender mod use their on size degradation curves so if you are using either of those you will see diminishing returns but adding men always increases damage. J&P Rebalance mod will be implementing new curves in the next version.

8 hours ago, Taqtaq said:

We know how other factors work ,at least we have an approximate number. Can you please give us a hint on how the "efficiency/ firearms" multipliers are calculated? As the altitude is not displayed in the game it may be difficult to measure its effects, however can you tell us how big could its effect be (I mean can it make the output damage be 200% for example)?

Firearms affects reload by 1.15 to .85 from 0 to 100. Also affects accuracy low by .85 to 1.05. 

I'll have to go pull the full efficiency value list, but I think its in the .85 to 1.05 type range.

Altitude results in a modifier ranging from -1 to 1. Average numbers are more in the -.5 to .5 range. If the value is positive it's applied to the accuracyLow, if it's negative it's applied to the accuracy high. For example if the altitude modifier was .5 then accuracyLow = accuracyLow + (accuracyLow * .5)

8 hours ago, Taqtaq said:

I searched his profile but couldn't find which post you mean. It would be nice if you can guide me to the post.

He has several posts in this thread but these are the main ones: http://forum.game-labs.net/topic/26142-hidden-mechanics-and-weapon-damage-degradation/?page=2&tab=comments#comment-574298 and http://forum.game-labs.net/topic/26142-hidden-mechanics-and-weapon-damage-degradation/?page=2&tab=comments#comment-573686

Link to comment
Share on other sites

6 hours ago, Taqtaq said:

Some other questions:😅

1- How does "Condition" work? I mean is it like:
a- if the unit has some condition ,despite of its percentage, then it will perform at max efficiency (max efficiency related to "condition" factor of course)?
OR b- its percentage makes difference ,so a unit with 80% condition will perform better than a the same unit with 40% condition,? And if it's so, how much does it affect the unit's total performance? is it like that a unit with 50% condition will perform half effective to its performance if it was at 100% condition?

2- Does "morale" affect a unit's performance? how much? (if it's possible to give a percentage. If not, give me any clue on how big/small is its effect)

3- What is the exact (or approximate) bonus damage for attacking a unit in its flanks or rear? (is the bonus different for the flank and the rear?)

Thank you

moraleEfficiencyRouting,0.8
moraleMeleeRouting,0.7
moraleEfficiencyWavering,0.8
moraleMeleeWavering,0.7
moraleEfficiencySteady,1
moraleMeleeSteady,0.9
moraleEfficiencyConfident,1.15
moraleMeleeConfident,1
moraleEfficiencyEager,1.25
moraleMeleeEager,1.05
moraleEfficiencyHeroic,1.35
moraleMeleeHeroic,1.1
fatigueEfficiencyFresh,0.95
fatigueMeleeFresh,1
fatigueSpeedFresh,1
fatigueEfficiencyWarmedUp,1
fatigueMeleeWarmedUp,1
fatigueSpeedWarmedUp,1
fatigueEfficiencyTired,0.83
fatigueMeleeTired,0.8
fatigueSpeedTired,0.8
fatigueEfficiencyVeryTired,0.7
fatigueMeleeVeryTired,0.6
fatigueSpeedVeryTired,0.7
fatigueEfficiencyExhausted,0.63
fatigueMeleeExhausted,0.45
fatigueSpeedExhausted,0.6

attackFactorFront,1
attackFactorFlanks,1.525
attackFactorRear,1.275

You may want to download the J&P Rebalance mod just for the Mod/Rebalance/UnitModifiersOriginalValues.csv. Some other stuff in there you might find interesting.

Link to comment
Share on other sites

2 hours ago, Taqtaq said:

Looks like the best guns to be positioned right behind infantry are:
1- 24 how
2- Napoleon
3- 3in 10pdr ordnance/ or Tredegar.

In general yes, though it really depends on what engagement range you are looking for. I tend to try and keep targets out of canister range so the Napoleon drops out of my armies very quickly. Adding in the fire rate definitely inflates the worth of the 3in, though it is still decent. I usually want a unit to hit as hard as possible in a single volley rather than have to fire twice, but that's play style preference really.

The 3in really suffers once availability is factored in. The 24pdr is pretty common and performs better at basically all ranges. And if you want mid to long range you're just better off with something other than the 3in. I think the 3in curve is actually pretty bad, take away its huge damage potential due to the large accuracy high and it compares pretty badly to other guns.

Link to comment
Share on other sites

1 hour ago, Taqtaq said:

Is this "Random value" TOTALLY random??😅 I mean: is the probability of shooting the max damage equal to the probability of shooting the min damage equal to the .... mid average damage and so on?
or there is less chance to shoot the min or the max damage and the chance increases as we go for the average  between min and max?

The reason I'm asking is that ,as you know, some weapons have huge difference between min to max damage (like 2-20).So, I'm thinking of calculating the damage another way to more value the min damage (as it's assured) and less value the max damage (as it depends on chance and the mercy of randomness). For example, we can calculate this kind of damage like this:

damage*AccuracyLow+ 0.5 (or less)*damage*AccuracyHigh

 

What's your opinion?

Commentating on the randomness the Unity engine provides is a bit above my ability. Never was good enough at the math side for that.

What the game appears to be doing is when the accuracy range is calculated, 1024 results of UnityEngine.Random(returns a value between 0 and 1 inclusive) are created into a RandomValues array. I can't tell exactly how the game determines which one of those to use as that part of the code is not available to me in the decompiler. But it appears that some kind of randomization is used to choose one of the 1024 instances and then the following is returned.

low + RandomValues[num] * (high - low)

Hopefully you or someone else has enough math background to tell if that means something is weighted.

Link to comment
Share on other sites

Thanks for all your comments, they are very useful...

23 hours ago, pandakraut said:

Firearms affects reload by 1.15 to .85 from 0 to 100. Also affects accuracy low by .85 to 1.05. 

I'll have to go pull the full efficiency value list, but I think its in the .85 to 1.05 type range.

Are the Values same for melee and morale?
I mean that a unit with 100 melee will perform 20% to 30% better than a unit with 0 melee given the same weapon
And a unit with 100 morale will keep its morale from dropping 20% to 30% better than a unit with 0 morale

 

23 hours ago, pandakraut said:

Altitude results in a modifier ranging from -1 to 1. Average numbers are more in the -.5 to .5 range. If the value is positive it's applied to the accuracyLow, if it's negative it's applied to the accuracy high. For example if the altitude modifier was .5 then accuracyLow = accuracyLow + (accuracyLow * .5)

Is the altitude modifier applied to melee also?

 

 

23 hours ago, pandakraut said:

You may want to download the J&P Rebalance mod just for the Mod/Rebalance/UnitModifiersOriginalValues.csv. Some other stuff in there you might find interesting

Downloaded, very useful. Thnk you

 

23 hours ago, pandakraut said:

Looked through the posts, thanks.

 

 

23 hours ago, pandakraut said:

low + RandomValues[num] * (high - low)

 

I think I will end up considering only AccuracyLow for valuing a unit😆. Because when you use a unit in battle you want to rely on it to make your tactic or strategy work and be successful. Thus, relying on AccuracyHigh (specially if there is a big difference between it and AccuracyLow) will make your plan's success dependent on chance... somehow

Edited by Taqtaq
  • Like 1
Link to comment
Share on other sites

I have two other questions:

1- how does cover value modifies taken damage?

2- I have a doubt that putting a unit in a fortification that is NOT only facing the enemy firing (such as town fortifications or fortifications like those in "Distress Call" mission, which face multiple directions) will result in your unit always taking flank/rear attack. Because I see their morale drop so quick with every volley compared to putting them out of fortification facing the enemy firing.
Anyone can confirm or deny this?

  • Like 1
Link to comment
Share on other sites

1 hour ago, Taqtaq said:

Are the Values same for melee and morale?
I mean that a unit with 100 melee will perform 20% to 30% better than a unit with 0 melee given the same weapon
And a unit with 100 morale will keep its morale from dropping 20% to 30% better than a unit with 0 morale

I need to look up the melee dependency. Will post that along with the efficiency dependency later today.

Edit: Following line was updated to correct an inaccuracy.

Morale regen gets fairly complex but a units morale stat doesn't appear to affect it.

1 hour ago, Taqtaq said:

Is the altitude modifier applied to melee also?

No

1 hour ago, Taqtaq said:

I think I will end up considering only AccuracyLow for valuing a unit😆. Because when you use a unit in battle you want to rely on it to make your tactic or strategy work and be successful. Thus, relying on AccuracyHigh (specially if there is a big difference between it and AccuracyLow) will make your plan's success dependent on chance... somehow

I'm not sure how useful trying to completely cut out chance is when evaluating weapons, given how much of it is present in the game. But if that makes more sense for you go for it. For example, reload times have randomization factors applied to them. So sometimes units really are slower to load.

I think that method will find the most success with rifles where the accuracy high tends to be the same across all of them. A bit less so with carbines, though in my opinion range is the only stat that really matters with those. Artillery is where I think your method will have the most problems since the accuracy high is all over the place.

Using an average between high and low works out pretty well I've found. Maybe with a high medium and low variance flag so you can choose which situations you are willing to accept the risk of a low roll. For example, I don't like 3in cannons for my close support slots because when an enemy unit is charging a low roll means the charge probably lands and I take losses. But for counterbattery, a low roll is fine because it's going to take a dozen shots to destroy the unit anyways, so the occasional low roll is acceptable to me.

Edited by pandakraut
Link to comment
Share on other sites

1 hour ago, Taqtaq said:

1- how does cover value modifies taken damage?

There's a damage reduction curve. I've never pulled it because it seems to work as expected, higher cover = lower damage

1 hour ago, Taqtaq said:

2- I have a doubt that putting a unit in a fortification that is NOT only facing the enemy firing (such as town fortifications or fortifications like those in "Distress Call" mission, which face multiple directions) will result in your unit always taking flank/rear attack. Because I see their morale drop so quick with every volley compared to putting them out of fortification facing the enemy firing.
Anyone can confirm or deny this?

Fortifications are weird. Some get flanked from visually ridiculous directions, others seem impossible to flank at all. I don't know what the deal is with the southern fort at Distress call but any fire from the north seems to inflict insane morale damage. Some of that might be that it's usually a 10 morale unit sitting in the fortification getting fired at by a 3* unit, but I still won't use those fortifications at all other than for melee defense.

Fortifications also apply a damage penalty to infantry units which is party of why they are so bad early on. The potomac fort fortifications apply a .3 damage penalty. The day 1 cold harbor defenses apply a .7. These are all defined individually so I don't have a full list. Unfortunately the last time I looked into it modifying the tooltip to show the damage percentage isn't possible. I will be able to fix the terrain damage reductions at least. Those are all broken currently so you do full damage no matter where a unit is standing which also contributes to the current state of the game where fortifications are a bad choice in most situations.

Link to comment
Share on other sites

I think I am missing something with how morale works. There is no direct dependency on regen or morale damage taken from the morale stat that I am seeing. However, in game experience absolutely indicates that higher experience units take more damage to rout than lower experience units. So all I can offer at the moment is that having a higher morale stat is most likely better.

Melee damage goes from 1 to 1.2 depending on the unit stat. Efficiency is odd it goes from .85 to 1.05 from 0 to 10, but then stays at 1.05 through 100.

 

Link to comment
Share on other sites

5 hours ago, pandakraut said:
6 hours ago, Taqtaq said:

Is the altitude modifier applied to melee also?

No

So does altitude have NO effect on melee damage? Or it has, but not the same value as for gun damage?

 

5 hours ago, pandakraut said:

I think that method will find the most success with rifles where the accuracy high tends to be the same across all of them. A bit less so with carbines, though in my opinion range is the only stat that really matters with those. Artillery is where I think your method will have the most problems since the accuracy high is all over the place.

Using an average between high and low works out pretty well I've found. Maybe with a high medium and low variance flag so you can choose which situations you are willing to accept the risk of a low roll. For example, I don't like 3in cannons for my close support slots because when an enemy unit is charging a low roll means the charge probably lands and I take losses. But for counterbattery, a low roll is fine because it's going to take a dozen shots to destroy the unit anyways, so the occasional low roll is acceptable to me

👍good point, totally agree...

 

5 hours ago, pandakraut said:

There's a damage reduction curve. I've never pulled it because it seems to work as expected, higher cover = lower damage

Do you have its values? For example: 100% cover means you'll get 0.5 of the incoming damage..

 

Thanks for all your answers

Link to comment
Share on other sites

24 minutes ago, Taqtaq said:

So does altitude have NO effect on melee damage? Or it has, but not the same value as for gun damage?

Altitude has no effect on melee damage.

52 minutes ago, Taqtaq said:

Do you have its values? For example: 100% cover means you'll get 0.5 of the incoming damage..

Well what I thought was cover was actually a generic multiplier based on unit type.

Infantry: 1.072
Skirmisher: .9 
Cavalry: 1.1 
Artillery: 1

Cover curve goes from 2.25 at 0 to .4 at 1. Not quite a linear curve, but pretty close.

Link to comment
Share on other sites

21 minutes ago, pandakraut said:

Cover curve goes from 2.25 at 0 to .4 at 1. Not quite a linear curve, but pretty close

That's too much!! So a unit with 0 cover will get nearly 5.5 the damage as if it was in 100 cover!

Link to comment
Share on other sites

Is there a modifier for melee damage based on the unit type? Or it's just the weapon type and units stats (melee, morale and condition)

For example: if I equip skirmishers with Hunter gun, will they compete same size/condition/morale infantry with Spring 1842?

Link to comment
Share on other sites

51 minutes ago, Taqtaq said:

That's too much!! So a unit with 0 cover will get nearly 5.5 the damage as if it was in 100 cover!

It's actually pretty hard to get a unit to 0 cover as you have to manage to get all pixels of the unit into water. If you have a CSA Shiloh save you can drag units around in the deployment area to see how much cover you still have in various areas. That said, manipulating the AI into bad cover and making sure your units are never fighting from it is a really good idea.

49 minutes ago, Taqtaq said:

Is there a modifier for melee damage based on the unit type? Or it's just the weapon type and units stats (melee, morale and condition)

There is a inputMeleeDamageModifier I'll have to go look up. You rarely have situations where equal size infantry and skirmishers are fighting each other, so in most cases the 1842s will win. Unless you have 2v1 fight in which case the 2v1 nearly always wins. Melee damage is some arcane formula that calculates numbers of pixels in contact so I'm not going to be all that much help with it. In the base game the answer is always just fight 2v1 and everything else barely matters.

Link to comment
Share on other sites

1 hour ago, Taqtaq said:

Is it due to "meleeMultiplePenalty,0.25"? and does the penalty multiplier change if you add more units e.g. 3v1?

Yes, that's the one though I had it in my head as .5. Multiplier is the same no matter how many units are involved as far as I know.

Link to comment
Share on other sites

Thank you so much

Another question😅: In some cases when the mission time ends the mission is over. But sometimes when the timer reaches zero you still have the choice to continue the mission... How can I know if I'll be able to continue the mission after the timer reachs zero or won't?

Link to comment
Share on other sites

5 hours ago, Taqtaq said:

Another question😅: In some cases when the mission time ends the mission is over. But sometimes when the timer reaches zero you still have the choice to continue the mission... How can I know if I'll be able to continue the mission after the timer reachs zero or won't?

Test runs of the battle, fast forward, and see when it actually ends. Or just consult these very helpful guides someone put together :)

https://steamcommunity.com/sharedfiles/filedetails/?id=1396453437

https://steamcommunity.com/sharedfiles/filedetails/?id=1398810316

Edited by pandakraut
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...