LoadoutAPI - risk-of-thunder/R2API GitHub Wiki
Use ContentAddition
The following LoadoutAPI
methods are obsoleted and should instead use the ContentAddition
submodule under it.
public static bool AddSkill(Type? t)
- please add your SkillTypes via
R2API.ContentManagement.ContentAdditionHelpers.AddEntityState<T>()
- please add your SkillTypes via
SerializableEntityStateType StateTypeOf<T>()
- please add your SkillTypes via
R2API.ContentManagement.ContentAdditionHelpers.AddEntityState<T>()
- please add your SkillTypes via
public static bool AddSkillDef(SkillDef? s)
- please add your SkillDefs via
R2API.ContentManagement.ContentAdditionHelpers.AddSkillDef()
- please add your SkillDefs via
public static bool AddSkillFamily(SkillFamily? sf)
- please add your SkillFamilies via
R2API.ContentManagement.ContentAdditionHelpers.AddSkillFamily()
- please add your SkillFamilies via
LoadoutAPI
Skins
CreateSkinIcon
This method generates a skill icon styled after the in-game ones.
SkinDefInfo
/// A container struct for all SkinDef parameters.
/// Use this to set skinDef values, then call CreateNewSkinDef().
CreateNewSkinDef
/// Creates a new SkinDef from a SkinDefInfo.
/// Note that this prevents null-refs by disabling SkinDef awake while the SkinDef is being created.
/// The things that occur during awake are performed when first applied to a character instead.
AddSkinToCharacter
/// Adds a skin to the body prefab for a character.
/// Will attempt to create a default skin if one is not present.
/// Must be called during plugin Awake or OnEnable. If called afterwards the new skins must be added to bodycatalog manually.