uzmite premium da sakrijete sve oglase
Postitused: 18   Külastatud: 608 users
15.05.2016 - 22:08
For those interested in knowing how it exactly works, here is an explanation about it.

Let's start with Amok's response. The more (att/def + units count) that you have, the stronger your rolls will be. What the game does is that before calculating the roll, it calculates a quotient with the following formula:



If this Bonus is bigger than 1 (therefore, Player 1's bonus is bigger), then:

The attacker's Nerf is 1
The defender's Nerf is the one in the above formula:



Notice that, assuming that the Bonus is above 1, this multiplier will always be lower than 1.




On the other hand, if the bonus is equal or lower to 1 (therefore, p2's bonus is equal or bigger):

The attacker's multiplier is given out by this formula:



Notice that, assuming that the Bonus is below 1, this multiplier will always be lower than 1.

The defender's multiplier is 1.




A small note: Both formulas are inversely proportional and trying X value on one of them must give the same value as 1 / X in the other one.





After calculating the respective multipliers, the game will procede to calculate the rolls with the CascadingRandom function. For those without knowledge about programming it works like this:

- You start with 1 as a potential roll.
- A decimal from 0.00 to 1.00 will be choose (randomly).
- For each time that this decimal is lower than your "reducer", your potential roll will increment.
- If the decimal is higher than your multiplier, then you will roll whatever your potential roll is at.
- If you reached the maximum roll possible and you fail again to get a number below your reducer, then the potential roll will become 1 again. This could potentially repeat itself multiple times.

For example, if you're attacking an opponent that have twice as much stacking bonus as you do, then your reducer will be 0.5 . This means that you have an instant 50% chance of rolling 1, and so on.

The above procedure is applied to both the offensive and defensive stack, and it determines your rolls. Notice that the critical hit is calculated apart.
Laadimine...
Laadimine...
15.05.2016 - 22:15
I got bored reading it
----
Hi
Laadimine...
Laadimine...
15.05.2016 - 22:18
Kirjutas Legendary Hero, 15.05.2016 at 22:15

I got bored reading it


Indeed. It only provide extra content for the math-oriented players in the game. It's also useful for those that wishes to make their own atWar battle calculator (like me!).
Laadimine...
Laadimine...
15.05.2016 - 23:23
Interesting. So critical is separate from stacking bonus, could this be why LB does so well with large stacks? Even if out numbered LB is at less of a battle stacking disadvantage because critical hits are calculated separately.
Laadimine...
Laadimine...
25.05.2016 - 01:35
How do you know this is how the game calculates it? Does it correctly predict the results of imbalanced battles?
Laadimine...
Laadimine...
17.06.2016 - 03:17
Seems more complicated then it shouldve been xD The above equation doesn't make sense to me. Why does attack and unit count involve addition?

I suggest the following equation:

Stack Power = ( Attacker Attk/ Unit) / (( Attacker Attk/ Unit) + ( Defender Def/ Unit))

Attacker roll * stack power
Defender roll

This equation gives bonus to defenders, because in real life situation, you have entrenchment situations, but c'est la vie.
Laadimine...
Laadimine...
17.06.2016 - 07:56
Kirjutas Cthulhu, 17.06.2016 at 03:17

I suggest the following equation:

Stack Power = ( Attacker Attk/ Unit) / (( Attacker Attk/ Unit) + ( Defender Def/ Unit))


Wouldn't it make the attacker's multiplier to be always < 1 though? I see it as [ x / (x+y) ]

I think the formula would flavor the defender...
Laadimine...
Laadimine...
18.06.2016 - 04:11
Kirjutas clovis1122, 17.06.2016 at 07:56

Kirjutas Cthulhu, 17.06.2016 at 03:17

I suggest the following equation:

Stack Power = ( Attacker Attk/ Unit) / (( Attacker Attk/ Unit) + ( Defender Def/ Unit))


Wouldn't it make the attacker's multiplier to be always < 1 though? I see it as [ x / (x+y) ]

I think the formula would flavor the defender...


It does, i even state it at the end xD
Laadimine...
Laadimine...
06.09.2016 - 12:46
BUMP.

Added some small notes. Also fixed an error in the defender's Nerf spotted by Beerus
Laadimine...
Laadimine...
06.09.2016 - 18:17
I don't think you even know what you're talking about, most of this sounds made up.
----
Laadimine...
Laadimine...
24.09.2016 - 02:21
yolo!!!
Laadimine...
Laadimine...
14.12.2016 - 08:07
Kirjutas clovis1122, 15.05.2016 at 22:08

For those interested in knowing how it exactly works, here is an explanation about it.

Let's start with Amok's response. The more (att/def + units count) that you have, the stronger your rolls will be. What the game does is that before calculating the roll, it calculates a quotient with the following formula:



If this Bonus is bigger than 1 (therefore, Player 1's bonus is bigger), then:

The attacker's Nerf is 1
The defender's Nerf is the one in the above formula:






My code so far:
var formula = function (p1atk, p1ss, p2def, p2ss) {
var difference = (p1atk + p1ss) / (p2def + p2ss)
if (difference > 1) {
var atkNerf = 1
var defNerf = (difference + 1) / (2 * difference)
} else {
var atkNerf = (difference + 1) / 2
var defNerf = 0
}
}

I don't understand - is the nerf actually referring to a multiplier?

Choosing units to input and calculating about the defence addition is version 2.0
Also, I know there's already a calculator, this is for input online in case someone doesn't want to download it
----

Laadimine...
Laadimine...
14.12.2016 - 09:38
Kirjutas LukeTan, 14.12.2016 at 08:07

I don't understand - is the nerf actually referring to a multiplier?


Nice code! Javascript I assume?

And yes, it is a multiplier - refer to the Cascading random function to learn how to calculate a roll with such multiplier.

http://pastie.org/10716313#1

Tsiteeri:

public static int CascadingRandom(Random random, int min, int max, double multiplier)
{
if (multiplier > 0.999 && multiplier < 1.001) multiplier = 1;

if (multiplier < 1)
{
int value = min;
for (int i = min; i < max; i++)
{
if (random.NextDouble() > multiplier) break;
value++;
}
if (value == max && random.NextDouble() <= multiplier)
return CascadingRandom(random, min, max, multiplier);
return value;
}
if (multiplier > 1)
{
int value = max;
for (int i = max; i > min; i--)
{
if (random.NextDouble() > 2 - multiplier) break;
value--;
}
if (value == min && random.NextDouble() <= 2 - multiplier)
return CascadingRandom(random, min, max, multiplier);
return value;
}
return random.Next(min, max + 1);
}
Laadimine...
Laadimine...
14.12.2016 - 10:17
Kirjutas clovis1122, 15.05.2016 at 22:08


- You start with 1 as a potential roll.
- A decimal from 0.00 to 1.00 will be choose (randomly).
- For each time that this decimal is lower than your "reducer", your potential roll will increment.
- If the decimal is higher than your multiplier, then you will roll whatever your potential roll is at.
- If you reached the maximum roll possible and you fail again to get a number below your reducer, then the potential roll will become 1 again. This could potentially repeat itself multiple times.

For example, if you're attacking an opponent that have twice as much stacking bonus as you do, then your reducer will be 0.5 . This means that you have an instant 50% chance of rolling 1, and so on.


1) Can I assume that reducer is always attacker's number of units / defender's number of units?
If not, what's the stacking bonus?

Or is the reducer in point 3 referring to the multiplier?

2) After the roll is calculated, is it just taking the attackers roll away from the defenders total health starting with the units that have the highest defence and vice versa for the attackers?

3) What does the critical mean? Does 5 critical stat mean a 50% chance of critting? Also, what is the damage bonus from critical attacks?

