Saturday, February 9, 2013

Writing LSL in Emacs

LSL Editing in Emacs with ECB and lslint
Recently, I've moved from working mostly in Windows to being on a Mac.  I'm mostly enjoying it, but I miss my favorite LSL editor, aptly called LSLEditor.

The problem is LSLEditor is written in C# and it uses several things that don't play nice in Wine, so it just won't work on my Mac.

LSLPlus is dead, and LSLForge appears to be continuing the effort.  But, I don't like Eclipse.

There's a VI mode for LSL.  And a lsl-mode.el that's woefully out of date on the Second Life wiki.

And then there's Emacs, which most of the time I shy away from.  Yet, for some reason, I fell in love with CEDET and ECB.  The screenshot is my effort to get something similar to a working environment in UNIX, specifically Mac OSX.  But this also works fine in any Linux environment or Cygwin.

I can't debug like I could with LSLEditor.  And because of that, I may give this up and instead see how hard it would be to port LSLEditor to Java.  But I'm pretty happy with what I see here so far.

Tuesday, January 15, 2013

Calamari - yum!

For years, I've been using sl_proxy.  But lately, it doesn't work so great with Third Party Viewers.  I've been forced to not only use Firestorm, but have to compile my own special version to force Firestorm to think I'm on the main grid rather than an OpenSim grid.

Now, I like Firestorm, but I don't like being forced to use any particular viewer because of my lame ISP.

Why do I use sl_proxy?  Because of the texture cache.  I have  limited bandwidth and slower network speeds than most people.  Since textures don't change, I want to be able to keep them locally.  If I can do that, then I can load them quickly if I revisit a place I've been to before.

The other day, I was browsing around and came across this article and decided to try it out.  So far, it's working great!  And it seems much faster than sl_proxy.  The big test comes with Mesh, tho.  I have had nothing but trouble trying to see mesh with sl_proxy.  I can see it fine when I connect directly.

RealLife's been too busy for me to really test it yet.  So, I'll update this post once I have a chance to see someone decked out in a mesh avatar.

=^.^=

Thursday, December 27, 2012

Lumiya - My second favorite Second Life Viewer

I can't believe I haven't blogged about this already.  For about the last six months, I've been mostly living in SL with Lumiya, an Android-based Third Party Viewer.  I love this app.  It has quite literally changed my Second Life because I can be there more often.

Lumiya is written by my dear friend Alina Lyvette.  She's done some real magic here, tackling that huge Second Life viewer and making it work on a smartphone.  I mean, real magic.  Lumiya runs on devices as old as my original Droid from Motorola.  I just recently upgraded to a Droid RAZR M, and Lumiya purrs along, smooth as silk. 

New World Notes has a nice article on it, with some recent screenshots as well as a video clip so you can see how animations look.  New World also links to Inara Pey's blog on Lumiya.

Lumiya doesn't do everything, yet.  It doesn't show group invitations, for example.  You can't voice with it.  But, you can stream media.  Alina is actively working on it, making it better with each release.  And, it's just her!  No one else works on it.  Simply amazing.

If you have an Android smartphone, and you like to be in SL when you're away from your normal viewer, get Lumiya.

If you have a QR scanner, you can just scan this to get your copy!  Otherwise, look for it on Google Play.  If you need help with Lumiya, please email support@lumiyaviewer.com and join the Lumiya Support Group in SL.
Lumiya Viewer on Google Play

Sunday, July 1, 2012

OpenCollar - Fixing the Longfall Cuffs - Chains

I love the Longfall 8cuff set.  But any of us who've used them know that the chains won't work right.  At least, not with LockGuard.  It's unfortunate, but easy to fix if you're comfortable editing prims.  They're no-transfer, so you have to do this yourself.  But it's not that hard.  Here's how:

First, your cuffs must be unlocked.  You can't edit them if they're locked.  If you don't own the keys, you'll have to get permission to have them unlocked while you do this.

Second, sit on a toy that will use them.  Or, I suggest you at least turn off your AO so your avatar doesn't move around much as you try to click on prims.

If you sit on a toy, you'll see that the right wrist works.

Let's start with fixing the left wrist.  Right click on the left wrist cuff and choose edit.  It should get a haze around it and the Edit dialog box comes up.  You might see one prim that's yellow.  That's the root prim.  We don't care which is the root prim in this case, so ignore it.

Around the cuff are four little U shaped attachment points.  We need to edit one of those.  So, in the edit dialog box, choose the "Edit Linked" checkbox.  Now, you can select individual pieces of your cuff.  Select one of the attachment points now.

Find the name under the "General" tab of the Edit dialog.  We're looking for the one named "ollac".  Next, choose the Contents tab.  Inside you'll find a notecard called "Lockguard V2 Config".  Open it and change the contents to be what I have below.   You're after the ID lines, which I've bolded.

