Difference between revisions of "MD-500D/SL Features"

From
Jump to: navigation, search
(Created page with "== SL Features ==")
 
(Commands)
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
== SL Features ==
+
<span class=sa-section>SECTION 13. SL Features</span>
 +
 
 +
== Macros and Appliers ==
 +
 
 +
Macros and appliers can be used to execute fixed sequences of commands.  The commands are written in notecards with specific prefixes, "*apply:" for appliers, and "*macro:" for macros.  Both types of notecards are functionally equivalent and differ only in the command used to invoke them, and the intended use.  Appliers are intended to set texture and otherwise modify the visual appearance of the aircraft, while macros are intended to activate switches and controls to put the aircraft into a desired state.
 +
 
 +
=== Invoking ===
 +
 
 +
To invoke an applier, use the command:
 +
 
 +
apply seats-white
 +
 
 +
This will look for the notecard "*apply:seats-white" in the aircraft inventory, and execute commands from it.  Similarly, use the command:
 +
 
 +
exec auto
 +
 
 +
to invoke commands from the notecard "*macro:auto".
 +
 
 +
=== Commands ===
 +
 
 +
{| class=wikitable
 +
! Command
 +
!Description
 +
|-
 +
|PUSH ''asgns'' || Executes a list of ; separated assignments.
 +
|-
 +
|style="white-space:nowrap;" |APPLY ''prim'':''face'':''type''=''uuid'' || Sets the ''type'' on the specified prim and face to the specified uuid.  ''type'' can be one of diff/norm/spec for the Diffuse, Normal or Specular of legacy materials, or 'mat' for the PBR material.
 +
|-
 +
|MESG ''mesg'' || Displays the message ''mesg'' to the flight crew only.
 +
|-
 +
|SAY ''mesg'' || Displays the message ''mesg'' on local chat.
 +
|-
 +
|XPDR ''xpdr-cmd'' || Enters a transponder code, or executes a specific transponder command.
 +
|-
 +
|SLEEP ''seconds'' || Sleeps for the specified number of seconds.
 +
|-
 +
|CMD ''command'' || Executes ''command'' as if it where a command typed in local chat.
 +
|-
 +
|ONFAIL ''asgns'' &#124; ''mesg'' || Sets a behavior to execute when a REQUIRE command fails.  ''asgns'' is a list of assignments to perform, and ''mesg'' is a message to display to the pilot.
 +
|-
 +
|REQUIRE ''cond'' &#124; ''fail-mesg'' || Test to see if the condition ''cond'' is true.  If not, the message ''fail-mesg'' is displayed to the crew and the commands configured by the ONFAIL command are executed before the macro is terminated.
 +
|}
 +
 
 +
==== APPLY ====
 +
 
 +
SAY Applying white seat textures.....
 +
APPLY pilot-seat:0:diff=eeac5299-5b1a-c5f0-4b5d-c9a41cf69324
 +
APPLY pilot-seat:0:norm=1a28b8df-1aad-a7d0-e35a-1bf4c7b95dbe
 +
APPLY pilot-seat:0:spec=f242948b-59b8-6f9d-becf-6141579423eb
 +
APPLY pilot-seat:0:mat=489bb016-aaed-41e9-98e2-b39b0ba1c722

Latest revision as of 21:08, 14 March 2026

SECTION 13. SL Features

1 Macros and Appliers

Macros and appliers can be used to execute fixed sequences of commands. The commands are written in notecards with specific prefixes, "*apply:" for appliers, and "*macro:" for macros. Both types of notecards are functionally equivalent and differ only in the command used to invoke them, and the intended use. Appliers are intended to set texture and otherwise modify the visual appearance of the aircraft, while macros are intended to activate switches and controls to put the aircraft into a desired state.

1.1 Invoking

To invoke an applier, use the command:

apply seats-white

This will look for the notecard "*apply:seats-white" in the aircraft inventory, and execute commands from it. Similarly, use the command:

exec auto

to invoke commands from the notecard "*macro:auto".

1.2 Commands

Command Description
PUSH asgns Executes a list of ; separated assignments.
APPLY prim:face:type=uuid Sets the type on the specified prim and face to the specified uuid. type can be one of diff/norm/spec for the Diffuse, Normal or Specular of legacy materials, or 'mat' for the PBR material.
MESG mesg Displays the message mesg to the flight crew only.
SAY mesg Displays the message mesg on local chat.
XPDR xpdr-cmd Enters a transponder code, or executes a specific transponder command.
SLEEP seconds Sleeps for the specified number of seconds.
CMD command Executes command as if it where a command typed in local chat.
ONFAIL asgns | mesg Sets a behavior to execute when a REQUIRE command fails. asgns is a list of assignments to perform, and mesg is a message to display to the pilot.
REQUIRE cond | fail-mesg Test to see if the condition cond is true. If not, the message fail-mesg is displayed to the crew and the commands configured by the ONFAIL command are executed before the macro is terminated.

1.2.1 APPLY

SAY Applying white seat textures.....
APPLY pilot-seat:0:diff=eeac5299-5b1a-c5f0-4b5d-c9a41cf69324
APPLY pilot-seat:0:norm=1a28b8df-1aad-a7d0-e35a-1bf4c7b95dbe
APPLY pilot-seat:0:spec=f242948b-59b8-6f9d-becf-6141579423eb
APPLY pilot-seat:0:mat=489bb016-aaed-41e9-98e2-b39b0ba1c722