Skip to content

NC Contents

HowardBaxton edited this page Mar 27, 2020 · 48 revisions

There are several key words that nPose is looking for when processing lines within a notecard. These key words are as follows:

Animations

command required nPose Version
ANIM 0.xx - ∞
SCHMO 2.00 - ∞
SCHMOE 2.00 - ∞

Props

command required nPose Version additional requirements
PROP 3.00 - ∞ prop script V1.00 - ∞
PROPDIE 3.00 - ∞ prop script V1.00 - ∞
PROP (oldSyntax) 0.xx? - 3.19 prop script V0.xx - V0.99

Events

command required nPose Version additional requirements
ON_SIT 3.10 - ∞ nPose SAT-NOTSAT Plugin V3.10 - ∞
ON_UNSIT 3.10 - ∞ nPose SAT-NOTSAT Plugin V3.10 - ∞
TIMER 3.10 - ∞ nPose SAT-NOTSAT Plugin V3.10 - ∞
TIMER_REMOVE 3.10 - ∞ nPose SAT-NOTSAT Plugin V3.10 - ∞
SATMSG 0.xx? - 3.29 nPose SAT-NOTSAT Plugin V0.xx? - V3.29
NOTSATMSG 0.xx? - 3.29 nPose SAT-NOTSAT Plugin V0.xx? - V3.29

Other

command required nPose Version
DEFAULTCARD 3.00 - ∞
MENUPROMT 3.00 - ∞
OPTION 3.00 - ∞
DOCARD 3.10 - ∞
PLUGINMENU 3.00 - ∞

Other (Advanced)

command required nPose Version
LINKMSG 0.xx? - ∞
PAUSE 2.00 - ∞
UDPBOOL 3.00 - ∞
UDPLIST 3.10 - ∞
MACRO 3.00 - ∞
PLUGINCOMMAND 3.00 - ∞

Key words are always all capital letters.

