Current master post-4.2.1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sffp
    Swordsman
    • Apr 2020
    • 434

    Running a half-orc blackguard, I just ran into a C++ error

    I think I was trying to cast "Maim Foe"

    Version 4.2.1
    Attached Files

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9630

      Originally posted by sffp
      I think I was trying to cast "Maim Foe"

      Version 4.2.1
      Excellent report, thanks - I think I can see the problem, and have filed a bug.
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • Sphara
        Knight
        • Oct 2016
        • 504

        angband.live nightly, 13th Nov, account SPHARAGAIN, the game crashed immediately after descending from DL51 to DL52. I obviously cannot produce the savefile. Gwarl can certainly send it to a dev, if there is anything to send, without further permission from me.

        "Ignoring illegal player location (35,216). Savefile corrupted - Couldn't load block dungeon"

        Comment

        • PowerWyrm
          Prophet
          • Apr 2008
          • 2986

          Commit 3f9d411 has a lot of crash potential:
          - if mob only has quest artifacts, get_random_monster_object() goes into endless loop
          - if quest artifacts are at the end and the RNG picks them first, get_random_monster_object() also goes into endless loop

          Probably a much simpler way to pick a random object would be:

          Code:
          static struct object *get_random_monster_object(struct monster *mon)
          {
              struct object *obj, *pick = NULL;
              int i = 1;
          
              /* Pick a random object */
              for (obj = mon->held_obj; obj; obj = obj->next)
              {
                  /* Check it isn't a quest artifact */
                  if (obj->artifact && kf_has(obj->kind->kind_flags, KF_QUEST_ART))
                      continue;
          
                  if (one_in_(i)) pick = obj;
                  i++;
              }
          
              return pick;
          }
          PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

          Comment

          • Pete Mack
            Prophet
            • Apr 2007
            • 6883

            That code isn't even right. It will favor the first objects enormously.

            You want to count down with probability, with P= 1/N for object 1 and p = 1 for object N. Even better, count the list without the quest artifacts, pick a random number between 1 an N, and count off til you get that object. As written, there are excessive calls to random.

            Comment

            • PowerWyrm
              Prophet
              • Apr 2008
              • 2986

              Originally posted by Pete Mack
              That code isn't even right. It will favor the first objects enormously.

              You want to count down with probability, with P= 1/N for object 1 and p = 1 for object N. Even better, count the list without the quest artifacts, pick a random number between 1 an N, and count off til you get that object. As written, there are excessive calls to random.
              Code works perfectly.

              First object: 100% chance to pick (100% obj1)
              Second object: 1/2 chance to pick, 1/2 chance to keep old one -> 1/2 chance for first 2
              Third object: 1/3 chance to pick, 2/3 chance to keep old one -> 1/3 chance on all first 3 (1/2*2/3)
              Fourth object: 1/4 chance to pick, 3/4 chance to keep old one -> 1/4 chance on all first 4 (1/3*3/4)
              ...
              Nth object: 1/n chance to pick, n-1/n chance to keep old one, and all up to (n-1) have equal 1/(n-1) probability -> 1/n-1 * n-1/n = 1/n chance on all n objects
              PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

              Comment

              • Pete Mack
                Prophet
                • Apr 2007
                • 6883

                Got it. I misread it the first time.

                Comment

                • Nick
                  Vanilla maintainer
                  • Apr 2007
                  • 9630

                  Thanks. Efficient and clear; I particularly like the way you don't let quest artifacts mess with the counting and probabilities.
                  One for the Dark Lord on his dark throne
                  In the Land of Mordor where the Shadows lie.

                  Comment

                  • Nick
                    Vanilla maintainer
                    • Apr 2007
                    • 9630

                    As far as I know there are two possibly outstanding bugs - duplicate uniques and duplicate artifacts - and I have been unable to pin them down despite much searching. So I think we're close to releasing 4.2.2. Let me know if there's anything I'm missing.
                    One for the Dark Lord on his dark throne
                    In the Land of Mordor where the Shadows lie.

                    Comment

                    • Sphara
                      Knight
                      • Oct 2016
                      • 504

                      Awesome.

                      Are there any other ways of reaching Gwarl than waiting him to appear in angband.live chat?

                      I've sent a personal message weeks ago. He finally addressed me in angband.live that he has sent my bug report further regarding to my vanilla save file. He just never removed the save file. He even apologized me for having a long absence. I have specifically stated that a save file of 'SPHARAGAIN' in angband.live is corrupted. But it is still there. I'm forced to play 4.2.1. Not a bad thing as such, but I want to be a part of new development. As far as playtesting goes.

                      So, unless there is not a string of misunderstandings, just remove spharagain vanilla nightly save file. And if there is another person who can do this, please inform me.

                      Loving f'***ing everyone, Sphara

                      Comment

                      • Rune
                        Rookie
                        • Dec 2020
                        • 3

                        I was looking in the source code and it looks like damage for the mage spell "Thrust away" is bugged.

                        Code:
                        spell:Thrust Away:40:12:90:40
                        effect:SHORT_BEAM:FORCE:1:10
                        dice:$Dd8
                        expr:D:PLAYER_LEVEL:+ 0
                        desc:Fires a short range beam of force.
                        Why would the damage be player level '+ 0' d8?

                        Comment

                        • Nick
                          Vanilla maintainer
                          • Apr 2007
                          • 9630

                          Originally posted by Rune
                          I was looking in the source code and it looks like damage for the mage spell "Thrust away" is bugged.

                          Code:
                          spell:Thrust Away:40:12:90:40
                          effect:SHORT_BEAM:FORCE:1:10
                          dice:$Dd8
                          expr:D:PLAYER_LEVEL:+ 0
                          desc:Fires a short range beam of force.
                          Why would the damage be player level '+ 0' d8?
                          Because the syntax of the expr line requires three fields. We want (player level)d8 as the damage, but we need to add the '+0' for the file to parse correctly.
                          One for the Dark Lord on his dark throne
                          In the Land of Mordor where the Shadows lie.

                          Comment

                          • wobbly
                            Prophet
                            • May 2012
                            • 2627

                            Originally posted by Sphara
                            Are there any other ways of reaching Gwarl than waiting him to appear in angband.live chat?
                            You could try the angband.live forum, though whether it'll work I'm not sure. I tried just then and got an error.

                            Comment

                            • DavidMedley
                              Veteran
                              • Oct 2019
                              • 1004

                              What is the order of classes on the creation screen?
                              a) Warrior
                              b) Mage
                              ...
                              f) Paladin
                              g) Rogue
                              ... etc

                              More precisely: how is the order chosen?
                              Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

                              Comment

                              • Nick
                                Vanilla maintainer
                                • Apr 2007
                                • 9630

                                Originally posted by DavidMedley
                                What is the order of classes on the creation screen?
                                a) Warrior
                                b) Mage
                                ...
                                f) Paladin
                                g) Rogue
                                ... etc

                                More precisely: how is the order chosen?
                                By their order in class.txt.
                                One for the Dark Lord on his dark throne
                                In the Land of Mordor where the Shadows lie.

                                Comment

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