Jump to content
  • 0

Attack and Defens System


Lalak

Question

How do characteristics work? If I have 10 attacks and 20 defenses, it still produces a 10 attack. Why does the defense not reduce the attack?

Have another player 30 protection, and I have 10 attacks, he would still beats 10 and not reduces damage on character have which 30 protection and I have 10 attacks.

Or does the defense only work on critical damage?

Can someone send a form of defense and attack? Thank you in advance.

 

Look at the math (simplified, you may understand it this way):

Damage = Attack * (100 / (100 + Defense) 

 

So lets say damage is 10 and Defence is 10

Damage = 9

 

If Defence is 0 Damage is 10.

 

If we then factor in random numbers and other chance based stats the damage can easily be 10+.

 

Lets say the target has 200 Defence

Damage: 3

 

At low numbers of attack defence doesn't do much since its all ratios. Lets make the numbers bigger.

 

Attack = 100

Defence = 200

 

So plug the numbers into the formula using a magic thing called a calculator and we get 30 damage.

 

This formula does work.

 

 

There are 3 damage types as you can clearly see:

 

Physical Damage:

Damages is calculated from the strength stat of the attacker

Resistance is calculated from the defence stat of the target (This decreases the damage dealt to the target)

 

Magic Damage:

Damage is calculated from the Ability Power stat of the attacker (Or magic stat whatever you call it)

Resistance is calculated from the Magic Resist stat of the target (This decreases the damage dealt to the target)

 

True Damage:

Damage is calculated from either the Strength stat of the attacker

There is no resistance calculated for True Damage

 

In the Item, class and spell editors you can specify the damage type and even what stat to scale the damage with so you can have some variability there.

 

The random function results in selecting a random number between .975 * the damage and * 1.025 the damage. This results in each attack dealing slightly different damage to not have the same damage each attack.

 

ScalingStat:

is defined in the Item editor, Class Editor or Spell Editor when using a spell, item or fighting barehanded. It can be whatever stat you want.

 

ScaleFactor is a percentage. You want your spell to do 30% of your magic

it's a percentage. You want your spell to do 30% of your magic

 

BaseDamage:

is a static amount of damage. Say you want your spell to always do 20 damage plus ability scaling.

 

CritMultiplier:

is a value that multiplies damage if you get a critical hit. For example x2 damage.

 

V_Defense:

is the targets defence stat.

 

I assume V stands for victim.

 

The formula doesn't work, Attack - 7, Defense 14. Total damage 7... 

Works if Attacks 7 and Armour on 114, reduces damage on 3 units. You can close the formula incorrectly

If the player will play the game, and pump Defense, he will always be in a big minus, as Defense will not benefit him depending on the characteristics of Attack. The conclusion is to pump Defense does not make sense.

 

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 1
40 minutes ago, Lalak said:

I know this without you, I need a specific answer, an explanation of the formula, how it works and how to change it. A mini guide of some sort to see the edit form and where to change it and determine where to paste what. That I am here to change the damage from the Attack reduced the level of Defens and level of ability power reduced from magic resistance:

  "PhysicalDamage": "Random (((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor))) * * CritMultiplier * 1.025) * (100 / (100 + V_Defense) ",
  " MagicDamage ":" Random (((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor)))) * CritMultiplier * 1.025) * (100 / (100 + V_MagicResist )) ",
  " TrueDamage ":" Random (((BaseDamage + (ScalingStat * ScaleFactor))) * * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor))) * * CritMultiplier * 1.025) "

 

I not understand in programming and went on this forum to to know, and to told as zhto do, not uslushat obvious things, which I 100 times saw...

 

For example, I will have it work?

"PhysicalDamage": "Random (((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor)))** Attack *1) * (100/ (1 + V_Defense)" * * CritMultiplier * 1.025) * (100 / (100 + V_Defense) ",
 

As me here is this do not can understand, Description of that for that replies.

As @Dashplant said its math, Very basic at that.

 

I'm honestly struggling to understand what you actually want help with but this is currently how damage works:

 

There are 3 damage types as you can clearly see:

 

Physical Damage:

Damages is calculated from the strength stat of the attacker

Resistance is calculated from the defence stat of the target (This decreases the damage dealt to the target)

 

Magic Damage:

Damage is calculated from the Ability Power stat of the attacker (Or magic stat whatever you call it)

Resistance is calculated from the Magic Resist stat of the target (This decreases the damage dealt to the target)

 

True Damage:

Damage is calculated from either the Strength stat of the attacker

There is no resistance calculated for True Damage

 

In the Item, class and spell editors you can specify the damage type and even what stat to scale the damage with so you can have some variability there.

 

The random function results in selecting a random number between .975 * the damage and * 1.025 the damage. This results in each attack dealing slightly different damage to not have the same damage each attack.

 

Honestly, if this doesn't make sense don't touch the damage formulas. The default formulas are more than plenty to build your game.

Link to comment
Share on other sites

  • 0

Dashplant already told you, the only thing we can tell you is that formulas use a math function which get a random value between maximum damage and minimum damage. If you check it you will notice that there is a , in the middle of the formula, that separates de max damage calculation from the min damage calculation, but you are the one who decide how damage is calculated. 

Link to comment
Share on other sites

  • 0
11 minutes ago, Lalak said:

I know this without you, I need a specific answer, an explanation of the formula, how it works and how to change it. A mini guide of some sort to see the edit form and where to change it and determine where to paste what. That I am here to change the damage from the Attack reduced the level of Defens and level of ability power reduced from magic resistance:

  "PhysicalDamage": "Случайный (((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor))) * * CritMultiplier * 1.025) * (100 / (100 + V_Defense) ",
  " MagicDamage ":" Случайный (((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor)))) * CritMultiplier * 1.025) * (100 / (100 + V_MagicResist )) ",
  " TrueDamage ":" Случайно (((BaseDamage + (ScalingStat * ScaleFactor))) * * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor))) * * CritMultiplier * 1.025) "

 

I not understand in programming and went on this forum to to know, and to told as zhto do, not uslushat obvious things, which I 100 times saw...

 

It's basic math, not programming. 

 

So instead of bitching at me for trying to help you, open up a high school math textbook.

Link to comment
Share on other sites

  • 0
26 minutes ago, Dashplant said:

 

It's basic math, not programming. 

 

So instead of bitching at me for trying to help you, open up a high school math textbook.

You no one gnaw, I need a solution and help, not a typical message. Who knows the answer, if you do not understand this, and can not help me with a detailed message, you do not need to leave your useless messages. No description of how the formula works and other characteristics and how it works and what is responsible for what! ...

Link to comment
Share on other sites

  • 0

Help to understand the formula

"PhysicalDamage": "Random(((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * 1.025) * (100 / (100 + V_Defense))",

For the items for which it is responsible and in what order is:

1. ScalingStat - Responsible for PhysicalDamage? or for all? Or what is it?

2. ScaleFactor - Responsible for PhysicalDamage? or for all? Or what is it?

3. CritMultiplier - Responsible for PhysicalDamage? or for all? Or what is it?

4. V_Defense -  Responsible for PhysicalDamage? or for all? Or what is it?

5. Is there such a thing? V_Attack or just Attack 

 

1) "PhysicalDamage":  deal with this.

