EA Forums - Banner

How your Offense Level is calculated

EE_Elephterion
725 posts Envision Developer
edited August 29
Level Calculation
For calculating the Offense Level of your army, the value of every unit is considered and transferred into an arbitrary score. That score is based on the level, its Army Point Cost and a magic number that acts as a modifier to balance powerful units against weaker units. That score then gets calculated against a theoretical army score on a given level to find out how close you are to your army’s hypothetical power potential of that level.

Unit Score
First, the individual score of every of your fielded units is calculated.
8ur31w5zy00o.png
All Unit Scores add up to the final Player Army Score

Offense Level Modifiers
The strongest units of a faction have a magic number they bring into the formula. This ensures that, due to their power, these units are also weighted heavier in the calculation of the Offense Level.

GDI Offense Level Modifiers:
  • Commando: 2,6
  • Mammoth: 2,6
  • Juggernaut: 1,5
  • Kodiak: 2,6
Nod Offense Level Modifiers:
  • Confessor: 1,5
  • Commando: 2,4
  • Avatar: 1,5
  • Specter: 2,6
  • Salamander: 2,6
Any unit not listed can be assumed to have an OLM of 0 (in words: Zero)

Theoretical Army Score
For calculating the Final Army level another value is needed, the value of an theoretical army using all available army points and has all units at its available max level. This does not take the magical numbers of the OLM into account.
c6a88xujk8j7.png
Army Score Fraction
Before the Final Army Level, a Fraction is calculated based on the Player Army Score compared against the Theoretical Army Score of a given level.
l065v1bk396m.png
The game calculates the Theoretical Army Score from level 1 to 200 (just in case) and then checks the Player Army Score against that array of values. The TAS that is the next lower value to the PAS is then chosen as the Theoretical Army Score for the calculation. Both are subtracted with the TAS that is one level below the TAS corresponding to the PAS.

Final Army Level
Ultimately the Final Army Level is calculated with the formula below and rounded to two digits after the comma.
dmlxsa19j3tq.png
If the TAS and PAS are identical, this value will return 1, which will result in an even Offense Level equal to the Command Center level, as intended.
In some rare cases the Offense level may exceed the CC level. That is when fielding only endgame units with an OLM greater than 0 (see list) in a low-level army; like 6x level 10 Salamanders at a level 10 CC.

Naturally, the mix of units is what ultimately decides the effectiveness of your army in combat, not the raw Offense Level alone. The strongest units won't be worth their repair costs if they are not used effectively.

Post edited by EE_Elephterion on
Envision Entertainment Community Liaison

