SynthCALIO

Configuration is done in JSON files. Below is a guide to the JSON format used by the SynthCALIO.
While configuration can be split over multiple files, they are all read in at once, so you can reference other records created in other files.
It will also automatically add the leveled item lists in an order that will not cause any missing entries, when referenced by another leveled item list.
You will get an error if circular references are detected.

Common

Both Leveled Item Lists and Outfits contain the following.

NOTE
Whenever entering a FormID in SynthCALIO, use the following format.
"ID:ModName.esp"
ID is the six hexadecimal digits, ID of the record. Do not include 0x. Leading 0s can be removed
ModName.esp is the name of the mod file include extension.

Valid examples:
  • "0001B3:Some Mod.esp"
  • "1B3:Mod.esp"
  • "A1E:Skyrim.esm"
Name:
Mandatory. This will be the EditorID of the record created. EditorIDs should be unique across all of Skyrim's mods, so keep this in mind when naming them.
Should only contain letters and numbers. No spaces or special characters.
SkipIfMissing:
Optional. Number of items listed, that are missing from your load order, that will cause this entry to be skipped. Default is 1 (Any).
This will exclude any that you have listed as Optional.
If set to 0, then it will never skip and could create an empty Leveled Item List / Outfit.
If set to -1, then will only skip if no non-optional entries are added to the list.
SPID:
Optional. List of SPID entries to add to INI file if this entry is added. There are 2 valid formats for this
Both formats exclude the FormOrEditorID which will be automatically filled in by the patcher, to the assigned FormID in the correct SPID format.
Refer to the SPID article SPID: The Complete Reference for more information.

Excluding FormType
Should look like "StringFilters|FormFilters|LevelFilters|TraitFilters|CountOrPackageIndex|Chance"
FormType will be either, "Item" or "Outfit" depending on if SPID added to Leveled Item List or Outfit.

Including FormType
Should look like "FormType=|StringFilters|FormFilters|LevelFilters|TraitFilters|CountOrPackageIndex|Chance"
Use this if you do not want the default FormType used.

Leveled Item Lists

Flags:
Optional. Valid values are "CalculateFromAllLevelsLessThanOrEqualPlayer", "CalculateForEachItemInCount", "UseAll", "SpecialLoot".
Multiple values can be used, separated by a comma. Example: "Flags": "CalculateFromAllLevelsLessThanOrEqualPlayer, CalculateForEachItemInCount"
ChanceNone:
Optional. Sets the ChanceNone value on the created record. Default is 0.
Can be either a number between 0 and 1 (0.5 = 50%) or a string like "50%".
Entries:
List of entries to add to this leveled item list.

