Skip to content

Stored form reference loaded from file invalid #83

@KHismoom

Description

@KHismoom

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions