Syntax for Orders

Last revised: July 13, 1991

Send comments or corrections (only for the HTML version of this file) to Doug Massey ([email protected])


You can receive a copy of this file via E-mail by sending your local Judge a message with "get syntax" in the body.


Syntax for Orders

The format of your diplomacy orders depends on the phase of the game: Movement, Retreats or Adjustments. Multiple orders can be entered on one line by separating them with commas or semicolons.

Movement orders:

Retreat orders:

Adjustment orders:

Where:

<type> = "army", "a", "fleet", "f" or <empty>.
<s-prov> = Source province.
<d-prov> = Destination province.
<c-prov> = Intermediate water province in a convoy route.
<power> = Power name or abbreviation of two or more characters.
<holds> = "h", "hold", "holds", "stand", "stands".
<moves> = "-", "->", "m", "move", "moves", "move to", "moves to".
<support> = "s", "support", "supports".
<convoy> = "c", "convoy", "convoys".
<proxy> = "p", "proxy", "proxy to".
<disband> = "d", "disband".
<build> = "b", "build" or <empty>.
<remove> = "r", "remove", "d", "disband" or <empty>.
<waive> = "w", "waive".

Province names can be abbreviated or can be spelled out. Coasts can be specified by following the province name with one of:

<coast> = "/nc", "(nc)", "/north coast", "(north coast)"

or appropriate other directions instead of "north".


Revising Orders

Revisions to orders can be sent in anytime before the deadline occurs. The last valid order for a particular unit will be honored. If no valid order is received for a particular unit it will be listed in the reports as "No order processed".


Conditional Orders

Orders can be entered conditionally using the following syntax:

if <condition> then
<orders>
else if <condition> then
<orders>
else
<orders>
endif

The "then"s are optional for old fortran programmers. The conditions are of the form:

<condition> = ["not"] <power> <type> <prov>

and may be combined with the keywords "and" and "or" evaluated left to right. You can use parentheses to change the precedence. The condition evaluates to "true" if a unit of the specified type belonging to the specified power is present (or not) in the specified province. The province must be specified, but the type and power are optional interpreted as "any" if not specified. The power, type and province can be specified in any order. Powers can be abbreviated to two or more characters or spelled out. For example:

phase Fall 1905 Movement
if not french army ruhr and (russian prussia or russian siliesia)
kiel -> berlin
munich support kiel -> berlin
else
kiel -> ruhr
munich support kiel -> ruhr
endif

Conditional statements can be nested with expected results. The end of a line closes off all parenthesis and the end of the orders closes off all missing endifs without an error being reported. Note, broadcast messages are not considered orders and thus cannot be sent out conditionally using this mechanism.


Submitting Orders for Future Phases

Orders can be submitted for future phases using the following syntax:

PHASE <season> <year> <phase>

Where the first letter of the season or phase are significant:

<season> = "Spring", "Summer", "Fall" or "Winter".
<phase> = "Movement", "Retreat", "Adjustment" or "Build".

The orders following the PHASE directive will be collected and saved until the indicated phase occurs. Some syntax checking will be done on the orders, but the full list of errors can't be determined until the actual phase occurs. That error list will be mailed to you when the orders are processed. If any pending orders are found for a particular phase, your power will get the "orders have been received" status automatically whether or not there were any errors or if the orders are incomplete. All orders until the next PHASE directive or the end of the mail message will be saved for the specified phase. Note that only orders are saved. In particular, broadcast messages can not be delayed for later transmission. An exception to this is that the set wait and set nowait directives will be propagated to the future phase. Your pending orders will be listed in replies to intervening order submissions. To get rid of all your pending orders, use the CLEAR command.

As a special note, please be aware that subsequent build orders will override earlier ones if more build orders are received than you have supply centers. Thus, when submitting orders for future build phases, you should list your builds in reverse order of preference in case you don't get as many supply centers as you were expecting.


* Diplomacy is a trademark of Hasbro, Inc., all rights reserved. Used with permission.