Hi All,
I'm not sure if I asked this before, but need to ask it anyway: What is the maximum number of variables that can be stored on a PC?
For instance, I have a large number of ints stored on teh player for each area they visit, so I have many SetLocalInt(oPlayer, sTagArea+sVar, 1); kind of thing. The sVar can run up to 1600 entries.
Further to this question, are all variables stored on a PC transferred between modules, or only certain types (if any). I think I recall integers being transferred, but not strings ... but I may have this wrong.
Thanks in advance for all answers given.
Lance.
Maximum Number of Variables Stored on a PC?
Débuté par
Lance Botelle
, janv. 29 2011 09:17
#1
Posté 29 janvier 2011 - 09:17
#2
Posté 29 janvier 2011 - 09:22
The storage format for characters on-disk (BIC) allows for any number of variables to be attached to a game object, so long as the resultant file size remains under 4GB.
I seem to recall some discussion that variables saved on PCs were previously not saved, but I'm not sure that this is true anymore for the latest version. It should be easy to test and confirm that they are saved and restored as expected.
I seem to recall some discussion that variables saved on PCs were previously not saved, but I'm not sure that this is true anymore for the latest version. It should be easy to test and confirm that they are saved and restored as expected.
#3
Guest_Chaos Wielder_*
Posté 29 janvier 2011 - 09:28
Guest_Chaos Wielder_*
All variables I've used have transferred between mods. Like Skywing says, though, there was a problem before about this. It seems to have been resolved, at least in my own testing and usage.
#4
Posté 29 janvier 2011 - 10:31
Thanks for the responses guys ... I have also decided to rearrange the way these variables are stored now. I just felt uncomfortble with this many on a PC.
It is good to know the limit and that the limitations no longer apply though.
Cheers!
Lance.
It is good to know the limit and that the limitations no longer apply though.
Cheers!
Lance.
#5
Posté 30 janvier 2011 - 04:52
You start getting performance issues when you start getting into thousands of variables.
#6
Posté 30 janvier 2011 - 06:23
To add to this, performance for accessing an object local variable by name degrades linearly as more variables are added (because that is, on average, more name comparisons that must be made before the variable is found in a sequential search).painofdungeoneternal wrote...
You start getting performance issues when you start getting into thousands of variables.
A script program using thousands of uniquely named locals attached to an object is probably best redesigned to operate differently (if possible).
Modifié par SkywingvL, 30 janvier 2011 - 06:24 .
#7
Posté 30 janvier 2011 - 07:08
hi painofdungeoneternal and SkywingvL,
This was my gut feeling as well anyway, and is why I decided to do this differently in the end. I now use the area object, and adjust the holder to use the player name + var to do the same thing. I don't know why I did not think this way in the first place.
Lance.
This was my gut feeling as well anyway, and is why I decided to do this differently in the end. I now use the area object, and adjust the holder to use the player name + var to do the same thing. I don't know why I did not think this way in the first place.
Lance.





Retour en haut