_NOTE: FOR NOTES OR ANNOTATIONS WITHIN THE NOTECARD, BEST PRACTICE IS TO BEGIN THESE LINES WITH THE POUND SIGN (#).

ANIM

  • ANIM is a key word used by nPose to let it know this line contains seat definition information.
  • When nPose sees this key word it will delete all existing seat defines from memory and start over with the new lines to rebuild the seat defines.
  • ANIM is the only key word which nPose uses to create seats in memory.
  • One ANIM line within a card will define one seat being seat 1.
  • Two ANIM lines within a card will define two seats, the first line being seat 1, and the second line being seat 2. etc.

The syntax is as follows:

  • ANIM|animationName|<0,0,0>|<0,0,0>[|facial[|seat name]]

The syntax is written this way because there are 4 required elements (keyword, animation, position vector, and and rotation vector) and the other elements are optional.

The position vector is an offset to either the root prim or the prim that the slave script is located in, depending on [Global Setting adjustRefRoot](Setting Global Options). A line beginning with the key word ANIM will let the core know the rest of the line will contain information to animate and position an Avatar. More importantly, the use of this keyword is to tell nPose to setup a seat you will need in this pose set, multiple ANIM lines will setup multiple seats for this pose set. Similar to the notecard names, the core is expecting to see an element separator. In the menu names the separator is the colon but inside the notecard the separator is the vertical bar. The information we need to give the core within a line beginning with the key word ANIM consists of the following:

  • Key word (vertical bar) animation name exactly (vertical bar) position vector (vertical bar) rotation vector (vertical bar) optional any facials we want to run (vertical bar) optional seat name.

The animation name must match the name of the animation in the Contents tab of the edit window. Copy/paste is the most reliable way to add the animation name. The animation must also be in the contents of the prim.

Vectors are written as follows <0.0,0.0,0.0>, three numbers separated by a comma. <x offset, y offset, and z offset>.

To use facial animations you need the nPose Facial/Layering Plugin. Facial animations can be any of the internal animations found here: http://wiki.secondlife.com/wiki/Internal_Animations Call them by name. Multiple facials can be called by separating them with the tilde "~". To add a facial expression without a seat name, simply add it after the rotation vector as follows:

  • ANIM|animationName|<0,0,0>|<0,0,0>|facial

To add a seat name but no facial, the seat name is expected to follow facial expression in this line and must be written as follows:

  • ANIM|animationName|<0,0,0>|<0,0,0>||seat name

NOTE: The facials and seat names are optional. They do not have to be included for the rest to work.

If the core sees only one line in the notecard, it will setup nPose to have only one seat and handle only one seated Avatar. Any additional Avatars who attempt to sit will be booted off. To allow for more seats and thus more Avatars to sit, add additional ANIM lines to the notecard with their own set of information.

TOP

SCHMO AND SCHMOE

This changes the animation of a single sitter (SCHMO) or group of sitters (SCHMOE) without affecting any of the other sitters. SCHMO/SCHMOE lines cannot build a seat, they can only modify existing seat defines. This allows us to selectively modify seat defines while not modifying all. We are required to tell nPose which seat each lines is intended to modify.

NOTES:
THIS DOES NOT BUILD A POSE SET, IT ONLY CHANGES A POSE SET ALREADY BUILT USING THE KEYWORD 'ANIM'.
To use facial animations you need the nPose Facial/Layering Plugin.

The syntax is as follows:

  • SCHMO|seat#|animation|<0,0,0>|<0,0,0>[|facial|[seat name]]
  • SCHMOE|seat#|animation|<0,0,0>|<0,0,0>[|facial|[seat name]]

seat# = number value of the seat to be replaced.
animation = inventory name of animation
facial = any of the built in expressions found here: http://wiki.secondlife.com/wiki/Internal_Animations
seat name = How the seat is named in the change seat menu if no one is sitting in that spot

Since this function only replaces seats and does not add them there should be a DEFAULT: set defining the amount of seats available.

  • SCHMO lines can only be run when requested from the menu and requires a menu user's key.
  • SCHMOE lines are free from the menu user restriction and can be run from a plug-in or other such source.
  • When multiple SCHMO lines are in the same notecard, only the menu user's seats will change.
  • When multiple SCHMOE lines are in the same notecard, all these seats will change.

TOP

PROP (prop script <=V0.10)

Deprecated: use the prop script >=V1.00
This command works only for the prop script v0.10 and older. The syntax is as follows:

  • PROP|propName|<0,0,0>|<0,0,0>[|explicit|[quiet]]

The syntax is written this way to indicate that explicit and also quiet are optional.

NOTE: For nPose control of props, props must have the prop plugin within their contents. If not these props will stay rezzed until they are manually deleted by owner.

The position and rotation vectors are an offset referenced from the prim that the core script is in. The position vector can be anywhere within a sim the owner has permissions to build. A normal prop will live only as long as the pose set and will be deleted. The optional 'explicit' prop will live until explicitly told to die. The syntax for explicit die command:

  • PROP|propName|propName=die

The optional 'quiet' prop will have new position reporting suppressed. This is so that moving props do not flood local chat with information when props are meant to move (new in V2.01).

PROP

This command works only if you use the prop script V1.00 or newer.
The syntax is as follows:

  • PROP|propName|<0,0,0>|<0,0,0>[|groupNumber|[quiet]]

propName: string, the name of the object you want to rez.
propPosition: vector, position is an offset referenced from the prim that the core script is in. The position vector can be anywhere within a sim the owner has permissions to build.
propRotation: vector (euler, degrees), rotation is an offset referenced from the prim that the core script is in.
groupNumber: integer (0-15), default: 0, a freely chosen number. specialty: Props with the groupNumber 0 will die whenever the default NC or a NC with an ANIM command is read.
quiet: string, prop will have new position reporting suppressed. This is so that moving props do not flood local chat with information when props are meant to move.

The syntax is written this way to indicate that groupNumber and also quiet are optional.

NOTE: For nPose control of props, props must have the prop plugin within their contents. If not these props will stay rezzed until they are manually deleted by owner.

TOP

PROPDIE

This command works only if you use the prop script V1.00 or newer.
The syntax is as follows:

  • PROPDIE[|propNamesList[|propGroupsList]]

propNamesList: a comma separated list of names. You may use the asterisk as a wildcard. If you don't provide a propNamesList, all props are targeted
propGroupsList: a comma separated list of group numbers. If you don't provide a propGroupsList, all propGroups are targeted

A prop will die if its name AND group matches.

Examples:

PROPDIE
PROPDIE|*
PROPDIE|*|*

All three are equal: All Props will die.

PROPDIE|Red*,GreenApple
All props with a name beginning with "Red" (RedApple, RedTomato, ...) and additionally the "GreenApple" will die

PROPDIE|*|1,2
All props that are rezzed with the group number 1 or 2 will die.

NOTE: Please keep in mind that props rezzed with the group number 0 will also die whenever the default NC or a NC with an ANIM command is read.

TOP

LINKMSG

The syntax is as follows:

  • LINKMSG|arbNum|message[|%AVKEY%[|pauseTime]]

The syntax is written this way to indicate that %AVKEY% and delay time are optional.

LINKMSG lines are used to pass information to scripts that are looking to act when a specific arbNum is used. This information is intended to extend the normal functionality of nPose in some way (many times keying a plugin to do something).
LINKMSG lines execute as soon as they are processed from the notecard and the line information is discarded from within nPose.
The optional %AVKEY% is used when a specific command needs to know who touched the menu. This will grab the menu toucher's key and pass it along with the message.
The optional 'pauseTime' is specifically intended for use when a prop is rezzed and that prop needs time to rez and get scripts up and running before nPose sends a message to the prop (such as temp attach commands).

Note: Try hard to not use the 'pauseTime' (it is evil), use the TIMER command instead.

TOP

PAUSE

The syntax is as follow:

  • PAUSE|pauseTime

This pause is more of a global pause and will halt nPose execution of the remaining items within the notecard for the duration of the pauseTime.

Note: Try hard to avoid this command (it is evil), use the TIMER command instead.

TOP

ON_SIT

You need nPose V3.10 or higher for this to work
You need the nPose SAT-NOTSAT Plugin V3.10 or higher for this to work

The syntax is as follow:

  • ON_SIT|seatNumber|command

Example: ON_SIT|1|PROP|propName|<0,0,0>|<0,0,0> rezzes the prop propName if someone sits on a particular seat.

Note: This works like the old SATMSG but has an improved, more flexible syntax.
Note: If you use ANIM and ON_SIT commands in one notecard make sure to write the ON_SIT commands somewhere AFTER the corresponding ANIM command.

TOP

ON_UNSIT

You need nPose V3.10 or higher for this to work
You need the nPose SAT-NOTSAT Plugin V3.10 or higher for this to work

The syntax is as follow:

  • ON_UNSIT|seatNumber|command

Example: ON_UNSIT|1|PROPDIE removes all props if someone leaves a particular seat.

Note: This works like the old NOTSATMSG but has an improved, more flexible syntax.
Note: If you use ANIM and ON_UNSIT commands in one notecard make sure to write the ON_UNSIT commands somewhere AFTER the corresponding ANIM command.

TOP

TIMER

You need nPose V3.10 or higher for this to work
You need the nPose SAT-NOTSAT Plugin V3.10 or higher for this to work

The syntax is as follow:

  • TIMER|[(string)timerName]|(csv list)seconds|command

timerName: case insensitive, user defined name, can be empty. More than one timer with the same name is valid. Choose a name if you want to be able to remove the timer with TIMER_REMOVE.
seconds: you may supply multiple comma separated float values. Special: you may also supply a "r" followed by 2 float values to create a random value between the first and the second float value.
command: the command string

Example:
TIMER|myTimer|5.5|LINKMSG|5000|The timer triggered after 5.5 seconds
sents a LINKMSG 5.5 seconds after the timer started.
TIMER|myTimer|r,300,600|LINKMSG|5000|Triggered
Triggers at a random time between 5 and 10 minutes.
TIMER|myTimer|300,600,r,300,600|LINKMSG|5000|Triggered
Triggers at a random time between 5 and 10 minutes. Triggers also after 5 minutes and after 10 minutes.

TOP

TIMER_REMOVE

You need nPose V3.10 or higher for this to work
You need the nPose SAT-NOTSAT Plugin V3.10 or higher for this to work

The syntax is as follow:

  • TIMER_REMOVE[|(csv list)Names]

Names: a list of comma separated, case insensitive timer names which should be removed. A wildcard * is allowed at the end of each name. If you do not provide the NameList or the NameList contains the name * then all timers will be removed.

Example:
TIMER_REMOVE
TIMER_REMOVE|*
TIMER_REMOVE|whatever,*
this commands will remove all timers

TIMER_REMOVE|redApple : removes the timer with the name "redApple"
TIMER_REMOVE|redApple, green* : removes the timer with the name "redApple" and also all timers with a name beginning with "green"

TOP

SATMSG

Deprecated: Use ON_SIT instead
You need the nPose SAT-NOTSAT Plugin for this to work

The syntax is as follows:

  • SATMSG|arbNum|message[|id[|seat#]]

SATMSG lines are intended to do much the same work as a LINKMSG except they don't execute until someone sits a particular seat. SATMSG processing will automatically grab the sitter's key and pass it with the message. There are now two ways to associate a particular SATMSG with a particular seat.

  1. Place the SATMSG just below the ANIM line that the SATMSG should be associated with. There is no need to use the 'optional' seat# this way.
  2. Add the 'optional' seat# at the end of the SATMSG line. This will tell nPose which seat to associate the SATMSG with. If SATMSG lines are needed with SCHMOE/SCHMO lines, the 'optional' seat# becomes 'required'. If the 'optional' seat# is used, they can be placed in any order within the notecard.

TOP

NOTSATMSG

Deprecated: Use ON_UNSIT instead
You need the nPose SAT-NOTSAT Plugin for this to work

The syntax is as follows:

  • NOTSATMSG|arbNum|message[|id[|seat#]]

NOTSATMSG lines are exactly the same as SATMSG lines with the exception that NOTSAGMSG lines run when someone is no long in that particular seat or the pose set is changed.

NOTE: SATMSG and NOTSATMSG lines can now be used in SCHMOE/SCHMO notecards as long as the 'optional' seat# is used. nPose needs this seat# information to correctly associate them with a particular seat.

PLUGINMENU

The syntax is as follows:

  • PLUGINMENU|pluginName|[pluginMenuParameters[|pluginActionParameters]]

pluginName: the unique name of the plugin. Build in plugins are: npose_changeseat, npose_unsit, npose_pickseat, npose_offset

pluginMenuParameters: plugin specific parameters for menu creation

pluginActionParameters: plugin specific parameters for the action

If you want nPose to not remenu, please use the command PLUGINMENU|void. (In previous versions of nPose, this had to be done by adding a "-" sign at the end of the button name)

TOP

DEFAULTCARD

The syntax is as follows:

  • DEFAULTCARD|ncName

Use this command to define the default notecard. If it is set inside the .init notecard, the default nc will be run after a script reset. If you set the global option 2default=1, then the default notecard also runs when all sitters stand up (or the menu times out)

TOP

OPTION

The syntax is as follows:

  • OPTION|optionName=optionValue[|optionName=optionValue[|...]]

Use this in the .init notecard to set the Global Options.

TOP

DOCARD

You need nPose V3.10 or higher for this to work
The syntax is as follows:

  • DOCARD|cardName

Loads and executes a notecard after the current card is finished.

Example: DOCARD|SET:sit1

TOP

UDPBOOL, UDPLIST

The syntax is as follows:

  • UDPBOOL|udpName=udpValue[|udpName=udpValue[|...]]
  • UDPLIST|udpName=udpValue[|udpName=udpValue[|...]]

Defines a UDP (user defined permission)
Notice: Due a bug UDPLIST is not working in nPose V3.00

TOP

MACRO

The syntax is as follows:

  • MACRO|macroName=macroValue[|macroName=macroValue[|...]]

Defines a macro. Macros may be used inside permissions / menu prompt / button text / path / some menu plugins.

Example 1: Imagine a bus with a drivers seat and several passenger seats. Passengers should be able to change the seat to any other passenger seat but not to the driver seat. We use a macro for "grouping" the seat to a "driver" group and a passenger group inside the .init notecard:

MACRO|driver=1|passenger=2~3~4~5~6~7~8~9~10~11~12

We then create a notecard with the name SET:ChangeSeat{@passenger} (here we use the macro inside the permission to make sure that only a passenger will see the button) and the content:

MENUPLUGIN|nPose_changeSeat|@passenger

(and here we use the macro as a parameter for the nPose_changeSeat plugin)

TOP

MENUPROMPT

The syntax is as follows:

  • MENUPROMPT|theText

Defines the menu prompt.

Note: only use one MENUPROMPT line inside a NC. Permissions can not be used for the MENUPROMT command.

TOP

PLUGINCOMMAND

The syntax is as follows:

  • PLUGINCOMMAND|commandName|linkMessageNumber[|propFlag]

commandName: the command you want to define linkMessageNumber: the number you want to use propFlag: if set to 1 the command will also relayed to props

Defines a new NC command. Should be used inside the .init NC only.

TOP

Clone this wiki locally