Jump to content

ReferenceCollection size imit ?


SKKmods

Recommended Posts

Is there a known limit on the size of a quest ReferenceCollection alias ?

 

Cant find anything specific other than the array limit of 128 on the CK site.

 

AddRef(), GetCount() and GetAt() all work OK at 5,120 spawned references.

 

It takes 11 mins to generate 5K wooden boxes at random YXZ around the player and 90 seconds to disable and delete them. I can keep bumping the test value but seems more efficient to ask.

 

 

46256407-1517931293.png

 

Edited by SKK50
Link to comment
Share on other sites

There is no definite known limit that I know of, though I imagine that if you go past a 32-bit integer the game will crash. That's roughly 2,147,483,647, so I imagine you'll murder your RAM or run out of patience first. :P Edited by Reneer
Link to comment
Share on other sites

Thanks for that.

 

I am surprised to find *something* on the platform has more capacity than needed ... probably as there was no legacy skyrim back-compatibility considerations when it was implemented. Array limit of 128 seems so ... 8088

Link to comment
Share on other sites

Sorry for bumping into your thread, but since we're talking limitations here... I'm aware of the limit of 128 elements for an array. But recently I've tried something unthinkable. I defined an array as property and was able to create more than 128 elements. It was, of course, for science. That lead me to a question, is there really a limitation of 128, or such array will be unable to operate with positions, which index is greater than 127 ??

Link to comment
Share on other sites

Array > 128 I wish, just checked and Add/Get ...

 

error: Array has 128 elements out of a maximum of 128 and cannot be expanded to add 1 more items

 

error: Array index 128 is out of range (0-127)

 

edit to add DIY

Function TestArraySize()

Int[] iArray = new Int[0]
Int iIndex = 0 

While iIndex < 256
	iArray.Add(iIndex)
	Debug.Trace ("SKK_MainScript.TestArraySize() Add " + iIndex)
	iIndex +=1
EndWhile

iIndex = 0 
While iIndex < 256
	Debug.Trace ("SKK_MainScript.TestArraySize() Get " + iArray[iIndex])
	iIndex +=1
EndWhile

iArray.Clear()

EndFunction 

Edited by SKK50
Link to comment
Share on other sites

Good to know, my depiction of the world hasn't been changed! ))

 

I asked that in the first place because of what I did with the properties and it confused me a bit. Here. No warnings or errors.

 

 

 

hWgKA8s.png

 

 

Link to comment
Share on other sites

Sorry if this is hijacking, but can someone explain what a reference collection is? The CK wiki only seems to have a single page on it with basic info: https://www.creationkit.com/fallout4/index.php?title=RefCollectionAlias_Script

 

Is it basically a fancy array of ObjectReferences that works like an Alias?

 

How does indexing work? E.g. if I have a RefCollectionAlias myRCA with the following refs:

 

Index 0: myObjRef1

Index 1: myObjRef2

Index 2: myObjRef3

 

...then I do "myRCA.Remove(myObjRef2)", will myObjRef3 have an index of 2 or 1?

Link to comment
Share on other sites

Sorry if this is hijacking, but can someone explain what a reference collection is? The CK wiki only seems to have a single page on it with basic info: https://www.creationkit.com/fallout4/index.php?title=RefCollectionAlias_Script

 

Is it basically a fancy array of ObjectReferences that works like an Alias?

 

How does indexing work? E.g. if I have a RefCollectionAlias myRCA with the following refs:

 

Index 0: myObjRef1

Index 1: myObjRef2

Index 2: myObjRef3

 

...then I do "myRCA.Remove(myObjRef2)", will myObjRef3 have an index of 2 or 1?

 

I believe the easiest way to think about is to think of it like a FormList. Doing a Remove() on the RefCollection will shift all the index ids just like doing it on an array or a formlist.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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