JContainers
JContainers
The main goal of the project is to extend Papyrus with JSON-based data structures (arrays and maps).
Dynamism
If you have some programming background, you’ll notice that you can not simply instantiate a class (or a script) in Papyrus. Almost everything exists in a single exemplar, except aliases and magic scripts. Papyrus arrays aren’t expandable, single array can hold a values of a single type only.
JContainers brings JMaps so that you can use them the same way FO4 structures are used. Considering the ability of JArray, JFormMap, JIntMap structures to reference/contain each other – and you can build large graphs of structures.
Embeded Lua
Ability to filter/search/modify data structures with Lua. Ability to write your own Lua scripts. Example:
int obj = JValue.objectFromPrototype(“[
{\”magnitude\”: -9},
{\”magnitude\”: 11},
{\”magnitude\”: 3}
]”)
int eleven = JValua.evalLuaFlt(obj, “return jc.accumulateValues(obj, math.max, ‘.magnitude’)”)
int minusNine = JValua.evalLuaFlt(obj, “return jc.accumulateValues(obj, math.min, ‘.magnitude’)”)
[New] Domains
The Domain is isolated, standalone sandbox, non-global (per-save file), personal storage of JC’s data, created by a modder for personal (or non-) use. The feature enables automatic removal of the data stored in a domain once a mod linked to the domain gets uninstalled.
[New] Form Observing
Internal improvement. Mimics the way a script references a form – a form referenced by any of JContainers’ containers won’t be unloaded by the game (unless force unloaded). Once a form deleted, the FormObserver will receive a notification and form references to that form will be set to zero.
Links
Quick feature overview
Latest documentation
Watch project news and updates on GitHub