Monster AC -> absorption + evasion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ewert
    Knight
    • Jul 2009
    • 707

    #31
    About the to-hit formula (I agree absorption should be a flat value), first choice is whether to make it linear formula or relative (or whatever, with a curve type graph). Buffs and such boost much more in linear formulaes, as well as they are much stronger in "low end". Which could work good, as a heroism+berserk if you have troubles hitting would really give a good boost. Whereas if you already are quite high hit %, it doesn't matter that much if it is 85% or 95%. Just thinking out loud.

    Comment

    • Magnate
      Angband Devteam member
      • May 2007
      • 5110

      #32
      Originally posted by fizzix
      I have an AC branch now up on github. It has my edited monster list and the changes to the parser, monster race structs, and all calls to r_ptr->ac so the game compiles and runs. I haven't done any tinkering with the to_hit or to_dam calcs yet.

      I've called the new AC variables eva (evasion) and sorb (absorption) but that's only because I am uncreative with names... Perhaps sorb should just be the old ac name?
      Well done - that is quick work indeed. I have a pvals branch up on github but am slightly behind you: it compiles and runs as normal, but I haven't done the parser changes for additional pvals yet.

      So can I just check, we now have r_ptr->evasion and r_ptr->absorption but no more r_ptr->ac, right? Presumably this breaks savefile compatibility?

      One thing you might want to think about: the current test_hit() function is called by both player and monsters for melee attacks (and for player missile attacks but not monster missile attacks). So you have a choice:

      1. Leave monsters hitting the player unchanged, and write a new test_hit2 function for players attacking monsters, or

      2. Separate player AC into evasion and absorption before messing with the to-hit formula.

      IMO the latter is much more work because of all the display issues (char screen etc.) - and we have yet to work out how the player increases EV.

      Also, pls don't forget to add details of monster evasion/absorption in describe_toughness() in monster1.c if you haven't done already.
      "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

      Comment

      • fizzix
        Prophet
        • Aug 2009
        • 3025

        #33
        Originally posted by Magnate
        So can I just check, we now have r_ptr->evasion and r_ptr->absorption but no more r_ptr->ac, right? Presumably this breaks savefile compatibility?
        It doesn't seem to...odd.

        I'm going to leave the player AC handling as is. Messing with the entire object list to add AC for evasion and absorption is not a step I want to take yet. Especially while I'm still unsure if this is going to work. Better to get a monster to hit player up to play test and then see about keeping that for the player.

        Alternatively, evasion could be entirely based on DEX and we wouldn't need to change any armor. But this is getting ahead of ourselves.

        Today's plan is to do some calculation of to-hit as it currently stands for various classes at various stages of the game. I can then use that to see how much of the general form I can retain with a simplified system.

        Comment

        • Derakon
          Prophet
          • Dec 2009
          • 9022

          #34
          I'd say that player evasion should be boosted by high DEX and reduced by heavy armor. Problem being that it would also need to scale with monster difficulty -- a naked 18-DEX character should have decent odds of dodging kobolds but not so great odds of dodging great wyrms.

          Comment

          • d_m
            Angband Devteam member
            • Aug 2008
            • 1517

            #35
            it's a little bit annoying, but I think that a good way to try to come up with the right formula is to choose some monsters who have various evasion/absorption stats and some some character types (STR/DEX/class/level/weapon) and figure out the outcomes you want in terms of chance to hit, average damage, etc.

            For extra credit, determine those player's evasion/absorption scores and do the calculation both ways, figuring out how much damage the monster will do also.

            I guess the alternative is to build the character archetypes and then just generate a table for all the monsters with the proposed formula, and then see how it looks.
            linux->xterm->screen->pmacs

            Comment

            • Estie
              Veteran
              • Apr 2008
              • 2347

              #36
              This is great. I have argued before that I think magic (= not affected by ac) damage dominates this game. However, thats no reason to not get the physical part right first.

              The split should eventually be done for @ too. I envision something like:
              armor (plate mail as opposed to robe) affects absorbtion, while enchantment (+20 vs +10) affects evasion. Also, heavy absorbtion armor might disturb spellcasting more than it is now (replacing the "glove" and weight rules and also affecting priest casters). Something like adding any current to hit malus on heavy armors to spellfailure at 1%/to-hit-minus might be a start. Dexterity and class(level) could also affect evasion.

              For ranged physical damage (projectiles), the same rules should apply. Any balancing can be done by adjusting arrow damage and to-hit chance.

              Comment

              • Magnate
                Angband Devteam member
                • May 2007
                • 5110

                #37
                Originally posted by fizzix
                It doesn't seem to...odd.

                I'm going to leave the player AC handling as is. Messing with the entire object list to add AC for evasion and absorption is not a step I want to take yet. Especially while I'm still unsure if this is going to work. Better to get a monster to hit player up to play test and then see about keeping that for the player.

                Alternatively, evasion could be entirely based on DEX and we wouldn't need to change any armor. But this is getting ahead of ourselves.

                Today's plan is to do some calculation of to-hit as it currently stands for various classes at various stages of the game. I can then use that to see how much of the general form I can retain with a simplified system.
                Ignore me - I don't think monster details are saved in the savefile, only the race (and current hp). So you're right, this shouldn't affect saves at all, which is great.

                Agreed on leaving the player EV until after this is sorted.

                I do have a spreadsheet somewhere with all the melee skills for all classes from cl1-50, but by the time I've found it you'll have done it anyway. There is nothing force you to fit the to-hit algorithm to the existing skill numbers btw - much better to get a smooth and logical algorithm, and tweak class melee skills accordingly.
                "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                Comment

                • fizzix
                  Prophet
                  • Aug 2009
                  • 3025

                  #38
                  I've been playing around a lot with the to-hit calculation. My conclusion is that the current to hit formula, while being fairly opaque, does a pretty decent job of balancing to hit values across the classes and across AC types.

                  It's also impossible to recreate this with a simple formula (where simple means that the calculation is opaque to the user, something like +1 to hit = +1 %.)

                  My current plan is to leave the to-hit calc as is and to work on implementing some absorption values.

                  Comment

                  • PowerDiver
                    Prophet
                    • Mar 2008
                    • 2820

                    #39
                    Originally posted by fizzix
                    I've been playing around a lot with the to-hit calculation. My conclusion is that the current to hit formula, while being fairly opaque, does a pretty decent job of balancing to hit values across the classes and across AC types.

                    It's also impossible to recreate this with a simple formula (where simple means that the calculation is opaque to the user, something like +1 to hit = +1 %.)

                    My current plan is to leave the to-hit calc as is and to work on implementing some absorption values.
                    I think things would be clear enough if you simply wrote the players hit roll normalized against monster AC. So if for now you have a test for ?(1dH > 3 Ac/4) you print out 4H/3 as the player's skill. Then it should be obvious how good you are compared to a monster with an AC of 25.

                    This thing about using words such as "excellent" to describe fighting skill is completely opaque, and wrong to boot. "Excellent" sometimes means "so bad it is pointless to try".

                    Comment

                    • ewert
                      Knight
                      • Jul 2009
                      • 707

                      #40
                      Hehe, yeah formulaes are fun. The current one is "easy", as in you can't really break it with bonuses to hit etc. It's also quite boring, which is the downside of easy.

                      With absorption, remember that if you go with a linear formula, each and every point higher is worth more. Going from 40dmg to 30dmg per hit is 33% increase in time to kill, going from 30 to 20 dmg is 50% increase in time to kill ... Man it's fun. Especially as the talk is of going linear flat value absorption. =P

                      Comment

                      • fizzix
                        Prophet
                        • Aug 2009
                        • 3025

                        #41
                        Originally posted by PowerDiver
                        I think things would be clear enough if you simply wrote the players hit roll normalized against monster AC. So if for now you have a test for ?(1dH > 3 Ac/4) you print out 4H/3 as the player's skill. Then it should be obvious how good you are compared to a monster with an AC of 25.

                        This thing about using words such as "excellent" to describe fighting skill is completely opaque, and wrong to boot. "Excellent" sometimes means "so bad it is pointless to try".
                        Well currently you get the % to-hit by looking at monsters you know well. However it's true that probably the only changes I make to the to-hit calculation are cosmetic ones. Replacing the 'fighting' with a number is a good idea. The other main cosmetic change is to get rid of the stupid 3/4 factor that appears whenever monster AC is used for calculation. I was thinking to do this for V as a pure cosmetic change, but the 3/4 factor doesn't appear when resistance calculation is done.

                        Comment

                        • Magnate
                          Angband Devteam member
                          • May 2007
                          • 5110

                          #42
                          Originally posted by fizzix
                          Well currently you get the % to-hit by looking at monsters you know well. However it's true that probably the only changes I make to the to-hit calculation are cosmetic ones. Replacing the 'fighting' with a number is a good idea. The other main cosmetic change is to get rid of the stupid 3/4 factor that appears whenever monster AC is used for calculation. I was thinking to do this for V as a pure cosmetic change, but the 3/4 factor doesn't appear when resistance calculation is done.
                          I think this is probably a very good time to remove the 3/4, since you're replacing the AC in the to-hit formula with the new EV value, and we can just make that 4/3 of whatever it would have been.
                          "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                          Comment

                          • EpicMan
                            Swordsman
                            • Dec 2009
                            • 455

                            #43
                            I think y'all are overthinking this. What about the following proportional to-hit formula:

                            (total player to-hit) / (total player to-hit) + (monster evasion)

                            (max attack damage) / (max attack damage) + (monster absorption)

                            Then just adjust the monster ac values to your liking.

                            So, player to-hit = monster evasion --> 50% chance of hitting
                            player to-hit = 2x monster evasion --> 67% chance of hitting
                            etc.

                            Advantages:
                            -Easy to guestimate hit chance from your to-hit and monster evasion, as well as compare your damage output to monster absorption. No opacity.
                            -Can adjust to-hit or damage issues separately without affecting the other
                            -Relatively simple to calculate (one addition and one division for hit and damage each)

                            Disadvantages:
                            -Would need a separate roll for critical hits.
                            -Does not conform to the min 5% hit / max 95% hit but those rules could be added in as a d10 roll with 1 = miss, 10=hit, 2-9=use above formula

                            Comment

                            • Magnate
                              Angband Devteam member
                              • May 2007
                              • 5110

                              #44
                              Originally posted by EpicMan
                              I think y'all are overthinking this. What about the following proportional to-hit formula:

                              (total player to-hit) / (total player to-hit) + (monster evasion)

                              (max attack damage) / (max attack damage) + (monster absorption)

                              Then just adjust the monster ac values to your liking.

                              So, player to-hit = monster evasion --> 50% chance of hitting
                              player to-hit = 2x monster evasion --> 67% chance of hitting
                              etc.

                              Advantages:
                              -Easy to guestimate hit chance from your to-hit and monster evasion, as well as compare your damage output to monster absorption. No opacity.
                              -Can adjust to-hit or damage issues separately without affecting the other
                              -Relatively simple to calculate (one addition and one division for hit and damage each)

                              Disadvantages:
                              -Would need a separate roll for critical hits.
                              -Does not conform to the min 5% hit / max 95% hit but those rules could be added in as a d10 roll with 1 = miss, 10=hit, 2-9=use above formula
                              That's a massive change from the current system, where to-hit percentages are normally in the 80-90% range for most comparable monsters. Your proposal would result in many more misses, unless to-hit bonuses went stratospheric.

                              It's also quite hard to envisage the effect of an increase to the player's to-hit, because the monster evasion is in the denominator. I would prefer an algorithm which subtracted EV from the nominator - IMO that would be much clearer.
                              "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                              Comment

                              • fizzix
                                Prophet
                                • Aug 2009
                                • 3025

                                #45
                                Originally posted by Magnate
                                That's a massive change from the current system, where to-hit percentages are normally in the 80-90% range for most comparable monsters. Your proposal would result in many more misses, unless to-hit bonuses went stratospheric.
                                is it? Current formula is:

                                Roll a number from 1 to the player's to hit total. If it's greater than the AC (or evasion) it is a hit. There's also an automatic 5% chance to hit or miss.

                                This seems pretty simple to me. What makes this complicated from a player perspective is to calculate the to hit value you need to know your class values and your racial bonuses (from the edit files). Your bonuses from weapons are helpfully displayed but you need to remember to multiply them by the arbitrary constant 3. (I want to put the full value on the character screen.) And yeah, the monster AC needs to be multiplied by the even more arbitrary constat 3/4. (I'm fixing this).

                                Originally posted by Magnate
                                It's also quite hard to envisage the effect of an increase to the player's to-hit, because the monster evasion is in the denominator. I would prefer an algorithm which subtracted EV from the nominator - IMO that would be much clearer.
                                current formula to hit becomes 1 - (Monster AC)/(to hit) or if you factor in the 5% to hit or miss it becomes.

                                0.9 * [1 - AC/(to hit)] + 0.05

                                For the absorption, play testing will be absolutely necessary. Epicman's approach is about as good as a straight subtraction of damage and I think we'll just have to try one and play around with it.

                                Comment

                                Working...
                                😀
                                😂
                                🥰
                                😘
                                🤢
                                😎
                                😞
                                😡
                                👍
                                👎