2) "Random(((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975,

3) ((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * 1.025) * (100 / (100 + V_Defense))",

4) What happens at the end of the formula  (100 / (100 + V_Defense))",

If I change that, for example, what happens?

"PhysicalDamage": "Random(((BaseDamage + (ScalingStat * ScaleFactor)))  * .975, ((BaseDamage + (ScalingStat * ScaleFactor)))  * 1.025) * (100 / (100 + V_Defense))",

Link to comment
Share on other sites

  • 0
10 minutes ago, Lalak said:

does not work on physical damage. 10 attacks characteristics have 1 individual have another individual 10 protection characteristics, player with attack 10 will hit on igruku with protection of 10, damage goes 10 not is declining

Look at the math (simplified, you may understand it this way):

Damage = Attack * (100 / (100 + Defense) 

 

So lets say damage is 10 and Defence is 10

Damage = 9

 

If Defence is 0 Damage is 10.

 

If we then factor in random numbers and other chance based stats the damage can easily be 10+.

 

Lets say the target has 200 Defence

Damage: 3

 

At low numbers of attack defence doesn't do much since its all ratios. Lets make the numbers bigger.

 

Attack = 100

Defence = 200

 

So plug the numbers into the formula using a magic thing called a calculator and we get 30 damage.

 

This formula does work.

Link to comment
Share on other sites

  • 0
38 minutes ago, Kibbelz said:

Look at the math (simplified, you may understand it this way):

Damage = Attack * (100 / (100 + Defense) 

 

So lets say damage is 10 and Defence is 10

Damage = 9

 

If Defence is 0 Damage is 10.

 

If we then factor in random numbers and other chance based stats the damage can easily be 10+.

 

Lets say the target has 200 Defence

Damage: 3

 

At low numbers of attack defence doesn't do much since its all ratios. Lets make the numbers bigger.

 

Attack = 100

Defence = 200

 

So plug the numbers into the formula using a magic thing called a calculator and we get 30 damage.

 

This formula does work.

 

Doesn't work for me, still the damage is the same and can not be reduced. Please help still here is with this

 

 

43 minutes ago, Lalak said:

Help to understand the formula

"PhysicalDamage": "Random(((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * 1.025) * (100 / (100 + V_Defense))",

For the items for which it is responsible and in what order is:

1. ScalingStat - Responsible for PhysicalDamage? or for all? Or what is it?

2. ScaleFactor - Responsible for PhysicalDamage? or for all? Or what is it?

3. CritMultiplier - Responsible for PhysicalDamage? or for all? Or what is it?

4. V_Defense -  Responsible for PhysicalDamage? or for all? Or what is it?

5. Is there such a thing? V_Attack or just Attack 

 

1) "PhysicalDamage":  deal with this.

2) "Random(((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975,

