Automatic Name Resolving

In an effort to cut down on the verbosity required when writing ContentLib files, many fields will try to automatically resolve shortenings into their full version.

For example, you can use the name Desc_Coal to refer to the Coal item, in place of the fully qualified asset path /Game/FactoryGame/Resource/RawResources/Coal/Desc_Coal.

Items are resolved by comparing the supplied Item name against existing Item ClassNames in the game. The first match the mod finds will be used, regardless of class type.

Watch out for ambiguity with Class Names! Sometimes different assets can have very similar names. Be as specific as possible with the name to avoid problems with this. You can check the output logs, or look at the content in ContentInspector to find out what class a path actually resolved to after ContentLib loads it.

Class Name Prefixes and Suffixes

Prefix

It is highly suggested that you still include the prefixes, such as Build_, in order to distinguish between assets that otherwise all match the query.

For example, the shorthand "ConstructorMk1" would match the following assets:

  • The FGBuildableManufacturer /Game/FactoryGame/Buildable/Factory/ConstructorMk1/Build_ConstructorMk1

  • The FGBuildingDescriptor /Game/FactoryGame/Buildable/Factory/ConstructorMk1/Desc_ConstructorMk1

  • The FGRecipe /Game/FactoryGame/Buildable/Factory/ConstructorMk1/Recipe_ConstructorMk1

  • The FGDecorationTemplate /Game/FactoryGame/Buildable/Factory/ConstructorMk1/Deco_ConstructorMk1

    1. but the only one you care about is Desc_ConstructorMk1.

In this cause, you must include the prefix in order to specify which of these assets you’re referring to.

Suffix

Class Names have a _C suffix when they have been generated by a Blueprint. The _C suffix is optional most of the time due to the The exceptions to this are Visual Kits, which need the suffix, and Patch target lines, which must be the full path.

When referencing a descriptor’s Visual Kit, you must keep the _C suffix. For example, Desc_OreGold_C resolves to the Caterium Ore kit, but Desc_OreGold resolves to the DefaultItemMesh (default fallback).

If the asset you are patching was blueprint generated, it needs the _C. Script-generated assets may or may not need the suffix (untested).

For example, the line at the top of the file patching the Turbofuel recipe must be //Game/FactoryGame/Recipes/AlternateRecipes/Parts/Recipe_Alternate_Turbofuel.Recipe_Alternate_Turbofuel_C