Battle Mechanics II: Separating the Buffs

lifeWelcome to the second part in this Battle Mechanics article series. In Part I, we constructed the basic battle formula, showing the relation between attack and life, and buffs and debuffs. Although we could go from there into other territory, I feel this second part is needed to avoid any confusion afterwards. In this part we will look at the different types of buffs and how they (possibly) interact.

  • 1. Recap
  • 2. The different Buffs
  • 3. Difference between additive and multiplicative
  • 4. What matters in the end

>continued

1. Recap

Let’s start with the formula we ended up with in Part I. I’ll be taking the colored version as it is easier to understand:

11

If we look at a case in which we are the attacking force, we need to fill in the orange factors in this formula. For the “Life debuff” part this is straightforward, as the only source of debuff is Gems*. For the “Attack buff” part, things are a little bit more complicated, as many more buffs are involved, which interact together in some way. In Part I, I took a shortcut and presented this simply as the (1+attack buff) factor, but behind this simple statement is some more complex math. For now, as we did in Part I, let’s focus on the Attack factor alone to avoid doing double work. Also, because Attack debuff belongs to the enemy, we will also not take this into account (we don’t have to). So the formula we will work with in this article will be formula (eq. 2):

2

(* new Hero skills also work with debuffs, but for the sake of clarity I will leave these out at the moment, but a similar article to this could be written, and might in fact be written once the Skills are better understood)

2. The different buffs

Focusing on attack, we have quite some buffs we need to take into account. The list is as follows:

  • Hero level
  • Perm buffs
  • Runes
  • Research
  • Gear and Gems
  • City Guardian

But how do these interact? Do they simply stack, or do they multiply each other? Basically, what we need to solve is the following riddle:

sep1

3. Difference between multiplicative and additive

Before figuring this out, first a little mathematical background. In many games and of course in mathematics in general, formulas can have many different terms in them. In this case, every single attack buff type is called a term by the way. Now all these terms as stated in above can be implemented in two basic forms: multiplicative and additive. Using an example with just a few example buffs, additive looks like this:

12

While multiplicative looks like this:

13

In most cases, additive is used when a buff adds directly to a certain number. For example, in the Diablo games, you can find weapons that have a +3 damage bonus. This +3 is a hard constant, so if your base attack was 2, now it will be 5. If it was 20, now it is 23. In short, additive tends to be unrelated to the base value of whatever is being increased (or decreased).

In contrast, multiplicative bonuses usually come in the form of percentages, such as we see in KoM. In fact, I have no knowledge of any constant, absolute, additive bonuses in this game. Different percentages lead to different multiplication factors. A 100% attack buff leads to a “2” multiplication factor.

Besides the mathematical difference, the outcome of the effects of buffs also changes with what type of math is used. Let’s say we have 3 buffs of 100% each, and fill them in in (eq. 12) and (eq. 13). In the strictly additive formula, we end up with (assuming 1 base attack) 4 attack. In the multiplicative formula, we end up with 8 attack.

In general, multiplicative is better and increases faster, but of course, this is just some theoretical math background and this still tells us nothing about the real situation in KoM, so let’s get back into the actual game.

4. Possible scenario’s 

So, with this many buffs, there are many possible scenario’s. Just working with two attack buffs from gear and perm buffs, we can piece together some combinations:

sep2

Assuming that the base attack value is a number and the buffs percentages/100, formula (C) corresponds to a strict additive form s given in (eq. 12), while (E) corresponds to multiplicative as in (eq. 13).

Formulas (A), (B) and (D) only work if the base Attack value is expressed as a percentage, and thus will give a percentage increase. To give an actual number for attack, we need to multiply the base attack value with the combination of buffs, be they either additive or multiplicative. So what is the real situation?

While it is completely possible to figure this out yourself, we need to know only the position and type of one buff, namely the gear buff. Now from all information from other sources and testing done by myself, it is almost certain that KoM uses a mix of additive and multiplicative, such as shown here in (eq. 14):

14

