Jump to content

[Dev/Test/Beta] LL FourPlay community F4SE plugin


Recommended Posts

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

 

?

 

 

 

  • 2 weeks later...
Posted

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?

Posted

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.

 

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

Posted

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.

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

Posted

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.

 

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

Posted

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

Posted

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 ?

 

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

Posted

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.

Posted

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

Posted

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.

 

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

  • 2 weeks later...
Posted

It has so many general purpose utility/helper native functions, why it's even called "LL FourPlay plugin" anymore?

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