Adding Ops Needed to Kill Calc

Open Kappa opened this discussion on

Kappa -

I'm sure the veterans of this game feel comfortable knowing if someone is kill-able or not just by looking at the homes needed from kill calculators but for the rest of us noobs, can we have a “successful ops required” result added to Nepherius's Chrome Addon or Hardar's

I've been copying and pasting visions and recons into a google spreadsheet ( and having it calculate the ops needed for me but having this info in the either of the above user friendly tools would be a welcome change to new players.

The 'OpCalculator' function the spreadsheet uses is

hardar -

I updated my tools page and had to move to another host.

You can find the kill calc with additionnal infos like ops needed here :

More tools to come when life gives me more time.

Kappa -

Nice work [up]

I took a quick look at the code and noticed you used logs to calculate the ops needed. I initially did that as well, though my formula was a bit different. Mine was along the lines of:
After x ops,
homes_remaining = initial_homes * (0.99)^x
x = log(homes_remaining / initial_homes) / log(0.99)

Your results are very similar though so I'm interested in how you arrived at your formula.

I eventually changed it to because our alliance realised that the rounding of damage becomes pretty significant when you're oping on smaller tribes with 50% war damage.

Eg. Oping on a tribe with 399 homes at 50% war damage:
homes killed = 399 * 0.01 * 0.5 = 1.995
which is rounded down to 1 home/op = failed KT [cry]

Extra note: the
homesDestroyed= Math.floor(homes * opDamage);
line in pastebin needs to be changed to
homesDestroyed= Math.max(Math.floor(homes * opDamage), 1);

Nvm, I see why your formula was so similar to mine now. Dividing by ln(0.99) is approx the same as multiplying by -100. That's a nice way to reduce computational power needed.

Sanzo -

If it was my calc I would just have it output:
'# of ops needed: a lot'
Page 1