3) ((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * 1.025) * (100 / (100 + V_Defense))",

4) What happens at the end of the formula  (100 / (100 + V_Defense))",

If I change that, for example, what happens?

"PhysicalDamage": "Random(((BaseDamage + (ScalingStat * ScaleFactor)))  * .975, ((BaseDamage + (ScalingStat * ScaleFactor)))  * 1.025) * (100 / (100 + V_Defense))",

 

Video Test Attack 7 Defense 14

https://ascensiongamedev.com/resources/filehost/583f69e3449283e7e02b7b6206d06508.mkv

Link to comment
Share on other sites

  • 0
5 minutes ago, Lalak said:

Help to understand the formula

"PhysicalDamage": "Random(((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * 1.025) * (100 / (100 + V_Defense))",

For the items for which it is responsible and in what order is:

1. ScalingStat - Responsible for PhysicalDamage? or for all? Or what is it?

2. ScaleFactor - Responsible for PhysicalDamage? or for all? Or what is it?

3. CritMultiplier - Responsible for PhysicalDamage? or for all? Or what is it?

4. V_Defense -  Responsible for PhysicalDamage? or for all? Or what is it?

5. Is there such a thing? V_Attack or just Attack 

 

1) "PhysicalDamage":  deal with this.

2) "Random(((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975,

3) ((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * 1.025) * (100 / (100 + V_Defense))",

4) What happens at the end of the formula  (100 / (100 + V_Defense))",

If I change that, for example, what happens?

"PhysicalDamage": "Random(((BaseDamage + (ScalingStat * ScaleFactor)))  * .975, ((BaseDamage + (ScalingStat * ScaleFactor)))  * 1.025) * (100 / (100 + V_Defense))",

 

For the love of god stop multi posting. Its a reportable offence. Use the edit button on previous posts.

 

ScalingStat is defined in the Item editor, Class Editor or Spell Editor when using a spell, item or fighting barehanded. It can be whatever stat you want

ScaleFactor is a percentage. You want your spell to do 30% of your magic

BaseDamage is a static amount of damage. Say you want your spell to always do 20 damage plus ability scaling.

