-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement linkset Data #141
Comments
I realize that, as the system is implemented in SL, if we lose track of a name:value pair, we cannot erase it. This can quickly happen in the deverloment phase, or if we store data line name of persons. So that there must be a way to edit the linkset data |
That's what llLinksetDataListKeys is for: |
I was wondering how it is implemented in SL, and if we may have advantage in implementing it differently. There are several solutions: That llLinksetDataListKeys uses numerical indexes suggests that the value:pairs are numbered. The simplest explanation is that they are numbered as they are created. Problem, if one pair is suppressed, the index of all the subsequent pairs is modified. So that this is not a reliable way to manage them. A wise scripter may use the multiple features of https://wiki.secondlife.com/wiki/LlLinksetDataFindKeys to organise his values, for instance with hierarchical names: |
This replaces issue #140 , as a better solution, and implementable more easily.
In a nutshell, the linkset data set (new Second Life feature) is a 64k space to store name:data pairs in an object, to be used by scripts. There are no restriction on lenght and number of these, but all values are stored as texts. It is attached to an object, not a prim.
SL implemented a set of functions to write, read, etc. the data. One is here: https://wiki.secondlife.com/wiki/LlLinksetDataRead
There also is an event raised when a pair is modified, but we are not forced to use it.
The idea of #140 was to pass data between scripts, without using an event (without disrupting the flow of the calculus). The new solution allows for much more, like:
-store data from a config notecard, so that it is accessible for all the scripts
-store data in a way it survives a script reset, for instance in a roleplay HUD
In more the argument of the difficulty to add data fields to prims is lowered, since only the objects are altered.
Added: workaround is to store values as properties of a prim. For instance if we use the colors of a face, we can store 8 vectors (tested: works even on faces which do not exist) We can store dozen UUIDS as face textures, shiny map, etc. There are some caveats, though, stored values are usually clipped to what makes sense for a prim.
The text was updated successfully, but these errors were encountered: