Satisfactory Blueprint Library
The SBL is used to provide BP-Scripts access to SML so they don’t need to use native code.
The USMLBlueprintLibrary
provides the functions you can use to interact with SML.
Logging
The debug logger is used to provide quick usage of the level based
logging for the the console of SML. It does that by providing multiple
static functions you can find under SML/Logging
.
Config
The SBL also provides the ability to save and load configurations in Blueprints.
As config
you can pass any kind of custom struct.
But only these types will get parsed properly:
-
String
-
Float
-
Integer
-
Bool
-
other Structs
-
Array of any of the above allowed types
void SaveConfig(String modid, Struct config)
Dumps the given config struct as a Json and saves it as the config file for the mod with the given name.
void LoadConfig(String modid, Struct& config)
Parses the config file of the given mod id to the attributes of the given config struct. Attributes not existent in the config file won’t get changed. (basically if you set default values for the struct, or just set the structs' variables to the values you want to use as default, this would allow you to define default values for the config files) Settings set in the config file which don’t have a corresponding attribute in the config struct simply get ignored.
Mod Registry Utility
There are functions allowing you to interact with the Mod Registry and obtain other mod info as well as helper functions for converting this information between different display formats.
FVersion ParseVersionString(String String)
This function allows you to easily convert a string encoded version like 1.2.3
to a version structure.
String Conv_VersionToString(FVersion Version)
This function allows you to convert a version structure
to a human readable version string like 1.2.3
.
bool IsModLoaded(String ModId)
This function takes a mod reference as input and checks if any kind of mod with that reference got loaded or not.
Array<String> GetLoadedMods()
This function returns the mod references of all currently loaded mods in an array.
ModInfo GetLoadedModInfo(String ModId)
This function allows you to access additional information about the mod with the given reference.
Texture2D LoadModIconTexture(String ModId, Texture2D FallbackIcon)
This function allows you to load the mod icon of the mod with the given reference as a Texture2D. If no Texture or mod is found, the function will return the fallback icon.
Version GetSMLVersion()
This function allows you to retrieve the version of the currently installed mod loader.
FVersion
This struct contains information about a SemVer compatible version in a parsed state.
Member Fields
-
int64 Major (read only)
The major SemVer version number
-
int64 Minor (read only)
The minor SemVer version number
-
int64 Patch (read only)
The SemVer patch number
-
String Type (read only)
The version type of this SemVer version.
Can be:
-
"alpha"
-
"beta"
-
"release"
-
-
String BuildInfo (read only)
Additional information to the version build.
FModInfo
This struct contains information about a loaded mod. Mainly contents of the data.json of the mod.
Member Fields
-
String ModId (read only)
The mod reference
-
String Name (read only)
The display name of the mod
-
FVersion Version (read only)
The version of the mod
-
String Description (read only)
The description of the mod
-
Array<String> Authors (read only)
The names of the authors of the mod in a list.
-
String Credits (read only)
Credits of the mod