Categories
Guide Tools

Non-Player Characters (NPCs)

Non-Player Characters, normally known as NPCs, are avatars that are created by the system rather than by someone logging into OpenSim. They look exactly like users’ avatars, but are controlled by the RezMela system. You can also interact with them to make them do simple tasks.

If your App contains the NPCs module in its library, you can create as many NPCs as you like (within limits – see below).

Available NPCs

When you click the Non-Player Characters category in the Create menus (assuming your App has the NPCs module), you will be given a list of sub-categories showing the different types of NPC available:

Let’s look at these NPCs in more detail

Men

This is the list of male NPCs in the Men category:

And here’s a closer look at their avatars:

Man 1
Man 2
Man 3
Man 4
Man 5

Women

This is the list of female NPCs in the Women category:

And here’s a closer look at their avatars:

Woman 1
Woman 2
Woman 3
Woman 4
Woman 5

Neon

This is the list of androgynous, alien-like NPCs in the Neon category:

And here’s a closer look at their avatars:

Neon Blue
Neon Green
Neon Red
Neon Yellow

Creating an NPC

When you create an NPC character, a white triangle appears like this, as a marker for the NPC’s home position:

and above the triangle, the NPC itself appears (the triangle is indicated by the red arrow):

You can select the triangle as with any other RezMela object, by long-clicking on it. If you move it, the NPC will automatically walk to the new position (as long as there are no obstacles in its way).

If you remove the triangle, the NPC will disappear too.

The NPC menu

You can control any NPC very easily. This is done through a blue menu, which you can obtain by clicking the upper body of the NPC:

You can see that the mouse cursor turns into a hand when you’re over the clickable area. Note that you don’t have to click them from the front – you can click them on the back or side, as long as it’s the upper part of the body.

Note that when an NPC is first created, it’s several seconds before clicking the NPC will have any effect. This is because the NPC is still registering itself with the RezMela system and cannot process the click yet.

Here’s the menu you will get:

In brief, the options have the following functions:

  • Follow Make the NPC follow you around
  • Select Select the NPC in order to perform functions such as sitting on objects
  • Hide text Hides the floating text that appears over the NPC’s head when the above functions are used
  • Remove Removes the NPC from the scene

Let’s look now at each of these functions in more detail.

Follow

The Follow option has the effect of making the NPC stay close to you. When you select the option, the NPC will walk to where you are and stand behind you:

Over its head is the floating text “Following [your name]”.

If you click them again, the Follow option will have changed to Unfollow:

Clicking Unfollow will remove the floating text and the NPC will stop following you. Note that the NPC will not move from that point, so you can use this to temporarily place NPCs by leading them to where you want them to stand.

You can have as many NPCs following you at once, although if you have several they might bump into each other as they try to get behind you.

Seating an NPC

The Select function can be used to make an avatar “sit” on an object. While some objects actually do make an avatar sit down (eg chairs), others use this function for other purposes, for example to make the avatar dance or do other animations. However, OpenSim uses the word “sit” to describe any of these.

For more information on seating, refer to the document Seating in RezMela.

When you click the Select button, the text “Selected by [your name]” appears over the NPC’s head:

You can only select one NPC at a time. If you have an NPC selected, and then you select another, the first NPC will be deselected.

If you click this NPC again, the menu will have changed and will show Deselect instead of Select:

Naturally, clicking Deselect deselects the NPC.

Now, let’s make the NPC sit on a chair. We’ll assume the chair is one that is designed to work with RezMela, and is part of the scene.

As the guide Seating in RezMela explains, when you hover the mouse cursor over a sittable object, the cursor changes to a hand and a chair, like this:

This tells you that if you left-click, your own avatar will be seated on the chair. But what we need to do is to seat the NPC.

So to do that, we right-click, which gives us a menu something like this:

Note that different viewers might present the menu in different ways, and that some options may not be present.

Now move the mouse cursor onto the Touch option in that menu, and left-click there. The NPC will then sit on the object:

If you then click the NPC again, the menu has a new option, Stand:

Of course, clicking this will make the NPC stand up, or otherwise stop using the sittable object, and any animations to stop.

Hide text

As you know, if you use Select and/or Follow, this is displayed in text floating above the avatar’s head:

Sometimes you might not want to see that, for example if you’re using the NPC to create scenes for images or videos you’re producing.

Clicking the Hide text option on the NPC’s blue menu will remove the text. The option will change to Show text, which will reveal the text again:

Note that this applies to all NPCs in your scene – you don’t need to hide or show each one’s text separately.

NPCs limit

RezMela automatically limits the number of NPCs you can create in order to prevent overload. By default, this is set to 100, but can be overridden by the App’s creator.

If you create more than the App’s limit, RezMela will remove NPCs at random until the limit is no longer reached. In this case, you will see the white triangles without their associated NPCs, as in this image:

Automatic removal

If there are no users (i.e. non-NPC avatars) in the region, and an App has NPCs in the scene, all of the NPCs will be temporarily deleted until a user re-enters the region, when they will all appear again.

The reason for this is to avoid situations whereby a user creates so many NPCs that when they leave the region they are unable to return (receiving instead the “region full” error message).

Removing the NPCs takes up to a minute, so if you are unable to return to the region because of “region full”, simply wait a minute or two and try again. The NPCs will reappear within around 15 seconds after you arrive.