Wrayth protocol: Difference between revisions
Jump to navigation
Jump to search
(Added pushBold, popBold, pushStream, popStream, clearStream) |
SIMU-WYROM (talk | contribs) m (SIMU-WYROM moved page StormFront protocol to Wrayth protocol) |
||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
The ''' |
The '''Wrayth protocol''' is the XML protocol used to pass information between the game and a front end. It is currently used by the official [[Wrayth]] front end as well as the unofficial front ends [[Nexus]] and [[EclipseFE]]. |
||
== Tags == |
== Tags == |
||
Line 12: | Line 12: | ||
|- |
|- |
||
| <a> |
| <a> |
||
| Displays a link that is clickable to obtain a menu of interaction options |
| Displays a link that is clickable to obtain a menu of interaction options or to send a command |
||
| |
| |
||
*exist - A unique identifier for the object, for use in menus |
*exist - A unique identifier for the object, for use in menus |
||
*noun - The noun of the object, for use in menus |
*noun - The noun of the object, for use in menus or commands |
||
*coord - An identifier for a command (optional) |
|||
| a <a exist="-26211" noun="door">heavy ironwood door</a> |
| a <a exist="-26211" noun="door">heavy ironwood door</a> |
||
<a exist="-10374531" coord="2524,1741" noun="ARMOR">ARMOR</a> |
|||
| Displays the contents as a clickable link |
| Displays the contents as a clickable link |
||
| Does not suppress following newlines |
| Does not suppress following newlines |
||
If coord is not specified, it is a menu, and exist and noun refer to the target of the menu. If it is specified, it is a command, and the exist and noun may be used in the command. |
|||
|- |
|||
| <clearContainer> |
|||
| Removes all text within the specified container window |
|||
| |
|||
*id - The id of the container window |
|||
| <clearContainer id="stow"/> |
|||
| No contents |
|||
| |
|||
|- |
|- |
||
| <clearStream> |
| <clearStream> |
||
Line 26: | Line 37: | ||
| <clearStream id="spellfront"/> |
| <clearStream id="spellfront"/> |
||
| No contents |
| No contents |
||
| |
|||
|- |
|||
| <d> |
|||
| Displays a link that is clickable to send a command to the game |
|||
| |
|||
*cmd - The command to send to the game (optional) |
|||
| <d cmd='gaze Ildran'>GAZE {self}</d> |
|||
| Displays the contents as a clickable link |
|||
| If the cmd parameter is omitted, will send the contents of the tag |
|||
|- |
|||
| <inv> |
|||
| Adds text to a container window |
|||
| |
|||
*id - The id of the container window |
|||
| <inv id='stow'> a <a exist="675003" noun="cards">deck of red and green cards</a></inv> |
|||
| Appends contents (plus a newline) to the container window specified |
|||
| |
| |
||
|- |
|- |
||
Line 36: | Line 63: | ||
| <right exist="674831" noun="dagger">dagger</right> |
| <right exist="674831" noun="dagger">dagger</right> |
||
| Sends the contents to the left or right hand panel |
| Sends the contents to the left or right hand panel |
||
| |
|||
|- |
|||
| <menu> |
|||
| Designates a menu |
|||
| |
|||
*id - A numerical id for the menu |
|||
*path - A path to the object being specified |
|||
*cat_list - The ordering of the menu item categories |
|||
| <menu id="0" path=" in #84744238" cat_list="1 2 3 4 5 6 7 8 9 10 11 12 13"><mi coord="2524,1613"/><mi coord="2524,1651"/>...<mi coord="2524,1740"/></menu> |
|||
| The contents should be a sequence of <mi> tags |
|||
| id appears to cycle through the numbers 0-9 |
|||
The path is the location of the item |
|||
|- |
|||
| <mi> |
|||
| Designates an item in a menu |
|||
| |
|||
*coord - The command to be executed, same as in <a> |
|||
| <mi coord="2524,1573"/> |
|||
| No contents |
|||
| |
|||
|- |
|||
| <mode> |
|||
| Changes the execution mode |
|||
| |
|||
*id - The id of the new mode |
|||
| <mode id="CMGR"/> |
|||
| No contents |
|||
| Valid modes appear to be "GAME" (the usual execution mode) and "CMGR" (ignore all tags except another <mode> tag) |
|||
|- |
|||
| <output> |
|||
| Changes the typeface |
|||
| |
|||
*class - The typeface to be used |
|||
| <output class="mono"/> |
|||
| No contents |
|||
| Only valid values for class appear to be "mono" (fixed-width font) and "" (normal font) |
|||
|- |
|||
| <prompt> |
|||
| Signals a [[Status prompt|prompt]] |
|||
| |
|||
*time - A timestamp for the prompt |
|||
| <prompt time="1134928732">R&gt;</prompt> |
|||
| Sends the contents to the story window |
|||
| |
| |
||
|- |
|- |
||
Line 68: | Line 138: | ||
== Special handling == |
== Special handling == |
||
* Tags followed by newlines suppress the newline output to the screen except where noted above. |
* Tags followed by newlines suppress the newline output to the screen except where noted above. |
||
[[Category:Front Ends]] |
Latest revision as of 14:27, 3 February 2022
The Wrayth protocol is the XML protocol used to pass information between the game and a front end. It is currently used by the official Wrayth front end as well as the unofficial front ends Nexus and EclipseFE.
Tags
Tag name | Description | Parameters | Example | Contents | Notes |
---|---|---|---|---|---|
<a> | Displays a link that is clickable to obtain a menu of interaction options or to send a command |
|
a <a exist="-26211" noun="door">heavy ironwood door</a>
<a exist="-10374531" coord="2524,1741" noun="ARMOR">ARMOR</a> |
Displays the contents as a clickable link | Does not suppress following newlines
If coord is not specified, it is a menu, and exist and noun refer to the target of the menu. If it is specified, it is a command, and the exist and noun may be used in the command. |
<clearContainer> | Removes all text within the specified container window |
|
<clearContainer id="stow"/> | No contents | |
<clearStream> | Removes all text within the specified window |
|
<clearStream id="spellfront"/> | No contents | |
<d> | Displays a link that is clickable to send a command to the game |
|
<d cmd='gaze Ildran'>GAZE {self}</d> | Displays the contents as a clickable link | If the cmd parameter is omitted, will send the contents of the tag |
<inv> | Adds text to a container window |
|
<inv id='stow'> a <a exist="675003" noun="cards">deck of red and green cards</a></inv> | Appends contents (plus a newline) to the container window specified | |
<left>
<right> |
Changes the text of the left and right hand panels |
|
<right exist="674831" noun="dagger">dagger</right> | Sends the contents to the left or right hand panel | |
<menu> | Designates a menu |
|
<menu id="0" path=" in #84744238" cat_list="1 2 3 4 5 6 7 8 9 10 11 12 13"><mi coord="2524,1613"/><mi coord="2524,1651"/>...<mi coord="2524,1740"/></menu> | The contents should be a sequence of <mi> tags | id appears to cycle through the numbers 0-9
The path is the location of the item |
<mi> | Designates an item in a menu |
|
<mi coord="2524,1573"/> | No contents | |
<mode> | Changes the execution mode |
|
<mode id="CMGR"/> | No contents | Valid modes appear to be "GAME" (the usual execution mode) and "CMGR" (ignore all tags except another <mode> tag) |
<output> | Changes the typeface |
|
<output class="mono"/> | No contents | Only valid values for class appear to be "mono" (fixed-width font) and "" (normal font) |
<prompt> | Signals a prompt |
|
<prompt time="1134928732">R></prompt> | Sends the contents to the story window | |
<pushBold>
<popBold> |
Makes text bold until a matching <popBold> tag |
None |
<pushBold/>You have unread news articles.<popBold/> | No contents | Does not suppress following newlines
May nest |
<pushStream>
<popStream> |
Sends text to specified window if it exists (story window instead) until next <popStream> tag |
|
<pushStream id="logons"/> * <a exist="-10374531" noun="Ildran">Ildran</a> joins the adventure. <popStream/> |
No contents | May nest |
<spell> | Changes the text of the prepared spell panel |
|
<spell exist='spell'>Spirit Warding I</spell> | Sends the contents to the prepared spell panel |
Special handling
- Tags followed by newlines suppress the newline output to the screen except where noted above.