Help with editing p_class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Malatar
    Scout
    • Dec 2009
    • 25

    Help with editing p_class

    I was trying to make it so my themed rogue Frodo would start with the Phial. So in the p_class.txt I replaced

    E:light:Wooden Torch:3:7

    with

    E:39:4:1:1

    which is the tval:sval from phial in object.txt...

    But it just gives me a Phial that's empty. It doesn't create light or have the activation ability. What am I doing wrong? (I'm sure the list is frighteningly immense...)
  • Derakon
    Prophet
    • Dec 2009
    • 9022

    #2
    The Phial's tval and sval are actually for a "base" phial object that is not the Phial of Galadriel; it just so happens that the only phial that can ever be generated normally is that Phial. There are also "base" stars and arkenstones that can never be generated, so that the Star of Elendil and the Arkenstone of Thrain both have objects to be based on.

    By modifying p_class the way you did, you just forced generation of a normal phial. I suspect that the game is not set up to allow for creation of artifacts in initial player inventories.

    Comment

    • Antoine
      Ironband/Quickband Maintainer
      • Nov 2007
      • 1010

      #3
      Don't do it this way - use debug mode instead. (Perhaps someone can post the exact keystrokes required?)

      A.
      Ironband - http://angband.oook.cz/ironband/

      Comment

      • Malatar
        Scout
        • Dec 2009
        • 25

        #4
        Originally posted by Antoine
        Don't do it this way - use debug mode instead. (Perhaps someone can post the exact keystrokes required?)

        A.
        I know how to do it with the debug mode, but I like seeing my poor, expired characters in the Hall of Fame, and debug mode precludes that...

        Comment

        • Derakon
          Prophet
          • Dec 2009
          • 9022

          #5
          You could make the Phial have max commonness, but that just makes it more likely you'll find it -- and I'm pretty sure you'd have to go into the dungeon to get it since I don't think artifacts can be generated in town.

          Comment

          • fizzix
            Prophet
            • Aug 2009
            • 3025

            #6
            Originally posted by Derakon
            You could make the Phial have max commonness, but that just makes it more likely you'll find it -- and I'm pretty sure you'd have to go into the dungeon to get it since I don't think artifacts can be generated in town.
            Probably the easiest way would be to give an early monster a phial drop (look at Morgoth's entry in monster.txt to see how to give an artifact drop to a monster.) You can give it to grip, fang or farmer maggot if you wanted.

            Comment

            • Derakon
              Prophet
              • Dec 2009
              • 9022

              #7
              Originally posted by fizzix
              Probably the easiest way would be to give an early monster a phial drop (look at Morgoth's entry in monster.txt to see how to give an artifact drop to a monster.) You can give it to grip, fang or farmer maggot if you wanted.
              Good call. Heck, couldn't you give it to a filthy street urchin? Or would that cause multiple Phials to be generated?

              Comment

              • Knight
                Scout
                • Oct 2011
                • 49

                #8
                Could you cause the Phial to be generated in the player's house?

                Comment

                • kaypy
                  Swordsman
                  • May 2009
                  • 294

                  #9
                  Originally posted by Derakon
                  Or would that cause multiple Phials to be generated?
                  Yes, I just tried and wound up with a dozen phials. Hmm. Does that mean that the v4 auto-drop spellbooks can also be duplicates? Maybe a check needs to be added to monster/mon-make.c/mon_create_drop ~line600?

                  edit:
                  Ah. V4 has a check added. (which wouldn't actually help for *this* case, but mostly prevents duplicate spellbooks)
                  Last edited by kaypy; October 30, 2012, 18:20.

                  Comment

                  • Derakon
                    Prophet
                    • Dec 2009
                    • 9022

                    #10
                    Originally posted by Knight
                    Could you cause the Phial to be generated in the player's house?
                    Not without modifying the source code. The house always starts empty.

                    kaypy: good to know. Oh well! Artifact spellbook drops aren't an issue since they only are dropped by uniques, which you can only kill once.

                    Comment

                    • Malatar
                      Scout
                      • Dec 2009
                      • 25

                      #11
                      Wow, so many great solutions to my problem. Thank you all very much...

                      I've been playing Angband and previous versions like Moria since 1986 (on a VAX 11/782 at my high school) and it's a real pleasure to see so many people still enjoying it.

                      Also, the Shockbolt tiles are simply incredible... Can't imaging going back to ASCII now...

                      Comment

                      • Malatar
                        Scout
                        • Dec 2009
                        • 25

                        #12
                        Originally posted by fizzix
                        Probably the easiest way would be to give an early monster a phial drop (look at Morgoth's entry in monster.txt to see how to give an artifact drop to a monster.) You can give it to grip, fang or farmer maggot if you wanted.
                        Hmm, can't seem to get this one. Tried adding these to Farmer Maggot:

                        drop-artifact:'Phial'

                        and then I tried

                        drop-artifact:'Phial of Galadriel'

                        but couldn't get away from an error parsing the monster.txt file. I'm assuming it's some type of syntax error...

                        Comment

                        • fizzix
                          Prophet
                          • Aug 2009
                          • 3025

                          #13
                          try:

                          Code:
                          drop-artifact:of Galadriel

                          Comment

                          • Malatar
                            Scout
                            • Dec 2009
                            • 25

                            #14
                            Originally posted by fizzix
                            try:

                            Code:
                            drop-artifact:of Galadriel
                            Much obliged, sir...

                            Comment

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