?Acquirement location of reading revisited

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ingwe Ingweron
    Veteran
    • Jan 2009
    • 2110

    ?Acquirement location of reading revisited

    I know this has been discussed before, with the conclusion that the location of reading ?Acquirement did not matter. However, I am convinced that it does, although I haven't parsed through the code. In the code for the ?Acquirement, is it checking the dl @ is actually on, or is it checking the dl of the particular location?

    My understanding is that certain locations in vaults are identified with an "8", "9", or ",", signifying treasure 20, 7, or 7 levels out of depth, respectively. When the ?Acquirement is read at an "8" location, it seems to consistently deliver better results than when read elsewhere.
    “We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see.”
    ― Tom Stoppard, Rosencrantz and Guildenstern are Dead
  • Derakon
    Prophet
    • Dec 2009
    • 8820

    #2
    You're imagining things. The only thing that matters for where you read Acquirement is the depth of the dungeon you're at.

    ...well, I guess if you read the scroll in a location where there was no room to drop an item, then that would matter, because you'd lose the item generated. So don't do that.

    EDIT: to clarify, the acquirement effect simply calls make_object() with the "good" and "great" flags set and an appropriate item level. Only after it has been made is it "moved" to the position in the dungeon where you are standing (or an adjacent location as appropriate). make_object() has no idea where you are and does not care.
    Last edited by Derakon; October 20, 2014, 00:52.

    Comment

    • Ingwe Ingweron
      Veteran
      • Jan 2009
      • 2110

      #3
      Ah, but what is the appropriate item level? When a vault is created, isn't the same item generation happening, with good and great flags set to the depth, but with the depth modified at certain locations within the vault? How is make_object() choosing the depth? Are you certain that the depth measurement for ?Acquirement is not taking into account the location just like the vault generation? I've tested it out empirically and I can say that there seems to be a definite difference when standing on an "8" location.
      Last edited by Ingwe Ingweron; October 20, 2014, 01:53.
      “We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see.”
      ― Tom Stoppard, Rosencrantz and Guildenstern are Dead

      Comment

      • Derakon
        Prophet
        • Dec 2009
        • 8820

        #4
        Originally posted by Ingwe Ingweron
        Ah, but what is the appropriate item level? When a vault is created, isn't the same item generation happening, with good and great flags set to the depth, but with the depth modified at certain locations within the vault? How is make_object() choosing the depth? Are you certain that the depth measurement for ?Acquirement is not taking into account the location just like the vault generation? I've tested it out empirically and I can say that there seems to be a definite difference when standing on an "8" location.
        I repeat, you're imagining things. Here's the complete source code for the acquirement function:

        Code:
        void acquirement(int y1, int x1, int level, int num, bool great)
        {
          object_type *i_ptr;
          object_type object_type_body;
          /* Acquirement */
          while (num--)
          {
            /* Get local object */
            i_ptr = &object_type_body;
            /* Wipe the object */
            object_wipe(i_ptr);
            /* Make a good (or great) object (if possible) */
            if (!make_object(cave, i_ptr, level, TRUE, great, TRUE, NULL, 0)) continue;
            i_ptr->origin = ORIGIN_ACQUIRE;
            i_ptr->origin_depth = p_ptr->depth;
            /* Drop the object */
            drop_near(cave, i_ptr, 0, y1, x1, TRUE);
          }
        }
        And here's the definition for the effects of the Acquirement and *Acquirement* scrolls:

        Code:
        case EF_ACQUIRE:
        {
          acquirement(py, px, p_ptr->depth, 1, TRUE);
          *ident = TRUE;
          return TRUE;
        }
        case EF_ACQUIRE2:
        {
          acquirement(py, px, p_ptr->depth, randint1(2) + 1, TRUE);
          *ident = TRUE;
          return TRUE;
        }
        Note the use of p_ptr->depth, i.e. the player's current dungeon level, as the only level determinant.

        Comment

        • Nick
          Vanilla maintainer
          • Apr 2007
          • 9343

          #5
          Originally posted by Ingwe Ingweron
          When a vault is created, isn't the same item generation happening, with good and great flags set to the depth, but with the depth modified at certain locations within the vault? How is make_object() choosing the depth?
          What happens is that when the vault code encounters an '8', it calls make_object with the depth set to the current dungeon depth + 20; but this is only for that call, it's not generally set. Moreover, the fact that that was an '8' square is not remembered anywhere after the '8'-ness of it has been used to determine the level of monster and object generated there. The only remaining difference between that square and any other on the level after generation is that vault squares can't be teleported onto.

          After the restructure who knows, anything might happen
          One for the Dark Lord on his dark throne
          In the Land of Mordor where the Shadows lie.

          Comment

          • Ingwe Ingweron
            Veteran
            • Jan 2009
            • 2110

            #6
            Thanks Derakon and Nick. Ugh, I just need to get my head examined.
            “We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see.”
            ― Tom Stoppard, Rosencrantz and Guildenstern are Dead

            Comment

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