VonHelton Posted January 20, 2019 Share Posted January 20, 2019 6 hours ago, EgoBallistic said: This is an update which adds a new function that was requested by mod authors. Whew.......I dredded having to download Fallout 4 again...... ? Link to comment
dagobaking Posted January 29, 2019 Share Posted January 29, 2019 Hello @jaam I have a few questions about this: Quote ; Sets the minimum array size required by a mod. Returns false if the current value was greater. Bool Function SetMinimalMaxArraySize(int theMaxArraySize) native global ; This patches ArrayAdd and ArrayInsert so they respect that maximum. The value is memorised in ToolLib.ini ; [Custom Arrays] ; uMaxArraySize=nnnnnn ; ; !! Creating arrays that are too large will adversaly affect your game !! Can I use this function by itself to extend the max size of arrays without adding the "uMaxArraySize=nnnn" change? Or, do I have to manually do that also? Can you give a sense of what a safe array size is that will not adversely affect the game? 1000? 2000? Link to comment
jaam Posted January 29, 2019 Author Share Posted January 29, 2019 Calling the function will have the same effect has setting the ini value. As for a "safe" value, I have been running with 50000 since I introduced the function without any performance effect. The max value does not matter UNTIL one of the array end up reaching it. And we don't have practical experience of using a huge size in any actual player game. I think the biggest array I used was around 2 or 3000 and at the time it wasn't an issue. So set something you think is reasonable. If that proves too small for certain users, all they have t do is edit their .ini to increase the value they use, so it will be correctable without a new mod version. Link to comment
dagobaking Posted January 30, 2019 Share Posted January 30, 2019 1 hour ago, jaam said: Calling the function will have the same effect has setting the ini value. As for a "safe" value, I have been running with 50000 since I introduced the function without any performance effect. The max value does not matter UNTIL one of the array end up reaching it. And we don't have practical experience of using a huge size in any actual player game. I think the biggest array I used was around 2 or 3000 and at the time it wasn't an issue. So set something you think is reasonable. If that proves too small for certain users, all they have t do is edit their .ini to increase the value they use, so it will be correctable without a new mod version. Thank you for the clarification. This is promising. I would only need something like 3000 at the most I think. But, I tested the function and it seemed to crash my script. Does it have to be run at game start or any other set-up? Link to comment
jaam Posted January 30, 2019 Author Share Posted January 30, 2019 It shouldn't. It has to be called Only before the first time any of your array reach 256 elements. After that the value stored in the ini should be applied before the main menu appears. But I only use it in the plugin that test the DLL functions. My setup sets the value in the .ini. If you have a consistent crash I may need to check that again. Link to comment
dagobaking Posted January 30, 2019 Share Posted January 30, 2019 4 hours ago, jaam said: It shouldn't. It has to be called Only before the first time any of your array reach 256 elements. After that the value stored in the ini should be applied before the main menu appears. But I only use it in the plugin that test the DLL functions. My setup sets the value in the .ini. If you have a consistent crash I may need to check that again. Ok. Thank you. I turned it back on and this time the script stayed running. So, I'm wondering if maybe there is some way it freezes when first run. But, then works after reload once the setting has been written once. Link to comment
jaam Posted January 30, 2019 Author Share Posted January 30, 2019 Try removing or commenting the line in the .ini and tell me if it crashes again. If so I'll look at it tomorrow I hope. Link to comment
dagobaking Posted January 30, 2019 Share Posted January 30, 2019 Where is that ini? I've looked in every folder I could think of and cant find it. Link to comment
jaam Posted January 31, 2019 Author Share Posted January 31, 2019 Data\f4se\plugins It is named LL_FourPlay.ini Link to comment
dagobaking Posted January 31, 2019 Share Posted January 31, 2019 38 minutes ago, jaam said: Data\f4se\plugins It is named LL_FourPlay.ini Ok. Yes. So, if I remove that line it does crash the script again. But, when I boot back up it works. So, it doesn't seem to like that first write-process for some reason. Link to comment
jaam Posted January 31, 2019 Author Share Posted January 31, 2019 Ok. I'll work on that this weekend. 1 Link to comment
dagobaking Posted February 1, 2019 Share Posted February 1, 2019 @jaam I was thinking that one possibility is that I'm using MO2. That puts new files into an over-write directory. That typically treats all the files like they are in the game folder. But, it could theoretically create path issues in some circumstances. Link to comment
jaam Posted February 2, 2019 Author Share Posted February 2, 2019 I am using MO2 also for my dev and play installations, so that's not it. I tried reproducing the issue with my test plugin without encountering the issue. Could you download the test plugin from here and try with nothing FP and/or AAF related ? Link to comment
dagobaking Posted February 2, 2019 Share Posted February 2, 2019 Yes. I only see the test updated to v24. Is that the one I should use? Another thought, does running this function clear existing arrays? Link to comment
dagobaking Posted February 2, 2019 Share Posted February 2, 2019 6 hours ago, jaam said: I am using MO2 also for my dev and play installations, so that's not it. I tried reproducing the issue with my test plugin without encountering the issue. Could you download the test plugin from here and try with nothing FP and/or AAF related ? I used test v24 and it seemed to check out ok that way. It doesn't crash the whole game or make arrays stop working. But, it does something that causes my script to crash. Maybe clearing existing arrays/formlists? Link to comment
dagobaking Posted February 2, 2019 Share Posted February 2, 2019 I did some more testing to narrow down what specifically is happening. Both "Add" and "Insert" stop working when I run SetMinimalMaxArraySize for the first time. That, consequentially causes AAF to break down. Link to comment
dagobaking Posted February 2, 2019 Share Posted February 2, 2019 Sorry for the many posts but I keep uncovering more information. I checked the Papyrus log from a game where Add and Insert stop and I see several of these entries: [AAF_MainQuest (07000F99)].aaf:aaf_mainquestscript.OnDataLoaded() - "C:\Games\MO2_BASE\mods\AAF_DEV\Scripts\Source\User\AAF\AAF_MainQuestScript.psc" Line 470 [02/02/2019 - 01:11:17PM] error: Array has 0 elements out of a maximum of 128 and cannot be expanded to add 1 more items stack: [AAF_MainQuest (07000F99)].aaf:aaf_mainquestscript.OnDataLoaded() - "C:\Games\MO2_BASE\mods\AAF_DEV\Scripts\Source\User\AAF\AAF_MainQuestScript.psc" Line 470 [02/02/2019 - 01:11:17PM] error: Array has 0 elements out of a maximum of 128 and cannot be expanded to add 1 more items stack: ... So, it looks like the change to Add and Insert, at least on first run, somehow causes them to think that "0" is too many elements... [Looking at the LLFP Test code, it doesn't appear that "Add" and "Insert" are directly tested which would reveal the issue.] Link to comment
jaam Posted February 2, 2019 Author Share Posted February 2, 2019 Sorry I was not active. The function should not affect existing arrays, as it only modify the function that add and the function that insert an element from the arrays. I will try testing add and insert in my test script, though I used them a lot in other scripts. Maybe I could always add the ini set before. Link to comment
dagobaking Posted February 3, 2019 Share Posted February 3, 2019 3 hours ago, jaam said: Sorry I was not active. The function should not affect existing arrays, as it only modify the function that add and the function that insert an element from the arrays. I will try testing add and insert in my test script, though I used them a lot in other scripts. Maybe I could always add the ini set before. Yeah. In my testing I realized that it doesn't affect existing arrays. But, Add/Insert get messed up somehow. Link to comment
Arcturus7777 Posted February 13, 2019 Share Posted February 13, 2019 Is this useful are needed for AAF? Link to comment
EgoBallistic Posted February 13, 2019 Share Posted February 13, 2019 3 minutes ago, Arcturus7777 said: Is this useful are needed for AAF? It is included with AAF. So yes it is needed for AAF but you don't have to download it separately. Link to comment
Arcturus7777 Posted February 13, 2019 Share Posted February 13, 2019 2 minutes ago, EgoBallistic said: It is included with AAF. So yes it is needed for AAF but you don't have to download it separately. Thank you for the quick response. Link to comment
zax Posted February 16, 2019 Share Posted February 16, 2019 It has so many general purpose utility/helper native functions, why it's even called "LL FourPlay plugin" anymore? Link to comment
dagobaking Posted February 24, 2019 Share Posted February 24, 2019 Hello @jaam Just checking in to see if you had a chance to test Add/Insert ? Link to comment
jaam Posted February 25, 2019 Author Share Posted February 25, 2019 Sorry, I have'nt tried yet. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now