Jump to content

Maximum Script Properties


Tyrant99

Recommended Posts

Posted

What do you mean for "maximum"?

Maximum values for the different types?

Or the max number of properties you can put in a single script?

 

Both answers:

int type are 32 signed bits

float type are 32 bits float

strings look not have a limit, but I will not go to a megabyte string

Arrays can have up to 128 entries inside without SKSE and no limits (but avoid arrays of more than a thousand values) with SKSE. But only a very few types of arrays are supported by SKSE

 

Number of states in a script: 128 max + no state (that is a big limitation if you build very complex MCM pages like I do)

Number of properties in a script: I have also 300 and I had no problems in compiling and using the script

 

Posted

@CPU

 

Sorry, should have specified, I just meant regular object properties.

I.E.

Actor Property PlayerRef Auto 

 

I'm looking at adding something like 1,000 of them, was wondering if I'd run into a problem...

Posted
3 minutes ago, Tyrant99 said:

@CPU

 

Sorry, should have specified, I just meant regular object properties.

I.E.

Actor Property PlayerRef Auto 

 

I'm looking at adding something like 1,000 of them, was wondering if I'd run into a problem...

Never added 1000, but in one of my mods I have exactly 323 properties, and the script compiles fine and works fine.

Posted
1 minute ago, CPU said:

Never added 1000, but in one of my mods I have exactly 323 properties, and the script compiles fine and works fine.

Ok, well, hold my beer! :classic_biggrin:

Posted

In case you really need more, you can always use the trick of the delegated script.

 

scriptname mydelegatedscriptforproperties extends reference alias

 

int property p1 auto

...

int property p99 auto

 

And then in the main script just use a property to reference the refalias.

 

mydelegatedscriptforproperties property props auto

 

props.p23 = 1

 

I used that for Scent of Sex, where the total number of properties is something like:

200 + 64 X 200 ~= 13000

Posted
5 minutes ago, Tyrant99 said:

Ok thanks, that might come in handy. And 13,000 is a lot! ?

SSX has a bunch of properties that are global.

Then you can create your sex rules, up to 64.

And each had about 200 properties inside to configure the rule itself.

 

If you know the mod, it is one of the most advanced mods to configure sex ever made.

Alone can replicate a ton of other random sex mods with just the configuration of some rules.

Posted

Just as side note, tried to compile a script with 10,000 properties and use the first and the last from another script.
It worked.


Seems that there is no limit (or a really huge limit) to the number of properties in a script.

 

@darkconsole guesses that the limit is 64K.

Posted
4 minutes ago, CPU said:

Just as side note, tried to compile a script with 10,000 properties and use the first and the last from another script.
It worked.


Seems that there is no limit (or a really huge limit) to the number of properties in a script.

 

@darkconsole guesses that the limit is 64K.

Oh, very nice! I'm up to about 700 properties in my Script so far and about 5k lines of code... No compiling problems so far.

 

Will probably hit ~ 1,200 properties, but it sounds like that shouldn't be a problem. ?

 

Thx for the info!

Posted

lol... Damn... :classic_laugh:

 

image.png.da6c5aad53189e76be2beba6c56b21d0.png

 

image.png.77b1c0d7adb485accc559261c8f651d3.png

 

Worked fine at ~ 750 properties.

 

Was about to button things up at 1,140 & about 8k lines of code. 

 

Actually, it still compiles just fine, the errors shows up when trying to fill the properties.

 

Posted

Variables count is 1024.

You just added properties or doing something extra in the code?

Posted

Pretty much just properties and functions that use them, didn't have other variables...

 

I dropped some properties out and at 993 properties it compiles and all properties fill fine.

 

Tossed the Properties in a linked script and did some text replacements in my functions, so all should work now.

 

Seems like the limit for filling is somewhere around 1,000, so guessing your 1024 is spot on... Compiling is no problem beyond this level, just filling.

Posted

The problem is referencing the properties because they need to be real variables.

In my 10K property test I checked only 2 properties (first and last.)

 

So probably the variables script limit is a stronger limit. So the top numer will be 1024 (to reach it you need to access the properties from another script.)

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...