Skip to content

Storing data on items

badstrrefbadstrref Member Posts: 124
edited March 2020 in Builders - Scripting
How reliable is it to store data on items for multiplayer with SetLocalXXX functions , is there any limitation? is it possible to loose data in any way? i know that tag / Name / Description workaround can do it (with core string+ getstringleft / right & such)... but thats bit dirty. Thanks for any light on this subject :smiley:

Comments

  • ProlericProleric Member Posts: 1,316
    edited March 2020
    It works OK within a single player module, but IIRC in multiplayer, by default, it is lost on logging off, and starting a new SP from localvault has issues, too.

    There are data base solutions. Alternatively, the description workaround comes as a package now:

    https://neverwintervault.org/project/nwnee/script/simple-database-free-persistent-storage
  • badstrrefbadstrref Member Posts: 124
    Wow, storing data in unindentified field, that's genius :)
    i'll check that system soon
    thank you
  • meaglynmeaglyn Member Posts: 151
    Storing data in items works fine in MP. You will want to use server vault. The values are not lost.

    Variables stored on the PC are lost on logout in multiplayer (or at least after a server reset).

    Things like location and object of course don't work and you have to do other things to store those. But for the basic types (int, float, string) this is a fine way to store PC persistence.

    I think proleric may be thinking of using the skin to store these and, by default, enforce legal characters deletes the skin on login. So in that way you can lose all your persistence. I disable ELC and use the PC skin for a good percentage of my PC related persistence.
  • ProlericProleric Member Posts: 1,316
    @meaglyn No, I was just wrong about MP. I wonder whether the MP issues I've read about are down to using local vault rather then server vault.
  • meaglynmeaglyn Member Posts: 151
    @proleric: I was trying not to say you were flat wrong ;)
    As far as I know localvault is a problem because people can cheat. Although, I did see a post somewhere recently about losing variables on items in localvault so maybe there is something else to that. I've never used it that way...
Sign In or Register to comment.