Now we need to figure out how many factors the real equation has and which buffs belong to each other. As it turns out, the most important one, the gear buffs, form a separate factor in this equation (A factor is one of the ‘parts’ in a multiplication, like the (eq. 14) has three: The base attack factor and two buff factors). All other buffs either reside in one large additive factor, such as:

15-1

or form multiple multiplicative factors themselves or in small groups:

15-2

5. What matters in the end

So what does this lead us all to? Well, as I have stated, this article series focuses on Battle Mechanics, but it specifically focuses on gear and gear choices. Why? Because that is basically all we as players have in terms of trying out different combinations. Only in gear(+Gems) can we shift some in the percentages buff versus debuff. ALL other buffs, such as Guardian/runes/Hero lvl are static and cannot be changed (for the better at least). You try to get these as high as possible and that’s it.

Secondly, I have also stated that the goal will not be to construct a complete and working battle simulator predicting exact outcomes, as this is impossible for PvP and we are also not looking too much into Campaign simulating. Nonetheless this could serve as a starting point for that.

So if we focus on gear in (eq. 15), and we do not care about the exact outcome of battle, but rather the relative impact of gear and Gem choices, it no longer matters what all the other buffs are, and it doesn’t matter how they factor into equation 15. Why? Well fairly simply stated: Whatever the exact form of (eq. 15) is regarding each buff type, we know two things:

  1. The “Gear attack” buff will be a separate factor in the formula
  2. The entire formula will be formed by a number of factors, all multiplicative

This means that the relative effectiveness of your gear buffs is not affected by your other buffs. What this means is basically that a 100% attack buff will always double your TK’s. Always? ALWAYS! Try it for yourself: Put either (eq. 15.1) or (eq. 15.2) into Excel. Fill in a range of different combinations of values for the other buffs. Now test the outcomes between having a 0 for the “Attack gear” value against a 1 (for 100%). Every single time you will see the TK doubling when inputting 1.

Now, if we replace the factors with some constants, we see that X = A*B*C*D is equal to X=(A*B*C)*D, and if we define E=A*B*C, this becomes X=E*D. Doing the same for (eq. 15.1) we get:

15-1

is equal to:

16

And redefining the left factor above into:

17

We substitute that into (eq. 16) again and we get:

18

Which is identical to the formula (eq. 2) with which we started! What I have explained here in even more detail basically is how we are not going to go for a full-on combat simulator, but only look at the relative impact of gear buffs/debuffs, why we therefor can discard the other buffs, and why this makes working out gear performances much easier. Equation 11 from Part I becomes slightly more specific:

19-2

I agree it is a step which does nothing to the formula as we already constructed in Part I, but I know for a fact that if I do not treat this subject now, people are bound to come asking for how Guardian buffs and Hero level factor in, as these will not be mentioned anymore beyond this point. I hope that you nonetheless found this interesting and don’t see this as a waste of time…I simply do not want to skip over things that will create problems later on.

So in this part we separated the buffs and saw why the other buffs from your city and Hero do not matter to your gear choices. But we still have to deal with an enemy army that also has buffs and debuffs that influence you and your gear choices…or do they? Stay tuned for an answer to this and why in Part III !

Advertisements