BTW I'll probably finish it in a week, reading C# code isn't easy.
Strangely, it doesn't seem to be related to C++, which I've studied.



Also, this battle calculator is completely necessary as the other one doesn't seem to have its keylogger used properly. It should be used on famous investors to allow the person to know what to invest in and what not to, not used to steal social security numbers, bank numbers and houses!
----

Laadimine...
Laadimine...
14.12.2016 - 12:07
Kirjutas LukeTan, 14.12.2016 at 10:17

Kirjutas clovis1122, 15.05.2016 at 22:08


- You start with 1 as a potential roll.
- A decimal from 0.00 to 1.00 will be choose (randomly).
- For each time that this decimal is lower than your "reducer", your potential roll will increment.
- If the decimal is higher than your multiplier, then you will roll whatever your potential roll is at.
- If you reached the maximum roll possible and you fail again to get a number below your reducer, then the potential roll will become 1 again. This could potentially repeat itself multiple times.

For example, if you're attacking an opponent that have twice as much stacking bonus as you do, then your reducer will be 0.5 . This means that you have an instant 50% chance of rolling 1, and so on.


1) Can I assume that reducer is always attacker's number of units / defender's number of units?
If not, what's the stacking bonus?

Or is the reducer in point 3 referring to the multiplier?


Yes, reducer = multiplier.

Which part of the formulas do you have problem with? I believe you wrote both the part of the difference of army's strength and the multiplier quite nicely in your code.

What you have done so far is correct, you just need the function that, given the maximal possible roll(max attack or defense stat) and a multiplier (attNerf and defNerf variables), returns you the roll value.

That is where the cascading random function comes in. Take your time to understand it.

Then:

Kirjutas LukeTan, 14.12.2016 at 10:17

2) After the roll is calculated, is it just taking the attackers roll away from the defenders total health starting with the units that have the highest defence and vice versa for the attackers?


Yes. This is what happens most of the times, and is fair enough for most of calcs purposes.


Kirjutas LukeTan, 14.12.2016 at 10:17

