Quick Overview

TinyFugue is a software package that utilizes the MS-DOS command window in Windows or the Terminal window in Mac OS X, rendering them into MU* clients, an interfacing system which makes it very fast and efficient. Like other such clients, TinyFugue provides players with a tool that can enhance your capabilities as a player.

TinyFugue allows you to create, manipulate, and store scripts that react to the game, such as automatically restoring heighten when it falls or changing you into leveling gear when you're close to leveling. Unlike other client programs, TinyFugue provides language but no interface, allows you to create all your functions from scratch in text files. In order to update your TinyFugue when you update these text files, simply type:

/purge
/load filename

To quit the client after you have quit the mud, type:

/quit

Installing and Launching TinyFugue

To install TinyFugue, you will need to download either the Windows or Mac TinyFugue installer file. The Linux version can be found on the TinyFugue home page.

Installing on the Mac is a simple matter of unstuffing and installing the *.gz file, mostly by a series of double-clicks. You can then launch TinyFugue with the Start TinyFugue 4.0s1 application, which you can move into your Applications folder.

On Windows, you can save the *.zip file to your desktop and double-click it to view its contents. Double-click the Setup.exe file and follow the directions to install it, noting the install directory. You can then right-click on your desktop and browser for the tf.exe file in your computer's TinyFugue directory to make a desktop icon to launch TinyFugue.

But don't launch TF yet.

Why not?

