Thursday, November 13, 2014

Easy NPC and DeMythifying the NPC Bug


NPCs are a powerful way to grab the attention of visitors to your sims and an excellent tool for engaging and guiding them through a region. At Nara's Nook we use them to greet, to entertain, and to introduce visitors to our novels. They can be so lifelike and enchanting that you might think they are powerfully complicated to create. When I first started creating them, that was true.


But as I demonstrated at the OSCC conference, and in this tiny video clip, it's now possible to create an NPC with a mouse-click and position it in less than a minute. Simply dress in the way you want the NPC to look and click the ball.  The Script will copy your appearance and rez an NPC that looks like you. You can drag the ball around to position the character as you'd like. Click the ball to derezz or rez the character. 


Right click the ball and you see this demo version contains three things: script, appearance card (titled "My Dancer") and an animation. You can add animations to this and when the character rezzes it will cycle through the animation in the contents. You can delete the animation provided in the ball but it must contain at least one animation to work.

This is character creation at its simplest. It's easy enough for the newest of our newbies to do. It requires no knowledge of scripting or animating. It uses little in the way of system resources. 

This worked beautifully for us until, around the end of September, a change in an Opensim update caused trouble. We call it the NPC bug. I want to emphasize, this bug is not isolated to this script. We have duplicated it in every NPC generation method we use. Fred Beckhusen, who generates more NPCs than I do, discovered the bug first in his regions and he does not use the same scripts we use at Nook grid. So lets bury the myth here that any particular generation script is the source of the NPC bug.

1. What is the NPC bug?

It is a change in the newest development releases of OpenSimulator that will cause all scripts running in a region to die when an NPC wearing scripts is deleted. It does not happen every single time but happens enough that it is a headache.

2. What versions of OpenSim is this a problem for?

I first ran into after some patches were uploaded for 8.0.1 around end of September. If your version is prior to that, you should not see this bug.

3. Is there a way to avoid triggering the NPC bug?

Yes. We had some 34 NPC characters in our build for the OpenSim conference--all generated by a variety of means and some requiring scripts to fulfill their purpose. After the bug appeared we had to go back and remake every NPC to insure they did not trigger the bug and crash us at the conference. Read on and I will walk you through the kinds of NPC and how to avoid the bug with each.


If  it is a simple NPC created with a  poseball as I demonstrate in the video, follow this procedure before clicking the poseball to save your appearance.

1. Detach any HUD or AO you have on your viewer interface--recording appearance with those on will result in an NPC that triggers the bug.

2. Remove any facelight, club lights, etc. Lights are the biggest source of NPC crash.

3. It's easy to forget that many attachments might have hidden scripts. Jewelry, shoes, hair should be script free. Inspect all attachments for scripts.

4. When you are script free, it is safe to click your poseball and record your appearance.

Some NPC, like the fire dancer , require a scripted item. In this case the rotating texture in the animation could be deleted after the object was rezzed and retain the animated behavior. We used that as the work around for the lizard band too. The lizards were attached to a scripted rotating disc and set up to rez when someone was near and disappear when no one was close. We couldn't figure out why they triggered the bug when they disappeared because they had no scripts. Deleting the script from the disc they were attached to eliminated the issues and once the rotation is part of the object parameters there is no need to keep the rotation script anyway. The trick with having certain NPC only rez if someone is close is how we managed to cram 34 NPCs into a build and still alow enough resources for the sim to handle visitors. For large groups of characters like the lizard band and the NPC dolls that gave clues in Free the Hero, it was crucial that they only re when needed.


There are some characters, like Shannan Albright's dragon shifter, that can't function without their scripts. Those are the ones you have to set to be on all the time. In that way the NPC is only deleted when the region is shutting down.

If you make a mistake and generate an NPC that triggers the bug it's not the end of the world. Delete the object that rezzes the NPC and restart the region. All should be well again.

That should get you started creating characters in your builds while avoiding the NPC bug. Don't let the bug scare you away from the chance to experience all the wonderful fun adding interactive characters to your builds can bring.