CritMultiplier is a value that multiplies damage if you get a critical hit. For example x2 damage.

V_Defense is the targets defence stat. I assume V stands for victim.

 

Honestly, if you don't understand how it all works just leave it alone. Its sufficient to use for your game and it does work. See my previous post where I proved it with Math.

Link to comment
Share on other sites

  • -1
1 hour ago, Dashplant said:

В формуле.json вы можете создать свои 3 формулы урона (физический, магический и истинный).

 

Так что все зависит от вас.

I don't know how I can rewrite this to make the formula work CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor))) * * * CritMultiplier * 1.025) * (100 / (100 + V_Defense) ",

Link to comment
Share on other sites

  • -1

CritMultiplier - Critical damage?

BaseDamage - Set standard damage

ScalingStat -  The characteristics of the character?

ScaleFactor - ???

V_Defense - ???

Defense -  Is it there at all?

Random - ???

AttackMultiplier -  Is it there at all?

PhysicalDamage - ???

MagicDamage - ???

TrueDamage - ???

Attack - Is it there at all?  characteristics. or is it V_Attack

 

What do I need to change here so that it reduces the Attack and not crit?

"PhysicalDamage": "Random(((BaseDamage + (ScalingStat * ScaleFactor))) * Attack * .975, ((BaseDamage + (ScalingStat * ScaleFactor))) * Attack * 1.025) * (100 / (100 + V_Defense))"

Link to comment
Share on other sites

  • -1
4 minutes ago, Kibbelz said:

As @Dashplant said its math, Very basic at that.

 

I'm honestly struggling to understand what you actually want help with but this is currently how damage works:

 

There are 3 damage types as you can clearly see:

 

Physical Damage:

Damages is calculated from the strength stat of the attacker

Resistance is calculated from the defence stat of the target (This decreases the damage dealt to the target)

 

Magic Damage:

Damage is calculated from the Ability Power stat of the attacker (Or magic stat whatever you call it)

Resistance is calculated from the Magic Resist stat of the target (This decreases the damage dealt to the target)

 

True Damage:

Damage is calculated from either the Strength stat of the attacker

There is no resistance calculated for True Damage

 

In the Item, class and spell editors you can specify the damage type and even what stat to scale the damage with so you can have some variability there.

 

The random function results in selecting a random number between .975 * the damage and * 1.025 the damage. This results in each attack dealing slightly different damage to not have the same damage each attack.

 

Honestly, if this doesn't make sense don't touch the damage formulas. The default formulas are more than plenty to build your game.

does not work on physical damage. 10 attacks characteristics have 1 individual have another individual 10 protection characteristics, player with attack 10 will hit on igruku with protection of 10, damage goes 10 not is declining

Link to comment
Share on other sites

  • -3

I know this without you, I need a specific answer, an explanation of the formula, how it works and how to change it. A mini guide of some sort to see the edit form and where to change it and determine where to paste what. That I am here to change the damage from the Attack reduced the level of Defens and level of ability power reduced from magic resistance:

  "PhysicalDamage": "Random (((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor))) * * CritMultiplier * 1.025) * (100 / (100 + V_Defense) ",
  " MagicDamage ":" Random (((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor)))) * CritMultiplier * 1.025) * (100 / (100 + V_MagicResist )) ",
  " TrueDamage ":" Random (((BaseDamage + (ScalingStat * ScaleFactor))) * * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor))) * * CritMultiplier * 1.025) "

 

I not understand in programming and went on this forum to to know, and to told as zhto do, not uslushat obvious things, which I 100 times saw...

 

For example, I will have it work?

"PhysicalDamage": "Random (((BaseDamage + (ScalingStat * ScaleFactor))) * CritMultiplier * .975, ((BaseDamage + (ScalingStat * ScaleFactor)))** Attack *1) * (100/ (1 + V_Defense)" * * CritMultiplier * 1.025) * (100 / (100 + V_Defense) ",
 

As me here is this do not can understand, Description of that for that replies.

Link to comment
Share on other sites

×
×
  • Create New...