Netrek Nexus banner

The Advanced Message and Macros Guide


Communication is a key element of Netrek. Typing takes time. Time is critical in dogfighting or teamwork. Most of the messages sent in Netrek are standard warnings, distress calls, requests, notifications, etc. Also retyping that insulting message every time you doosh someone is a drag. Fortunately, Netrek has a system with a bunch of messages all set to relay critical information for you. This is a guide to that system. It's pretty complex, with a lot more abilities than most people will ever need; for most players, section 2, on RCDs, is all they really need.

Note that as of version 1.2, MacTrek has only minimal (but evolving) RCD and Macro facilities, so most of this manual won't apply to MacTrek users.

If you are reading this, you should already be familiar with how to send basic messages in Netrek. If not, read the Basic Messaging Instructions

Contents:

  1. Introduction: Four Fine Flavors
  2. RCDs, canned messages for those rushed moments
    The most important part of this manual.
  3. User Macros, tell us how you really feel
  4. Writing User Macros
  5. Customizing RCD's
  6. Customizing RCM's
  7. Credits


1. The four kinds of message


Like the heading says, there are four kinds of messages in Netrek.

Two of these (RCDs and Message Macros) are macros. "Macro" is a computer term which refers to having the computer do some typing or mousing for you. So instead of typing out a long message yourself, you just hit a couple of keys and the machine does the rest.

The types are:

  1. Simple messages. You just type these, as per the messaging instructions.
  2. RCDs
    These are predefined help and advisory messages, like "Bomb Kli @ 7". There are 25 of these, including 4 general purpose ones.
    You can change which keys send which messages using standard keymap configuration.
    You can change how these look to you when other people send them to you.
  3. Message Macros
    These are messages you set up in your configuration file.
    You choose what these messages say.
    You choose which keys send the messages.
  4. RCMs
    These are messages the server sends to you, like "GOD->ALL Geebzy (F1) [CA] was kill 1.00 for Raboof (R7) [CA] [phaser]"
    You can change how these look to you.

2. RCD's, for when you're in a hurry


There are a number of macros called "Receiver Controlled Distresses" or RCD's. Most are assigned to a control key (where you hold down the "control" key and press another key at the same time), but two are assigned to normal keys.

For example, if you place your mouse pointer near the planet Cassiopia and type control-1, your client should issue something similar to "F0->FED Help at Cas! (have 3 armies) 60% shld, 13% dam, 63% fuel"

Here's a table of the default distresses. All the examples below assume that you are player F0, alias "Twinky", flying a CA carrying 3 armies near Beta Crucis. The closest planet to your mouse pointer is Cassiopia, which has 5 armies, the nearest friendly player to the mouse pointer is player Fc, and the nearest player of any team to the mouse pointer is player 06.

Key Distress
Name
Purpose Sample Message
E help Call for help      F0->FED Help(CA)! 60%shd, 13% dam, 63% fuel, 3 armies!     
F carrying Announce you are carrying armies      F0->FED Carrying 3 armies.     


Control Key Distress
Name
Purpose Sample Message
b bomb Tell your team to bomb someplace
Put mouse near target planet, hit control-b
     F0->FED bomb Cas @ 5     
c space_control Tell your team to control a certain area
Put mouse near a planet, hit control-c
     F0->FED Help Control at CAS     
e escorting Announce you are escorting a teammate
Put mouse near teammate you are escorting, hit control-e
     F0->FED ESCORTING c (13%D 60%S 62%F)     
f free_beer Tells your team about a crippled or unskilled player
Put mouse near beer, hit control-f
     F0->FED 6 is free beer     
h crippled Tells your team about a crippled player
Put mouse near crip, hit control-h
     F0->FED 6 @ Cas crippled     
l controlling Tells team you are controlling a certain area
Put mouse near a planet, hit control-c
     F0->FED Controlling at Cas     
m bombing Tells team where you are about to bomb
Put mouse near target planet, hit control-m
     F0->FED Bombing Cas @ 5     
n no_gas Tells your team someone is out of fuel
Put mouse near fuel-less ship, hit control-n
     F0->FED 6 @ Cas has no gas     
