I have set up a variable storage structure for my Total Conversion, where I have a Settings Notebook initially generate it, load it with all of the default variables, and then creatures and objects and things draw their settings from it. All of this works fine usually, but if I so much as think about changing any variables or logic in either the dino’s or the object (which cast between one another through various events), then specifically the object gets corrupted. If I try to load the DevKit with the object in my mod’s folder, then it will not start. This makes my life very inconvenient as this settings object is one of the most important objects in my TC, and I will frequently be adding new variables to it. I would rather not have to rebuild the object from a functional backup every time I want to change anything.
More Specific Information: The Object itself is an Indestructible, Unstasisable Tek Foundation, which all dino’s perform a small line trace to initially find, and then keep as a variable for future reference. It contains a name tag sorting algorithm (For my Settings Notebook, to make it easier to select a specific dino), a Dino Update Function (Casts to all dino’s of a given class, and commands them to update their settings from it), and the initialization of many variables, mostly Arrays as they can store information specific to each dino neatly, such as Scale or Health. It is initially spawned when a player opens the Settings Notebook for the first time, and will remain in that world permanently. I have arrays which are accessed by the notebook set to Public, and some which are Private.
So it sounds like what you are running into is a circular dependancy issue. Basically because these classes are directly referencing each other it can’t actually resolve the classes when it loads them. (You can look up C++ circular dependancy to get a better understanding of what is happening under the hood)
Here is the kind of setup you seem to have:
Class A (Constructs and references Class B)
Class B (references Class A)
What you want to do is the following:
Create a child of Class A (Which I will call A_Child going forward)
In Class A_Child, override all of the functions you declared in Class A and move the implementations to Class A_Child
Replace all of the implementations in Class A with very generic ones and make sure to remove ALL references to Class B from Class A.
Make sure Class B ONLY references Class A and not Class A_Child. A reference to the A_Child instance can be stored here but should be stored AS Class A and never casted to A_Child (You won’t need to, because all the functions are declared in Class A)
Which will leave you with the following
Class A (Declares functions and variables only)
Class A_Child (Spawns and references Class B)
Class B (References Class A)
Aha! At first I was unsure if that was actually the issue as I could not find a circular dependency between the Notebook and Settings Object, but then I found one between the Object and the Dinos themselves. The way I have it set up now is that I have the Settings Object have no dependencies on anything, the Dinos have dependencies to the main object, and a new child of the Object has dependencies on the Dinos. There are still many crashes, but nothing is getting corrupted anymore and the error I was seeing on previous crashes has disappeared- so I can only assume that the dependency issue is fixed!
Now, however, a new issue has appeared: Sometimes after tabbing out and reentering the window, the DevKit throws an ‘Assertion Failed: IsValidLowLevel()’ error, traced back to KismetDebugUtilities. I’m not sure what I’ve modified that could affect the debugger, but at least now I can get back to work on my TC! Thank You
EDIT: It appears to throw that error when I attempt to pan around in the event graphs in particular.