corrado33 Posted September 15, 2018 Share Posted September 15, 2018 Are there ways to have a list of a LOT of objects? Arrays can only be 128 long (right?) My favorite player house has a script for the workbench and stuff to transfer items from a chest to the player so that you can use items out of the chest instead of carrying them. BUT, it doesn't do it... adequately. It has a bunch of named chests for every type of weapon/smithing resource, etc, but the workbenchs don't pull from those named chests, therefore it essentially makes those chests... useless. So I wanted to write a better script, but the problem I've run into is... well... what if a chest has more than 128 items in it? I could make some fancy scripting that uses multiple arrays, but that seems... annoying. I'm sure someone has figured this out by now. Does the skse function CreateFormArray allow for more than 128 elements? It says it's possible to create arrays longer than 128 elements, but it doesn't say if you should do that or not... Link to comment Share on other sites More sharing options...
Reneer Posted September 15, 2018 Share Posted September 15, 2018 Sounds like you will want to use a Formlist for this. Link to comment Share on other sites More sharing options...
corrado33 Posted September 15, 2018 Author Share Posted September 15, 2018 Sounds like you will want to use a Formlist for this. Ugh.... I DID read about formlists, but I must have missed the part where you could make/edit them in game. I thought they could only be created beforehand in creation editor. Thanks. Link to comment Share on other sites More sharing options...
foamyesque Posted September 17, 2018 Share Posted September 17, 2018 (edited) They can only be created in the editor, but they can be modified via script in game afterwards. As long as you're in a situation where you know how many lists you'll need, or if you need to talk to Skyrim's other systems, they're a good solution. If you absolutely need stuff to be created at runtime you're going to need to use arrays, and if you want those properly arbitrarily and dynamically sized, you'll need SKSE. Edited September 17, 2018 by foamyesque Link to comment Share on other sites More sharing options...
CPU Posted September 29, 2018 Share Posted September 29, 2018 If you just need Forms or ObjectReferences then SKSE allows the creation of arrays of more than 128 items.But using a FormList in this case can be better. Link to comment Share on other sites More sharing options...
Recommended Posts