Dodge revamp

Post Reply
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Dodge revamp

Post by Alexander82 »

From the previous discussions:
Alexander82 wrote: Tue Feb 26, 2019 4:13 pm At the moment dodge isn't effective against units that have a bonus against you.

My suggestion is that when a unit has a bonus against you the effect of dodge is reduced but not necessarily removed

Ideally the reduction might scale with the entity of the bonus (e.g. Any 100% bonus bypass a 10% dodge so a 50% bonus bypass 5% dodge and a 200% bonus a 20% dodge) but in case it is too complex to code we might stick for a fixed value (20/30% i guess)

The final word on coding is from @Stratego (dev) tough
Age of Fantasy design leader
User avatar
Dagravian
Posts: 938
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Dodge revamp

Post by Dagravian »

That is quite inconvenient issue indeed... I think i might know the definitive solution for dodges, but i need to have a clear definition of these 4 complex things first...

@Stratego (dev) Need you to answer these things...

- Can you reveal the attack formula of the game? I mean what does the game see when one unit attacks another? How the whole attack is mathematically calculated by it? I think we should update it to fix this...

- How does dodge works and what is the relationship it does have with bonuses to render it useless?

- Dodges happen before or after the armor/health soak of attack?

- Do random probability percentage dices (D100) are included on Dodge formulas? Actually, how percentage works and interact with other parameters in game?
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Dodge revamp

Post by makazuwr32 »

1. Current damage formula:
A - attack value of attacking unit
B - bonus against defending unit; can be 0
D - defence of defending unit
T - total damage dealt

Code: Select all

T = A*(B+1) - D
Also i must admit that normally melee units deal 1 damage only against flying if they don't have bonuses.

2. If unit has bonus against other unit (for example elven fire archer against master troll headhunter, that one has 50% dodge ranged) than dodge melee (if unit is melee) or dodge ranged (if unit is ranged) is ignored completely.

Even 100% dodge melee or ranged.

Dodge counter works always on the other hand (ofc with % it has) and allows to dodge counter attack regardless of defending unit.

3. Before. If unit dodged attack than damage is ignored.

4. This is only thing i can't answer.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Dagravian
Posts: 938
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Dodge revamp

Post by Dagravian »

1- I see, so can be eighter, flying units owns a special damage formula or there is variables missing on this formula. Or perhaps the game might calculate how damage is made in a total different way...

2,3- That's weird since dodge theorically happen before calculation of the damage. I'm almost sure that the issue should be there somewhere... But idk if is on the dodge formulas or on the interaction that it have with damage or another source... Does happen that you know the formulas of both melee/ranged dodges?

4- ok =/
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Dodge revamp

Post by Midonik »

DoomsdayDragonfire wrote: Thu Mar 21, 2019 3:33 pm 1- I see, so can be eighter, flying units owns a special damage formula or there is variables missing on this formula. Or perhaps the game might calculate how damage is made in a total different way...
Hmm, from JSON point of view you add a special action so maybe it just changes it to 1 automatically?
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Dodge revamp

Post by makazuwr32 »

DoomsdayDragonfire wrote: Thu Mar 21, 2019 3:33 pm 2,3- That's weird since dodge theorically happen before calculation of the damage. I'm almost sure that the issue should be there somewhere... But idk if is on the dodge formulas or on the interaction that it have with damage or another source... Does happen that you know the formulas of both melee/ranged dodges?
What formulas?
Dodges are working same way as spell resist:
Either unit completely avoids spell/attack or it gains damage/affected by spell normally.
If unit has 30% dodge melee and range than he has 30% chance to avoid damage of melee or ranged units which don't have bonus against him.

As for point 1 actually there is a bit different formula for flying units.
If attaking melee non-flying unit has bonus against target flying unit (somehow) than it deals damage normally with formula i provided. If melee unit hasn't that bonus than it deals exactly 1 damage. It is logical "if/then/else" from programming.
Also if unit is flying or ranged than it can deal damage to flying normally with formula above.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Dagravian
Posts: 938
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Dodge revamp

Post by Dagravian »

Midonik wrote: Thu Mar 21, 2019 3:43 pm Hmm, from JSON point of view you add a special action so maybe it just changes it to 1 automatically?
Idk, from what i know, Json just do store values for gameplay stuff and don't do the maths for the game. It just obey what other languages define for it... So i don't think it can provide outputs like that naturally. But i guess that might be possible if there is a external rule for it.
makazuwr32 wrote: Thu Mar 21, 2019 4:03 pm
What formulas?
Dodges are working same way as spell resist:
Either unit completely avoids spell/attack or it gains damage/affected by spell normally.
If unit has 30% dodge melee and range than he has 30% chance to avoid damage of melee or ranged units which don't have bonus against him.

