## Datafile format for SCS

Preliminary data structure for the configuration of the seasonal plugin. Using JSON:

{      "SCS_Data" : [           "Plugin" : "Skyrim.esm",           "Options" : "unused",           "Data" : [                { "0x00000001" : [ "0x00000010", "0x00000010", "0x00000010", "0x00000010", "0", "0", "0x00000010", "0x00000010"] },                { "0x00000001" : [ "path\to\model1.nif", "path\to\model1.nif", "", "0x00000010", "0", "0", "0x00000010", "0x00000010"] },                ...                { "0x00000005" : [ "0", "0", "0", "0x00000005", "0x00000005", "path\to\anothermodel.nif", "0x00000005", "0x00000005"] }           ]      } , {           "Plugin" : "Somethingelse.esp",           "Options" : "unused",           "Data" : [                { "0x00000005" : [ "0", "0", "0", "path\somethingelse\new.nif", "0x00000005", "0x00000005", "0x00000005", "0x00000005"] }           ]      } ] }

Let’s break it down. This is the JSON document root which contains all the data. It defines an array [] is to follow:

{      "SCS_Data" : [           ..      ] }

Each element of this array is a plugin (ESM/ESP) for which we have seasonal models to choose from. Starting with the first plugin, the official (Bethesda) models. We define the plugin name, some option flags (currently unused, but reserved for future development), and then define another array which actually contains the data for this ESM/ESP:
{      "Plugin" : "Skyrim.esm",      "Options" : "unused",      "Data" : [           ...      ] }

Okay, great. Now we get to the meat of the data. Each element of the data array is defined in terms of a form ID. This is the form ID that we will be replacing in-game with its seasonal variants, so I’ll refer to it as the “base form ID.” The variants are in an array that has a fixed form containing 8 strings, one for each “season.”
Each string can be one of:

• another Form ID which will be looked up when we load the game to determine the actual model it uses
• the raw path to a model (.nif) relative to the Data directory. This is preferable to avoid the lookup needed for the above, but limited in that it’s possible to specify an invalid path
• The number 0 – This is a special case that signifies that this item should just go away completely during this season (e.g. flowers, crops)

{ "0x00000005" : [ "0", "0", "0", "0x00000005", "0x00000005", "path\to\anothermodel.nif", "0x00000005", "0x00000005"] }

The seasonal part of the array are of the sequence: Early Winter, Winter, Early Spring, Spring, Early Summer, Summer, Early Autumn, Autumn. Early means we’re in transition from the previous season.

This is the current version of data that I’m using for development. It contains 138 flora models chosen primarily from the area around Riverwood and Whiterun: SCS_Data.json (The “Options” fields are missing, because I added them while typing up this post! The code will simply interpret them as empty if they’re missing.)

There could be hundreds of ESP/ESMs listed in the JSON (for compatibility). As the game starts, it’ll read in the entire data file, and then select the elements that match the current load-order to build a list of valid models to use.

This data format will almost definitely need to expand in the future for weather compatibility support, and other things I haven’t even thought of.