Tutorial level
Add a tutorial level to teach commands to new players. Very much a WIP. Breaks save and bones compat.
This commit is contained in:
@@ -4546,6 +4546,9 @@ Persistent.
|
||||
." .lp travel_debug
|
||||
." Display intended path during each step of travel (default off).
|
||||
." Debug mode only.
|
||||
.lp tutorial
|
||||
Play a tutorial level at the start of the game.
|
||||
Setting this option on or off in the config file will skip the query.
|
||||
.lp "verbose "
|
||||
Provide more commentary during the game (default on). Persistent.
|
||||
.lp whatis_coord
|
||||
|
||||
@@ -4979,6 +4979,10 @@ command. Persistent.
|
||||
% Display intended path during each step of travel (default off).
|
||||
% Debug mode only.
|
||||
%.lp
|
||||
\item[\ib{tutorial}]
|
||||
Play a tutorial level at the start of the game.
|
||||
Setting this option on or off in the config file will skip the query.
|
||||
%.lp
|
||||
\item[\ib{verbose}]
|
||||
Provide more commentary during the game (default on). Persistent.
|
||||
%.lp
|
||||
|
||||
@@ -1987,6 +1987,7 @@ add items given a Japanese name when playing as a Samurai to discoveries list
|
||||
make music improvisations more varied and interesting, as well as useful
|
||||
give a helpful tip when first entering "farlook" mode
|
||||
add a boolean option tips to disable all of the helpful tips
|
||||
add a tutorial level
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific New Features
|
||||
|
||||
34
doc/lua.adoc
34
doc/lua.adoc
@@ -33,6 +33,26 @@ Example:
|
||||
local str = nh.an("unicorn");
|
||||
|
||||
|
||||
=== callback
|
||||
|
||||
Add or remove a lua function to callback list.
|
||||
First argument is the callback list, second is the name of the lua function to be called.
|
||||
Two arguments adds the callback, if optional 3rd argument is true, removes the callback.
|
||||
Cannot add the same function to the same callback list does nothing.
|
||||
|
||||
|===
|
||||
| cmd_before | called before an extended command is executed. The command name is given as a parameter. If this function returns false, the command will not execute.
|
||||
| level_enter | called when hero enters the level for the first time.
|
||||
| level_leave | called when hero leaves the level.
|
||||
| end_turn | called after player input is handled. May not be exact turn, if eg. hero is running or otherwise occupied.
|
||||
|===
|
||||
|
||||
Example:
|
||||
|
||||
nh.callback("level_enter", "tutorial_enter");
|
||||
nh.callback("level_enter", "tutorial_enter", true);
|
||||
|
||||
|
||||
=== debug_flags
|
||||
|
||||
Set debugging flags.
|
||||
@@ -90,6 +110,16 @@ Example:
|
||||
local filename = nh.dump_fmtstr("/tmp/nethack.%n.%d.log");
|
||||
|
||||
|
||||
=== eckey
|
||||
|
||||
Return the key bound to an extended command, or the full extended
|
||||
command name, if it is not bound to any key.
|
||||
|
||||
Example:
|
||||
|
||||
local k = nh.eckey("help");
|
||||
|
||||
|
||||
=== getlin
|
||||
|
||||
Asks the player for a text to enter, and returns the entered string.
|
||||
@@ -482,6 +512,8 @@ Example:
|
||||
Create an engraving.
|
||||
|
||||
* type is one of "dust", "engrave", "burn", "mark", or "blood".
|
||||
* optional boolean `degrade` defaults to true; engraving can degrade or be wiped out.
|
||||
* optional boolean `guardobjects` defaults to false (unless making a level and the text is "Elbereth"); are items on the engraving protected from monsters.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -579,6 +611,8 @@ Set flags for this level.
|
||||
| hot | Level is hot. Dungeon flag "hellish" automatically sets this.
|
||||
| cold | Level is cold.
|
||||
| temperate | Level is neither hot nor cold.
|
||||
| nomongen | Prevents random monster generation.
|
||||
| nodeathdrops | Prevents killed monsters from dropping corpses or random death drops.
|
||||
|===
|
||||
|
||||
Example:
|
||||
|
||||
Reference in New Issue
Block a user