Registry

SML provides a few registry mechanisms for quick and easy content management.

Remote Call Object Registry

The Remote Call Object Registry is a Game Instance Subsystem that automatically registers all listed remote call objects in the Satisfactory Player Character.

You can use the Register Remote Call Object-Function to add the class of a remote call object to the registry so that it gets automatically registered in the player.

Subsystem Holder Registry

The Subsystem Holder Registry ia a Game Instance Subsystem that automatically registers all listed subsystem holders to the mod loader lifecycle. The holders are then manged by SML and called at the correct times.

You can use the Register Subsystem Holder-Function to add the class of a subsystem holder to the registry.

Mod Key Bind Registry

The Mod Key Bind Registry is a blueprint function library that provides a couple of functions that allow you to easily add your own key bindings and axis bindings to the game via the UE ActionMappings and AxisMappings system.

Since we don’t have direct access to the Satisfactory project file, we can’t add them directly to Project Settings > Engine > Input > Bindings, so instead we add them through this SML registry.

Users of your mod can edit these keybinds from the in-game keybindings screen in the options. Your keybinds will show up with the given display name grouped in a category with your mod’s name, and their set values will persist between sessions of the game.

RegisterModKeyBind(String ModReference, InputActionKeyMapping KeyMapping, Text DisplayName)

Register a given key mapping and associates it with mod reference provided. The action name (part of the InputActionKeyMapping) should be unique and start with a "ModReference." prefix to avoid conflicts with other mods. This function will throw an exception if the action name doesn’t start with the prefix described above. You can only register two keys with the same name. One of them should be a keyboard action and another is a gamepad action (optional).

RegisterModAxisBind(String ModReference, InputAxisKeyMapping PositiveAxisMapping, InputAxisKeyMapping NegativeAxisMapping, Text PositiveDisplayName, Text NegativeDisplayName)

Registers the given axis key mappings and associate them with the given mod reference. The axis names (part of the `InputAxisKeyMapping`s) should be unique and start with a "ModReference." prefix to avoid conflicts with other mods. This function will an throw exception if the axis names don’t start with the prefix described above. Both axis mappings should have equal action names, too. Satisfactory requires all axis binds to have 2 keys with opposite directions, and they will be displayed as 2 keys in the control options too. You can only register two axis binding pairs. One of them should be a keyboard axis and the other a gamepad axis (optional).

Mod Content Registry

The Mod Content Registry is a subsystem that manages registration and lifetime of any kind of modded content.

All content you create and add with your mod that is of supported types should be registered through this registry. Meaning, you should not register it yourself in the games subsystems.

This essential in ensuring that it is correctly saved, loaded, and identified by the game and other mods.

If you don’t need any dynamic behaviors the Mod Content Registry provides, you should use properties in your InitGameWorld module instance instead of calling methods on this object directly.

Content can only be registered before a save is loaded. After that moment, the registry is frozen and no changes can be made after that!

Registered content is then also tracked automatically for changes/overwrites if possible. By f.e. looking up Alpakit overwrite data.

You can use it’s Get(UObject*)-Function to get a instance of the registry.

RegisterSchematic(FName ModReference, TSubclassOf<UFGSchematic> Schematic)

Registers the given schematic.

It additionally also registers referenced recipes and items automatically.

You must also provide your mod reference so the content can get associated properly.

RegisterResearchTree(FName ModReference, TSubclassOf<UFGResearchTree> ResearchTree)

Registers the given research tree.

It additionally also registers referenced schematics automatically.

You must also provide your mod reference so the content can get associated properly.

Nodes should be type of default BPD_ResearchTreeNode.

RegisterRecipe(FName ModReference, TSubclassOf<UFGRecipe> Recipe)

Registers the given recipe.

It additionally also registers referenced items automatically.

You must also provide your mod reference so the content can get associated properly.

RegisterResourceSinkItemPointTable(FName ModReference, UDataTable* PointTable)

Registers the given resource sink item point table.

You must also provide your mod reference so the content can get associated properly.

TArray<FItemRegistrationInfo> GetLoadedItemDescriptors()

Returns a list of all currently loaded item descriptors.

TArray<FItemRegistrationInfo> GetObtainableItemDescriptors()

Returns a list of all item descriptors that are referenced as product in recipes.

FItemRegistrationInfo GetItemDescriptorInfo(TSubclassOf<UFGItemDescriptor> ItemDescriptor)

Returns the registration info of the given item descriptor.

TArray<FRecipeRegistrationInfo> GetRegisteredRecipes()

Returns a list of all currently registered recipes.

FRecipeRegistrationInfo GetRecipeInfo(TSubclassOf<UFGRecipe> Recipe)

Returns the registration info of the given recipe.

TArray<FResearchTreeRegistrationInfo> GetRegisteredResearchTrees()

Returns a list of all currently registered research trees.

FResearchTreeRegistrationInfo GetResearchTreeRegistrationInfo(TSubclassOf<UFGResearchTree> ResearchTree)

Returns the registration info of the given research tree.

TArray<FSchematicRegistrationInfo> GetRegisteredSchematics()

Returns a list of all currently registered schematics.

FSchematicRegistrationInfo GetSchematicRegistrationInfo(TSubclassOf<UFGSchematic> Schematic)

Returns the registration info of the given schematic.

bool IsRecipeRegistered(TSubclassOf<UFGRecipe> Recipe)

Allows checking if the given recipe is already registered.

bool IsSchematicRegistered(TSubclassOf<UFGSchematic> Schematic)

Allows checking if the given schematic is already registered.

bool IsResearchTreeRegistered(TSubclassOf<UFGResearchTree> Recipe)

Allows checking if the given research tree is already registered.

FBasicRegistrationInfo

This struct is the base struct for all registration info structures. It holds information about the actual object it holds information for, and it references the registering mod.

FName ModReference

The mod reference of the mod that originally registered this content.

FName OverwrittenByModReference

If the object was overwritten, this holds the reference to the mod owning the overwritten asset.

UClass* RegisteredObject

The object/content this registration info holds registry information about.

FItemRegistrationInfo (extends FBasicRegistrationInfo)

This struct holds registry information for UFGItemDescriptors.

TArray<TSubclassOf<UFGRecipe>> ReferencedBy

Holds a list of recipes that reference this item.

FRecipeRegistrationInfo (extends FBasicRegistrationInfo)

This struct holds registry information for UFGRecipes.

TArray<TSubclassOf<UFGSchematic>> ReferencedBy

Holds a list of schematics that reference this recipe.

FSchematicRegistrationInfo (extends FBasicRegistrationInfo)

This struct holds registry information for UFGSchematics.

TArray<TSubclassOf<UFGResearchTree>> ReferencedBy

Holds a list of research trees that reference this schematic.

FResearchTreeRegistrationInfo (extends FBasicRegistrationInfo)

This struct holds registry information for UFGResearchTrees.