MLPV2 Tutorial

From Second Life Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Setting up MLPV2

These instructions look long, but it's easier than it looks. Here's the overview:

  1. get the scripts and install them in a prim
  2. put your anims in the same prim
  3. Create and edit one or more .MENUITEMS.* notecards (use whatever you want for "*"). Configure menus and add poses to the menus. Mostly the same as old MLP, with enhancements and no need to edit the main menu.)
  4. Reset and try the menu
  5. adust each pose (same way as old MLP)
  6. dump memory and save positions in notecard (nearly same way as old MLP; sellers may want to use modular .POSITIONS.* files)

These instructions are oriented for someone setting up a new object. However, those who bought one and are adjusting it or adding poses can simply skip the obvious steps that the maker would already have done.

Get the scripts

Get MLPV2 (empty) from SLExchange. Cost, L$1. I also recommend the configured example for L$100.

Take a good look at the .readme file.

Install scripts

Either copy its contents into inventory and then into your furniture, or else edit the prim and use it in your bed. Life is easiest if you use the root prim for MLPV2; instructions below for when it's not. For your first try, stick with root prim and keep life simple. (An easy way to add it to an existing bed is to just float it slightly above your mattress and then apply a totally clear texture, available in any freebie depot.)

Click the MLPV2 prim so that it starts up for the first time. If you get a menu, fine; you've already done this.

Install animations

Drag all the anims you'll use into the prim. (You can pull these out of poseballs you like. If the animations are no-copy, this will render the poseballs useless.)

Create and edit your .MENUITEMS.* file

Create a new notecard, named ".MENUITEMS.mystuff", where "mystuff" can be anything you want. MLPV2 can take any number of these, and bed sellers can make different pose sets for different customers. For now we'll make just one, and talk about "pose packs" later. Drop this notecard into the object -- though you might want to do most of the editing first -- objects with lots of things in inventory react slowly to changes, and you might have a lot of animations.

Create a menu:

MENU MyMenu | ALL | PINK | BLUE

This creates a menu whose button in the top menu will be labeled MyMenu. ALL indicates that it will be accessible by everyone (alternatives here are GROUP, only allowing people in the same group as the object, or OWNER, only allowing the owner). After that, list each ball color for the poses in this menu. You can have up to four balls. If you have some solo poses, some couples poses, and some 3some poses, they have to be in different menus.

In this example, a pink and a blue poseball will be rezzed.

For each pose in this menu, add a line like this:

POSE pose1 | anim1 | anim2

where

pose1 will be the button name for this pose.
anim1 is the name for the animation for the first poseball (which happens to be pink in our example)
anim2 is the name for the animation for the second poseball (which happens to be blue in our example)

For facial expressions, you add a suffix to the animation names indicating the expression. Note that you don't change the actual name of the animation in the inventory, you just add the suffix in this configuration notecard. These are explained under MLPV2 Expressions below. For a simple example, appending "*" will give an astonished open-mouth expression.

The following can also be included in your menu:

STOP
SWAP
BACK
TOMENU MyOtherMenu

STOP makes a button labeled STOP that de-rezzes the poseballs and unsits everyone. SWAP makes a button labeled SWAP that exchanges the first two balls. It currently has no effect on any 3rd or 4th ball. BACK makes a button labeled BACK that goes back to the previous menu. TOMENU makes a button labeled MyOtherMenu, which goes to another menu (which you must create).

