Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stored form reference loaded from file invalid #83

Open
KHismoom opened this issue Dec 4, 2021 · 0 comments
Open

Stored form reference loaded from file invalid #83

KHismoom opened this issue Dec 4, 2021 · 0 comments

Comments

@KHismoom
Copy link

KHismoom commented Dec 4, 2021

The most recent VR version of JContainers, 4.1.13, has a different behavior than the SE version in regards to resolving form references stored in an Array/Map loaded from a file.
Try the following code on SE and VR:

                Form f = Game.GetFormFromFile(0x12fcc,"Skyrim.esm")
                Int iTest = JArray.object()
                JArray.addForm(iTest,f)
                JValue.writeToFile(iTest,"FormTest.json")
                iTest = JValue.readFromFile("FormTest.json")
                f = JArray.getForm(iTest,0)
                ConsoleUtil.PrintMessage("TestForm: "+f+", "+f.GetName())

On SE you'll have a correct form reference in f after the file is loaded, console output is
TestForm: [SPELL < (00012FCC)>], Healing
whereas on VR it is None, console output is
TestForm: None,

Retrieving the form directly from the array after adding it works fine on both SE and VR.
It seems that when actually loading a form reference from a file, it does not get resolved correctly on VR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant