niston Posted November 5, 2020 Share Posted November 5, 2020 Browsing through the LL_FourPlay.psc source, I just realized that LL_FourPlay F4SE Plugin has functionality to patch the 128 array elements limit. Yep, that's right! In F4SE\Plugins\LL_FourPlay.ini, put this: [Custom Arrays] uMaxArraySize=512 Tadaa.. You can now have 512 settlements, instead of just 128. In fact, all your <array>.Add() or <array>.Insert() calls can now add or insert up to 512 elements, instead of only 128. Just like that. And to raise the limit from mod script, you can do something along these lines: Scriptname LargeArrayPatch:LAP extends ObjectReference Import LL_FourPlay Int Property ArraySizeLimit = 512 Auto Const Event OnInit() If (SetMinimalMaxArraySize(ArraySizeLimit)) Debug.Trace(Self + ": Array size limit patched to (" + ArraySizeLimit + ") elements.") EndIf EndEvent That will create the LL_FourPlay.ini, if it doesn't exist already. The SetMinimalMaxArraySize() function will return true and adjust the ini setting if the new limit is larger than then one previously set in the ini. It'll return false otherwise and not update the ini. Be cautious however: You should not use very large numbers as the limit, it might cause unintended consequences, trash your game and burn down your home. I wouldn't really trust anything above 1024. Very much awesome indeed! Link to comment Share on other sites More sharing options...
Reneer Posted November 5, 2020 Share Posted November 5, 2020 Very informative, quick and understandable Papyrus examples, little modding / programming jargon, and well written. I can see a lot of uses for this neat INI trick in my own work. Thank you for the write-up. Link to comment Share on other sites More sharing options...
pra Posted November 5, 2020 Share Posted November 5, 2020 But, WTF is "LL_FourPlay" even? Sounds like something from The Site Which Must Not Be Named. If so, would be nice if a standalone version could be made for the broader public. Link to comment Share on other sites More sharing options...
niston Posted November 5, 2020 Author Share Posted November 5, 2020 Its a plugin from that other site which can't be linked here.But if you get AAF, you also get LL_FourPlay included with that. Not sure yet if you can also distribute LLFP with your mods. It's declared a community resource after all. Asking around right now. @Pra you will probably like this: ; Returns the first index of the position the toFind string starts. You can use this to check if an animation has a tag on it. Is not case sensitive. Int Function StringFind(string theString, string toFind, int startIndex = 0) native global ; Returns the selected substring from theString. If no length is set, the entire string past the startIndex number is returned. string Function StringSubstring(string theString, int startIndex, int len = 0) native global ; Splits the string into a string array based on the delimiter given in the second parameter. ; As this function does ignore whitespace, putting a space as the delimiter will only result in a string being returned without spaces. string[] Function StringSplit(string theString, string delimiter = ",") native global ; Opposite of StringSplit. string Function StringJoin(string[] theStrings, string delimiter = ",") native global ; Converts an integer of any base to a hexadecimal string representation string Function IntToHexString(Int num) native global ; Converts a hexadecimal string to an integer Int Function HexStringToInt(String theString) native global And who would refuse some nice array functions: Form[] Function ResizeFormArray(Form[] theArray, int theSize, Form theFill = NONE) native global String[] Function ResizeStringArray(String[] theArray, int theSize, String theFill = "") native global Int[] Function ResizeIntArray(Int[] theArray, int theSize, Int theFill = 0) native global Float[] Function ResizeFloatArray(Float[] theArray, int theSize, Float theFill = 0.0) native global Bool[] Function ResizeBoolArray(Bool[] theArray, int theSize, Bool theFill = False) native global Var[] Function ResizeVarArray2(Var[] theArray, int theSize) native global Link to comment Share on other sites More sharing options...
SKKmods Posted November 5, 2020 Share Posted November 5, 2020 To be clear: all of this utility cleverness depends on F4SE ? [ Yes | No ] Link to comment Share on other sites More sharing options...
YouDoNotKnowMyName Posted November 5, 2020 Share Posted November 5, 2020 Wow this is awsome!Can't have big enough arrays ...(That sounds wrong ...) :laugh: I guess this proves all those people wrong who think that there are just sick freaks on "the site that shall not be named".Great stuff! Link to comment Share on other sites More sharing options...
niston Posted November 5, 2020 Author Share Posted November 5, 2020 @SKK Yes Link to comment Share on other sites More sharing options...
monesq Posted April 7, 2021 Share Posted April 7, 2021 Maybe someone will see this, maybe not, but I found the following ini after I had pasted an entire settlement using the newest version of clipboard: LL_FourPlay[Custom Arrays]uMaxArraySize=2000 When I Googled the ini entry, it brought me to this forum. I have no idea what this is. I am not a programmer. This ini was created after I pasted a settlement using Clipboard Resurrection. I pasted approximately 5,000 pieces of a recent Sanctuary build. Since pasting the settlement, my game freezes every 2-3 minutes for abut 15 seconds. I am stumped. If I go to a save before the "pasting incident" the game is fine. Any ideas? At this point it is more curiosity than saving a game as this was a test game for my settlements that I am creating either as blueprints of clipboard files. Thanks. Link to comment Share on other sites More sharing options...
l2a2e2l2e Posted June 12, 2021 Share Posted June 12, 2021 Hi, do you know if the fix allows the settlements in excess of 128 to have full functionality, i.e., will the game allow settlers to be assigned to them? Link to comment Share on other sites More sharing options...
niston Posted June 12, 2021 Author Share Posted June 12, 2021 I think so and have no information at the moment that would indicate otherwise.But I will be able to give a definitive answer sometime soon; I'm at 118 registered workshops currently with moar to come. Link to comment Share on other sites More sharing options...
Recommended Posts