42 thoughts on “Battle Mechanics II: Separating the Buffs

  1. Pingback: Battle Mechanics – Steel Floss

  2. Pingback: w5840

  3. First off. Your posts are very informative and only play KoC Battle for the north, they have helped my create a crude(because I’m not so math savy( but somewhat accurate battle simulator for KoC battle for the north campaign. Anyway, My question, which is strictly for PvE in campaign, is the mechanics and what am I missing. I’m good with descriptive stats but this has my head twisted. My base stats I’m using are alchemy lvl 10(.50), buff(.21), knight level 260(1.3) gear stats : life buff (4.325), attack buff( 4.385), life debuff (2.445), attack debuff(2.58) vs a level 18( .09). Troop modifiers are T5s attack 900 and life 1800 and t6 life 1100 and life 2200. (Only two troop types at camp so not dealing weak vs strong yet, just ground vs ground so assuming .9 or 1.08 against, also we have added heroes I’ve yet to use in the tests) The adversary uses t6 When I send 1000 t6 the resulting damage is 51667. Also using t5 damage equates to 35262. Any help greatly appreciated

    Like

  4. isn’t there a mysterious random buff or factor? If I attack 3 times with large amount of troops I get 3 different Scores.

    Like

    • Im gonna make fresh new account now and try Battle Calc vs Goblins, then i try same thing with higher hero and later with other buffs (depends on how fast i can reach those things^^)

      Like

  5. New message because the site is bugged and al further messages take 10 sites to read in traight down order 😀

    So i tested RUNE Buff and with 100%atk + 100%hp i get ~47-48% less loss, so runes are the same as gear a multiplication.

    -with 100% atk buff only i get ~20% less loss-

    in 2 hours i can test 100%hp buff only to see if i get ~50% less loss.

    Like

    • Hero Level
      250 killed 93015 troops
      10 killed 36612 troops
      Level and kill got same 2,5 factor, so hero level is also multiplicative.

      Perma Buff
      i cant test bacuse no shield wall etc.

      Guardian
      4/3 killed 58821
      0/0 killed 57590
      0/0 is ~97% of the kills then 4/3 so the value is also multiplicative.

      well i try formula with all buffs multipliactive now and write down the values.

      Like

      • with all multiplications i get (on 1660 enemy troops)
        (calculated in 1 Round)
        1876 kills
        5 loses

        Real Life:
        1660 kills (there are no more goblins)
        2 loses

        The values are close ones but still not accurate enough
        With Hero without Equip (level 250) i get:
        513 kills
        116 loses

        Real Life:
        661 kills
        20 loses (all my MR)

        Like

        • i used BaseAtk*(1+CGAtk/100)*(1+ReseacrhAtk/100)*(….)
          Old Calculation gave me 205ATK and 155HP on a single MR
          New Calculation gives me 280ATK and 215HP on a single MR

          Like

  6. Well i dont get it, i filled the math in excel and with my stuff and buffs i get a total ATK of 205,74 and LIFE of 155,053 on a single Master Ranger when using base ATK 32 and LIFE 10. So when i attack 1660 T3 Goblins(does the level of the leader counts towards goblins? if so then it is 100) of different types (lets ignore this) with 20 MR. The formula have to be:
    Kills: ((20*205,74)/1)*((2,024)/(1660*8))= 0,627
    Lost: ((1660*4)/2,893)*(1/(20*155,053))= 0,740
    As u can see the goblins kill more of my troops then me of theres, but in reality i beat em away with 6 lost.

    Like

    • i took base atk 4 and base life 8 (same as elv and dwarves T3 stats)
      further explanation: my buffs are CG 4/3, Research 10/10, Perma 57/43, Runes 20/20, Hero Level 250. Maybe u can tell me if my Formulas are correct and how to handle the number of troops also how does the 50% buff and debuff works vs different type of troops.

      Like

      • Difficult to say where the problem is here, but just remember this, that from part I onwards, we are no longer talking about exact numbers for TK, just relative ones to compare gear.

        With Goblins though, you do know all the stats of the enemy (dont forget goblin hero lvl), so it would be possible, but take into account the weak against/strong against bonuses as well. Is that where the problem could be?

        Like

        • I would be happy if i get even close to a Number where i win.
          Well i think Goblins have the same stats as other troops?
          I also take the Goblin Leader level into account.
          Weak/Strong also but what ever i do i will never get a TK value close to real one. Like i kill 1660 T3 Goblins with 20 MR and only lose 6 that would mean my Kills have to be much larger than my Loses or not?

          Like

          • afaik, the goblin T1-T3 share the same stats as player T1-T3, numbers only enhanced by Goblin leader level.

            And what you describe with MR could make sense, as they are very good at killing Goblins.

            But Im missing to much info to give a clear answer, for example on how many rounds of combat are fought. Try to attack with a full MR march and see if your losses can come close to what you calculated. If it doesnt work out, try switching around buffs (besides gear) between multiplication and addition and see if you can arrive at a number that comes close.

            Like

          • PS: Why are those values so low, like 0,627 kills, do i need to multiply this value with something?

            In your Example u say:
            ————————
            Let’s say you are defending your city. You have 100 troops with 1 Life. An attacker comes along who has 20 troops with 1 Attack. How many troops does he/she kill? Without extra buffs, the attacker will kill 20 troops of your army. Whether we state this as (20/100)*total_troops, or 20/1 (Life per troop)…
            ————————

            if i use ur formula in (10) i get:
            TK=((20*(1+0))/(1+0))*((1+0)/(100*(1+0)))= 0.2
            but why do i have to multiply this again with the total troops of the defender if i already took the 100life into account (100 troops x 1 life)?

            This would mean the defender loses 20 units.
            let me see in my example:

            Kills: 0,627*1660= 1040,82
            Loses: 0,740*20= 14.8

            in RL i lose 6 troops, it cant be the strong/weak factor because the enemy has 3 different types of troops.

            Like

              • Another Question, does the HP at Campiagn Bosses only reflect the amont of troops or the total life of all troops? because it says 1660, this coukd mean each troops has 1 life or there are 1660 troops.?

                Like

                • Sry for spam^^ i think i will do a new account and check with a level 1 hero without any buff the scores. then i get more level in hero and runes and check the difference.

                  Like

                  • Be my guest, but remember also, that in none of my posts, I go into the relation between buffs other than gear and gems….so statue, hero lvl, etc…whether they multiply or add I dont know and dont specify, so in short, none of the information given in these articles will ever be useful to calculate exact losses/TKs…just relative comparisons….

                    Like

            • The example I gave was just a very basic one, giving defender and attacker easy numbers (not based in reality) to show the most basic representation of combat in this game. Please do not use this as any sort of real indicator.

              Like

              • All the old calcs created before gear used to add all percentages together like buff1+buff2+buff3…etc. So I think my way is correct but I try to take all into multiplication like the gear, because my values always so low. If I get extreme grow on strength due to multiplication the value has also to increase so let’s see. I’ll post my experience later on.
                Cyan and tyvm

                Like

                • Well I can try it easily with rune On and off, if the kill value increases by a factor of (rune%) runes are multiplication factor. If the value increases by a smaller amount it’s addition factor or not?

                  Like

                  • absolutely correct. In the same way, you could get test results for guardian (assuming difference between cities), hero lvl (assuming not all are 250), and gear. Only research will be difficult, but as it, from the top of my head now, is the only factor we cannot test separately, you could work it out form the rest with which others it would multiply….Interesting to see results of such a test!

                    Like

  7. Compliments!
    The math. is to complicated for me , but i am looking forward to your explanation how skills and gems and gear relate to eachother in terms of creating a strong hero 😉

    Like

    • Well, the math here was a bit much for stating something obvious at the end. If you don’t get it in this part, just accept it and focus on parts I and III (espcially III), where the math is a bit easier and where the important conclusions are drawn…

      Like

    • Im not sure about skills yet, Ive been out of the game for some time, I have heard some things on how skills interact with other buffs, but cannot be sure yet unfortunately

      Like

  8. BeardMonkey, I have found your articles very useful. With this more complex subject matter could you do a case study showing gear bonuses, buffs, base attack numbers etc and how the formula works. Thanks Jay, World 161

    Like

  9. If you look at the requests that hobbit kom sends to server they seem to imply that permabuffs and guardian buffs are added together.

    we cam also change the legendary hero which will give us better buffs but unless we have maxed guardians in every city this might not be good idea.

    Have hou really tested that gear buff is separate factor? From my experience it might be added to hero level etc buffs. ill have to test it again

    Thanks for the series keep up the good and interesting work!

    Like

    • truth be told I have NOT done extensive testing on how the buffs interact myself, but I got some of the info, such as you mention, form very reputable sources which must be 100% correct. Only chance being I was lied to on purpose, which I do not expect from these sources…

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s