At this point, you will want to open (or create) the plain text ASCII file called tfrc (with no extension) to keep in the /tf-lib directory. (You'll find /tf-lib inside whichever directory you specified on Windows and in the /usr/local/lib/ directory on Macs.) While its contents are entirely up to you, you might want to start it with the following settings:


Copy and paste the above to begin. These are just preliminary settings that won't do much yet. Having defined avatar as a connectable world, you can type /connect avatar or avwest to connect to Av/AvWest when you launch TinyFugue. But by adding to the tfrc or creating other *.tf files and loading them into the tfrc, you can program and customize TinyFugue to make it a powerful mudding client.


Adding the above into the tfrc allows you to use the up-arrow and down-arrow keys on your keyboard to scroll through previously entered commands. By loading the different pre-defined *.tf files, you can now:

  1. Define aliases in the tfrc file with the syntax: /alias aliasname commands
  2. Define colors (you will probably want to make white and black the same color, and both of them the opposite of your background color.
  3. Type /speedwalk to toggle the option to enter directions by simply typing something like 3nwdenw.

Have a look at the Utilities page on the Druware helpsite for a brief overview of the different *.tf files and what they do; you may decide you want to load others.

Now when you launch TinyFugue, you can type /alt avatar|avwest altname password (either avatar or avwest) to log in as that character on that mud. You can relog or change alts while still connected using the same syntax.

Disclaimer

All the information here pertains to TinyFugue version 4.0 stable release 1. Unless you would like to hire me out (for a fee!), don't assume this site comes with customer service support; please don't ask me for help without first extensively reading over all the help files and trying to figure it out on your own.

The Basics

Syntax

TinyFugue uses a rigid but fairly simple language structure that must be followed. TinyFugue's own help files contain a plethora of information, but the following can get you started.

%;

Command separation is denoted with the %; syntax. It is equivalent to = in Av or ; in zMUD.

\

It is far easier to read a TinyFugue file when the macros and commands contain line breaks and indents. Use \ at the end of a line to denote that the next line should be read as a continuation of the current line. The \ can also be used before a character within quotes (as in a trigger pattern) to prevent TinyFugue from interpreting it as a special character.

{selector}
%{selector}

These are the typical syntaxes for citing variables or arguments. The selector can be a variable name or a number of special characters, which can be founds in the subs file of the TinyFugue User's Guide of the help files.

$(command)

The command is evaluated and its valued substituted where this syntax is used. Example:

/def whichav = /send emote is connected to $(/listsockets -s).

Typing /whichav would emote the name of the mud to which you were connected.

$[expression]

The expression is evaluated and its value substituted where this syntax is used.

/DEF

The most useful TinyFugue feature is the macro, which you can define with the /def command. It uses the syntax /DEF [options] [name] [= body]. While there are numerous options, as shown in the DEF file of the TinyFugue Command Reference in the help files, the most relevant would be:

-mmatching

Your options here are -msimple for simple matching, -mglob for global matching, or -mregexp for regular expression matching, the one that will be used most here.

-nshots

The macro gets deleted when it has been triggered the number of shots. Default value is 0.

-tpattern

Based on which type of matching you specified with the -mmatching option, you would define your pattern with the syntax -t"pattern".

-h"event[ pattern]"

Hooks can be used to define what happens during such events as CONNECT when you are first connected to a mud and DISCONNECT when you are disconnected.

-a[ngGurfdBbhC]

Alters the appearance of the line respectively as follows: normal, gag, norecord, underline, reverse, flash, dim, bold, bell, hilite, Color.

-P[n][nurfdBhC]

Partial highlighting with the nth match in the pattern, or the entire pattern if n is omitted. these follow the same values the -a notations, though only one value can be used.

Pattern Matching

Every trigger is comprised of a pattern and commands. Patterns consist of hard-coded text and wildcards. In order to make triggers work everytime, you need to first understand how to make your client match the pattern in your triggers with every possible permutation of the desired line of text.

TinyFugue allows for simple, global, and regular expression trigger matches. The most useful (and potentially most complicated) of these are the regular expressions.

PATTERN MATCHING PRIMER (REGULAR EXPRESSIONS)

WildcardMatches

PATTERN MATCHING FINAL

If you're new to zMUD scripting syntax, you might also want to take a closer look at an example.

These lines are only supposed to match the first line of information you see for each person when you type group, but as you know if you've played the game at multiple levels, this line has almost no consistencies in terms of spacing, which can make it tricky to match for variables:

[ 12 War ] LowbieExample 175/ 175 hp 105/ 105 mana 173/ 173 mv
[254 Hero] HeroExample 2918/ 2918 hp 208/ 208 mana 1482/ 1482 mv
[ 5 Lord] AndLordExample 24780/24780 hp 8673/ 9170 mana 17581/17666 mv

To match all three lines, the trigger pattern has to take into account all the spacing inconsistencies:

\[([0-9 ]+) ([A-Za-z ]+)\] ([A-Za-z]+)[ ]+([0-9]+)[^0-9]+([0-9]+) hp[ ]+([0-9]+)[^0-9]+([0-9]+) mana[ ]+([0-9]+)[^0-9]+([0-9]+) mv

This pattern delineates 9 variables:

%1 : Level number
%2 : Lord, Hero, or Class info
%3 : Character name
%4 : Current hp
%5 : Max hp
%6 : Current mana
%7 : Max mana
%8 : Current moves
%9 : Max moves

Syntax Structure

/DEF

According to the help files, you should stick with the /DEF syntax whenever possible, since it is highly versatile and configurable. Within the basic /DEF [options] [name] [= body] structure, you can gag, highlight, color, create macros and triggers, and more.

Gagging

Gagging is very straightforward, using the -mregexp -t"pattern" syntax to match the pattern then gagging it with -ag.


Highlighting

This method of highlighting is really gagging, then echoing over the gagged line. For our example, let's say you want to be able to highlight sanctuary or iron monk spells when you type affects (as well as emote its duration). You simply need to specify the pattern and gag it, then echo the highlit line as follows:


Note that /if structures must be closed with /endif and include %; between conditional outcomes but not between the conditional statement and the first outcome. You can add conditions with /elseif (statement) and/or an optional default case with /else.

Colors

You can color specific words instead if you choose. If you wanted to show the word "sleeping" in yellow everytime, you could add:


Macros

None of the above /DEF macros have a name specified. The name would be one word immediately preceding the equals sign. With a name specified, you could call that macro in other instances by its name with the syntax /name.

Triggers

I have included a few general TinyFugue triggers throughout this site.

/ALIAS

If you've included the line

/load alias.tf

in your file, you can also use the /alias structure as follows:


The advantage of this structure is that you can call the command in the game without using the preceding /. Typing unl e would send "unlock e, open e" to the game.

/SET

Variables can be created/defined with the syntax /set variablename=value, both within and outside macros.

/WHILE

If you have a variable that is a list of items, or you want to manually type a list in the game, you can cycle through it using this structure. For example, if you wanted to repair all your items, you could create this macro:


Then after you've reloaded the file, you could type /repairall helm boots gloves in the game to have the macro repair each item in turn.

General Triggers

Heighten Triggers

I personally prefer heightening (which everyone can do from Hero level 5 on) to casting three separate detecting spells. These are a comprehensive set of triggers to help re-heighten your senses whenever they fall.


Threnody Counter

Lord secret alert: cover your eyes if you really don't have a lord alt. Threnody requires 20 people, but unless you sit there counting your screen, it can be a pain to track. Here is a little trigger set that counts for you.