Any technical limitation on number of properties in scripts?

Post » Wed Sep 24, 2014 5:18 am

Yes, it's me again. I may have found a way to have a script track the player character's perks - this script serves as a cache/mirror for fast access to player character perk data instead of waiting for object locks with the HasPerk function.

It uses RegisterForMenu on the StatsMenu with GetPerkPoints to determine when the player has added new perks. whenever it detects that perks have been added (if there are fewer perk points on menu close than on menu open), the script will refresh its perk data.

My next question: Is there a technical limitation or an other issues with large numbers of properties on one script. I will likely need at least a property for every perk I would like to support caching for, and then additional booleans for caching actual perk status. If this would result in too many variables, I can use arrays of booleans and assign each perk an arbitrary number/array index.
User avatar
Ria dell
 
Posts: 3430
Joined: Sun Jun 25, 2006 4:03 pm

Post » Wed Sep 24, 2014 1:23 am

I have used several hundred properties and variables before without any issues. I don't believe there's a limit on how many you can have in a script.

User avatar
Juan Cerda
 
Posts: 3426
Joined: Thu Jul 12, 2007 8:49 pm

Post » Wed Sep 24, 2014 4:43 am

Yeh, like egocarib, I've used a huge amount of properties before when I was experimenting with my PokeDov idea (link in my signature contains the script if you want to have a peak at that monstrosity). It still ran as smooth as butter, in fact it was too quick. Had to slow it down with a bunch of Utility.Wait()'s

- Hypno
User avatar
Mrs Pooh
 
Posts: 3340
Joined: Wed Oct 24, 2007 7:30 pm

Post » Tue Sep 23, 2014 1:41 pm

i think for property count it's more about memory than speed, if it's, like, 500 properties to object ref's, it'll make them all persistent

User avatar
Ash
 
Posts: 3392
Joined: Tue Jun 13, 2006 8:59 am


Return to V - Skyrim