Skip to content
DestroyedClone edited this page Apr 17, 2022 · 1 revision

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>()
  • SerializableEntityStateType StateTypeOf<T>()
    • please add your SkillTypes via R2API.ContentManagement.ContentAdditionHelpers.AddEntityState<T>()
  • public static bool AddSkillDef(SkillDef? s)
    • please add your SkillDefs via R2API.ContentManagement.ContentAdditionHelpers.AddSkillDef()
  • public static bool AddSkillFamily(SkillFamily? sf)
    • please add your SkillFamilies via R2API.ContentManagement.ContentAdditionHelpers.AddSkillFamily()

Skins

CreateSkinIcon

This method generates a skill icon styled after the in-game ones. Huntress Default Skin Icon

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.