Scripting Features

  • Search existing ideas before submitting
  • Use support.secondlife.com for customer support issues
  • Keep posts on-topic
Thank you for your ideas!
(Web)sockets
As a high-performant and modern alternative to the llHTTPRequest and llRequestURL , (web)sockets would be a great addition. It will allow objects and HUD elements to have direct bi-directional communication with back-end server software. The same can be achieved with the existing HTTP methods, but it requires a lot of effort to implement. The (web)sockets would have to be proxied through the Linden Labs servers just like the HTTP requests to avoid the leaking of IP addresses. If websockets are to be used, the benefit of HTTPS certificates exist for a secure connection. I am not requesting (web)sockets in the script to act as a server like llRequestURL , but for the script to always be the client to an external server (though feel free to implement that as well!). The functions could look like: key llSocketOpen( string url /*, Other options... */ ); llSocketSend( key id, string data ); // llSocketSend does not need a 'key' to return; packets identify themselves llSocketClose( key id ); The events could look like: socket_receive( key id, string body ) {} socket_close( key id, integer code ) {} // Code would follow the standard, but code '0' could be "closed by own script". There could be events for when the socket is opened or errors, too. In that case the llSocketOpen function can be non-blocking. Example code: key handler; default { state_entry() { handler = llSocketOpen( "wss://example.com:8081" ); llSocketSend( handler, "Hello world!" ); } socket_receive( key id, string body ) { if( id == handler ) { llSocketClose( id ); } } socket_close( key id, int code ) { if( id == handler ) { if( code == 0 ) { llSay( 0, "The socket was closed by us!" ); } elseif( code > 0 && code <= 99 ) { llSay( 0, "The socket was closed by the Linden proxy with code: "+ (string)code ); } else { llSay( 0, "the socket was closed by the remote server with code: "+ (string)code ); } } } }
5
·
tracked
llGetInventoryLastOwner
(or llGetInventoryAddedBy, or - ... But I'll stick to the semantics of "last owner" for presentation's sake) Scripts can act on object inventory and objects can be configured to accept inventory from any source ( llAllowInventoryDrop ), as well as from agents with permission to modify the owner's objects. Being able to interrogate object inventory entries for their last owner would be good addition to scripting - it would make CHANGED_INVENTORY and CHANGED_ALLOWED_DROP events more able to richly react to the users causing them, as well as allowing for (slightly) better behavior security. Objects have a property OBJECT_LAST_OWNER_ID but this can only be interrogated (in script land) with llGetObjectDetails, while the object exists in the world. It would be nice if this property was: available on all kinds of asset, for inventory, set when it is added to an object's inventory, accessible via a key llGetInventoryLastOwner(string item) function; the same theme as llGetInventoryCreator . ---- Snipped from a followup- I think this additional surface would help put inventory metadata stuff to bed. They're less important since the information can be determined by holding state and introspection, but I feel reasonable in assuming keeping this stuff transiently in the event queue versus many disparate user implementations and in memory + serializations would be cheaper for everyone. If inventory changed event triggers don't batch the count + index stuff is unecessary, but I haven't checked and I feel like dropping a folder into an object will be counted as as single event. These would be meaningful only within CHANGED_INVENTORY and CHANGED_ALLOWED_DROP events in the same vein as llDetected*. integer llGetInventoryRemoveCount() -- 0..N, the number of removed inventory entries. string llGetInventoryRemoveName(integer index) -- "" or when llGIRC is nz and 0 <= i < N, the name of removed entry i. At this point the entry is no longer present in the object. integer llGetInventoryRemoveType(integer index) -- INVENTORY_NONE or when llGIRC is nz and 0 <= i < N, the INVENTORY_TYPE of the removed entry i. At this point the entry is no longer present in the object. integer llGetInventoryAddCount() -- 0..N, the number of added inventory entries. string llGetInventoryAddName(integer index) -- "" or when llGIAC is nz and 0 <= i < N, the name of added entry i. integer llGetInventoryAddType(integer index) -- INVENTORY_NONE or when llGIAC is nz and 0 <= i < N, the INVENTORY_TYPE of the added entry i.
6
Load More
→