Jump to content
  • 0

NPC Damage Formula?


Breadcrumbs

Question

Hi, I'm wondering if there's a way to do random damage numbers with NPCs? I can't seem to get an NPC to do more than the base damage I set unless if I change their crit chance, but I'd like to be able to set a base + a range, so like "3-7 damage" if it is possible.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

You can set the max and the min damage ratio on the server/resources/forumas.xml file. Everyone's damage is calculated using that formula. The final damage value is a random number between the max and the min damage ratio.

Link to comment
Share on other sites

  • 1
1 minute ago, Breadcrumbs said:

 

This takes effect on how enemy monsters deal damage to you too? I'm looking for their min/max.

it should be, yes. If you have never edited the formulas.xml file and you are working with low damage(for example, each time a npc hits you it deals 3 damage points) you will never feel any variation because the default damage formula variance is so small.

 

WARNING: Be carefull when editing damage formula. Mathematic errors such as dividing by 0 would result on a server several error.

Link to comment
Share on other sites

  • 0
2 minutes ago, Khaikaa said:

You can set the max and the min damage ratio on the server/resources/forumas.xml file. Everyone's damage is calculated using that formula. The final damage value is a random number between the max and the min damage ratio.

 

This takes effect on how enemy monsters deal damage to you too? I'm looking for their min/max.

Link to comment
Share on other sites

×
×
  • Create New...