Difference between revisions of "Manual:Wizhelp Files"

From DikuMUD Wiki
Jump to navigation Jump to search
(checked against the current code (wiki review 2026-11-15))
 
Line 1: Line 1:
−
This section contains a link to each help-topic in the MUD wizhelp command.
+
The help texts gods read in the game with <code>wizhelp</code> are kept here, one page for each, named <code>Wizhelp/&lt;Name&gt;</code>. They reach the game the same way as the players' help pages (see [[Manual:Help Files|Help Files]]), with their own script, file type and index. To write one, see [[Editing the Wiki#Pages the game reads|Editing the Wiki]].
  
−
This means that editing the pages below will, after a sync job, end up in the wizhelp on the MUD.
+
== How a page reaches the game ==
 +
The scripts are in <code>vme/etc/help/</code>:
 +
* <code>getwikiwizhelppage.py &lt;Name&gt;</code> fetches the page <code>Wizhelp/&lt;Name&gt;</code> and saves it as <code>&lt;name&gt;.wiz</code> (the name in lower case) in the current directory.
 +
* <code>fetchwizpages.sh</code> runs it for every Wizhelp page, one after the other.
  
−
Right now the curly brackets used like this {help topics} will get converted by the script so
+
Run it from <code>vme/etc/help/</code> and move the files into <code>vme/etc/help/strings/</code>, where the game reads them:
−
that it becomes a clickable link on the MUD server into this: <a cmd='#'>help topics</a>.
+
cd vme/etc/help
 +
sh fetchwizpages.sh
 +
mv *.wiz strings/
  
