Scripting Features

  • Search existing ideas before submitting
  • Use support.secondlife.com for customer support issues
  • Keep posts on-topic
Thank you for your ideas!
Add a Text Rendering Method
Add a new function LSL function named llRenderText or similar, which allows users to dynamically render text, with limited but flexible formatting, onto the face of their choosing. Concept: // Signature llRenderText(integer face, string text, list params); // Basic example llRenderText(ALL_FACES, "Lorem ipsum...", [ FONT_ALIGN, "right", FONT_WEIGHT, "bold", FONT_FAMILY, "sans serif" ]); Rationale Text is ubiquitous, yet Second Life has no way for users to display text other than uploading a texture, setting floating text using llSetText , or using relatively resource intensive solution such as XyText/Furware/et al. This absence precludes interesting features, such as being able to create a responsive interactive terminal in Second Life, HUDs with dynamic text, etc. A scripted and efficient text solution that displays on the face of a prim/mesh would give Second Life the biggest bang for the buck: Limited in scope (easier to implement than grand UI-creation ideas) Easy to kitbash into existing and new creations For inspiration, you can look to how the Text Display widget is implemented in the Playstation game Dreams. It has limited options: a finite number of fonts and formatting options, but the fact that it can be combined with other content makes it rather powerful. Other details Font color, opacity, glow, etc are controlled by prim properties (Example: setting face color to red sets font color to red) Questions Should the background always be transparent? Creators could put another prim behind the text display face to give it a background, or it could be a property of the render params. Possible Parameters FONT_WEIGHT FONT_STYLE FONT_FAMILY FONT_VERTICAL_ALIGN FONT_HORIZONTAL_ALIGN FONT_TEXT_WRAP FONT_LINE_HEIGHT FONT_SIZE Possible Features Markdown / rich text
37
·
tracked
Make the “Explore in IDE” launch target configurable instead of hard-coding
### Problem When the user activates Explore in IDE (or any other tight-integration launch path), the viewer always constructs and opens this URI: vscode://lindenlab.sl-vscode-plugin/connect?port=…[&object=…][&script=…] This is hard-coded in: indra/newview/llscripteditorws.cpp - LLScriptEditorWSServer::buildVSCodeURI() - LLScriptEditorWSServer::launchVSCode() There is currently no way for a user (or another external editor) to change which application is launched. Every time the modern WebSocket path is started via the UI, VS Code is forced to open even if the user is using a different editor that already implements the JSON-RPC protocol documented in doc/external-editor-json-rpc.md . This is especially annoying for developers who keep another compliant editor running and only want the viewer’s WebSocket server to start / publish an object. ### Proposed change Rename the preference checkbox Current label contains “VS Code”. Change it to something neutral, e.g. “Code Tight Integration” (or “Tight Editor Integration”). Add an optional text field under the same “Script Development” section, visible when tight integration is enabled: - Setting name suggestion: ExternalWebsocketSyncLaunchURI (or ExternalEditorLaunchURI ) - Default value: vscode://lindenlab.sl-vscode-plugin/connect - The field should accept any URI scheme that the OS can open (or a full executable path + arguments if that is preferred). - The viewer should append the existing query parameters ( ?port=… , &object=… , &script=… ) to whatever base the user supplies, exactly as buildVSCodeURI does today. Update the launch path Replace the hard-coded string in buildVSCodeURI() / launchVSCode() with a read of the new setting. Keep the current default so existing VS Code users are unaffected. Documentation Update the “VS Code Launch URI” section in doc/external-editor-json-rpc.md to describe the configurable base URI and the parameters that are still appended by the viewer. ### Benefits Any external editor that understands the documented JSON-RPC protocol can be launched directly from “Explore in IDE”. Users who already have their preferred editor running can leave the field empty or point it at a no-op / custom handler so that only the WebSocket server is started. The official VS Code plugin remains the zero-configuration default. Removes the product-name-specific wording from the preferences UI. ### Related code / history Introduced in the tight-integration work (see PR #5834 and the VS Code launch helpers added in llscripteditorws.cpp ). Settings already present: ExternalWebsocketSyncEnable , ExternalWebsocketSyncTightIntegration , ExternalWebsocketSyncPort .
2
·
tracked
(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
Load More
→