3) What does the critical mean? Does 5 critical stat mean a 50% chance of critting? Also, what is the damage bonus from critical attacks?


Actually it's all in percent so 5 critical means 5%, which is 0.05 in decimal form.

To calculate the critical it goes like this (get the unit's roll first!):

- Get the unit's critical in decimal form (i.e, 5% = 0.05)
- Roll a random decimal number between 0 and 1
- If (unit's critical < random decimal number), then add to the current roll the maximal attack possible. Else don't add it.


Kirjutas LukeTan, 14.12.2016 at 10:17

BTW I'll probably finish it in a week, reading C# code isn't easy.
Strangely, it doesn't seem to be related to C++, which I've studied.


GL man

C# is more practical and closer to Java than to C++ indeed.

Take your time and have fun

Kirjutas LukeTan, 14.12.2016 at 10:17

Also, this battle calculator is completely necessary as the other one doesn't seem to have its keylogger used properly. It should be used on famous investors to allow the person to know what to invest in and what not to, not used to steal social security numbers, bank numbers and houses!




I was actually working on an online calculator using html, css, javascript and php. But with the current game status I pretty much lost all the motivation for it.
Laadimine...
Laadimine...
06.02.2017 - 09:52
Kirjutas clovis1122, 15.05.2016 at 22:08

For those interested in knowing how it exactly works, here is an explanation about it.

Let's start with Amok's response. The more (att/def + units count) that you have, the stronger your rolls will be. What the game does is that before calculating the roll, it calculates a quotient with the following formula:



If this Bonus is bigger than 1 (therefore, Player 1's bonus is bigger), then:

The attacker's Nerf is 1
The defender's Nerf is the one in the above formula:



Notice that, assuming that the Bonus is above 1, this multiplier will always be lower than 1.




On the other hand, if the bonus is equal or lower to 1 (therefore, p2's bonus is equal or bigger):

The attacker's multiplier is given out by this formula:



Notice that, assuming that the Bonus is below 1, this multiplier will always be lower than 1.

The defender's multiplier is 1.




A small note: Both formulas are inversely proportional and trying X value on one of them must give the same value as 1 / X in the other one.





After calculating the respective multipliers, the game will procede to calculate the rolls with the CascadingRandom function. For those without knowledge about programming it works like this:

- You start with 1 as a potential roll.
- A decimal from 0.00 to 1.00 will be choose (randomly).
- For each time that this decimal is lower than your "reducer", your potential roll will increment.
- If the decimal is higher than your multiplier, then you will roll whatever your potential roll is at.
- If you reached the maximum roll possible and you fail again to get a number below your reducer, then the potential roll will become 1 again. This could potentially repeat itself multiple times.

For example, if you're attacking an opponent that have twice as much stacking bonus as you do, then your reducer will be 0.5 . This means that you have an instant 50% chance of rolling 1, and so on.

The above procedure is applied to both the offensive and defensive stack, and it determines your rolls. Notice that the critical hit is calculated apart.

im not understanding the formula
----
USA USA USA
Laadimine...
Laadimine...
22.02.2017 - 07:02
Kirjutas clovis1122, 15.05.2016 at 22:08

On the other hand, if the bonus is equal or lower to 1 (therefore, p2's bonus is equal or bigger):

The attacker's multiplier is given out by this formula:



Notice that, assuming that the Bonus is below 1, this multiplier will always be lower than 1.

The defender's multiplier is 1.


Doesn't this formula turns out with a multiplier over 1?
Theoretically, with this formula i could attack 200 tanks with 1 tank and do some serious damage
200 - 1 = 199
199 + 1 = 200
200 / 2 = 100
100 * 8 = 800 (attackers attack)
200 * 4 = 400 (defenders defence)
----

Laadimine...
Laadimine...
22.02.2017 - 07:19
Kirjutas LukeTan, 22.02.2017 at 07:02

Kirjutas clovis1122, 15.05.2016 at 22:08

On the other hand, if the bonus is equal or lower to 1 (therefore, p2's bonus is equal or bigger):

The attacker's multiplier is given out by this formula:



Notice that, assuming that the Bonus is below 1, this multiplier will always be lower than 1.

The defender's multiplier is 1.


Doesn't this formula turns out with a multiplier over 1?
Theoretically, with this formula i could attack 200 tanks with 1 tank and do some serious damage


You need to calculate this first:

Kirjutas clovis1122, 15.05.2016 at 22:08

Let's start with Amok's response. The more (att/def + units count) that you have, the stronger your rolls will be. What the game does is that before calculating the roll, it calculates a quotient with the following formula:




If this result is below 1, then you can use the formula that you quoted.
If the result is bigger than 1, then you need to use the other formula.
Laadimine...
Laadimine...
atWar

About Us
Contact

Privaatsus | Kasutustingimused | Bännerid | Partners

Copyright © 2024 atWar. All rights reserved.

Liitu meiega:

Levita