forked from SilverIce/JContainers
-
Notifications
You must be signed in to change notification settings - Fork 24
Home
SilverIce edited this page Nov 29, 2014
·
36 revisions
JContainers (JSON Containers or just JC) is data structures framework for Skyrim, an SKSE plugin. JContainers features:
- Array containers: don't have to care whether you allocated enough big array or not. Just fill it with data (number, text, form or another container), merge arrays together, resize, seek
- Associative containers (maps) -
- Any nested combinations of containers (graphs) are possible - array may contain arrays, maps. Map can contain arrays, maps and etc
- Path resolving - access nested containers easy. ".stats.health"
- Export or import a container into or from a JSON file. Will export all sub-containers the container references.
- Flexible - use only what you need.
- 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
- Threadsafe - means you can modify/read a container from a different scripts (threads) and the container will still be in a consistent state. Local locking - process of modifying/reading a container in one thread does not blocks another thread in process of modifying another container.
JC was created to solve the following CK problems:
- No data structures. What we have is just stock array which is not dynamically resizeable, size limited by 128 items, may contain only single type of item (form, float, integer, string or boolean)
- No associative containers
- No way to build hierarchic data structures (combine data structures)
- CK does not provide a way to store a custom data. This issue often turns into huge script files filled with lot of hardcode. JC offers JSON files what you can read data from.