Jump to content

[Dev/Test/Beta] LL FourPlay community F4SE plugin v43 2023 05 06


Recommended Posts

  • 2 weeks later...

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

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
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

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
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

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
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

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

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
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
  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use