Scripting Question re: Local Variables
Glassmelter
Member Posts: 38
After doing a bunch of reading online and plumbing the depths of my imperfect memory, I am feeling confused about local variable storage on inventory items and how persistent I can count on that being on server vault characters between persistent world server resets.
I want this to be true:
For server vault characters, any local variables set on a undroppable, unsellable inventory object can be counted on to remain between server resets. There is no reason to think that the data so-stored could ever be lost accidentally.
Is it true? I will probably implement a database system for things that involve a lot of data, but for simple character-specific things that would be frequently called, I think this is a more efficient way to store data, as long as it will work.
I want this to be true:
For server vault characters, any local variables set on a undroppable, unsellable inventory object can be counted on to remain between server resets. There is no reason to think that the data so-stored could ever be lost accidentally.
Is it true? I will probably implement a database system for things that involve a lot of data, but for simple character-specific things that would be frequently called, I think this is a more efficient way to store data, as long as it will work.
0
Comments
I have used this for my PW for years without a single problem.
I use it for 99% or more of character-specific variables. A multitude of in-game options, appearance variables (for returning from shapeshifting), choices and data for certain spells, etc. If I can store it as an INT, STRING, or FLOAT, it can go on that item. Come to think of it, I can't recall more than a handful of scripts I use that set variables on PCs themselves.
In these cases, you can split it across multiple items.
http://nwn.wikia.com/wiki/Local_variable