Format
{?}{[Lv#]} {#x} FormIDorEditorID
Parts surrounded by {} are optional. Do not include the {}.
  • {?} - Optional. If present, then this entry is optional and will not be counted towards the SkipIfMissing count. No spaces between ? and [Lv#].
  • {[Lv#]} - Optional. If present, then this will set the Level value to # for this entry. Default: [Lv1]
  • {#x} - Optional. If present, then this will set the Count value to # for this entry. Default: 1x
  • FormIDorEditorID - Mandatory. This is the FormID or EditorID of the item to add to the list. If referencing another Leveled Item List created by SynthCALIO you must use the Name you assigned on that Leveled Item List as the EditorID

Outfits

Items:
List of items to add to this leveled item list as either FormID or EditorID.
If referencing a Leveled Item List created by SynthCALIO you must use the Name you assigned on that Leveled Item List as the EditorID
Can add ? prefix to make the entry optional. This will not count towards the SkipIfMissing count. No spaces between ? and FormIDorEditorID.
DefaultOutfit:
Optional. If this outfit is added, will update the NPC's Default Outfit to this one. This will actually update the record, so good for setting default outfit for unique NPCs.
For others where you may want to only assign the outfit to some non-unique NPCs, I recommend using SPID instead as it has the simple chance option.
SleepingOutfit:
Optional. If this outfit is added, will update the NPC's Sleeping Outfit to this one. This will actually update the record, so good for setting default outfit for unique NPCs.
For others where you may want to only assign the outfit to some non-unique NPCs, I recommend using SPID instead as it has the simple chance option.
As Outfit default FormType for SPID you would need to use the following SPID format:
"SleepOutfit=|StringFilters|FormFilters|LevelFilters|TraitFilters|CountOrPackageIndex|Chance"
While the above configurations can be used to create SPID text configuration files, as of v1.3 SynthCALIO can also be used to create any other text based configuration files that need to contain the Form ID of records created by SynthCALIO.
This is done by adding a "Outputs" folder under the SynthCALIO configuration folder, which would be by default Skyrim/Data/SynthCALIO/Outputs/.
Any files added to this folder including in subdirectories will be checked and if matches defined configured outputs will be processed, and matching files created in the same relative location under Skyrim/Data/ (Still in the defined Output folder defined in Synthesis settings).

Defined outputs

By default there are 2 defined outputs configured for SPID and SkyPatcher. These are configured in outputs.ini file in the SynthCALIO configuration folder. This file will be created if it doesn't already exists with these defaults.
If there are other commonly used frameworks that would benefit from this please let me know and I can add them to the default outputs.ini file.

You can also add outputs configurations into your actual text based files. This is done by adding a comment as the very first line in the file.
Line should start with any of the following supported comment prefixes based on what your file normally would use for comments. Currently supported are //, # and ;
After that it should say "SynthCALIO - " followed by key=value pairs separated by semi-colons (;).
All must be on the single first line of the file.
Example: "; SynthCALIO - RemoveHeader=yes;FormID={id}:{mod};"

For a file located in the Outputs folder to be processed, a valid configuration for the file must be present either in the outputs.ini file or in the first line of the file itself.
Also that configuration must at least include a valid FormID settings else it will be skipped.

Configurations are combined from the outputs.ini file and the first line of the file itself. So if you have a configuration in both, the one in the file will override the one in the outputs.ini file, but only for settings you defined. Other settings can come from other matching configurations for that file of defaults if none defined. For configurations in the outputs.ini file, they are processed top to bottom, so the last matched value for any setting will be used, if not overridden by in-file configuration.
Higher priority configurations (lower in output.ini or in-line) will only replace the settings defined in the higher priority configuration. If you don't define one then setting from lower priority is used, but if you define one but leave it blank then it will override. So defining a blank FormID in a higher priority configuration will make that file be skipped as FormID is mandatory in the final configuration used.

Outputs Settings

[Section Name]
Mandatory in outputs.ini. INI files are broken up into sections. The section name is used to match the file name relative to the Outputs folder. Wildcards are supported, so * can be used to match any number of characters. However * won't match multiple directories, unless you use */ or some/parent/dir/*/filename.ext
* can match nothing, so */ file won't exclude matching files in the root of the Outputs folder.
Filename is relative to the Outputs folder, so you must not start it with a / else it won't match anything.
FormID
Mandatory in final combined configuration. Default is empty. If empty after applying matching config entries, file is skipped. Must include at least one pair of FormID variables else value is invalid and file will be skipped. {mod} or {mod.esp} and {id} or {0id}
Rename
Default is empty. Useful if file name must include the SynthCALIO patch file name. Should include at least 1 file variable, else just name the config file this already. If multiple files renamed to same they will all be combined into the single file. This includes if you using SPID via the JSON config files and here, it will combine the results just fine. Due to this best not to rename too conflicting file names if text file has structure, like XML based files. For SPID and SkyPatcher however it will work fine.
As long as Rename is just a file name, the resulting file will still exist in the same sub-folder as the original file.
NOTE: I have no intension of removing SPID from the JSON files, as I think it works well there, but wasn't going to work as well for SkyPatcher and possibly others, so added this option.
OnIncomplete
Default is RemoveLine. Valid values:
  • RemoveLine: Will just remove any line from the file that contains variables that were not replaced. Unless nothing was replaced, in which case the whole file is skipped. So won't create output file just full of comments.
  • SkipFile: If any variable was not replaced, file is skipped.
KeepHeader
Default is True. Valid values:
  • False: If one liner SynthCALIO header exists, it's settings are still used, but header is removed from resulting output file.
  • True: If one liner SynthCALIO header exists, it's settings are still used, and the header will remain in the resulting output file.
Regex
Default is empty. Not available in header of output files. If defined uses supplied Regular Expression to match output file names, instead of the wildcard supplied in the section name. Unlike other settings this is not inherited for other matching sections. When using Regex, the section name is ignored, just give it a descriptive unique name.

Variables

Variables can be used in FormID and Rename settings, as well as in the source output files. They are always wrapped in curly brackets {}.
{mod}
Usable in all locations that variables can be used. Will be replaced with the SynthCALIO plug-in file name excluding file extension
{mod.esp}
Usable in all locations that variables can be used. Will be replaced with the SynthCALIO plug-in file name including file extension
{id}
Usable only in FormID setting. Will replace with the FormID excluding any leading 0s
{0id}
Usable only in FormID setting. Will replace with the FormID including any leading 0s
{EditorID}
Usable only in source output files. EditorID should be replaced with the EditorID used in SynthCALIO, for the FormID you want. Will replace with FormID in the format listed in FormID setting. At least 1 of these must be found and replaced in the file else file will be skipped.

Generic Example

{
  "LeveledItems": [
    {
      "Name": "EditorID4LeveledItem1",
      "Flags": "UseAll",
      "ChanceNone": "10%",
      "SkipIfMissing": 1,
      "Entries": [
        "123456:FormKey.esp", // Comments are allowed
        "EditorID"
      ]
    },
    {
      "Name": "EditorID4LeveledItem2",
      "Flags": "UseAll",
      "ChanceNone": 0.1,
      "Entries": [
        "[Lv5] 1x 123456:FormKey.esp", // Can include Level and Count information in this format.
        "[Lv5] EditorID" // Can exclude Level or Count if you want the default value of 1.
      ]
    },
    {
      "Name": "EditorID4LeveledItemAll",
      "Flags": "CalculateFromAllLevelsLessThanOrEqualPlayer, CalculateForEachItemInCount",
      "Entries": [
        "EditorID4LeveledItem1", // Must use EditorID when referencing other records created by SynthCALIO
        "?EditorID4LeveledItem2" // This entry is optional.
      ],
      "SPID": [ "StringFilters|FormFilters|LevelFilters|TraitFilters|CountOrPackageIndex|Chance" ] // SPID entry to add to INI, unless skipped. Excludes the starting Item=FormOrEditorID| part as that is automatically added.
    }
  ],
  "Outfits": [
    {
      "Name": "EditorID4Outfit",
      "Items": [ "EditorID4LeveledItemAll" ],
      "SkipIfMissing": 1,
      "DefaultOutfit": [
        "ABC123:Dragonborn.esm" // Can have comments
      ],
      "SleepingOutfit": [
        "NPCEditorID" // Can use EditorID or FormID
      ],
      "SPID": [
        "StringFilters|FormFilters|LevelFilters|TraitFilters|CountOrPackageIndex|Chance", // SPID entry to add to INI, unless skipped. Excludes the starting Outfit=FormOrEditorID| part as that is automatically added.
        "SleepOutfit = |StringFilters|FormFilters|LevelFilters|TraitFilters|CountOrPackageIndex|Chance" // Can include FormType if you don't want Outfit, but FormOrEditorID must still be empty, so first | should be straight after =.
      ]
    }
  ]
}