Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old March 6, 2008, 02:26   #1
CunningGabe
Swordsman
 
Join Date: Feb 2008
Location: Boston, MA
Posts: 250
CunningGabe is on a distinguished road
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
CunningGabe is offline   Reply With Quote
Old March 6, 2008, 03:31   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,480
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
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.
Nick is offline   Reply With Quote
Old March 6, 2008, 09:09   #3
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,951
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by CunningGabe View Post
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 is offline   Reply With Quote
Old March 6, 2008, 14:36   #4
roustk
Adept
 
Join Date: Dec 2007
Posts: 167
roustk is on a distinguished road
Quote:
Originally Posted by CunningGabe View Post
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
roustk is offline   Reply With Quote
Old December 20, 2019, 19:41   #5
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
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()
eastwind is offline   Reply With Quote
Old December 21, 2019, 14:29   #6
DavidMedley
Veteran
 
Join Date: Oct 2019
Posts: 1,004
DavidMedley is on a distinguished road
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.
DavidMedley is offline   Reply With Quote
Old December 21, 2019, 22:06   #7
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,480
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by eastwind View Post
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.
Nick is offline   Reply With Quote
Old December 23, 2019, 01:32   #8
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
Quote:
Originally Posted by DavidMedley View Post
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.
eastwind is offline   Reply With Quote
Old December 23, 2019, 18:43   #9
DavidMedley
Veteran
 
Join Date: Oct 2019
Posts: 1,004
DavidMedley is on a distinguished road
Quote:
Originally Posted by eastwind View Post
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]
DavidMedley is offline   Reply With Quote
Old January 7, 2020, 07:06   #10
DavidMedley
Veteran
 
Join Date: Oct 2019
Posts: 1,004
DavidMedley is on a distinguished road
Can you create a Short Bow of Lothlórien? Or do you just have to create random good items until you get one?
DavidMedley is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OS X: Wizard/Fiddle paul1 Vanilla 0 October 7, 2007 10:04


All times are GMT +1. The time now is 23:47.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.