The meaning of abbreviation ynaq in nethack

nethack

I am new to Nethack, English is not my first language, and the first game screen shows:

NetHack, Copyright 1985-2018
         By Stichting Mathematisch Centrum and M. Stephenson.
         Version 3.6.1 Unix, revised Sep 16 16:35:42 2018.
         See license for details.


Shall I pick a character's race, role, gender and alignment for you? [ynaq] 

Looking at each letter in the option list, I presume that they mean:

  • y: yes
  • n: no
  • a: unknown
  • q: quit or exit

What does the "a" option do?

Best Answer

Choosing a means no takebacks are allowed for this choice.

The explanation can be found in the game's code. For example, lines 544 through 548 of /win/tty/wintty.c (windows version, console menu) state:

    /* this prompt string ends in "[ynaq]?":
       y - game picks role,&c then asks player to confirm;
       n - player manually chooses via menu selections;
       a - like 'y', but skips confirmation and starts game;
       q - quit
     */

so it appears that choosing the a option does the same as choosing the y option (randomize your role), but does not allow you to confirm or cancel if you got a combination you don't want to play, instead it will immediately start the game.

Looking a bit further at line 950:

getconfirmation = (picksomething && pick4u != 'a' && !flags.randomall);

The boolean getconfirmation is always false if pick4u (containing the player's choice) is set to a. Thus the program will not run the code asking for confirmation, instead leaving the function and presumably going on to setup the game.