[rel] JContainers

Post » Tue Oct 21, 2014 5:20 pm

JContainers

Data structures framework for Skyrim

Motivation and Overview

Papyrus is an overly simplified language, a language without convenient data structures. In some cases stock functionality in enough. In other cases in a result of this simpleness you may get a script containing more data (texts, numbers) than a code. In cases like these, JContainers makes things much easier by giving you basic data structures.

JContainers (JSON Containers or just JC) is intended to store data in a structured, convenient way. For that purpose JC implements basic data structures: arrays and associative containers (dictionaries). All data persists in a SKSE co-save file.

JContainers features:

- Data structures.
- Import and export data to and from JSON files. https://github.com/SilverIce/JContainers/blob/master/JContainers/test_data/json_loading_test/jdb.json
- https://github.com/SilverIce/JContainers/blob/master/JC.md#path-resolving - simplifies access to nested data
- https://github.com/SilverIce/JContainers/blob/master/JC.md#lua (in progress) - The main purpose is to minimize the amount of cumbersome Papyrus code needed to handle data by moving it into Lua scripts. https://github.com/SilverIce/JContainers/releases/tag/v3.2-alpha.1
- C++ API - interaction with JC via C++ interface. This mean you can invoke C++ anologue of any Papyrus function JC provides.

Links

https://github.com/SilverIce/JContainers/releases/tag/v3.1.0

https://github.com/SilverIce/JContainers/blob/master/JC.md
https://github.com/SilverIce/JContainers/issues

Special thanks


to Saerileth and Gooser, without your interest that project would be abandoned on early stages
to Skwerlman and Alex Dunn for documentation improvements
Verteiron - his Familiar Faces mod makes my framework much more noticeable on nexus
thanks to RealAntithesis for interesting ideas


Third party libraries used

skse library - it would be impossible to imagine Skyrim modding without it
boost framework - real treasure for any C++ programmer
jansson - nice json parsing library

LuaJit - Just-In-Time Compiler for Lua


Permissions

-You (as mod author) may bundle this plugin.

- It's up to you to report to the user of incompatibility of installed JC API version and the version mod has been compiled for the best user's experience. Valid condition is `JC.APIVersion() == hardcodedAPIVersion && JC.featureVersion() >= hardcodedFeatureVersion`.

- The files in this plugin are not to be modified under any circumstance as that could cause problems when a load order includes multiple mods that use the plugin and one or more mods have modified the files in this plugin.

User avatar
Robert Devlin
 
Posts: 3521
Joined: Mon Jul 23, 2007 2:19 pm

Post » Tue Oct 21, 2014 12:14 pm

For those of us who are aspiring modders but novice programmers, would you be kind enough to briefly explain what kind of things this might enable us to achieve in the CK. Broad question, I know, but this sounds interesting. :smile:

User avatar
Matthew Barrows
 
Posts: 3388
Joined: Thu Jun 28, 2007 11:24 pm

Post » Tue Oct 21, 2014 4:25 pm

Nothing. It improves Papyrus scripting, but doesn't affect CK in any of possible ways

User avatar
Alba Casas
 
Posts: 3478
Joined: Tue Dec 12, 2006 2:31 pm

Post » Tue Oct 21, 2014 11:04 pm

Does the use of data structures mean that papyrus scripts can be optimized and therefore run more quickly?

User avatar
Tai Scott
 
Posts: 3446
Joined: Sat Jan 20, 2007 6:58 pm

Post » Tue Oct 21, 2014 7:49 am

So how much will barrels and crates be improved...jk!!!

User avatar
Jodie Bardgett
 
Posts: 3491
Joined: Sat Jul 29, 2006 9:38 pm


Return to V - Skyrim