Skip to content

NC Contents

HowardBaxton edited this page Mar 18, 2021 · 35 revisions

nPose now has the ability to set a permission for each and every command line used inside any notecard. I've named this a 'Line Permission' rather than a Button Permission. With Line Permissions we can now have far more control over if and when any command will be run.

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 - 3.10
SCHMO 2.00 - 3.10
SCHMOE 2.00 - 3.10
SEAT_INIT 4.00 - ∞
XANIM 4.00 - ∞

Props

command required nPose Version additional requirements
PROP 3.00 - ∞ prop script V1.00 - ∞
PARENT_DO 4.00 - ∞ prop script V4.00 - ∞
PROP_DO 4.00 - ∞ prop script V4.00 - ∞
DIE 4.00 - ∞ prop script V4.00 - ∞
TEMPATTACH 4.00 - ∞ prop script V4.00 - ∞
POS 4.00 - ∞ prop script V4.00 - ∞
ROT 4.00 - ∞ prop script V4.00 - ∞
COPY 4.00 - ∞ prop script V4.00 - ∞
PROPDIE 3.00 - 3.10 prop script V1.00 - ∞

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 - ∞
ON_ENTER 4.00 - ∞ nPose SAT-NOTSAT Plugin V4.00 - ∞
ON_EXIT 4.00 - ∞ nPose SAT-NOTSAT Plugin V4.00 - ∞
ON_NEW 4.00 - ∞ nPose SAT-NOTSAT Plugin V4.00 - ∞
ON_LOST 4.00 - ∞ nPose SAT-NOTSAT Plugin V4.00 - ∞
ON_ALL_EMPTY 4.00 - ∞ nPose SAT-NOTSAT Plugin V4.00 - ∞
ON_ALL_FULL 4.00 - ∞ nPose SAT-NOTSAT Plugin V4.00 - ∞
ON_ALL_NOT_EMPTY 4.00 - ∞ nPose SAT-NOTSAT Plugin V4.00 - ∞
ON_ALL_NOT_FULL 4.00 - ∞ nPose SAT-NOTSAT Plugin V4.00 - ∞
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 - ∞
DEF 4.00 - ∞

Other (Advanced)

