Fleet JsonsFleet jsons are the files in which fleets are specified. They must be put in data/variants_lib/fleets in a mod's folder. An annotated example of one can be found in data/variants_lib/fleets of this mod's folder. As a brief overview, the files allow you to partition a fleet's fleet points into groups that will be dedicated to specific lists of ship variants. Fleet jsons are not merged, and the game will not load if an attempt is made to load two of them with the same id. For this reason, I would recommend prefacing all of your fleetDataIds with some unique string to avoid conflicts similar to how you would give ids to modded ships. Below is the previously mentioned example fleet json.
Spoiler
{
# the classpath of the fleet factory to load this fleet json with, the class in this field must
# extend variants_lib.data.VariantsLibFleetFactory
# DEFAULT: variants_lib.data.VariantsLibFleetFactory
"usingFactory":"variants_lib.data.VariantsLibFleetFactory",
# mods that need to be enabled for this file to be loaded. Use this to make fleets with content
# from other mods which may not be enabled. Put .variant files with content from other mods in
# data/variants_lib/modded_variants and ensure its file name is the same as its variant id
# DEFAULT: no mods. If your mod is enabled the fleet will be loaded
"requiredMods":["variants_lib"],
# String used to identify this fleet variant. Must be unique
"fleetDataId":"example_fleet",
# minimum dp of fleet to be edited to this fleet variant
"minDP":70,
# maximum dp of fleet to be edited to this fleet variant
"maxDP":400,
# If the fp of the fleet being edited is above minDP but below this field, set the DP of the fleet
# to the value of this field
# DEFAULT: 0, DP is not changed
"setDPToAtLeast":100,
# Whether to allow auto fit on the fleet. The option here takes priority over all other features
# in this mod that affect autofit
# DEFAUT: no preference, do what other settings around autofit say
"autofit":false,
# Whether to spawn this fleet json if the faction the fleets is spawning as has no heavy industry
# DEFAULT: true
"spawnIfNoIndustry":false,
# Personality unofficered ships in this fleet will have in combat
# DEFAULT: the factions officer aggressiveness specified in doctrine
"defaultFleetWidePersonality":"aggressive",
# commander skills that will be added to the fleet's captain
# DEFAULT: no additional skills
"additionalCommanderSkills":["support_doctrine"],
# automatically generate freighters for this fleet, with the float being the fraction of dp given to them
# DEFAULT: feature is not enabled
"autoLogitsticsFreighterDP":0.07,
# automatically generate tankers for this fleet, with the float being the fraction of dp given to them
# DEFAULT: feature is not enabled
"autoLogitsticsTankerDP":0.07,
# automatically generate personnel carriers for this fleet, with the float being the fraction of dp given to them
# DEFAULT: feature is not enabled
"autoLogitsticsPersonnelDP":0.04,
# automatically generate civilian liners for this fleet, with the float being the fraction of dp given to them
# DEFAULT: feature is not enabled
"autoLogitsticsLinerDP":0.04,
# variants and their amount to always add to fleets of this type
# DEFAULT: no additional ships
"alwaysInclude":{"ox_Standard":2, "atlas_Standard":1},
# Specify what portion of the fleet's dp should be dedicated to different groups of ships
# Based on how the fleet generation system works, it's best to have ships with similar dp
# in each partition and have the higher average dp partitions before lower dp ones
"fleetPartitions":[
# a partition
{
# specifies the fraction of the fleets dp that will be occupied by ships in this partition.
# So partitionWeight / sumOfAllPartitionWeights of the fleets dp will be dedicated to ships
# in this partition. Any unused dp is given to be used by the next partition down
"partitionWeight":30,
# A list of variants in the partition and their respective weights. Each variant has a
# variantWeight / sumOfAllVariantWeightsInThisPartition chance of spawning. Note that
# spawning probabilities can be skewed if some variants can't be spawned with the partitions
# allotted dp
"variants":{
"onslaught_xiv_Elite":50,
"onslaught_Elite":50,
}
},
# another partition
{
"partitionWeight":40,
"variants":{
"dominator_AntiCV":13.16,
"dominator_Assault":13.16,
"dominator_Support":13.16,
"dominator_Outdated":13.16,
"eagle_Assault":7.89,
"eagle_xiv_Elite":18.42,
"mora_Assault":10.53,
"mora_Strike":10.53,
}
},
{
"partitionWeight":20,
"variants":{
"falcon_xiv_Elite":20,
"enforcer_Assault":20,
}
},
{
# Maximum amount of the fleet's dp that will be dedicated to ships in this partition.
# Useful for capping the amount of certain ships can spawn.
# DEFAULT: no limit on dp
"maxDPForPartition":12,
# Maximum amount of ships that will be dedicated to ships in this partition
# Useful for capping the amount of certain ships can spawn.
# DEFAULT: no limit on ships spawned
"maxShipsForPartition":3,
"partitionWeight":2,
"variants":{
"hound_Standard":100,
}
},
{
"partitionWeight":3,
"variants":{
# ghetto way of spawning logistics of appropriate size
"colossus_Standard":10,
"atlas_Standard":100,
"buffalo_hegemony_Standard":1,
}
},
{
"partitionWeight":3,
"variants":{
"phaeton_Standard":1,
"prometheus_Super":100,
}
},
],
}
data/variants_lib/fleets/fleets.csvfleets.csv is used to specify which fleet jsons to load and the spawning weights that correspond to each fleet. Enter the file name of a fleet json including its extension to tell the mod to load the file. The other fields in the csv are spawning weights for specific fleet types, which are strings found under the "$fleetType" memkey in the memory of in game fleets. Enter a weight in a fleet type field to determine how likely the fleet json will appear compared to others. Leaving a fleet type field blank or set to zero prevents its corresponding fleet json from spawning as that fleet type. The blank fleets.csv in this mods folder contains all vanilla fleet types and some nexerlin fleet types as columns. Add additional fleet types fields to the csv by adding a column with the string that will stored under the "$fleetType" memkey. This file is merged with those of all other enabled mods with no overriding allowed. A filled in fleets.csv file looks something like this:
data/variants_lib/factions_tags.csvfactions_tags.csv is primarily used to define spawning details for fleet jsons. The factionID field is self explanatory. The fleets field defines which fleet jsons should spawn in certain factions. Define which fleet jsons you want to spawn with a comma separated list of fleetDataIds. The specialFleetSpawnRate field is the fraction of fleets that will spawn as fleet jsons. Input a decimal number between zero and one. The tags field is input as a list of comma separated strings which can be anything. The only tag that does anything at the moment is "no_autofit", which disables autofit for most fleets of the faction. The specialFleetSpawnRateOverrides is a specialFleetSpawnRate field for specific fleet types. Input a comma separated list of fleet types incased in quotation marks followed by a colon and a number between one and zero (ie. "taskForce":0.8, "patrolLarge":0.5, "inspectionFleet":1.0). This file is merged with those of all other enabled mods with proper appending and overriding. A filled in factions_tags.csv should look something like this.
data/variants_lib/variant_tags.csvvariants_tags.csv is used to specify details on how specific ship variants should spawn. The variantID field is for variant ids. The officerInfo field is for tags specify the skills and personality of officers that pilot the variant. Tags are input as a comma separated list. The tags hs, ce, im, dc, fm, pd, ta, bm, se, ms, gi, ew, oe, and pa correspond to the skills helmsmanship, combat endurance, impact mitigation, damage control, field modulation, point defence, target analysis, ballistic mastery, systems expertise, missile specialisation, gunnery implants, energy weapon mastery, ordinance expert, and polarised armour respectively. If the ship variant has an officer, these skills are given to the officer in the order that they are written until the officer runs out of skill slots. There are also the tags ca, ti, st, ag, and re which correspond to the personalities cautious, timid, steady, aggressive, and reckless respectively. These tags specify the personality of the officer. The smods field specifies the smods a variant should be given and their order if they are to receive smods. Input the ids of the smods as a comma separated list and they will be added in the order that they are written. Note that this smods feature will only work on factions with the "no_autofit" tag in faction_tags.csv. This file is merged, but variants can not be defined twice. A filled in variant_tags.csv may look something like this:
data/variants_lib/variants_lib_settings.jsonvariants_lib_settings.json contains settings for this mod. The enableNoAutofitFeatures field toggles no autofit features when spawning fleets. The enableFleetEditing toggles the appearance of naturally spawning fleet jsons entirely. The enableDefaultPersonalitySetting toggles whether to use the defaultFleetWidePersonality feature of fleet jsons. The universalPreModificationScripts field specifies a list of scripts that are run before fleets are processed by this mod's listener. The scripts run must implement the interface variants_lib.scripts.FleetEditingScript from the mod's api. The scripts do not run in any particular order. The universalPostModificationScripts field works the same thing as the universalPreModificationScripts except the scripts are run after fleets are processed by this mod's listener. This file is merged. Any boolean fields set to false are guaranteed to remain false after merging.
data/variants_lib/modded_variantsA folder for putting variants that appear in fleet jsons which require content from mods that may not be enabled. The file names of any variants in this folder must be identical to their ids.