Jump to content

help me understand MCM State options, as they cause me trouble


Recommended Posts

Posted

i am currently developing a mod with a MCM that is growing ever so slighty in size, just like they do sometimes. In one of the previous versions of the mod i switched over to the new State options method, with the help of @Hylysi (them basically doing all the dirty work, big thanks!). Which is just alot better in terms quality than the old OID method. But sadly i recently encountered an error after adding the 129th State option. And the error causes CTD on save load and doesnt let me access the scripts properties in CK, etc.. After going back to only 128 State options, everything is working like a charm.

The log spits following line when i try to access the scripts properties: 

 

SCRIPTS: error: Class DeviousStrikeConfig overflowed the named state count field(s) while linking. The class is marked as invalid. A programmer must adjust the bit field sizes

 

Could somebody explain to me what exactly is going on here and maybe even provide some help? I have tried to research this problem the whole day but i couldnt find any answers at all.

My feelings tell me that i might be unable to add more than 128 State options, since i have heard it is recommended to use States for smaller MCMs and OIDs for larger ones. This would be very sad though, because that means i have to change the whole MCM back to the OID version and all the effort was for nothing.

Posted
6 hours ago, Tlam99 said:

split the states.

Condition A first pack

Condition B second pack

 

so do mean putting more options into one state and differentiating by conditions in the states 

or

putting the states into conditions

could you give a quick example of what you had in mind?

 

Would it also solve the problem to split the different mcm pages into their own scripts, since every page cant have more than 128 options?

Posted
3 minutes ago, Cursed Raccoon said:

Would it also solve the problem to split the different mcm pages into their own scripts, since every page cant have more than 128 options

this seems to be the best solution to split it for my opinion.

Less scriptload compared to check in script.

 

Posted

Papyrus has a limit of 128 states per script.

Any more than that and, as you saw first hand, the game will crash.

 

The lazy method is to use OIDs when adding new options, once the limit has been reached.

Milk Mod Economy, for example, does just that.

Posted (edited)
16 hours ago, Hylysi said:

Papyrus has a limit of 128 states per script.

Any more than that and, as you saw first hand, the game will crash.

 

The lazy method is to use OIDs when adding new options, once the limit has been reached.

Milk Mod Economy, for example, does just that.

 

I will do my very best to avoid the lazy method

and thanks for the clarification.

Edited by Cursed Raccoon
  • 2 months later...
Posted

Almost forgot to report back on the results.

 

I made the decision to switch back to the OID method, but i split the mcm pages into their own scripts. This was the best fitting result for me personally, as i inted to make the mcm even bigger than it is now while keeping everything more comprehensible. It also makes the communication between the different pages/scripts easier. 

 

If one you has found an even better method, i would love to an examplinary implementation. 

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