pipakin-SkillInjector icon

SkillInjector

Injects new skills in a simple way for mod authors.

Last updated 8 months ago
Total downloads 18716
Total rating 2 
Categories Mods
Dependency string pipakin-SkillInjector-1.1.1
Dependants 50 other mods depend on this mod

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.800 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.800

README

Injects skills into Valheim's skill system. Handles adding to the list and both the cheat options (Raise/Reset). Leaves you to handle getting XP and actually applying effects. You will need to pick a unique number for your skill id. I'd stick with numbers > 200.

Usage:

    [BepInDependency("com.pipakin.SkillInjectorMod")]
    public class MySkillMod: BaseUnityPlugin
    {
        const int SKILL_TYPE = 299;
        ...

        void Awake()
        {
        SkillInjector.RegisterNewSkill(SKILL_TYPE, "MyCoolSkill", "Doing Cool Stuff", 1.0f, null, Skills.SkillType.Unarmed);
        }

        ...
    }

the parameters are:

  • id - the numeric id for your skill. MUST BE UNIQUE.
  • name - the name of your skill.
  • description - the description of your skill.
  • increment - the increment to adjust your skill by when increasing.
  • icon - the icon for your skill (Unity Sprite). Can be null if you use a template skill to base your icon on.
  • template - the skill to copy the icon from if you don't provide an icon.

Known issues:

  • Doesn't support multiple languages for the skill name (working on it).

Github link: https://github.com/pipakin/PipakinsMods/tree/master/SkillInjector

All my mod code on GitHub: https://github.com/pipakin/PipakinsMods

Available versions

Please note that the install buttons only work if you have compatible client software installed, such as the Thunderstore Mod Manager. Otherwise use the zip download links instead.

Upload date Version number Downloads Download link  
2021-3-17 1.1.1 18666 Version 1.1.1 Install
2021-3-17 1.1.0 50 Version 1.1.0 Install