−
To sync these pages with the MUD run the script in vme/etc/help/fetchallwizpages.sh
+
<code>getwikiwizhelppage.py</code> is <code>getwikihelppage.py</code> for the <code>Wizhelp/</code> pages, and treats a page the same way: the file is the page as the wiki renders it, in HTML; HTML comments go; the first heading is cleaned; a red link to a <code>Wizhelp/</code> page becomes <code>{text}</code>; and every <code>{text}</code> becomes <code>&lt;a cmd='#'&gt;text&lt;/a&gt;</code>, a link that runs ''text'' as a command when clicked. <code>{Wizhelp Goto}</code> runs <code>wizhelp goto</code>. [[Manual:Help Files#What the script does to a page|Help Files]] has the details.
  
 +
=== Wizhelp topics: wiz.index ===
 +
<code>wizhelp &lt;command&gt;</code> (the <code>do_wizhelp</code> program in <code>vme/zone/helpzon.zon</code>) finds the text through <code>vme/etc/help/strings/wiz.index</code>, which works like <code>help.index</code>: lines <code>topic=file</code>, grouped by first letter between <code>:start:a</code> and <code>:end:a</code>, and so on, and the first topic that starts with what you typed is shown. Several commands share a page: <code>nocomm</code> and <code>notell</code> show [[Wizhelp/Noshout]], <code>flick</code>, <code>mash</code> and <code>rock</code> show [[Wizhelp/Wizsocials]], <code>path</code> shows [[Wizhelp/Wpath]], and <code>wizinv</code> finds <code>wizinvisible</code>, [[Wizhelp/Wizinvisible]]. Below the text, the game adds a link to the page on this wiki, named after the file.
 +
 +
<code>wizhelp</code> alone does not read the index: it lists the commands in the game's command table from level 200 up to your own level. A page for something that isn't a command of that level, such as [[Wizhelp/File]] or [[Wizhelp/Personal]], is only shown when you type its name. <code>wizhelp notes</code> shows the builders' notes of the zone you are in.
 +
 +
As with help, the files are read from disk each time, so a new or changed file needs no reboot.
 +
 +
=== Adding a wizhelp page ===
 +
# Write the page here, <code>Wizhelp/&lt;Name&gt;</code>, with a capital first letter (the part after <code>Wizhelp/</code> is case-sensitive).
 +
# Add <code>python3 getwikiwizhelppage.py &lt;Name&gt;</code> to <code>vme/etc/help/fetchwizpages.sh</code>.
 +
# Fetch it into <code>vme/etc/help/strings/</code>.
 +
# Add its topics to <code>wiz.index</code>, each in its letter's section.
 +
# Commit the script, the index and the <code>.wiz</code> file, and open a pull request.
 +
 +
Each command's level is its <code>minlevel</code> in <code>vme/etc/commands.def</code>; [[Wizarding 101]] lists them all.
 +
 +
== The wizhelp pages ==
 +
<div style="column-width:11em">
 
* [[Wizhelp/Advance|Advance]]
 
* [[Wizhelp/Advance|Advance]]
 
* [[Wizhelp/At|At]]
 
* [[Wizhelp/At|At]]
Line 14: Line 37:
 
* [[Wizhelp/Broadcast|Broadcast]]
 
* [[Wizhelp/Broadcast|Broadcast]]
 
* [[Wizhelp/Cdelete|Cdelete]]
 
* [[Wizhelp/Cdelete|Cdelete]]
 +
* [[Wizhelp/Competition|Competition]]
 
* [[Wizhelp/Copy|Copy]]
 
* [[Wizhelp/Copy|Copy]]
 
* [[Wizhelp/Corpses|Corpses]]
 
* [[Wizhelp/Corpses|Corpses]]
−
* [[Wizhelp/Competition|Competition]]
 
 
* [[Wizhelp/Crash|Crash]]
 
* [[Wizhelp/Crash|Crash]]
 
* [[Wizhelp/Cstat|Cstat]]
 
* [[Wizhelp/Cstat|Cstat]]
Line 23: Line 46:
 
* [[Wizhelp/Execute|Execute]]
 
* [[Wizhelp/Execute|Execute]]
 
* [[Wizhelp/File|File]]
 
* [[Wizhelp/File|File]]
−
* [[Wizhelp/Flick|Flick]]
 
 
* [[Wizhelp/Force|Force]]
 
* [[Wizhelp/Force|Force]]
 
* [[Wizhelp/Freeze|Freeze]]
 
* [[Wizhelp/Freeze|Freeze]]
 +
* [[Wizhelp/Gmlure|Gmlure]]
 +
* [[Wizhelp/Gmmem|Gmmem]]
 +
* [[Wizhelp/Gmquest|Gmquest]]
 +
* [[Wizhelp/Gmroom|Gmroom]]
 +
* [[Wizhelp/Gmtrack|Gmtrack]]
 +
* [[Wizhelp/Gmtreasure|Gmtreasure]]
 +
* [[Wizhelp/Gmyule|Gmyule]]
 +
* [[Wizhelp/Gmzap|Gmzap]]
 
* [[Wizhelp/Goto|Goto]]
 
* [[Wizhelp/Goto|Goto]]
−
* [[Wizhelp/Gp|Gp]]
+
* [[Wizhelp/Jstat|Jstat]]
 
* [[Wizhelp/Load|Load]]
 
* [[Wizhelp/Load|Load]]
−
* [[Wizhelp/Mash|Mash]]
 
 
* [[Wizhelp/Makemoney|Makemoney]]
 
* [[Wizhelp/Makemoney|Makemoney]]
 
* [[Wizhelp/Message|Message]]
 
* [[Wizhelp/Message|Message]]
 
* [[Wizhelp/Noshout|Noshout]]
 
* [[Wizhelp/Noshout|Noshout]]
−
* [[Wizhelp/Notell|Notell]]
 
 
* [[Wizhelp/Nset|Nset]]
 
* [[Wizhelp/Nset|Nset]]
−
* [[Wizhelp/Path|Path]]
 
 
* [[Wizhelp/Personal|Personal]]
 
* [[Wizhelp/Personal|Personal]]
 
* [[Wizhelp/Petrify|Petrify]]
 
* [[Wizhelp/Petrify|Petrify]]
Line 43: Line 70:
 
* [[Wizhelp/Reset|Reset]]
 
* [[Wizhelp/Reset|Reset]]
 
* [[Wizhelp/Restore|Restore]]
 
* [[Wizhelp/Restore|Restore]]
−
* [[Wizhelp/Rock|Rock]]
 
 
* [[Wizhelp/Seize|Seize]]
 
* [[Wizhelp/Seize|Seize]]
 
* [[Wizhelp/Set|Set]]
 
* [[Wizhelp/Set|Set]]
 
* [[Wizhelp/Setskill|Setskill]]
 
* [[Wizhelp/Setskill|Setskill]]
 
* [[Wizhelp/Shutdown|Shutdown]]
 
* [[Wizhelp/Shutdown|Shutdown]]
−
* [[Wizhelp/Slime|Slime]]
 
 
* [[Wizhelp/Snoop|Snoop]]
 
* [[Wizhelp/Snoop|Snoop]]
 
* [[Wizhelp/Switch|Switch]]
 
* [[Wizhelp/Switch|Switch]]
Line 65: Line 90:
 
* [[Wizhelp/Wtimewarp|Wtimewarp]]
 
* [[Wizhelp/Wtimewarp|Wtimewarp]]
 
* [[Wizhelp/Zap|Zap]]
 
* [[Wizhelp/Zap|Zap]]
 +
</div>

Latest revision as of 06:13, 15 November 2026

The help texts gods read in the game with wizhelp are kept here, one page for each, named Wizhelp/<Name>. They reach the game the same way as the players' help pages (see Help Files), with their own script, file type and index. To write one, see Editing the Wiki.

How a page reaches the game

The scripts are in vme/etc/help/:

  • getwikiwizhelppage.py <Name> fetches the page Wizhelp/<Name> and saves it as <name>.wiz (the name in lower case) in the current directory.
  • fetchwizpages.sh runs it for every Wizhelp page, one after the other.

Run it from vme/etc/help/ and move the files into vme/etc/help/strings/, where the game reads them:

cd vme/etc/help
sh fetchwizpages.sh
mv *.wiz strings/

getwikiwizhelppage.py is getwikihelppage.py for the Wizhelp/ pages, and treats a page the same way: the file is the page as the wiki renders it, in HTML; HTML comments go; the first heading is cleaned; a red link to a Wizhelp/ page becomes {text}; and every {text} becomes <a cmd='#'>text</a>, a link that runs text as a command when clicked. {Wizhelp Goto} runs wizhelp goto. Help Files has the details.

Wizhelp topics: wiz.index

wizhelp <command> (the do_wizhelp program in vme/zone/helpzon.zon) finds the text through vme/etc/help/strings/wiz.index, which works like help.index: lines topic=file, grouped by first letter between :start:a and :end:a, and so on, and the first topic that starts with what you typed is shown. Several commands share a page: nocomm and notell show Wizhelp/Noshout, flick, mash and rock show Wizhelp/Wizsocials, path shows Wizhelp/Wpath, and wizinv finds wizinvisible, Wizhelp/Wizinvisible. Below the text, the game adds a link to the page on this wiki, named after the file.

wizhelp alone does not read the index: it lists the commands in the game's command table from level 200 up to your own level. A page for something that isn't a command of that level, such as Wizhelp/File or Wizhelp/Personal, is only shown when you type its name. wizhelp notes shows the builders' notes of the zone you are in.

As with help, the files are read from disk each time, so a new or changed file needs no reboot.

Adding a wizhelp page

  1. Write the page here, Wizhelp/<Name>, with a capital first letter (the part after Wizhelp/ is case-sensitive).
  2. Add python3 getwikiwizhelppage.py <Name> to vme/etc/help/fetchwizpages.sh.
  3. Fetch it into vme/etc/help/strings/.
  4. Add its topics to wiz.index, each in its letter's section.
  5. Commit the script, the index and the .wiz file, and open a pull request.

Each command's level is its minlevel in vme/etc/commands.def; Wizarding 101 lists them all.

The wizhelp pages