ID leftwrist
ID wrists
ID allfour
texture 245ea72d-bc79-fee3-a802-8e73c0f09473
size 0.07 0.07
life 1
gravity 0.3

Congratulations!  You've just fixed your left cuff!  Now chains will properly attach to it.  If you're sitting on a toy, cancel the animation and re-sit.  You should now see chains.

Now you need to do the same thing with the other cuffs.  Even though the right one seems to be working, open it and edit it to have the lines I have below.

Right Wrist

Prim Name: rcuff
Notecard

ID rightwrist
ID wrists
ID allfour
texture 245ea72d-bc79-fee3-a802-8e73c0f09473
size 0.07 0.07
life 1
gravity 0.3

Right Ankle

Prim name: rllc
Notecard
ID rightankle
ID ankles
ID allfour
texture 245ea72d-bc79-fee3-a802-8e73c0f09473
size 0.07 0.07
life 0.5
gravity 0.3


Left Ankle:

Prim name: lllc
Notecard:
ID leftankle
ID allfour
ID ankles
texture 245ea72d-bc79-fee3-a802-8e73c0f09473
size 0.07 0.07
life 0.5
gravity 0.3

Wednesday, June 13, 2012

32,767 views!

I admit, this is a totally geeky thing for me to post, but my blog hit 32,767 views today.  =)

What's so great about that number?  Well, back in the days of DOS, it was the highest number that you could store in an variable.  I'm oversimplifying, but it's a nerdy thing.  Now, you can store HUGE numbers.  But, I've a certain fondness for this one.

Thursday, February 9, 2012

MLPv2 Chains Plugin done!

Yay!  I finished it last night.  Well, maybe "finished" is too strong of a word.  I got all the planned features working and there doesn't appear to be any big problems with it.  I'm sure there are bugs and I'll have to figure those out.  It's a little more chatty than I like and I'm hoping to reduce that.

Next, I'll be adding some RLV support and sounds.  The devPose toys I've seen have a nice little chain sound when poses are changed.  I made one for mine, too.

I might be able to use the RLV plugin for MLPv2, but I haven't really reviewed it yet.  It looks pretty complete at a glance, so that's encouraging.

After that, it's off to spend money on animations and build in a couple of toys.  The first two will be a pair of suspension poles for one and probably a St. Andrews Cross.  Once those are done and I decide how I'm going to handle updates, I'll put my Pocket Dungeon up for sale.

Monday, October 10, 2011

Prim Count Halver - COOL!

My friend Sei and her pet Angel have released one of the coolest things I've seen in SL.  It's a Prim Count Halver that does some really neat voodoo magic and can cut a linkset's prim count down by up to half.

The script Sei sell is copy, no-trans.  You simply drag a copy of the script into your build and *POOF* it's about 1/2 the prims on your land.

Sounds too good to be true?  Well, everything has a catch, unfortunately.  Two things happen to the linkset that are unavoidable.
  • The linkset becomes phantom.  The root prim can be set non-phantom, but the rest of the build is phantom.
  • No scripts may exist in the object.  None.  Zip.  Zero.
 Another thing to note is that the prim savings you won't see in the object.  The library chair, for example, reports it's 21 prims before and after.  But, if you look at the land use of prims, that's the number that magically goes down.

This script is perfect for those who are trying to save prim counts on static objects, such as walls or store fronts.  Remember, the root prim can be set non-phantom, so it's possible to put an invisible solid box around whatever you've made to keep people from walking thru it.

Tuesday, October 4, 2011

Just some random thoughts

  • I really need to move to some adult land.  I'm working on some furniture that will use RLVibe and my little in-world place is rated Mature.  It's ...unwise... to even think of demoing any products at my current in-world store.  But it's so expensive!  :(
  • Having a cold sucks!  And I think I just might suffer from SAD.  It's starting to rain again and I'm really, really dreading the upcoming weeks without sunshine.
  • I need to get back to work on RLVibe.  I've kind of stalled because I've too many things I want to do and can't seem to focus on just one.
  • I can't wait for NaNoWriMo.  I'm also dreading it.
  • My other love, Anarchy Online, seems to be dying.  I logged in after being away for a bit and it was a ghost town.  So sad...

Friday, September 9, 2011

RLV Scripting - Determine RLV version

Updated 9/15 - Thanks, Sei!

As I start to work with LSL a bit more, specifically with RLV, I thought I might share some scripts.

These first scripts will be for objects that are owned and worn by the avatar.  Interacting with furniture requires a relay and a slightly different way of doing things.

First thing, you should learn how to determine if RLV is present and enabled on the client.  The quickest way for one avatar to ask another avatar if they have RLV is to IM them "@version" (without the quotes).  If they have RLV on, they will auto-respond with the version number -- it won't even show up on their client.  If they don't have RLV, they're going to see that you sent them that message and probably ask what you're doing.

Scripts do this the same way, but they use llOwnerSay("@version=<channel>"); where channel is a channel your script is listening on.