As for point 1 actually there is a bit different formula for flying units.
If attaking melee non-flying unit has bonus against target flying unit (somehow) than it deals damage normally with formula i provided. If melee unit hasn't that bonus than it deals exactly 1 damage. It is logical "if/then/else" from programming.
Also if unit is flying or ranged than it can deal damage to flying normally with formula above.
Their Formulas? Well i guess the right meaning might be Function?... Btw as both have a bit of each other, i think we should consider both...

The ones that should exist to control the "dodge event" happening prior damage on attack. Calculating and defining the "heads/odds" of dodges on every attack and also other parameters as dodge pool for it, the probability chance of this event to happen and other stuff before passing to the "damaging event".

In other words, the math made to define a choice for the engine to trigger or not the dodge on an unit. Remember that it can't think by itself, so something was created to simulate that, bcz it can't guess or speculate results by itself... I'm not sure of how many steps it might have, but they should be calculated based not only on the 0 (will not trigger) and 1 (certainly trigger), but also considering the values in between them. As the probability of dodge happen is in between 0% and 100% chance.

All i did understand from what you said is that "% = sucess". As 30% means 30% sucess. But what makes the game choose the 30% sucess instead of 70% failure? And why it does think that 0.1% bonus can overlap 100% dodge if bonus is theorically added on damaging event formula? So at least, i think that might have 4 or more of those maths for each "%" parameter on the game. So, the issue can be there on the formulas/func or on the interaction between them.

Same for spell resist... There must be a formula/function to calculate the probability of spell sucess/resist by units buried somewhere aswell... We just need to figure it out or wait Daniel answer this.
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Dodge revamp

Post by makazuwr32 »