command required nPose Version
LINKMSG 0.xx? - ∞
PAUSE 2.00 - 3.10
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 EACH LINE WITH THE POUND SIGN (#). NOTES AND ANNOTATIONS MUST BE ON A SEPARATE LINE FROM KEY WORD COMMAND LINES.

ANIM

NOTE: ANIM is no longer available for use in V4. Instead use SEAT_INIT and XANIM.

The major function of the ANIM line was to create the information about each seat in memory to animate each sitting Avatar. New in V4.00 is a simple command to create an empty set of information for a given number of seat information(s). See SEAT_INIT for usage.

TOP

SCHMO AND SCHMOE

These key words are not recognized in V4 and are replaced by XANIM.

TOP

XANIM

XANIM works exactly as a SCHMOE line would in previous versions of nPose. nPose will run every XANIM line in the notecard but does not mean that the number of XANIM lines need to equal one for every seats. This means that we can change poses for some (but not necessarily all) sitters in any one card.

Looking at the overall picture of what is happening, XANIM lines cannot create a seat in memory but it can replace (update) the seat information which is currently in memory. The seats must exist already and is created by the simple command of SEAT_INIT. SEAT_INIT will create bare bones seat information which is not enough information to allow a sitter to be animated and will likely not be allowed to sit. See SEAT_INIT for usage.

nPose will execute every XANIM line it sees in a single notecard. Strongly advised to update all seats in the DEFAULTCARD so that all sitters have complete seat information before they sit. Otherwise they will not be allowed to sit.

The syntax is as follows:

  • XANIM|seat#|csvlist animationName|<0,0,0>|<0,0,0>[|facial]

The syntax is written this way because there are 5 required elements (keyword,seat#, animationList, position vector, and and rotation vector) and the other element (facial) is optional. The list of animations allows us to add bento animations to be run with the normal Avatar animation.
In previous versions of nPose we were able to supply one other optional bit of data which was the seat name. If you wish to change the seat names which are used in the Change Seats sub menu, use the DEF command.

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.

Similar to the notecard names, the core is expecting to see an data 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 XANIM consists of the following:

  • Key word (vertical bar) seat# (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 where the Slave script resides.

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](https://github.com/nPoseTeam/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 "~".

Couples or groups of seats:

See How-To using Couples setup HERE.

In any one notecard, any number of XANIM lines are allowed up to the total number of seats created by the SEAT_INIT. This offers the option of changing a group of seat information, such as a couple.

  • NOTE: It has been found that unless a full set of seats information is not given in the DEFAULTCARD to completely populate the seats information with XANIM lines, nPose will not respond to a new sitter in unpopulated seats correctly (or not at all).

Singles sitters within a group of sitters:

See How-To using Multiple Singles setup HERE.

The process of allowing each sitter to select a pose (SCHMO action replacement) goes like this:

  1. Create XANIM lines in a notecard for all of the seats that will be limited to the menu users' UUID.
  2. Adjust the pose for each of the seats.
  3. Use a 'line permission' following the XANIM in each of the lines: XANIM{seat#}|seat#|animationName|position vector|rotation vector|| . This will only run the single XANIM line associated with the seat# where the menu user is seated.

TOP

SEAT_INIT

The syntax is as follows:

  • SEAT_INIT|numberOfSeatsRequired

The SEAT_INIT is a required command if this build will have sitters. The only purpose of this command is to create a place in memory to hold information nPose needs to animate a seated Avatar.

The best place for SEAT_INIT line is inside the .init notecard. It can go inside other notecards but unless for some reason the number of seats needed for this build changes, use the .init notecard.
Look HERE for the minimum required lines in the .init notecard.

TOP

PROP

See How-To using PROP setup Rezzing and Derezzing Props and Animesh as a Prop.

This command works only if you use the prop script V1.00 or newer.
Version 4.00 of nPose requires prop script V4.00 or newer.
The syntax is as follows:

  • PROP|propName|<propPosition>|<propRotation>[|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 XANIM 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.
This command has been removed with the release of nPose V4.00. See DIE instead.

TOP

PARENT_DO

PARENT_DO is a way to send commands from props back to the parent for execution of said command.

The syntax is as follows:

  • PARENT_DO|nPose command

TOP

PROP_DO

There is a significant change in the way nPose rezzes and communicates with props (all things rezzed). There is one script (nPose Prop Plugin V4.00) that handles rezzing and communications (both sending and receiving), thus the prop plugin must be added in with the main scripts (for rezzing and sending/receiving data) and in the contents of all things rezzed (props, temp attach items, click to temp attach items, and attach items). This is everything except the Adjusters.

The PROP_DO command is used in all notecards when it is vital to send commands and such to props from the main build.

The syntax is as follows:

  • PROP_DO|propName|csv propGroup|propNameSpace|nPose command

The propNameSpace will most likely always be blank. PROP_DO supports the "*" wildcard for "ALL" in both the propName and in the csv propGroup.

An example of how to make all props die:

  • PROP_DO|*|*||DIE This command will remove all props, including attached or temp attached due to * wildcards for propName and propGroupNumber.

TOP

DIE

The DIE command works on all props including attach and temp attach. Use it in conjunction with PROP_DO and you can specify by name and/or prop group number.

  • PROP_DO|*|*||DIE

TOP

TEMPATTACH

See How-To using TEMPATTACH setup HERE.

Temp attach is now handled via the prop plugin, thus add the prop plugin to all temp attach items. Also use with PROP_DO.

The syntax is as follows:

  • [TEMP]ATTACH|target[|attachmentPoint[|allowInsecureMessages[|PermissionRequestTimeout[|AttachTimeout]]]]

    target: Avatar UUID or seat number
    
    attachmentPoint: integer, see http://wiki.secondlife.com/wiki/LlAttachToAvatarTemp
    
    allowInsecureMessages: if a prop gets temp attached to a user different to the nPose object owner,
      the communication from this prop to its parent is blocked per default for security reasons.
      But there may be some cases where you want to allow the communication to the parent.
      0: (default) no communication to the parent if the owner changes.
         This is secure.
      1: communication to the parent is allowed if the prop is set to noMod for next owner.
         This should be fairly secure *** as long as the prop doesn't rez any new prop ***
      2: communication to the parent is allowed.
         This is totaly unsecure and allows the next owner to control your nPose Object
    PermissionRequestTimeout: float, seconds, default=60; If set to 0: no timeout -> the prop will not die
    AttachTimeout: float, seconds, default=5; (From the LSL wiki: The attach step is not guaranteed to succeed) If set to 0: no timeout -> the prop will not die
    
    _**_NOTE:  The optional settings work just fine with their default settings and in almost all cases can be ignored._**_
    

    For example, use the following line to temp attach a sword to the right hand:

PROP_DO|sword|||TEMPATTACH|%AVKEY%|6

target can either be user's uuid or a seat#

Use ATTACH if the goal is to send the attach item to the user's inventory and attach from there.

TOP

POS

POS moves the Prop to position pos, where pos is in "NC" coordinates (relative to parent object and to be scaled if the scale flag is set). Use in conjunction with PROP_DO.

The syntax is as follows:

  • POS|pos

An example which will move the prop named 'apple' to position <1.0, 2.0, 1.0>:

  • PROP_DO|apple|||POS|<1.0, 2.0, 1.0>

TOP

ROT

ROT rotates the Prop to the rotation rot, where rot is in "NC" coordinates (relative to parent object).

The syntax is as follows:

  • ROT|rot

An example which will rotate the prop named 'apple' upside down <0.0, 180.0, 0.0>:

  • PROP_DO|apple|||ROT|<0.0, 180.0, 0.0>

TOP

COPY

This command copies the items from the parent inventory to own inventory (all types but scripts). This is similar to what the adjuster does when a pose is changed.

The syntax is as follows:

  • COPY|item[|item...]

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.

It is recommended to use PLUGINCOMMAND rather than LINKMSG because it is self documenting as well as added benifits including ease of configuring data information in a notecard line.

TOP

PAUSE

Removed in V4.00

TOP

ON_SIT

You need nPose V3.00 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 this particular seat.

TOP

ON_UNSIT

You need nPose V3.00 or higher for this to work

The syntax is as follow:

  • ON_UNSIT|seatNumber|command

Example: ON_UNSIT|1|PROP_DO|*|*||DIE removes all props if someone leaves this particular seat.

TOP

TIMER

You need nPose V3.00 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.00 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

ON_X

You need nPose V4.00 or higher for this to work
You need the nPose SAT-NOTSAT Plugin V4.00 or higher for this to work

ON_X commands are seat specific (unlike ON_SIT and ON_UNSIT which is notecard specific). Once an ON_X command is set, they remain set until either an empty command of like are issued or when .init card is run. Thus the .init is the perfect place for these commands.

The syntax is as follows:

  • ON_ENTER|csv seat#s|nPose command
  • ON_EXIT|csv seat#s|nPose command
  • ON_NEW|csv seat#s|nPose command
  • ON_LOST|csv seat#s|nPose command
  • ON_ALL_EMPTY|nPose command
  • ON_ALL_NOT_EMPTY|nPose command
  • ON_ALL_FULL|nPose command
  • ON_ALL_NOT_FULL|nPose command
command when triggers
ON_ENTER triggers if someone enters a specific seat
ON_EXIT triggers if someone leaves a specific seat
ON_NEW triggers if someone new sits on the object
ON_LOST triggers if someone unsits from the object
ON_ALL_EMPTY triggers when all seats were not empty but now are empty
ON_ALL_NOT_EMPTY triggers when all seats were empty but now are not
ON_ALL_FULL triggers when all seats were not full but now are full
ON_ALL_NOT_FULL triggers when all seats were full but now are not

TOP

SATMSG

Use ON_SIT instead
TOP

NOTSATMSG

Use ON_UNSIT instead
TOP

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

Go HERE for a list of the options available to use.

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 the contents of a notecard after the current card is finished.

Example: DOCARD|SET:sit1 or DOCARD|thisCard. Meaning nPose will run any card, even if that card does not have a menu button.

TOP

UDPBOOL, UDPLIST

The syntax is as follows:

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

Defines a UDP (user defined permission)
UDPBOOL is a singe boolean (0/1) name-value pair. UDPLIST is a list of name-value pairs.
See How-To set up and maintain UDPBOOL.

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

commandName: the command you want to define linkMessageNumber: the number you want to use

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

TOP

DEF

The syntax is as follows:

  • DEF|keyword|seat#=setting[|seat#=setting]

Keywords (case insensitive):

seatName, seatPerm, animName, animPos, animRot, animFacials, animNcName, animCommand, sitterKey, sitterType, sitterName

As you see from the list of parameters, there are only a couple of them that even make sense to change, unless you're very daring (seatName and seatPerm).

seatName is the seat name we see in the list of open seats in the Change Seats menu.

  • DEF|seatName|1=One|2=Two|3=OuthouseLeft|4=OuthouseRight

seatPerm could prevent others from sitting a certain seat and reserve that seat for the owner for example.

  • DEF|seatPerm|1=owner|2=group

TOP

Clone this wiki locally