This first script I call rlvCheck and it's meant to be called by another script wishing to know whether or not RLV is enabled and what version.  NOTE: This is an example script.  Bundle this into a larger script, or do more in just a single script to keep script counts down.

integer RLV_VERSION = 24767;
integer RLV_VERSION_REQUEST = 24768;
integer rlvCheckCount = 0;
integer rlvMaxCheck = 3;
float rlvCheckDelay = 30.0f;
integer rlvHandle;

checkRLV()
{
    rlvCheckCount = 0;
    rlvHandle = llListen(RLV_VERSION, "", llGetOwner(), "");
    llSetTimerEvent(rlvCheckDelay);
    llOwnerSay("@version=" + (string)RLV_VERSION);
}

default
{
    state_entry()
    {
        checkRLV(); // Do this to announce the RLV version to listening scripts in the same object
    }

timer()
{
    if (++rlvCheckCount >= rlvMaxCheck)
    {
        llListenRemove(rlvHandle);
        llSetTimerEvent(0.0f);
    }
    else
        llOwnerSay("@version=" +  (string)RLV_VERSION);
}

    listen(integer channel, string name, key id, string message)
    {
        if (channel == RLV_VERSION)
        {
            llListenRemove(rlvHandle);
            llSetTimerEvent(0.0f);

            string version = llList2String(llParseString2List(message, [" "], []), 2);
            list lTemp = llParseString2List(version, ["."], []);
            string major = llGetSubString(llList2String(lTemp, 0), -1, -1);
            string minor = llList2String(lTemp, 1);
            llMessageLinked(LINK_THIS, RLV_VERSION, major + minor, NULL_KEY);
        }
    }

    attach(key attached)
    {
        if (attached != NULL_KEY)
            checkRLV();
    }

    link_message(integer sender, integer msgType, string message, key id)
    {
        if (msgType == RLV_VERSION_REQUEST)
            checkRLV();
    }
}
A caller script that would use this might do something like:
integer RLV_VERSION = 24767;
integer RLV_VERSION_REQUEST = 24768;
integer rlvCapable = FALSE;
default
{
    state_entry()
    {
        llMessageLinked(LINK_THIS, RLV_VERSION_REQUEST, "", NULL_KEY);
    }

    link_message(integer sender_num, integer num, string message, key id)
    {
        if (num == RLV_VERSION)
        {
            rlvCapable = TRUE;
            llOwnerSay("Restrained Love v." + message + " detected");
            restoreRestrictions(); // a function to re-apply any restrictions
            return;
        }
    }
}
 Now at this point, the script will know if RLV is available after one and a half minutes.  What I usually do is cause RLV restrictions to be restored as soon as I know what the version is.

And the numbers I chose for the communication channel are just random ones I thought of -- there's nothing special or reserved about them.  I did found out that they can't be negative.

Thursday, July 28, 2011

How to turn on RLV in Firestorm

 Several people have asked me how to turn on RLV in Firestorm.  It isn't on by default.  There are a couple of ways to do it.

If you find this page helpful, please click the +1 button at the bottom.  =^.^=

Quick
From the menu, Avatar -> Preferences -> Firestorm -> General -> Allow Remote Scripted Viewer Controls (RLVa), then restart Firestorm.

Advanced
  1. Turn on your Advanced menu.  You can turn them both on by going to Avatar -> Preferences -> Advanced and then check "Show Advanced Menu"
  2. On your Advanced menu, near the bottom, tick "RestrainedLove API (RLVa)".
  3. Near the middle is a section for RLVA and if you expand out that menu you can:
  •  List restrictions
  • Enable objects to give to your #RLV folder (great for traps, being forced to wear items, etc.) -- some traps will give you an outfit and force you to wear them.  One that comes to mind is in Kitten's Castle where you're turned into a marble statue.
  • Show debug messages - this is really useful when writing RLV scripts.  It's also nice to have on just so you know when something RLV is being done to you by either a person or object.
A quick and easy way to check if you've got RLV enabled is to ask someone to IM you with just the text: "@version" (without quotes).  If RLV is enabled, you won't see it, but they'll see something like:
Kittin Ninetails (busy response): RestrainedLove viewer v2.7.0 (Firestorm 3.0.1.22566 - RLVa 1.4.0)


Remember, you'll need a relay to interact with objects.  Take a look at my Quick RLV tutorial.  And if you want to try something really fun, go to Marine's maze and try to find your way out.  And don't cheat! =^.^=

Also, here's a link to a video for Installing and Activating RLV in Various Third Party Viewers.  The first part of the video covers installing Marine's RLV on Windows and how to copy the voice files over.  If you install my Linux or Mac builds, these are installed for you.  At about 7 minutes into the video, Trix explains how to turn on RLVa in Phoenix and Imprudence.  Trix has another good video on the #RLV folder.  Actually, Trix has quite a lot of good videos, but those are the two I saw that relate to this page.