DoomsdayDragonfire wrote: Fri Mar 22, 2019 1:19 pm And why it does think that 0.1% bonus can overlap 100% dodge if bonus is theorically added on damaging event formula?
I am not sure about spell resist but if unit has at least 0.0000001% bonus than there is function that overrides dodges. Like magic missle ability hits always any targets regardless of their spell resist which can be 0/100/1000/9001%. Magic missle just is set to ignore them. Same here for dodges and bonuses - if unit has bonus against other unit than it is set in some additional function inside dodges code than dodges (only melee and range! it doesn't affect dodge counter!) to ignore dodges.

Also 30% chance is chance of successful dodge.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Dagravian
Posts: 938
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Dodge revamp

Post by Dagravian »

Answering my own first question... I see the whole attack function as this sequence of events. And inside of each event, they have their own set of formulas to calculate stuff for the next event. The first thing it does is check what is the attack source if it is melee/ranged or hability. Then it starts with:

Dodge > attack (calculate all atk of attacker) > defense (calculate all defense of defender) > armor soak (calculate results + maybe your formula without bonus variable) > counter.

If is a spell:

Resist > attack > defense > armor soak.

The "dodge counter" enters on "counter" event, the final event, and since you said it is ok, i'm not counting on "dodges", so it isn't part of our dodge isue.

So if an unit attacks another, the game will check if it can dodge/resist, if it can, all the rest of events should be ignored. As the unit avoided/resisted the attack. But if not, on Jsons, you can define if the units/habilities owns all or any parameters/variables needed for the calculation of next events, so they can skip or not entire parts of some events based on what the unit/hability have on it's Json... That's why magic missile can just ignore resist and defense of an unit...

But bonuses break that sequence of events somehow. By ignoring that rule and forcing priority above "dodge event". Thing that should not happen as bonuses should be applied on "attack event". So it should not have any reason to interfere with dodge behavior...
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Dodge revamp

Post by makazuwr32 »

Some time ago it was that way. And elves were literally unkillable because they dodged too much attacks.

As for bonuses: it is counted in dodges section as well and if unit has bonus to defending unit than it sets dodges to 0 now. Here bonuses act as boolean: has attacking unit bonis against defending or not — 0 or 1. Amount of bonuses is counted in attack calculating part.

And what alex suggests is to make bonuses affect resulting chance of dodge now. Not 0 or normal but -5% per each 50% of bonus damage. So for example troll headhunters when attack elven archers will give them -20% dodge ranged because they have 200% bonus. Alas now elven archers will still have 10% chance to dodge attack instead of guaranteed kill on hit.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Dodge revamp

Post by makazuwr32 »

Also because this will affect mainly elves + troll headhunters we need to think more.
For now only ways of dealing with master troll headhunters which are under cover of their giants for elves are their fire archers and if this change will be in than even fire archers will have 30% chance of miss instead of guaranteed hit.

If this change will be made than troll headhunters must loose part of their own dodge ranged.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Dagravian
Posts: 938
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Dodge revamp

Post by Dagravian »

If Bonuses already strikethrough the dodges, i doubt that can solve the problem or make significant difference. As it would now interfere with unit's accuracy... So i still think it is not needed to allow bonuses to interfere as they should not have any relationship with dodges to begin...

If it was already working as intended that way before, but elves were dodging too much, then the answer weren't simple adjust the dodge formula/function to reduce the probability of dodge from happenning? Or by reducing the sucess chance if it was going to happen?
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Dodge revamp

Post by makazuwr32 »

15% dodge chance for elves makes them thin as glass.
And with 30% chance they were dodging too much of attacks when even units with bonus had chance to miss them.
And just think how would you deal for for example for humans with bugged elf who has 100% all dodges and ability to dodge even units who has bonuses.

And that is actually can be possible because veteraning is going to be changed and will give +attack, (maybe) +hp and +dodges (instead of +armor).
How do you think you can deal with unit who has 100% all dodges?

Also another problem here begins is to fight for elves with troll headhunters. Because only their current range who can hit them is fire archer and if even she will have a 50% (!!!) miss chance than elves will become weak as glass against orcs and their headhunter + hamletback + orc king spam.

Actually now i think that dodges must act as they do for now. With their own weakness. Or else dodges will become superior variant of armor and because mostly only elves have them and they rely on dodges really high than any changes in current chances will make them much more weaker and glassy (and that is despite the fact that they are already glassy, even worse than undeads against fireballing hordes of drake knights) and any changes in mechanic of dodges on the other hand will make elves too tough to deal with.

Right now bonuses act as backdoor which allows to deal with annoying units quite easy. Without that you just need to rely exclusively on luck which can be really bad (10 misses in a row against unit with 10% chance only i once had and without that backdoor such things will happen much more common).

Armor has on non-spell immune units two backdoors - disarmor spell and (exclusive for elves) minimal damage increase.
Spell resist and spell immunity has 2 backdoors as well - on-hit effects and offensive spells.
Why dodges must not have such thing?
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Tankhead
Posts: 1838
Joined: Fri May 18, 2018 6:46 am
Location: United states, Texas

Re: Dodge revamp

Post by Tankhead »

Trying to change dodge mechanic looks like its creating issue after issue
"The smallest pebble was once the biggest stone, the biggest stone was once bigger"
User avatar
Dagravian
Posts: 938
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Dodge revamp

Post by Dagravian »

To begin, why i don't think bonus relate to dodge is bcz they do operate in diferent ways. The definition of Bonus is as its own name suggests, it gives an extra value to an atribute already defined.

While Dodge is an event that can happen or not in space-time continuum. The idea of dodge is simple: You might have a chance to dodge, so if you have this chance... Will you be able to dodge? Can you dodge in time? Can you avoid the atack totally? Or it just enough to let the attack pass scraching?... So to sumarize, Dodge is a possibility, and not always ensured as bonus... That's why i think they should not be related with each other to begin.

The principle of mathematical probability is a relation of all favorable/desired results with all possible results. As long as there is a balance of them all. So grafically, the results of equal probabilities will be a straight line... So if 10% is too low and 30% too much, then there is something very, very wrong with the formulas... As it reveals a weird curve... But thanks to that, i think i discovered why that happened.

Applying to our terms:
I believe that the game see only half of the dodge event itself, it just calculate if the dodge will happen, but not if it will be sucessfull... So it see these 30% as 100% sucess on dodge, so P=(1÷0.3) meaning it will trigger dodge once every 3,3333...3 attacks, while on 20% (1÷0.2), once every 5 attacks, if 10% (1÷0.1), once every 10 attacks, or 1% (1÷0.01) being once every 100 attacks... And that growth curve is just what you said that was happening... So that might be the source of the Dodge problem, and the solution is quite easy and don't requires bonuses messing around.

It just need to finish the function applying the chance of happening equally as the chance of sucess... So if the unit own 30% dodge, it should give it 30% of sucess instead of 100%... This will make the dodge works as intended, also i think that we should check if spell resist doesn't have this sort of problem aswell, then, stuff like penetration, deflection, critical hits or other parameters that require some chance to happen will be easier to be added aswell.

Also, thinking about dodge veteraning,
- We can apply a cap amount of happening or a minimal fail percentage if it is going to happen.
- We can apply an reverse amount of sucess dodging for each % added on the happening chance, it would be literally 'higher the chance, lower the chance'. :lol:
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Re: Dodge revamp

Post by Alexander82 »

Don't worry too much about stats.

We can still adjust them and I didn't intend the rework mainly for archers/headhunters (right now I think that they are easy enough to kill with fire alone) but as a general logic (that might, obviously, need some stat adjustment in critical cases).

For example an important aspect is the fact that warriors (anti cavalry), can't dodge melee against cavalry because they are infantry too.

I'd like elven basic melee units to be useful but not just by making them a copy of human units, but in their own way. I feel that a good dodge mechanic is important to make elves work as they should.
Age of Fantasy design leader
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Dodge revamp

Post by makazuwr32 »

Hm.
I wonder is it is possible to make via some tech for elven dodges to work regardless of enemy bonuses.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Re: Dodge revamp

Post by Alexander82 »

I'm against the "regardless" if intended as a "totally ignore bonus".

Maybe a tech to make them act as ni my first post.

Mybe 2 or 3 tech levels to allow them to retain more dodge progressively.

I'll think about it.
Age of Fantasy design leader
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Dodge revamp

Post by makazuwr32 »

Alexander82 wrote: Tue Mar 26, 2019 10:18 am I'm against the "regardless" if intended as a "totally ignore bonus".

Maybe a tech to make them act as ni my first post.

Mybe 2 or 3 tech levels to allow them to retain more dodge progressively.

I'll think about it.
That will be even better.
Alas i think elves must have lower costs for their techs in general and even lower for these specific techs.

Right now to upgrade elves to max level takes a bit too much time if compare to humans or orcs.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Re: Dodge revamp

Post by Alexander82 »

I think that a better dodge would make them better in the previous stages of the game
Age of Fantasy design leader
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Dodge revamp

Post by makazuwr32 »

Maybe but the problem is that it must be researchable.
And currently elves already to achieve best stats require tons of time to research things.
18 turns for bow upgrades
18 turns for armor
18 turns for melee
18 turns for each dodge type (x3 total)
6 turns for aimed shot
12 turns for presicion shot (tech that increases minimal damage dealt)
12 turns for fencing mastery
3 turns for balanced blades
6 for jump
10 for ent toughness
14 for rock throwing (this tech also doesn't affect newly trained ent demolitioners)
8 for treetop archery
4 for lembas
3 for better sight
3 for thunderstorm

These are main techs which are required most of time. Some others i didn't include.

In total 189 turns.

I suggest to lower cost for researching of all blacksmith techs (exept of balanced blades) to 4/5/6 and dodges down to 3/4/5. It will reduce total cost of elven by 27 turns down to 162 turns and they are core techs.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Re: Dodge revamp

Post by Alexander82 »

I wouldn't touch the cost of core units since they affect a lot of units. Maybe some of the techs that affect only a few units (like rock throwing)

It is true that elves need more turns but I wouldn't make a direct comparison with other races since every race works in a different way (we might make the same comparison with undeads and humans but I don't think we would think that we should lower uman techs' costs or increase undead tech costs).

For example humans will greatly increase the amount of turns required to max everything once warfell will be in game and the same will happen to orcs once we will set properly the embassy system for them.

I suggest no touching costs for now
Age of Fantasy design leader
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Dodge revamp

Post by makazuwr32 »

The problem here is that humans get their best units much faster than elves get to their highest level even if count only blacksmith and dodge techs for elves only.

Also human blacksmith techs already cost lower than they were before (4/5 turns)
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Re: Dodge revamp

Post by Alexander82 »

i'll consider that
Age of Fantasy design leader
User avatar
Dagravian
Posts: 938
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Dodge revamp

Post by Dagravian »

Wow never noticed that were needed more than 200 turns to level up everything there... Would not be better if we just add one tech on the castle of every faction later on to reduce all tech (or blacksmiths techs) cost by 1 turn instead of eventually re-adjusting them again and again?
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Dodge revamp

Post by makazuwr32 »

I don't think if this is technically possible...
Also blacksmith techs have only 4 races:
Humans
Dwarves
Elves
Scaledfolks (not exactly blacksmith but mutation techs which will affect many units of scaledfolks)
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Dagravian
Posts: 938
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Dodge revamp

Post by Dagravian »

Well, if the tech does target the whole tech category as the bonus is made to target a whole category of units, we can make a tech reduce the full cost of the next techs by 10% or 15%... Same could be made if we desire to speed up unit production by making the tech target a whole category as infantry or calvary...
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻
Post Reply

Return to “Archived - FAQ”