o ogg Tell your team to ogg someone
Put mouse near target ship, hit control-o
     F0->FED Help Ogg 6 at Cas     
p ogging Tells team who you are about to ogg
Put mouse near target ship, hit control-p
     F0->FED Ogging 6     
t taking Tell your team you are carrying and your intended target
Put mouse near target planet, hit control-t
     F0->FED (CA) Carrying 3 to Cas @ 5     
0 pop Alert teammates to the number of armies on a planet
Put mouse near relevant planet, hit control-0
     FO->FED Cas @ 5!     
1 save_planet Tell your team to save a planet
Put mouse near relevant planet, hit control-1
     F0->FED Help at Cas! (have 3 armies) 60% shld, 13% dam, 63% fuel     
2 base_ogg Call a base ogg
Put mouse near the teammate to synchronize with, hit control-2
     F0->FED Sync with --] c [--- OGG ogg OGG base!!     
3 help1 General distress. Same as help2 unless you change it.      F0->FED Help me! 13% dam, 60%shd, 63% fuel 3 armies     
4 help2 General distress. Same as help1 unless you change it.      F0->FED Help me! 13% dam, 60%shd, 63% fuel 3 armies     
5 asw Tells team you are doing Anti-Scout (bomber) Warfare
Put mouse near enemy bomber, hit control-5, it will mention the planet you are closest to
     F0->FED Anti-bombing 6 near Bet     
6 asbomb Tells team you intend to bomb a planet, especially if you are using an AS
Put mouse near target planet, hit control-6
     F0->FED DON'T BOMB Cas. Let me bomb it (CA)     
7 doing1 General Info message. Same as doing2 unless you change it.      F0->FED (Twinky) has 3 armies at lal. 13% dam, 60% shd, 62% fuel     
8 doing2 General Info message. Same as doing1 unless you change it.      F0->FED (Twinky) has 3 armies at lal. 13% dam, 60% shd, 62% fuel     
9 pickup Tell your team an enemy has beamed up armies
Put mouse near carrier, hit control-9. Will say what planet they are closest to.
     F0->FED 6++ @ Cas     
@ other1 General info message. Same as doing1 unless changed.      F0->FED (Twinky) has 3 armies at lal. 13% dam, 60% shd, 62% fuel     
# other2 General info message. Same as doing1 unless changed.      F0->FED (Twinky) has 3 armies at lal. 13% dam, 60% shd, 62% fuel     


Now, why would these be called "Receiver Configurable Distress" calls?
Because not only can you change what keys send the messages, but you can in fact change exactly how the message appears to you. So, if instead of seeing "6 is free beer" when your teammate sends you a message, you can configure things so that you see "6 is crispy and good with ketchup" instead. More on how to do this later, in the Customizing RCD messages section.

3. User Message Macros



3.1 How to Do It

Message macros are mostly sent by entering "Macro Mode".
This means that you enter the macro key (capital X by default) and then the key of the macro you want to send.
So if you have macro b set to send your team the message "Please bomb enemy core!",
then typing "Xb" (X followed by b) will send that message. You can set macros for most numbers, letters, and symbols, but not the question mark. Lower case and upper case letters will send different macros; if you want Xb and XB to do the same thing, you have to set them to.

3.2 Single Key Message Macros

If you like, you can assign macros to single keys, for messages you need to be able to send quickly and easily.
The way to do this is to use the "singleMacro" entry in your config file.
The entry
     singleMacro: bi
Would make Macros b and i into one key macros, meaning that:

3.3 More with Macros

4. Writing User Message Macros


In your netrekrc file, a simple macro will look like this:

mac.b.T: Bomb their core, d00dz!
The format is mac.<key>.<dest>: <text>.
So for the above example,

Now, a more complicated example might look like:

mac.1.A:%     Send                 .--------.     They   
mac.1.A:%     the                  |_I_I_I_I]__   need it  
mac.1.A:%     Short Bus    .::.    | _sped ;;_ )  at %L
mac.1.A:%                  ':::'' ='-(_)----=(_)'

In the above

This third example shows how to specify the destination on the fly:

     mac.f:           Help!  Carrying %a!!
