Page 4 of 4 FirstFirst ... 2 3 4
Results 31 to 32 of 32

Thread: The essence of all creature's battle characteristics

  
  1. #31
    Awakening Game Master Metal Gear Rex's Avatar
    Join Date
    Sep 2009
    Posts
    5,689

    Default Re: The essence of all creature's battle characteristics

    Quote Originally Posted by Mothrayas View Post
    Pretty sure that unless mefistotelis changed it for some random reason, this snippet of KeeperFX source code would still be accurate.
    Ah. Then that means the cap is 79%. Unless it gets rounded up via decimals, which would mean 80% as I thought before. I seem to remember it cutting off decimals rather than rounding them up though, but I could be mistaken there.
    Last edited by Metal Gear Rex; June 4th, 2013 at 10:31.
    Dungeon Keeper 2 Patch: With More Balance and Pie [Hiatus]
    Forever Hiatus. Probably. Latest Version: 3.5 w/Levels 1-11 Revised.

    The Awakening: GM Powers Activate!
    Tesonu is napping!

  2. #32
    Elite Dragon Mothrayas's Avatar
    Join Date
    Nov 2009
    Location
    The Netherlands
    Posts
    1,635

    Default Re: The essence of all creature's battle characteristics

    For the sake of being accurate, it's 79.6875%.

    The game doesn't work with decimals. It works with fixed-point math which is roughly accurate to 1/256ths. Note that integer division always rounds down.

    As an example of damage calculation:

    (KeeperFX source code)
    Code:
    cdamage = (dmg * (256 - carmor)) / 256;
    Let's say dmg (damage of hit) is 10000 and carmor (creature armor) is the max, 204. cdamage is the result damage after armor reduction.

    cdamage = (10000 * (256 - 204)) / 256
    cdamage = (10000 * 52) / 256
    cdamage = 520000 / 256
    cdamage = 2031 (rounded down from 2031.25)

    The armor reduction here is 7969/10000, or 79.69%.

    So in effect, the maximum armor effect is close to 79.6875%, or a bit more depending on integer division roundoff. (Smaller numbers are less accurate.)

    The Awakening


Similar Threads

  1. Creature Guess
    By dk2player in forum Silly
    Replies: 192
    Last Post: March 16th, 2010, 15:25
  2. Which Creature is That?
    By Metal Gear Rex in forum Silly
    Replies: 14
    Last Post: February 21st, 2010, 18:02

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •