Finding a formula that shows the rate at which the value of each unit decreases, depending on the number of units.

Polarbog

New member
Joined
Sep 8, 2019
Messages
6
I play a game where it is important to know how much damage your units do against an enemies base defense (flaks). However, it is hard to find out how much damage your units (Breda, in this case) will do because of this fact:

"Flaks have an extremely strong armor. The more units shoots at it, the less effective each individual shot will be.

Example: 100 Bredas do 3 times as much damage as 10 Breads."

"One Breda does a base 1250 damage to flaks."

I need to find a formula that shows the rate at which the damage dealt (value) by each Breda (unit) decreases, depending on the number of Breda (units), given these facts above.

Below are some formulas that the game uses that have the same idea (the value of each unit decreases, the more units there are). The formula I am looking for might be one of them, but with different rates/values.

Thank you so much for your help!











Formulas below \/ \/ \/

There is a formula with the same idea (the value of each unit decreases, the more units there are) that applies to resource production per number of bases:

The more bases you have on the map, the lower the effectiveness of the production.
Formula: Productivity = (number_bases ^ 0.5) / number_bases
Examples:
- 1 base: → 100% effectiveness
- 2 bases: → 70.7% effectiveness
- 3 bases: → 57.7% effectiveness
- 4 bases: → 50% effectiveness
- 10 bases: → 31.6% effectiveness
- 16 bases: → 25% effectiveness
- 25 bases: → 20% effectiveness
- 100 bases: → 10% effectiveness
etc.
Example with bases which all have the same production rate:
You have 1 base on the map, it produces 1,000 steel/min
You have 4 bases on the map, they produce 2,000 steel/min (4,000 * 50% = 2,000)


There is another formula with the same idea that applies to your maximum resource storage capacity.

Each additional factory raises the storage maximum a little less than the previous one.

- Formula: Concrete storage limit = Rounded (Root (number_of_concrete_factories_on_Map * 1000)) * 1000
- Formula: Steel storage Limit = Rounded (Root (Number_steel_mills_on_Map * 1000)) * 300
- Formula: Aluminum storage limit = Rounded (root (number_of_alu_factories_on_Map * 1000)) * 100
- Formula: Fuel storage Limit = Rounded (Root (number_of_oil_refineries_on_Map * 1000)) * 30

- example calculation: 3 Bases with each Level 11 Steel Mills on home map => Steel storage limit = Rounded(Root(33 * 1000)) * 300 + 500000 + 1000000 = 1554600
 
"Flaks have an extremely strong armor. The more units shoots at it, the less effective each individual shot will be.

Example: 100 Bredas do 3 times as much damage as 10 Breads."

"One Breda does a base 1250 damage to flaks."

I need to find a formula that shows the rate at which the damage dealt (value) by each Breda (unit) decreases, depending on the number of Breda (units), given these facts above.
I think the assumption is that there is some sort of proportion; but in order to solve such a problem, we need to know the kind of proportion.

Your examples show that they like square roots: the formula

Productivity = (number_bases ^ 0.5) / number_bases​

is equivalent to

Productivity = 1/sqrt(number_bases)​

so that productivity is inversely proportional to the square root of the number of bases.

So one might guess that the damage inflicted per Breda is inversely proportional to the number of Bredas, so that the damage from n Bredas would be n * 1/sqrt(n) = sqrt(n). But then 10 Bredas would do sqrt(10) = 3.16 units of damage, and 100 would do sqrt(100) = 10, which is 3.16 times as much, not 3 times as much. It's close enough, so maybe they round so that it becomes 3. You can decide just how the rounding is done, based on more examples.

[I initially supposed that the damage is n^k (that is, some sort of power rule); that led me to k = log(3) = 0.477, and the rule would be n^0.477; that's close to n^0.5, which led me to the supposition above.]
 
I think the assumption is that there is some sort of proportion; but in order to solve such a problem, we need to know the kind of proportion.

Your examples show that they like square roots: the formula

Productivity = (number_bases ^ 0.5) / number_bases​

is equivalent to

Productivity = 1/sqrt(number_bases)​

so that productivity is inversely proportional to the square root of the number of bases.

So one might guess that the damage inflicted per Breda is inversely proportional to the number of Bredas, so that the damage from n Bredas would be n * 1/sqrt(n) = sqrt(n). But then 10 Bredas would do sqrt(10) = 3.16 units of damage, and 100 would do sqrt(100) = 10, which is 3.16 times as much, not 3 times as much. It's close enough, so maybe they round so that it becomes 3. You can decide just how the rounding is done, based on more examples.

[I initially supposed that the damage is n^k (that is, some sort of power rule); that led me to k = log(3) = 0.477, and the rule would be n^0.477; that's close to n^0.5, which led me to the supposition above.]
Thank you so much! This is amazing and so useful to know!
 
Top