Notice how there is no destination? This macro requires that you give a third keystroke specifying the recipient. For example, it could be invoked by:
     XfT             <- to your team
     Xf1             <- to player 1
     XfG             <- if you are desperate, send to God
     XfA             <- if you are stupid, send to ALL
The %a is replaced with how many armies you are carrying. And multiline macros can be flaky or not work at all if they require a destination, so don't try that.

Now, if you want to send the message to the player closest to the mouse, you could use:

     mac.f.%u:           Help!  Carrying %a!!
But you'd want to be very careful about where you had your mouse.

Here's the reference tables for the possible destinations and substitutions.

4.1 Table of Destinations

Here are the values you can use for the destination of a message macro:

DestSends to
A All players
T Your team
F The Fed team
K The Klingon team
O The Orion team
R The Romulan team
G The Server's admin (God)
 0 thru 9, 
a thru j
 The player with that number  
%isend message to self
%Isend message to self
%csend message to self
%u player nearest to mouse
%Uplayer nearest to mouse
%pplayer nearest to mouse
%t team of player nearest to mouse
%z team of player nearest to mouse
%Zteam of player nearest to mouse
%gnearest friendly player to your ship
%hnearest enemy player to your ship

4.2 Table of Substitutions

Here are the codes for things that can be substituted into message macros:

    Standard:

    %a   armies carried by sender
    %d   sender damage percentage
    %s   sender shield percentage
    %f   sender fuel percentage
    %w   sender wtemp percentage
    %e   sender etemp percentage
    %t   team id character of target planet
    %T   team id character of sender team
    %c   sender id character
    %n   armies on target planet
    %E   1 if etemped, 0 if not
    %W   1 if wtemped, 0 if not
    %S   sender two character ship type
    %p   id character of target player
    %g   id char of target friendly player
    %h   id char of target enemy player
    %P   id character of player nearest sender
    %G   id char of friendly player nearest sender
    %H   id char of enemy player nearest sender
    %l   three character name of target planet
    %i   sender full player name (16 character max)
    %u   full name of target player (16 character max)
    %z   3 letter team id of target planet
    %b   planet nearest sender
    %o   three letter team name of sender
    %k   number of kills sender has
    %K   number of kills target player has
    %*   if this is encountered, the macro IS NOT PRINTED
    %    this is replaced by a space, mainly useful for starting a message
         must be followed with a blank space, like "% ".

    FULLY CAPITALIZED:

    %L   three character name of target planet
    %I   sender full player name (16 character max)
    %U   full name of target player (16 character max)
    %Z   3 letter team id of target planet
    %B   sender nearest planet
    %O   three letter team name of sender

    Ping stats: (may differ slightly from server '!' ping stats)

    %v   average ping stat round trip time 
    %V   ping stat round trip standard deviation
    %y   percent total packet loss as calculated by server formula

    Miscellanous:

    %m   the last message you sent
    %M   the last message you sent in all caps

4.3 Macro Expressions

Conditional tests may be done within the macro system, the syntax for these test is as follows.
     %?   introduces a test
     =    equivalence
     >    greater
     <    less
Expressions are evaluated on a character by character basis until the test is resolved.
The text of the test is then replaced in the macro by 1 or 0.
Tests are then fed to a syntax called conditional text.

The best way to demonstrate how this works is by example.
  "1%{included if true%!included if false%}"
This would print:
  "included if true"
whereas
   "0%{included if true%!included if false%}"
would print:
  "included if false"

4.4 Macro Notes and Oddities

Before the system described here, which is called NEWMACRO, there was an older system. In some clients, code for the old system, which had no substitution codes, may still work.

For example, if this is in your macro file:

     mac.E.T         Help!  I'm carrying!!
     macro.E.A       You all suck!
     mac.E           Help!  I'm a twink!!
     mac.E.T         Help!  I'm carrying again!!
     macro.E.A       You all suck even worse NOW!
The surprising results would be that pressing XE would broadcast the first two messages, and then wait for the destination of the third. It would be impossible to ever use the last two.

Note that macro syntax is not printf syntax. Not hardly.

A Few More Example Macros

