<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE daiml SYSTEM "../../../../dtd/daiml.dtd">
<daiml autotoc="On this page" title="Smacky's Guide To Game Mechanics, Section 2-1: Commands, textwindows, &amp; bound keys">
    <stylesheet href="../screen.css" media="screen" title="Default"/>
    <stylesheet href="../print.css" media="print" title="Default"/>
    <section id="commands">
        <title>
            Commands
        </title>
        <p>
            Daimonin knows two flavours of command, <a href="#gamecommands">game commands</a> and <a href="#metacommands">meta commands</a>.
        </p>
        <div class="note">
            <p>
                <img alt="[NOTE]" src="../note.png"/> I classified the commands thusly when I first wrote <strong><em>Smacky's Guides</em></strong>. The names aren't entirely accurate but they're good enough. In fact, the difference is that game commands often (but not always) take one or more arguments (eg, <code>"/apply &lt;item&gt;"</code>) whereas meta commands never do (they may, however, act on the item highlighted by the cursor in the inventory or below windows).
            </p>
        </div>
        <section id="gamecommands">
            <title>
                Game commands
            </title>
            <p>
                Game commands tend to specify an action for your character to perform (eg, <code>"/pray"</code> to, errm, pray) or are used to chat with other players (eg, <code>"/shout"</code>).
            </p>
            <p>
                All game commands start with forward slash and are lowercase. Game commands are entered at the <a href="#lowertextwindow">console</a> or may be <a href="#boundkeys">bound to a key</a>.
            </p>
            <p>
                See <a href="./appx_a.dai">"Appendix A: Game commands"</a> for a complete list of game commands.
            </p>
        </section>
        <section id="metacommands">
            <title>
                Meta commands
            </title>
            <p>
                Meta commands generally influence the behaviour of the program (eg, <code>"?M_SKILL_LIST"</code> to open a dialog displaying all your character's skills).
            </p>
            <p>
                All meta commands start with <code>"?M_"</code> and are uppercase. Meta commands may not be entered at the console. They must be <a href="#boundkeys">bound to a key</a>.
            </p>
            <p>
                See <a href="./appx_b.dai">"Appendix B: Meta commands"</a> for a complete list of meta commands.
            </p>
        </section>
    </section>
    <section id="textwindows">
        <title>
            Textwindows
        </title>
        <section id="uppertextwindow">
            <title>
                Upper textwindow (the chat window or shoutbox)
            </title>
            <p>
                The upper textwindow is often called the shoutbox because that is where <a href="../communication/secn_4.dai">shouts</a> (orange text) are shown.
            </p>
            <p>
                But <a href="../communication/secn_1.dai">says</a> (white text), <a href="../communication/secn_5.dai#telling">tells</a> and <a href="../communication/secn_4.dai#replying">replies</a> (blue text for those you receive and white text for those you send), <a href="../communication/secn_5.dai">groups says</a> (yellow text), and informational and server messages (green text) are also shown here.
            </p>
            <p>
                The upper textwindow can be scrolled with the <a href="../game_mechanics/secn_2-1.dai#metacommands">meta commands</a> <code>"?M_PAGEUP_TOP"</code> / <code>"?M_PAGEDOWN_TOP"</code> (INSERT / DELETE by <a href="../game_mechanics/appx_c.dai#textwindows">default</a>).
            </p>
        </section>
        <section id="lowertextwindow">
            <title>
                Lower textwindow (the message window and console)
            </title>
            <p>
                The lower textwindow serves two functions: output and input.
            </p>
            <p>
                Output takes the form of <a href="../communication/secn_3.dai">emotes</a> (yellow text for those you receive and white text for those you send), command confirmations (dark gold text) and effects (white text), and many informational messages (green, blue, orange, purple, red, or white text).
            </p>
            <p>
                <a href="#gamecommands">Game commands</a> may be input in the console. To open the console enter the <a href="#metacommands">meta command</a> <code>"?M_CONSOLE"</code>. By <a href="./appx_c.dai#textwindows">default</a> this is <a href="#boundkeys">bound to the key</a> KPENTER, so press that.
            </p>
            <p>
                You will now see a cursor in the lower textwindow. This means you can start typing (<a href="#boundkeys">key bindings</a> are ignored).
            </p>
            <p>
                The rules in the console are simple. If the text you enter begins with a backslash ('/') it is taken as a <a href="#gamecommands">game command</a>. Otherwise the text will be echoed to other players (and NPCs) nearby.
            </p>
            <p>
                In the console, a number of editing keys are available:
            </p>
            <table>
                <tr>
                    <th>
                        LEFT/RIGHT
                    </th>
                    <td>
                        move the cursor within the text you have typed
                    </td>
                </tr>
                <tr>
                    <th>
                        HOME/END
                    </th>
                    <td>
                        move to the beginning/end of the string
                    </td>
                </tr>
                <tr>
                    <th>
                        UP/DOWN
                    </th>
                    <td>
                        cycle through the history
                    </td>
                </tr>
                <tr>
                    <th>
                        DELETE/BACKSPACE
                    </th>
                    <td>
                        delete the next/previous character from the cursor
                    </td>
                </tr>
                <tr>
                    <th>
                        RETURN/KPENTER
                    </th>
                    <td>
                        enter any text you have typed and return to the game
                    </td>
                </tr>
                <tr>
                    <th>
                        ESCAPE
                    </th>
                    <td>
                        return to the game
                    </td>
                </tr>
            </table>
            <div class="note">
                <p>
                    <img alt="[NOTE]" src="../note.png"/> The <a href="#metacommands">meta command</a> <code>"?M_MCON"</code> can be used to send a partial <a href="#gamecommands">game command</a> to the console, leaving the console active so you can complete the text.
                </p>
                <p>
                    An example should make it clear: <a href="./secn_3-1.dai">bind a key</a> to the macro <code>"?M_MCON/shout "</code>. Now when you press that key you will enter the console and the text <code>"/shout "</code> appears automatically. The console remains open so you can type in the message.
                </p>
            </div>
            <p>
                The lower textwindow can be scrolled with the <a href="#metacommands">meta commands</a> <code>"?M_PAGEUP"</code> / <code>"?M_PAGEDOWN"</code> (PAGEUP / PAGEDOWN by <a href="../game_mechanics/appx_c.dai#textwindows">default</a>).
            </p>
        </section>
    </section>
    <section id="boundkeys">
        <title>
            Bound keys
        </title>
        <p>
            Individual <a href="#gamecommands">game commands</a> and <a href="#metacommands">meta commands</a> can be bound to keys. For example, you might bind the game command <code>"/cast minor healing"</code> to 'H'.
        </p>
        <p>
            Detailed instructions on (re)binding keys are given in <a href="./secn_3-1.dai">"Section 3-1: Key settings"</a>.
        </p>
        <p>
            See <a href="./appx_c.dai">"Appendix C: Default bindings"</a> for a complete list of the default key bindings.
        </p>
    </section>
</daiml>