With MLPV2 (assuming you're using the .MENUITEMS that comes with MLPV2 rather than an old MLP configuration), any MENU that is not found in a previous TOMENU entry is added to an empty slot in the top menu. I'll talk more about this below, under MLPV2 Submenus.

It's a good convention to end each menu with the following:

SWAP
STOP
BACK

For MLPV2 (again, assuming you're using the .MENUITEMS that comes with MLPV2 rather than an old MLP config), buttons are placed in the menu in the same order they appear in the config notecard. To convert to using this new (sane) menu order, see here: [1]

Tip! By convention, the top, "main menu" often includes buttons such as OPTIONS, SHUTDOWN, etc, as well as buttons providing access to the sub-menus.

Don't attempt to put actual poses here. They may work sometimes, but the right number of balls won't always get generated for them here, depending on where the user was before. If the user was in a Solo submenu with one ball and comes back up to the top menu level and selects there a pose with two balls, the second ball won't be generated, because the main menu doesn't have any directives about the number of balls to generate.

You may wish to add at this top level a HELP button.

The configuration would be something like this:

LINKMSG HELP | 1,-4,987789,-Help for XYZProduct##Here's your help notecard

Then just drop in the ~give script add-on found here MLPV2_Give_Item_Add-on

It might be better to name the help notecard something other than just "Help", so that your users can identify it more easily when it ends up in their inventories.


Continuation menus

As we all know, you get at most 12 buttons in an SL menu. However, with MLPV2.1, you can have more than 12 buttons in a configured MENU. If there are more than 12, MLPV2.1 will automatically add a MORE--> button after the 11th item, leading to the remaining choices. (And also after the 22nd item, etc.)

If you wish MLPV2.1 to automatically a BACK button, add the parameter AUTOBACK in your .MenuItems config card. It doesn't matter where it is, but convention is to put it near the top.

Note that a BACK button will not be added to the top, main menu (because there is no further back there to go back up to.) Nor will it add it to the last page of a series of sub-menu pages, or to a single-page sub-menu -- you must add the word BACK yourself manually to these if desired.

Menu Reset

Save your changes. (If you're editing a copy in inventory, install it in the MLPV2 prim).

Click the MLPV2 object. If this is the first time since you installed the scripts, it will start up and read the configurations. If you get a menu, select OPTIONS -> ShutDown -> Menu Reset. This button causes it to re-read all .MENUITEMS.* files, including yours.

Watch for warning messages. The most common one is due to an animation being missing or misspelled in the configuration. Fix any mistakes and do another Menu Reset.

Click to get the menu. You should see the button for your new menu; click it. You should see the menu you configured. Click the first pose. You should see the right number and color balls appear. They may be in odd places.

Tip! Note that RESET will not re-read positions from the positions card. Only PosRest and RESTART will.

The default pose

The "default pose" is a set of poseball positions and orientations that is used for any new pose, since new poses don't have saved positions yet.

The default pose in the MLPV2 distribution assumes that the MLPV2 prim is essentially an unrotated box, flattened and stretched like a mattress cover. If your prim is rotated (as is likely if you're using a flattened cylinder lying on its side for the mattress, and MLPV2 is in the mattress), you will want to adjust the default pose so none of the balls are underground.


Go to main blue menu and select adj-default -> default.

Tip! If you don't have this choice, see here: [2]


If the default pose looks fine (4 balls arranged in a square, avs sitting facing each other), skip this step.

If the default pose looks wrong, adjust it following the instructions below, as for any pose you would add. You may have to be clever to get at balls that might end up under the floor or buried in your object.

When saving the default pose as described below, be sure to save it to the .POSITIONS notecard, rather than to your .POSITIONS.mystuff notecard.

Adjusting poses

MLPV2.2 and earlier Use the menu to select whichever pose you want to adjust. If it's a new pose, it will get the default pose. Have avatars sit on the poseballs. Use the menu OPTIONS -> Adjust Pos to make the poseballs visible and easy to select for editing. (They get long and translucent, so we call them "beams".)

Select the beams and orient them as desired. When done, use the OPTIONS -> SavePos button.

You may continue with the next pose, or re-adjust this one. When someone stands, their poseball will go back to the normal shape. Just click the AdjustPos button to make it a beam again.

The AdjustPos button's only affect is to change the size and appearance of the poseballs. Feel free to adjust positions by selecting the clear tiny sat-upon poseballs and moving them, if you prefer.

MLPV2.3 and later Select OPTIONS -> Adjust Pos at any time. Whenever anyone is sitting on a poseball, it will be long and translucent to be easy to find and select. We call these "beams". Participants can hop on and off balls at any time during adjustment.

Select the beams and orient them as desired. When done with a pose, simply select the next pose. The current pose's position is automatically saved. Also, you can save the current pose's position at any time using OPTIONS -> Save Pos.

To undo changes to the current pose, just select it again. Alternatively, just quit adjusting.

To quit adjusting, make sure the current pose is saved (if desired), and use either STOP or OPTIONS -> Adjust Pos. (Stop will also delete the balls and pop off any participants.)

Saving pose positions

NOTE WELL: The SavePos button saves the position in MLPV2 memory. A reset will cause it to forget, as will taking it into inventory and rezzing it again, even if it's no-copy. End users will probably want to save the changes, and sellers will need to.

[NOTE! It is for this reason that the .POSITIONS notecard should be ideally released to customers as MODIFY. Note as well, though, that if a notecard is placed in a no modify prim, people will not be able to open the notecard at all, regardless of the perms on the notecard. This is a SL system limitation.]

Saving pose positions, new object

Follow these instructions if this is a new object and you plan to sell it and possibly a line of related objects with MLPV2 poses. There is a simpler way for end users, below.

Create a .POSITIONS.mystuff notecard, where mystuff matches your .MENUITEMS.mystuff file name. (This isn't absolutely required, but makes life simple and I will assume that convention is followed in this tutorial.)

Use OPTIONS -> MemDump to dump all the positions. Using the chat history window, copy the text between the "-----" lines, which looks something like this:

MLPV2 (empty): {pose1} <... numbers ...>

It may include a timestamp.

Paste them into your notecard. It is not necessary to delete the stuff before {pose1}, but you can if you like things tidy.

Delete the {stand} line. Delete the {default} line. (Note: if you changed the default pose, save this line in .POSITIONS notecard.)

Save, and OPTIONS -> ShutDown -> PosReset. This causes the .POSITIONS.* files to be re-read, including yours.

That's about it; now you're ready to test your poses. Have fun!

Tip! If the PosReset button is not offered, look for the RESTART option. Note that RESET will not re-read positions from the positions card. Only PosRest and RESTART will.

Saving a single position that you've updated

When you use OPTIONS -> SavePos for, say, pose1, you'll see a line in chat looking like this:

MLPV2 (empty): {pose1} <... numbers ...>

There may be a timestamp. You can copy this line and replace it in the corresponding .POSITION.* file (e.g., the one already containing this pose's position).

Saving pose positions, simplified version for end users

If you're adjusting an object you bought that's already set up, and you've adjusted a lot of poses, this is the easiest way to save all your changes. Note, however, that if your product has pose pack modules and you might want to remove one to make room for other add-on poses, this might not be the best way.

Use OPTIONS -> MemDump to dump all the positions. Using the chat history window, copy the text between the "-----" lines, which looks something like this:

MLPV2 (empty): {pose1} <... numbers ...>

It may include a timestamp.

Paste them into the .POSITIONS notecard, replacing its previous contents. It is not necessary to delete the stuff before {pose1}, but you can if you like things tidy.

Delete all other .POSITIONS.* files in the MLPV2 prim's inventory.

If you later decide to delete a pose pack (a .MENUITEMS.* file) with poses you won't use, you can still do that. The positions for those poses will still be in the .POSITIONS notecard, and you can feel free to delete them manually.

Deleting adj-default menu button

Once you're happy with the default pose positions, simply delete .MENUITEMS.zz-default from the MLPV2 prim's inventory. You can always put it back by dragging that file from the MLPV2 distribution.


PROPS (MLPV2.1)

Props are objects that your MLP product will rez for poses. For any pose, you can have at most one prop. When you choose another pose or hit STOP, any rezzed prop disappears. If you delete the MLP object, any prop will disappear within 3 minutes.


1) Start by adding these two buttons to your MLP menu (You may wish to put them under the OPTIONS menu.)

  • LINKMSG DumpProps | 0,-4,1,DUMPPROPS // dump all prop configs
  • LINKMSG SaveProp | 0,-4,1,SAVEPROP // save position/rotation for a prop

Save your work.


2) Have to hand a prim prop object that you want to rez.

3) Add to this prop object the "~prop" script (you'll find this inside the supplied "~pillow" object ), and drop your prop object into the MLP prim's inventory. Note: the prop object and everything in it will need to be copiable for next owner -- otherwise, it will only ever rez once for them!

4) Now, edit a .PROPS notecard or add a new one (named .PROPS.* where * is anything, for a modular config.) Copy this example line and paste it into your .PROPS file.

| mypose | myobject | <1,1,1>/<0, 0, 0>

  • Replace "mypose" with the name of the pose that the object should rez for.
  • Replace "myobject" with the name of the prop object. The object name cannot contain vertical bars.

Save your work.

5) Use the MLP menu's PosReset or RESTART button. When the MLP has restarted, select the pose that you set the prop for. The prop should appear. It might be underneath the MLP object, or some distance away, so look around -- it may be best to do this using a single prim MLP floating in the air, the first time.

6) Edit the prop, and use the editing arrows to move the prop to where you want it. Then, use the MLP menu button called "SaveProp" that you created earlier. To make the change permanent, select the text in the chat line (including the first vertical bar, and optionally any text before it) and replace the corresponding line in your .PROPS* file. Or, do all your props, saving their positions, and then use the DumpProps button. This works the same way as saving positions in .POSITIONS* files.

7) To get MLP to reread .PROPS* files, use PosReset (which resets positions as well as props), or RESTART.

Keep in mind that props and positions are saved separately, so if you adjust a pose and its prop, you need to save both pose position and prop.



Lear Cale 10:31, 14 May 2008 (PDT)