Replies

  • Recently i was asked if I could go into some detail about how the game estimates the level of your Offense army and so here it is, a little guide on the magic behind the curtain.
    If there are other aspects of the game you'd like to know more let me know and I'll see what I can reveal to you.
    Envision Entertainment Community Liaison
  • Soixie
    240 posts Member
    The code is actually much more simple, as it's simply a weighted average based on cost size plus some "magic fairy dust". Since I didn't need the magic dust at the time I never reversed parsed it, thanks for making me want to to do that now.
  • Hi! could you explain the same thing about a player score. How it is calculated. Which base units worth how much. Thanks
  • Player score is determined by building units within the base, and building defense and offensive units.

    Points provided within a base is the following;

    Levels 1-12 are hard coded, starting after level 12 the formula = ROUNDDOWN (S*1.2^(New level - 1),0)

    Where "S" is a strength

    CONSTRUCTION YARD / DEFENSE HQ / COMMAND CENTER / FACTORY / AIRFIELD / BARRACKS / DEFENSE FACILITY: S = 4
    POWER PLANT: S = 3
    REFINERY / Accumulator / Harvester / Silo: S = 2

    Point values awarded for building a CC for example;
    Level - Points awarded for increasing to
    Increasing CC from level 27 to 28 for example, grants you 317 points
    1 - 20
    2 - 4
    3 - 3
    4 - 4
    5 - 4
    6 - 5
    7 - 6
    8 - 8
    9 - 9
    10 - 11
    11 - 14
    12 - 17
    13 - 20
    14 - 24
    15 - 29
    16 - 35
    17 - 42
    18 - 51
    19 - 61
    20 - 73
    21 - 88
    22 - 106
    23 - 127
    24 - 153
    25 - 184
    26 - 220
    27 - 264
    28 - 317
    29 - 381
    30 - 457
    31 - 549
    32 - 659
    33 - 791
    34 - 949
    35 - 1,139
    36 - 1,367
    37 - 1,640
    38 - 1,968
    39 - 2,362
    40 - 2,835
    41 - 3,402
    42 - 4,082
    43 - 4,899
    44 - 5,879
    45 - 7,054
    46 - 8,465
    47 - 10,159
    48 - 12,190
    49 - 14,629
    50 - 17,554
    51 - 21,065
    52 - 25,278
    53 - 30,334
    54 - 36,401
    55 - 43,682
    56 - 52,418
    57 - 62,902
    58 - 75,482
    59 - 90,579
    60 - 108,695
    61 - 130,434
    62 - 156,520
    63 - 187,825
    64 - 225,390
    65 - 270,468


    For defensive units, levels 1-13 are hard coded, after which the formula is

    =CORE_VALUE * 1.2^(New Level - 12)

    I don't remember how I calculated core value originally, but it's similar to "strength value" in the prior formula

    Barb Wire / Wall = 2.4519276232704
    Missile Squad / Zone Trooper = 4.087
    MG Nest / Guardian / Predator / Pitbull / Sniper Team = 8.172
    "Artillery" = 24.525

    Point values awarded for building an Artillery defensive unit for example;
    Level - Points awarded for increasing to
    Increasing ART from level 27 to 28 for example, grants you 453 points
    1 - 19
    2 - 4
    3 - 5
    4 - 6
    5 - 7
    6 - 8
    7 - 10
    8 - 11
    9 - 15
    10 - 17
    11 - 20
    12 - 24.525
    13 - 29
    14 - 35
    15 - 42
    16 - 51
    17 - 61
    18 - 73
    19 - 88
    20 - 105
    21 - 127
    22 - 152
    23 - 182
    24 - 219
    25 - 262
    26 - 315
    27 - 378
    28 - 453
    29 - 544
    30 - 653
    31 - 784
    32 - 940
    33 - 1,128
    34 - 1,354
    35 - 1,625
    36 - 1,950
    37 - 2,340
    38 - 2,808
    39 - 3,369
    40 - 4,043
    41 - 4,851
    42 - 5,822
    43 - 6,986
    44 - 8,383
    45 - 10,060
    46 - 12,072
    47 - 14,486
    48 - 17,383
    49 - 20,860
    50 - 25,032
    51 - 30,038
    52 - 36,046
    53 - 43,255
    54 - 51,906
    55 - 62,288
    56 - 74,745
    57 - 89,694
    58 - 107,633
    59 - 129,160
    60 - 154,992
    61 - 185,990
    62 - 223,188
    63 - 267,826
    64 - 321,391
    65 - 385,669

    The same formula for defense is used for offense

    =CORE_VALUE * 1.2^(New Level - 12)

    Core value for Mammoth / Firehawk / Orca / Kodiak = 8.172


    1 - -
    2 - 10
    3 - 11
    4 - 14
    5 - 17
    6 - 20
    7 - 24
    8 - 29
    9 - 34
    10 - 42
    11 - 49
    12 - 8.172
    13 - 10
    14 - 12
    15 - 14
    16 - 17
    17 - 20
    18 - 24
    19 - 29
    20 - 35
    21 - 42
    22 - 51
    23 - 61
    24 - 73
    25 - 87
    26 - 105
    27 - 126
    28 - 151
    29 - 181
    30 - 218
    31 - 261
    32 - 313
    33 - 376
    34 - 451
    35 - 541
    36 - 650
    37 - 780
    38 - 935
    39 - 1,123
    40 - 1,347
    41 - 1,617
    42 - 1,940
    43 - 2,328
    44 - 2,793
    45 - 3,352
    46 - 4,022
    47 - 4,827
    48 - 5,792
    49 - 6,951
    50 - 8,341
    51 - 10,009
    52 - 12,011
    53 - 14,413
    54 - 17,296
    55 - 20,755
    56 - 24,906
    57 - 29,887
    58 - 35,865
    59 - 43,037
    60 - 51,645
    61 - 61,974
    62 - 74,369
    63 - 89,243
    64 - 107,091
    65 - 128,509


    *** Note; formula is same for all worlds. Strengths and Core_Values might be different for your world (go test) and I did not extrapolate all buildings and all units for both factions.
  • Wow! This is EXACTLY what I wanted! Thank you so much!
  • These two I could figure out more or less, and you can just do log of total crystals spent and get a very good guesstimate. The big puzzle to me was always how you calculate the level of a base based on the number and levels of buildings, could you clarify this as well, please?
  • Soixie
    240 posts Member
    edited September 25
    I've never tried to calc base level, but when I took a look this morning, straight weighted average does not work.

    7 primary buildings
    7 accumulators
    27 power plants

    Base level was off by ~1.5

    I'll keep tinkering with it however, the core formula for which the entire game engine is based on is simply X * Y ^ Z where;
    X = arbitrary value
    Y = 1.1, 1.2 or 1.32
    Z = Level
  • How about the formula for how the results of a battle are calculated?
  • How about the formula for how the results of a battle are calculated?

    The TACS script is public, simply open and read it for battle calcs.
  • "Recently i was asked if I could go into some detail about how the game estimates the level of your Offense army and so here it is, a little guide on the magic behind the curtain.
    If there are other aspects of the game you'd like to know more let me know and I'll see what I can reveal to you."

    I for one would like a precise description of how the fortress level is calculated. Previously we were given two completely different versions by Rhiordd and by another one of the developers at that time. One said it was a simple calculation based on the top 10 individual player offense levels, while another claimed it was based on the average offense levels of the top 10 alliances.
    I have spent quite a bit of time helping other following alliances get their fortress badges and for the most part it seems the fortress level rises too quickly to the maximum level of 95. Without previous badgewinners on that world helping out it could take years for many of the following alliances to have enough maximum sized offenses to defeat the fortress on their own.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!