LSL to write/update/change notecards needs to exist
Willow Curry
I'm not sure why this is still not a thing, but for a long time, Second Life's data in scripts is like playing an RPG without a memory card, and no way to save. There's a lot of valuable information that is relegated to variables, where if something breaks and the script needs to be reset, or something needs to be moved and placing it down resets the script, all of that information is gone.
Right now, the only other option is to set up an external data server to send and receive information from, and that's overkill.
Implementing a way to store, edit, and erase data from a notecard within an object would grant us the following at the least:
- Dynamic data storage: Scripts could save and update information without requiring manual editing of notecards.
- Improved configuration management: Scripts could automatically update configuration parameters stored in notecards, making it easier to maintain and modify object behavior.
- User data persistence: Objects could store user-specific data, allowing for personalized experiences without manual intervention.
- Storing with script restarts: Right now, there is no way to restart a script and still store the information inside without the use of an external webhost.
- Extended variable use: Too many variables can make a script problematic. Notecards could allow for storing and recalling them as needed to a far easier degree.
- Simplified data sharing: Scripts could generate and distribute notecards with custom content to users or other objects, facilitating information exchange.
- Reduced script memory usage: By offloading data to notecards, scripts could potentially use less memory for storing large amounts of information.
- Enhanced debugging and logging: Scripts could write log data or debug information to notecards for easier troubleshooting and analysis.
- Dynamic content creation: Objects could generate and update notecards with current information, such as player statistics or in-world event details.
We need the ability to write to notecards. I'm shocked we don't have this yet but it feels like not having this as an option does a great disservice to creators and customers in Second Life.
Log In
IceCold Skytower
You can store a lot with Linkset Data, and you can also stuff things in prim descriptions, color, primitive parameters of a torus, etc. Very much inspired by old computers and limitations.
Oh and Experience Keys can also store some information that becomes gridwide available with the Experience
Madi Melodious
IceCold Skytower Yes, with the introduction of linksetdata this has become less of a important issue.
Peter Stindberg
I feel you, Willow Curry, and was the same "How can it NOT exist! What an oversight!", until I saw the light, until I learned to live with the tight restrictions of LSL, until I learned to think outside of the box, to come up with smart ideas. Once I saw the light, my code improved. LSL is challenging us, it's the true endgame, and you need to give yourself to the challenge, walk through the fire, and come out victorious, a scripter forever changed.
That said, as respected scripters Fenix Eldritch and Bavid Dailey said, LSD is the way to go these days. It gives you 128 kbyte of persistent storage, pampering us in ways unheard of for LSL before, and when used properly, will not let you yearn for notecard-writing anymore.
(Hope it shows up this time)
Jamesp1989 Resident
Peter Stindberg except making user changable settings is an incredible pain with LSD and you need a menu pop up for every setting you want changed. For that to be viable we would need a much more robust menu system. Probably wont get that till client side lua though
Madi Melodious
Jamesp1989 Resident This is not really the case. When I need to make changes to linksetdata in bulk, just enter it into a notecard and read it into place. Then remove the notecard.
I personally wrote several functions that let you use linksetdata as replacement for lists
Fenix Eldritch
Writing to notecards is not allowed because the act of updating one actually creates a brand new notecard asset under the covers. The previous asset is not deleted - any may never be deleted if it's still referenced by something else.
From the wiki: "
The assets themselves are immutable (they never change, they are only ever created and deleted); this allows multiple inventory handles to refer to the same asset without having to duplicate the asset. When it appears an asset is being modified, it is saved as a new asset. The consequence of this is that multiple copies of items in inventory all share the same asset UUID.
"To allow scripted creation of assets would flood the asset servers into oblivion with such "updates".
Better to use LinksetData as Bavid suggests. It's faster (doesn't require a dataserver event to read), and can hold far more data (128 Kb vs notecard's 64Kb). You also have more control over how the data is organized (key-value-pairs vs notecard line numbers).
Bavid Dailey
Linkset Data is intended to provide objects with persistent data storage and address a lot of your requirements.
A variant of this, experience LSD provides a global 'database' which scripts in multiple objects can address.
I can imagine the the ability to write notecards is disabled because of the numerous ways in which it might go catastrophically wrong - simple e.g. creating a new notecard in a tight loop.