👩‍💻 Scripting changes coming soon

News from the Second Life Team – January 2024 Edition

 

Happy New Year! We’re off to a great start to the year at the Lab and happy to share more Second Life updates with you. You’ll find news on scripting additions, PBR Materials, Project Viewers, and an update on the Second Life Mobile Private Alpha program. Enjoy!

A handful of new, useful scripting features will be getting released in the coming weeks:

llComputeHash

LSL’s old llMD5 function has a significant flaw: it always adds a “:” character to the input string. This makes it useless for most hashing purposes. Enter: llComputeHash! This new function can generate a hash of an input string using any of the following hashing algorithms: md5, md5_sha1, sha1, sha224, sha256, sha384, and sha512.

 
default {
touch_start(integer count) {
string message = your-test-message-here;
 
list algorithms = [md5, md5_sha1, sha1, sha224, sha256, sha384, sha512];
 
integer algorithmCount = llGetListLength(algorithms);
llOwnerSay(message=’ + message + );
 
integer i = 0;
for (i = 0; i < algorithmCount; ++i) {
string algorithm = llList2String(algorithms, i);
string hash = llComputeHash(message, algorithm);
llOwnerSay(algorithm + = + hash);
}
}

llGetNotecardLineSync

You know how it takes an incredible amount of time for your furniture to boot up after resetting its scripts? Argh! Yeah, it’s annoying, and likely due to your sofa/throne/maypole reading configuration from one or more notecards in its inventory.

The new llGetNotecardLineSync function makes loading data from notecards in object inventory much faster by providing a synchronous access method with the caveat that the notecard must be in the region’s asset cache.

 
string NOTECARD_NAME = notecard;
key gLineCountId;
 
default {
state_entry() {
// Request number of notecard lines.
gLineCountId = llGetNumberOfNotecardLines(NOTECARD_NAME);
}
 
dataserver(key id, string data) {
if (id != gLineCountId) { return; }
 
integer count = (integer)data;
integer i;
for (i = 0; i < count; ++i) {
string line = llGetNotecardLineSync(NOTECARD_NAME, i);
if (line == EOF) {
llOwnerSay(—EOF—);
}
else if (line == NAK) {
llOwnerSay(—NAK—);
}
else {
llOwnerSay(line);
}
}
}

BTW, if you’re interested in knowing more about the scripts that power a huge amount of Second Life’s furniture, vehicles and more check out the open source AVsitter project. 🪑

llGetCameraAspect, llGetCameraFOV, and llWorldPosToHUD

Several functions have been added to help content creators position HUDs:

  • llGetCameraAspect – Returns the aspect ratio of the wearer’s screen as a float (width/height)
  • llGetCameraFOV – Returns a float value for the current camera’s field of view
  • llWorldPosToHUD – Returns HUD position of an in-world object
 
integer gHasPerms = FALSE;
 
function printCameraInfo() {
float aspect = llGetCameraAspect();
float fov = llGetCameraFOV();
llOwnerSay(aspect = + (string)aspect + FOV = + (string)fov);
}
 
default {
on_rez(integer a) {
llResetScript();
}
 
state_entry() {
llRequestPermissions(llGetOwner(), PERMISSION_TRACK_CAMERA);
}
 
run_time_permissions(integer perms) {
if (perms & PERMISSION_TRACK_CAMERA) {
gHasPerms = TRUE;
printCameraInfo();
}
}
 
touch_start(integer count)
{
if (gHasPerms) {
printCameraInfo();
} else {
llRequestPermissions(llGetOwner(), PERMISSION_TRACK_CAMERA);
}
}

Scripting roadmap

Status of these upcoming changes and more are visible on Second Life’s new public road visible at feedback.secondlife.com. If you have ideas or feedback on the scripting system check out the Scripting Features and Scripting Bugs boards.

🧪 Project Viewers

😀 Emoji

This viewer is also in RC and is based on a contribution by Kitty Barnett, and adds the ability to insert emojis in text chat.

Maintenance W

This Viewer brings many fixes (see list here), including a fix to a long standing issue with voice failing after quickly restarting your viewer

Maintenance X

This Viewer brings many usability improvements, including:

  • Saving you some clicks by allowing the deletion of folders containing worn items. 
  • In case you only wish to detach, Alt+Shift+R will now detach selected attachments so you can remove those less fashionable items at rapid speed.
  • The time format has been changed to show the more superior SLT instead of PDT.
  • The group join fee will be shown when leaving a group so you can be extra sure you want to leave it.
  • Shift+Alt+N will now open the Notifications floater 
  • Group notices can now be accessed directly from the People floaters Groups tab. Hover that mouse cursor over the group name for access.
  • Group notices will now default as being sorted by date with the newest first 

Maintenance Y

With this Viewer, you can now preview your outfit photos when hovering your cursor over outfits in the Outfit floater. You can also now remove locations from history via the context menu located in the Places floaters Visited tab.

image4.png

See the list of additional fixes here.

Default Viewer

🎨 GLTF PBR Materials

At the end of November, we announced in this blog post that PBR became available grid wide! The PBR Materials project brings increased realism and enables bringing GLTF content into Second Life with expected results. Now you can create scenes with real reflections which mimic how our eyes have learned to identify that a surface is metal, plastic, or some other material. Whether you create objects in Second Life or simply enjoy seeing and wearing them, PBR Materials will provide a big step up in the appearance of the Second Life world.

Individually faceted disco ball reflections
image1.png

As of January 8th, 2024, the PBR Materials Maintenance 1 viewer became the default viewer for Second Life. See Release Notes here. There are 17 new Materials available in the Library so you can start building with PBR today!

📱 Mobile Update

On December 12th, we announced our Mobile Private Alpha, bringing the richness of the Second Life virtual world to your Android or iOS mobile device. Qualifying Premium Plus members can apply now for the Private Alpha. If you are Premium Plus, you can learn more at this link.

Check out this video if you haven’t already!

We’ve had an incredible amount of interest, so if you’ve applied but haven’t been added yet, you’re still on our list. Future testers will be added and notified as the Private Alpha continues to expand. Thanks again for your patience as we process the ongoing demand and we look forward to your participation!

Have A Great Weekend From All Of Us At Zoha Islands/Fruit Islands

SL Share’s Photo Upload Feature is Temporarily Down

Hot off the SL Blog Presses regarding photo share and Facebook:

by Community Manager Linden Lab on ‎03-20-2014 11:29 AM

 

Facebook recently contacted us to let us know that the Photo Upload feature of SL Share is not permitted to automatically include location SLURLs in posts made from the application. We’re working with them to get a hotfix out ASAP, but in the meantime the Photo Upload feature in SL Share will not work, as Facebook has temporarily disabled that part of the application. SL Share’s Status Update and Check-In features will continue to work.

When SL Share’s full functionality is restored, SLURLs will no longer be included when you share a picture using Photo Upload, but you will still be able to let your Facebook friends know where to join you in Second Life by using the Check-In feature.

We apologize for the inconvenience this may cause you and are working to get a fix out ASAP.  We’ll use this blog to keep everyone posted with any updates and will of course let you know once the issue is resolved as well. Thank you for your patience.

Posted by: Suzanne Piers, ZI Social Media Manager