Wizard mode docs?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CunningGabe
    Swordsman
    • Feb 2008
    • 250

    Wizard mode docs?

    Is there any current documentation for the special debug commands for Vanilla? It doesn't appear to be in the obvious place, and it's not too hard to find the commands by source-diving, but it would be useful to have in-game documentation for these commands. If no documentation exists currently, I may be willing to write some

    Gabe
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9637

    #2
    As a starting point, there is a list of the Oangband wizard commands in lib/info/spoil (IIRC) in any Oangband or FAangband distribution. I don't know how different the vanilla ones are.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • takkaria
      Veteran
      • Apr 2007
      • 1951

      #3
      Originally posted by CunningGabe
      Is there any current documentation for the special debug commands for Vanilla? It doesn't appear to be in the obvious place, and it's not too hard to find the commands by source-diving, but it would be useful to have in-game documentation for these commands. If no documentation exists currently, I may be willing to write some
      Try looking at Sangband, too. I would love to have the wizard commands converted to use something like cmd0.c, so they can be accessed via a menu. (That wasn't a hint at all. )
      takkaria whispers something about options. -more-

      Comment

      • roustk
        Adept
        • Dec 2007
        • 167

        #4
        Originally posted by CunningGabe
        Is there any current documentation for the special debug commands for Vanilla? It doesn't appear to be in the obvious place, and it's not too hard to find the commands by source-diving, but it would be useful to have in-game documentation for these commands. If no documentation exists currently, I may be willing to write some

        Gabe
        A starting point is "grep -B 1 case wizard2.c":
        Code:
        		/* Ignore */
        		case ESCAPE:
        		case ' ':
        		case '\n':
        		case '\r':
        --
        		/* Hack -- Generate Spoilers */
        		case '"':
        --
        		/* Hack -- Help */
        		case '?':
        --
        		/* Cure all maladies */
        		case 'a':
        --
        		/* Teleport to target */
        		case 'b':
        --
        		/* Create any object */
        		case 'c':
        --
        		/* Create an artifact */
        		case 'C':
        --
        		/* Detect everything */
        		case 'd':
        --
        		/* Edit character */
        		case 'e':
        --
        		/* View item info */
        		case 'f':
        --
        		/* Good Objects */
        		case 'g':
        --
        		/* Hitpoint rerating */
        		case 'h':
        --
        		/* Identify */
        		case 'i':
        --
        		/* Go up or down in the dungeon */
        		case 'j':
        --
        		/* Self-Knowledge */
        		case 'k':
        --
        		/* Learn about objects */
        		case 'l':
        --
        		/* Magic Mapping */
        		case 'm':
        --
        		/* Summon Named Monster */
        		case 'n':
        --
        		/* Object playing routines */
        		case 'o':
        --
        		/* Phase Door */
        		case 'p':
        --
        		/* Query the dungeon */
        		case 'q':
        --
        		/* Summon Random Monster(s) */
        		case 's':
        --
        		/* Teleport */
        		case 't':
        --
        		/* Un-hide all monsters */
        		case 'u':
        --
        		/* Very Good Objects */
        		case 'v':
        --
        		/* Wizard Light the Level */
        		case 'w':
        --
        		/* Increase Experience */
        		case 'x':
        --
        		/* Zap Monsters (Banishment) */
        		case 'z':
        --
        		/* Hack */
        		case '_':
        '?' is the standard do_cmd_help. '_' appears to show the area covered by MONSTER_FLOW_DEPTH (based on the code), but really is a debugging hook for Ben (and presumably later developers).

        Kevin

        Comment

        • eastwind
          Apprentice
          • Dec 2019
          • 79

          #5
          The current 4.2.0 doesn't seem to include debug.txt, which is supposed to be the help text file displayed when you enter "^a?". I went through the switch statement shown in the earlier post and made my own for my own reference.
          In addition to a short description from the comments in the switch, I included the function called, because that was helpful to me in debugging. If you copy the text below and put it in a file debug.txt in src/lib/help or src/lib/user/info then the "^a?" command will display it in-game.

          Code:
          Debug mode commands (preceeded by the debug-command prefix ^a):
          
          space: ignore debug-command prefix, do nothing
          ": generate spoilers, do_cmd_spoilers()
          ?: help, do_cmd_wiz_help()
          a: cure all, do_cmd_wiz_cure_all()
          A: make the player powerful, do_cmd_wiz_advance()
          b: teleport to target, do_cmd_wiz_bamf()
          c: create any object, wiz_create_item(false)
          C: Create an artifact, wiz_create_item(true)
          d: detect everything (multiple calls to effect_simple)
          D: test for disconnected dungeon, disconnect_stats()
          e: edit character, do_cmd_wiz_change()
          E: perform an effect, do_cmd_wiz_effect()
          f: stats_collect()
          F: do_cmd_wiz_features()
          g: make 1-40 good objects, acquirement(..., false)
          G: GF demo, wiz_proj_demo()
          h: hitpoint rerating, do_cmd_rerate()
          H: hit all monsters in LOS, effect_simple()
          j: go up or down in the dungeon, do_cmd_wiz_jump()
          l: learn about objects, do_cmd_wiz_learn(100)
          L: do_cmd_keylog()
          m: magic mapping, effect_simple(EF_MAP_AREA....
          n: summon named monster
          o: do_cmd_wiz_play
          p: phase door, effect_simple(EF_TELEPORT, player, near
          P: monster pit stats, pit_stats()
          q: query the dungeon, do_cmd_wiz_query()
          r: get full recall for a specific monster or all monsters
          s: summon 1-40 random monsters, do_cmd_wiz_summon(n)
          S: collect stats, stats_collect() [same as f]
          t: teleport, effect_simple(EF_TELEPORT, player, far
          T: make a trap
          u: un-hide all monsters, effect_simple(EF_DETECT_VISIBLE_MONSTERS, 
               EF_DETECT_INVISBILE_MONSTERS
          v: create 1-40 very good objects, acquirement(..., true)
          V: create all items of a given tval
          w: wizard light the level, wiz_light()
          W: wipe recall for a specific monster or all monsters
          x: increase experience
          X: quit game without saving
          z: banish monsters within a given sight distance
          _: do_cmd_wiz_hack_nick()

          Comment

          • DavidMedley
            Veteran
            • Oct 2019
            • 1004

            #6
            FYI, wizard mode and debug commands are two different things. The colorfully named Wizard Mode doesn't do anything afaik except allow you to cheat death.
            Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

            Comment

            • Nick
              Vanilla maintainer
              • Apr 2007
              • 9637

              #7
              Originally posted by eastwind
              The current 4.2.0 doesn't seem to include debug.txt, which is supposed to be the help text file displayed when you enter "^a?".
              Yes, that got cleaned out when we moved the help to online; the equivalent page is here. I'm not sure whether to re-instate this, or remove the debug command and encourage people to go to the online docs.
              One for the Dark Lord on his dark throne
              In the Land of Mordor where the Shadows lie.

              Comment

              • eastwind
                Apprentice
                • Dec 2019
                • 79

                #8
                Originally posted by DavidMedley
                FYI, wizard mode and debug commands are two different things. The colorfully named Wizard Mode doesn't do anything afaik except allow you to cheat death.
                Yeah, I was aware, but the OP asked about debug command doc, in spite of the title being wizard mode. And obviously the debug commands are the ones that doc is useful for, as there aren't any wizard mode commands to doc.

                I didn't know the doc got moved online, please understand that I've missed everything that's happened in the last 10-15 years and I'm just reading the code. I don't remember what version angband was on when I was messing around privately with it before (I never submitted anything back then, I just had a private version to play with a few hacks I made).

                For fun I created a wizard command to create piles of coins, since I couldn't figure out how to do that with ^ac and didnt realize it could be done with ^ae. Anyway, just adding AU to the player isn't the same as generating a pile of gold by sval type on the dungeon floor, in case the wizard is working to add a new type of coins or something. But I doubt I'll do anything with my new ^a$ wizard command now that I've got it. Unless someone wants it before I lose the code.

                I have a mild opinion that given the migration of all the powerful features from wizard mode to debug mode, debug mode should mark the character as cheater. And maybe wizard mode should mark the character less onerously somehow (cat with nine lives or something). But it's not a big deal with me.

                Comment

                • DavidMedley
                  Veteran
                  • Oct 2019
                  • 1004

                  #9
                  Originally posted by eastwind
                  debug mode should mark the character as cheater.
                  It does. I've also suggested that if you turn on "cheat death" then your score should count up to your first death. [shrug]
                  Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

                  Comment

                  • DavidMedley
                    Veteran
                    • Oct 2019
                    • 1004

                    #10
                    Can you create a Short Bow of Lothlórien? Or do you just have to create random good items until you get one?
                    Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

                    Comment

                    • Nick
                      Vanilla maintainer
                      • Apr 2007
                      • 9637

                      #11
                      Originally posted by DavidMedley
                      Can you create a Short Bow of Lothlórien? Or do you just have to create random good items until you get one?
                      Yes you can - follow these steps:
                      1. Create a short bow
                      2. Do Ctrl-a o (play with object) and select your bow
                      3. Hit t for tweak
                      4. You will be prompted for ego index; this accepts either a number or an exact ego item name. Embarrassingly there is no way of typing "of Lothlórien" exactly because of the accent, so you have to enter the ego index (which is 35, which you could get by counting through ego_item.txt starting at 0, but now I've told you)
                      5. Keep hitting enter until you get to the end of the prompts, then hit a for accept
                      One for the Dark Lord on his dark throne
                      In the Land of Mordor where the Shadows lie.

                      Comment

                      • DavidMedley
                        Veteran
                        • Oct 2019
                        • 1004

                        #12
                        Thanks!!!! I'm experimenting with recovering a character that was lost to a server crash.
                        Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

                        Comment

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