You can find the original NPC poseball in a gift box beside the landing area at world.narasnook.com:8900. You can find a version with the capability to sense and rez for nearby avatars in Paradise region. That one is a green poseball set to copy. Set float radius in that script to a non zero number to enable sensing.

If you'd like to see our the Geeked-Out Fairytales NPC exhibit we built for the conference, you'll find a duplicate of that build loaded at world.narasnook.com:8900:Pandora.
 
My thanks to Mata Hari who wrote the script we use in the original poseball and to Fred Beckhusen who added to it to create the sensor version. You will find a more advanced and powerful NPC Controller and instructions on how to use that here at Fred's website.


Thursday, September 11, 2014

Safari XVII: Cats on Safari









This weeks Hops:

Destination 1 Wunderland in Metropolis  hypergrid.org:8002:Wunderland
Destination 2 Aire Mille Flux    grid.aire-mille-flux.org:8002
Destination 3 New Genres Grid  hg.ngrid.org:800

~Nara

Sunday, August 3, 2014

Lost and Found



Thirza Ember, Wirzardoz Chrome, Snowbody Cortes


If you could be anything?


Wizard Gynoid and Fuschia Nightfire
 Anyone?


Hypergrid Safari Gang at Safari Clubhouse Teravus Plaza OSGrid

What/who would you be? I've been experimenting four years now, trying to come up with an answer.

Nara in OSGrid avatar. Lost in FrancoGrid


The answers I've come up with are more internal than external.  I want adventures.



Pathfinder Lester (elephant's mouth), Serene Jewel, Miso Susanowa, Dharma Galaxy, Nara Nook and ?

 I want to be able to write anywhere...


Siobhan Muir and Me in my Nara's Nook avatar



Nara Nook: Did you ever imagine you'd one day be on an elephant and settling down to write?

Siobhan Muir: Not outside of India.

Nara Nook: Me either.

Nara Nook: Not even inside of India.
 I want to get lost in all the ways it is possible to get lost. 


Siobhan Muir and Nara in an OSGrid avatar at Sandbox Plaza III testing Bullet Physics Vehicles

With Siobhan doing the backseat driving and me doing the navigating, geographically-lost is a given.

Um...lost somewhere else.


I want to get lost in the dark depths of creativity, with new ideas blooming around me.
 Lost in the crowd.
 
Dance party at Dorena's World

I teleported into this and rezzed floating on my back above the crowd with lights flashing music blasting. Looking down on it, I thought this must be what Woodstock was like. Only this reality isn't drug induced.
And since I love to level up...

Nara LostWorld:Terrarium
  I can take lost to a whole new level at LostWorld Grid lostworld-os.com:8002:LostWorld
 
Terrarium


Lost in time...

LostWorld:Rome  There is a room with info displays on historical details

Roman Bath

Joe Builder, creator of LostWorld
 Lost in space...
 
Enterprise is the size of 4 256x256 meter regions

Wizard Gynoid takes charge.

Snowbody Cortes, Miso Susanowa, Wizard Gynoid look at home there.

Engine Room

Shuttle Bay

Klingon Ship:Bridge
And because we can still take lost to deeper levels....
Holodeck

Holodeck Garden Scene Rezzing

Nara lost in a new space in deep space.

Lost in a holodeck is my favorite place to be.

Go on a Hypergrid Safari with us or explore on your own. Immerse yourself and lose yourself in the adventure, the inspiration, the fun. Because it's only when you are willing to let go, lose yourself, that the real you can be found.


 ~Nara Malone


If you have never been to the metaverse, you can find out how to get there. If you need help figuring out those instructions you can message me as Nara Malone on Facebook, or G+

If you know all about the metaverse and have never been on Safari join the HG Safari Group on Facebook  or Hypergrid Safari on G+   There is a Sunday Safari leaving the clubhouse at Noon Pacific Time today. I'll be there. Will you?