Here's a few more for your delectation:
     # useful for INL...
     mac.C.%i: CAPTAIN
     mac.N.%i: NEWGALAXY
     mac.S.%i: START
     mac.T.%i: %Z
     # misc
     mac.W.%t: SHUT UP, TWINKS!!
     mac.I.%u: %u: det when you escort!
     mac.O.%u: (%i) ogging
     mac.c.T:   %p++ near %l
     mac.b.T:   %?%n>4%{bomb %l at %n%!bomb%}
     mac.d.T:   %E%{%!%W%{%!I'm fine.  How are you? %}%}%E%{ETEMPED!!!  %}
                %W%{WTEMPED!!!  %}Carrying %?%a>0%{%a armies!%!NO armies.%}
     mac.a.T:   %E%{ETEMPED!!!  %}%W%{WTEMPED!!!  %}Carrying %?%a>0%{%a 
                armies! %!NO armies.%}
     mac.R.A:   I'm a %?%S=SB%{star base!%!twink!%}
     mac.K.A:   KissMy%S
     mac.t:     thanks
     mac.y:     yes
     mac.n:     no
     mac.B:     bye, getting hungry/sleep/horny
     mac.e.T:   need escort going to %l%?%a>0%{, carrying %a armies!%}
     mac.v.%t   %T%c PING stats: Average: %v ms, Stdv: %V ms, Loss: %y%%
     # repeat last message
     mac.m:         %m

5. Customizing RCD's


The basic idea with RCDs is that everyone likes certain standard types of messages, such as distress, pickup, carrying, etc, to appear in a certain way. Unfortunately this is usually not the way everyone else sends them. To make matters worse, everyone sends their messages in a different way and this hopelessly clutters the message window. Fortunately, there is help! You can configure the way certain standard messages and distress calls appear to you. This is an important point: you do not configure the way the messages are sent with RCD. Instead, you are configuring how they appear to you. You MAY NOT affect how a message appears to anyone else, this is against the basic concepts of RCD.

In order to change *how a message appears to you* a line such as the following should be in your config file:

     dist.taking:   (%i) Carrying %a to %l%?%n>-1%{ @ %n%}
     dist.help:     Help!  I've fallen!  I can't get up!  %a
This has the format dist.<name of distress>: <macro text>.

The names of the distresses and the macros that the system normally uses for them are listed below. Arguments for the macro syntax are the same as above. A few of the substitution codes may not make sense to use such as %m (last message sent).

All these examples assume: you are player F0 (%T%c), alias "Twinky" (%i), flying a CA (%S), carrying 3 (%a) armies, with the mouse closest to Cassiopia (%l or %L), which has 5 (%n) armies. The nearest friendly player to the mouse is player Fc (%T%g) and the nearest player of any team to the mouse cursor is player 06 (%p). You yourself are near Beta Crucis.

Key Distress Name       


E   help
       %T%c->%O Help(%S)! %s%% shd, %d%% dmg, %f%% fuel,
          %?%S=SB%{ %w%% wtmp,%!%}%E%{ ETEMP!%}%W%{ WTEMP!%} %a armies!
       General distress call. This one also reports if you are wtemped
       or etemped, if you are an SB. Example:
          "F0->FED Help(CA)! 60%shd, 13% dam, 63% fuel, 3 armies!

F   carrying
        %T%c->%O %?%S=SB%{Your Starbase is c%!C%}arrying 
           %? %a>0%{%a%!NO%} arm%?%a=1%{y%!ies%}.
        Tells your team the number of armies you are carrying. Example:
           "F0->FED Carrying 3 armies."

b   bomb                
       %T%c->%O %?%n>4%{bomb %l @ %n%!bomb%}
       Tell your team to bomb a planet. Example:
          "F0->FED bomb Cas @ 5"

c   space_control
       %T%c->%O Help Control at %L
       Request space control at specified location. Example:
          "F0->FED Help Control at CAS"
e   escorting
       %T%c->%O ESCORTING %g (%d%%D %s%%S %f%%F)
       Tells your team who you are escorting. Example:
          "F0->FED ESCORTING c (13%D 60%S 62%F)"
                
f   free_beer   
       %T%c->%O %p is free beer
       Tells your team about a clueless player who is an easy kill. 
       Example:
          "F0->FED 6 is free beer"

h   crippled
       %T%c->%O %p @ %l crippled
       Tells your team that someone is crippled, i.e. badly damaged. 
       Example:
          "F0->FED 6 @ Cas crippled"

l   controlling
       %T%c->%O Controlling at %l
       Tells your team that you are space controlling somewhere. This is 
       the art of dominating a region of space. Example:
          "F0->FED Controlling at Cas"

m   bombing
       %T%c->%O Bombing %l @ %n
       Tells your team that you are bombing. Many players turn this message 
       off (by inserting a %* anywhere in the message string) as they can 
       figure out for themselves where someone is going to bomb by their 
       course. Example:
          "F0->FED Bombing Cas @ 5"

n   no_gas
       %T%c->%O %p @ %l has no gas
       Tells your team about someone who is out of fuel, good or bad. 
       Example:
          "F0->FED 6 @ Cas has no gas"

o   ogg
       %T%c->%O Help Ogg %p at %l
       Tell your team to ogg a carrier. Example:
          "FO->FED Help Ogg 6 at Cas"

p   ogging
       %T%c->%O Ogging %h
       Tells your team who you are ogging. Example:
          "F0->FED Ogging 6"

t   taking       
       %T%c->%O (%S) Carrying %a to %l%?%n>-1%{ @ %n%}
       Taking a planet. Example:
          "F0->FED (CA)  Carrying 3 to Cas @ 5"

0   pop 
        %T%c->%O %l%?%n>-1%{ @ %n%}!
        Tells your team the number of armies on a planet or that it has 
        popped or been bombed or dropped on recently. Example:
            "FO->FED Cas @ 5!"

1   save_planet
       %T%c->%O Help at %l! %?%a>0%{ (have %a arm%?%a=1 %{y%!ies%}) %} 
           %s%% shld, %d%% dam, %f%% fuel
       Need help NOW to take or protect a planet. Example:
          "F0->FED Help at Cas! (have 3 armies) 60% shld, 13% dam, 63% fuel"

2   base_ogg,   
       %T%c->%O Sync with --]> %g <[-- OGG ogg OGG base!!
       That greatest of maneuvers, the Ogg, as applied to an enemy SB. 
       Example:
          "F0->FED Sync with --] c [--- OGG ogg OGG base!!"

3   help1       
       %T%c->%O Help me! %d%% dam, %s%% shd, %f%% fuel %a  armies.
       General distress. Same for help2. Example:
          "F0->FED Help me! 13% dam, 60%shd, 63% fuel 3 armies"

4   help2
       %T%c->%O Help me! %d%% dam, %s%% shd, %f%% fuel %a armies.
          Defaults to same as above.

5   asw
       %T%c->%O Anti-bombing %p near %b.
       Tells your team that you are doing Anti Scout (bomber) Warfare. 
       Example:
          "F0->FED Anti-bombing 6 near Bet"

6   asbomb
       %T%c->%O DON'T BOMB %l. Let me bomb it (%S)
       Respectfully requests that you be allowed to bomb something. This is 
       typically used if you are flying an AS as they have a much better 
       chance of bombing a planet to a lower number, making it easier to 
       take. Example:
          "F0->FED DON'T BOMB Cas. Let me bomb it (CA)"

7   doing1
       %T%c->%O (%i)%?%a>0%{ has %a arm%?%a=1%{y%!ies%}%} at lal.  
          %d%% dam, %s%% shd, %f%% fuel
       General information message. Example:
          "F0->FED (Twinky) has 3 armies at lal. 13% dam, 60% shd, 62% 
           fuel"

8   doing2
       %T%c->%O (%i)%?%a>0%{ has %a arm%?%a=1%{y%!ies%}%} at lal.  
          %d%% dam, %s%% shd, %f%% fuel
       Same as doing1, by default

9   pickup      
       %T%c->%O %p++ @ %l
       One of the most useful macros. Use this if you see an enemy pick up 
       armies . Example:
          "F0->FED 6++ @ Cas"

@   other1
       %T%c->%O (%i)%?%a>0%{ has %a arm%?%a=1%{y%!ies%}%} at  lal. 
          (%d%%D, %s%%S, %f%%F)
       Another general call. 

#   other2
        %T%c->%O (%i)%?%a>0%{ has %a arm%?%a=1%{y%!ies%}%} at  lal. 
           (%d%%D, %s%%S, %f%%F)
        Same as above

Headings

If you configure an RCD, you also must configure the header of that message, that is the part at the beginning that specifies who the message is from and to. This isn't difficult; just add the header to the beginning of the RCD. For example, instead of
  dist.T.taking: Carrying %a to %l%?%n>-1%{ @ %n%}
use
  dist.T.taking: % %T%c@%b Carrying %a to %l%?%n>-1%{ @ %n%}


The default header is % %T%c->%O and an alternative is % %T%c@%b

Example

We'll map the generic distress call (help) to 'h', and make it appear as: "I'm about to die with %a of your team's armies!"

First, try to separate in your mind the two types of configurability that are going on here.

  1. you are changing the key that sends the message
  2. you are changing how the message appears to you
In order to do (1), just use a keymap. Simply put the following in your config file:
keymap: hE
This performs the key configuration we wanted for the first example, telling the system that you want "h" to do what "E" normally would do. You can then tell it to use E for something else, or you can leave it as is, and either key will send a distress call.

In order to change the message, put the following in your config file:

dist.help:     %T%c->%O I'm about to die with %a of your team's armies!
Note the header.

Server Debugging

If you have read all the documentation, are sure you are using the right syntax, and RCD (or MACRO) still is not working, then check out the following.

1. Did you receive RC_DISTRESS when you logged in?

The server must send this to the client to tell the client that it understands RCD messages. Otherwise the client will just send the standard formatted RCDs.

Some clients have a mod which shows you whether RC_DISTRESS is on by looking at the first line of the macro window. If it says, "Packages active: NBT, NEWMACRO, SMARTMACRO", you have no guarantee that RCD was turned on by the server. If it says, "Packages active: NBT, NEWMACRO, SMARTMACRO, RC_DISTRESS" then RCD is definitely on. Don't worry about #1, go to #2.

2. Are any MACROs assigned to the same key as the RCD you are configuring?

If this occurs, you will see the macro and NOT the RCD.

3. Are any other RCDs assigned to the same key as the RCD you are configuring (this includes the DEFAULT RCDS!!) ?

If this occurs, you will see whichever RCD happens to be listed first when the client examines the RCD list.

6. RCM's (Receiver Configurable Server Messages)

Those kill and take messages that the server sends are called RCM's, and as you may have guessed, they work a lot like RCD's, in that you can change how they appear to you.

Short packet kill messages may be freely configured using the macro syntax. Things are interpreted as follows:

All others are undefined.

The format of the messages is:

msg.[name of message]: [RCM macro]

Available messages and their defaults are:

msg.kill:  ........
msg.kill:GOD->ALL %i (%S) (%T%c%?%a>0%{+%a armies%!%}) was kill 
           %?%d>0%{%k%!NO CREDIT)%} for %u (%r%p) %?%w>0%{%W%!%}
msg.planet:GOD->ALL %i (%S) (%T%c%?%a>0%{+%a armies%!%} killed by %l (%z) 
            %?%w>0%{%W%!%}
msg.bomb:%N->%Z We are being attacked by %i (%T%c) who is %d%% damaged.
msg.destroy:%N->%Z %N destroyed by %i (%T%c)
msg.take:%N->%O %N taken by %i (%T%c)
msg.ghostbust:GOD->ALL %i (%S) (%T%c) was kill %k for the GhostBusters

BRMH-style formatted kill windows may be obtained by something like:

msg.kill:  %i (%S) (%T%c%?%a>0%{+%a armies%!%}) %>30 kill 
             %?%d>0%{%k%!NO CREDIT)%} for %u (%r%p) %?%w>0%{%>65%W%!%}

7. Credits

This document was based on material from the COW manual sections which were written by Jeff Nelson sometime around 6/4/1993. In March of 2007, akb4 rewrote and reformatted a bunch to create this as a separate manual. Probably other people contributed as well.