Skaff Premium for å skjule alle annonser
Post: 63   Besøkt av: 589 users

Det orginale innlegget

Postet av clovis1122, 13.05.2020 - 13:53
I wanted to write this down somewhere, so here it goes: as Ivan stated back in 2015, there's really no %. There's no concept of "priority" in the code, just "order and random rolls".

We manage a list of Turn Actions for every player, and they're processed as follows. Let's assume player A attacked player B, while player B tried to run away:

1. Pick a random player.
2. Pick his next action (if any, if no more moves just pick another player). Let's assume player A's action is selected.
3. See where the stack wants to go (e.g attacking another city or unit, or just moving away). If he's not being attacked, complete the move successfully. Mark his target as "attacked".
4. Finish the action, and go again from step 1. Let's assume we now pick player B's Turn Action. He wants to move his units away.
5. Now, we check that this stack is being attacked and it is in defense position. We will calculate the chances of this stack being intercepted: we will roll a random number between 0 and 1. If the number is higher than (AttackerArmyCount / (DefenderArmyCount * 2)) [EDIT: the actual formula is AttackerArmyCount / DefenderArmyCount * 2, which is processed as (AttackerArmyCount / DefenderArmyCount) * 2. then the stack escapes.

This system has been in place for more than 3 years. Updates like this one from 2012 are either outdated or weren't implemented as-is. This explanation reveals lots of unintended behaviors, especially when you consider what a Turn Action really is. I hope it sheds some light for those interested in this system.

EDIT: please also check Dave's explanation for more details about this mechanic.
21.07.2021 - 05:43
 Mobster (Mod)
Skrevet av Your Monkey, 20.07.2021 at 20:01

I read this for first time. AW is really complex than it looks.

Laster...
Laster...
25.10.2023 - 12:26
Skrevet av Dave, 01.05.2021 at 19:28

Correction -- A novel by Dave
...


Wild! I'm a little late here, but thank you for putting this together. I was looking back to see if I had notes regarding turn-block and walls then stumbled upon this.

I've added a little note to the main thread to refer to your very detailed post.

Sitat:

Now, I don't know if Amok/Ivan did it this way on purpose or not. Maybe this is what they wanted. All I know is I've never changed it... it is exactly how it was from their time.


I think it wasn't intended, they've also talked about capping TBs at 50% before 😅. The last update I found regarding tbs also implies a TB limit.

Sitat:

So to sum up, what does all this mean?

First, when attacking a stack that's moving, any of the following could happen:

1) it could move out of range, preventing the attack
2) it could move within range and the attack proceeds

Second, if the attack proceeds, you are now "turnblocked" unless you can escape from it:

1) If defender has 3 or fewer units, they can't escape. They are turnblocked.
2) If attacker has at least 50% the units the defender has, they can't escape. They are turnblocked.
3) Otherwise, there is a % chance the defender *might* escape.

So there.


Very nice simplified summary!
Laster...
Laster...
23.05.2024 - 00:36
Skrevet av Phoenix, 06.05.2021 at 07:31

Skrevet av Dave, 01.05.2021 at 19:28

Correction -- A novel by Dave

I was recently looking into this again after somebody asked me some questions about it. I noticed the things Clovis said in this topic, and even the things I said too, were not matching up with what was actually happening in-game when I did some tests. It turns out what we both said were wrong.

I've looked through the code again, AND tested in-game, and the following is what really happens.

.......


Best forum post of 2021, you have earned 1 blowjob token


sorry what the actual fuck?!
Laster...
Laster...
atWar

About Us
Contact

Personvern | Vilkår for bruk | Bannere | Partners

Copyright © 2024 atWar. All rights reserved.

Følg oss på

Spre budskapet