device activation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • d_m
    Angband Devteam member
    • Aug 2008
    • 1517

    device activation

    So I fixed a divide-by-zero crash that I encountered on device activation.

    I also changed the max fail rate from 95% down to 75% on devices. I figure that's still hard enough that it isn't making things too easy, but it reduces the number of times an activated ability is completely useless. This is particularly apparent with DSM.

    Changes are both available in r1984.
    linux->xterm->screen->pmacs
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    Originally posted by d_m
    So I fixed a divide-by-zero crash that I encountered on device activation.

    I also changed the max fail rate from 95% down to 75% on devices. I figure that's still hard enough that it isn't making things too easy, but it reduces the number of times an activated ability is completely useless. This is particularly apparent with DSM.

    Changes are both available in r1984.
    Well done on spotting the bug - what were the circumstances of the crash?

    The change to max fail is minor and presumably benefits only warriors and very low INT priests or paladins. I suppose it will help all classes with very early finds of nice activatables.

    P.S. I notice your comment about using something a little less convoluted for the failure rate - it took me months to get to that formula! Please see http://www.terminalarrogance.com/devices.xls for all the working and the desired bounds. The challenge is to get a formula that makes the skill meaningful without either gimping warriors or making life too easy for magi. The alternative was to edit tables.c and completely re-do the skill range and INT mods - which I would have done if I hadn't hit on this formula. But happy to see it improved, as always!
    Last edited by Magnate; July 4, 2010, 09:23.
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

    • ekolis
      Knight
      • Apr 2007
      • 921

      #3
      From looking at the changelogs, looks like it crashed when the device's level was exactly 90 points higher than the player's skill, 90 being the difference between the diff_max and skill_min variables... Looks like someone got extra lucky early on in finding a device!
      You read the scroll labeled NOBIMUS UPSCOTI...
      You are surrounded by a stasis field!
      The tengu tries to teleport, but fails!

      Comment

      • Magnate
        Angband Devteam member
        • May 2007
        • 5110

        #4
        Originally posted by ekolis
        From looking at the changelogs, looks like it crashed when the device's level was exactly 90 points higher than the player's skill, 90 being the difference between the diff_max and skill_min variables... Looks like someone got extra lucky early on in finding a device!
        Yes, I worked that out after posting. I hadn't realised that could happen, so that was a good catch by d_m.
        "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

        Comment

        • d_m
          Angband Devteam member
          • Aug 2008
          • 1517

          #5
          Originally posted by Magnate
          P.S. I notice your comment about using something a little less convoluted for the failure rate - it took me months to get to that formula! Please see http://www.terminalarrogance.com/devices.xls for all the working and the desired bounds. The challenge is to get a formula that makes the skill meaningful without either gimping warriors or making life too easy for magi. The alternative was to edit tables.c and completely re-do the skill range and INT mods - which I would have done if I hadn't hit on this formula. But happy to see it improved, as always!
          Honestly that comment was just pithy because it took me a long time to figure out what was going on. I will probably just replace the comment with a description of how the formula works. Sorry for the noise
          linux->xterm->screen->pmacs

          Comment

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