We recommend using the Thunderstore Mod Manager or an alternative for installing mods
It's a library for other devs!!! It allows adding more skills for characters
Last updated | a week ago |
Total downloads | 17772 |
Total rating | 12 |
Categories | Mods Libraries |
Dependency string | KingEnderBrine-ExtraSkillSlots-1.4.0 |
Dependants | 6 other mods depend on this mod |
Unified BepInEx all-in-one modding pack - plugin framework, detour library
Preferred version: 5.3.1Adds scrolling to lobby UI (skills, loadout, character select, difficulty)
Preferred version: 1.6.0Standalone MMHOOK_Assembly-CSharp for other mods to depend on.
Preferred version: 1.0.1It's utility mod and does almost nothing on its own.
What you should know about it is that mod has key bindings for extra skills that must be assigned in settings.
Here's, I think, the best key bindings (default, starting from 1.4.0):
Adding extra skill is almost the same as adding normal skills.
Along with SkillLocator
, you need to use ExtraSkillLocator
. It contains info about extra skills.
Here's code snipet for adding extra skills:
var extraSkillLocator = commandoPrefab.AddComponent<ExtraSkillLocator>();
extraSkillLocator.extraFirst = firstExtraSkill;
extraSkillLocator.extraSecond = secondExtraSkill;
extraSkillLocator.extraThird = thirdExtraSkill;
extraSkillLocator.extraFourth = fourthExtraSkill;
That's all it takes for adding simple skills.
All defined classes extend corresponding classes from RoR2. Class naming follows one pattern: Extra{NameOfRoR2Class}.
ExtraSkillLocator
- The main thing that you need. It's a component that you add to your character prefab to be able to use extra skills.
Fields:
extraFirst
- contains info about first extra skillextraSecond
- contains info about second extra skillextraThird
- contains info about third extra skillextraFourth
- contains info about fourth extra skillExtraInputBankTest
- Containts info about user inputs state for extra skills.
Fields:
extraSkill1
- contains info about first extra skill stateextraSkill2
- contains info about second extra skill stateextraSkill3
- contains info about third extra skill stateextraSkill4
- contains info about fourth extra skill stateExtraSkillSlot
- Contains consts for extra skill slots. Can be used to get skills from the corresponding slot from SkillLocator
.
RewiredActions
- Contains consts for rewired actions. With that info, you can manually access corresponding buttons state via Rewired.Player
ExtraSkillSlotsPlugin
- Main class of this mod. There's nothing you can do with it, except to look at BepInPlugin definition to define a dependency to that mod.
If you got to the point where you need more skills, you probably know enough about creating characters/skills, just want to leave here a small guide for skills creating.
ExtraInputBankTest
(and any component that not stored in fields) from EntityState
you should use outer
field, for example:var extraInputBankTest = outer.GetComponent<ExtraInputBankTest>();
//Create new SkillFamily
var firstSkillFamily = ScriptableObject.CreateInstance<SkillFamily>();
//IMPORTANT! Do not forget to add name for SkillFamily
//because game uses it for saving loadout
//Also I recomend to follow naming convention "{PrefabName}{SkillSlot}Family";
(firstSkillFamily as ScriptableObject).name = "MyCharacterBodyFirstExtraFamily";
//Adding skill variants to the family
firstSkillFamily.variants = variants;
//Registering skill family in catalog
LoadoutAPI.AddSkillFamily(firstSkillFamily);
//Adding new GenericSkill component to character prefab
var firstExtraSkill = myCharacterPrefab.AddComponent<GenericSkill>();
//Setting SkillFamily to our GenericSkill
firstExtraSkill.SetFieldValue("_skillFamily", firstSkillFamily);
...
//Adding ExtraSkillLocator to character prefab
var extraSkillLocator = myCharacterPrefab.AddComponent<ExtraSkillLocator>();
//Assigning our skill to corresponding slot
extraSkillLocator.extraFirst = firstExtraSkill;
Feel free to ping me on discord @KingEnderBrine
if you found one.
1.4.0
DrBibop
for code example.1.3.2
1.3.1
1.3.0
1.2.2
1.2.1
Moved extra skill row up a bit, to not interfere with the default skills stock number.
Optimization.
1.2.0
Added BaseSkillState
hooks
Again fixed stats recalculation.
1.1.0
Updated for RoR2
release version.
Changed extra skill slot indices (11, 12, 13, 14). Mainly this was done to not interfere with Sniper's ammo.
Added support for Purity
cooldown reduction.
1.0.4
1.0.3
Fixed issue where stats recalculation starts throwing errors in console.
Updated dependencies
1.0.2
1.0.1
1.0.0
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-4-6 | 1.4.0 | 1103 | Version 1.4.0 | Install |
2021-4-2 | 1.3.2 | 823 | Version 1.3.2 | Install |
2021-4-2 | 1.3.1 | 234 | Version 1.3.1 | Install |
2021-4-2 | 1.3.0 | 11 | Version 1.3.0 | Install |
2021-1-5 | 1.2.2 | 8136 | Version 1.2.2 | Install |
2020-8-23 | 1.2.1 | 4604 | Version 1.2.1 | Install |
2020-8-22 | 1.2.0 | 319 | Version 1.2.0 | Install |
2020-8-17 | 1.1.0 | 845 | Version 1.1.0 | Install |
2020-7-23 | 1.0.4 | 876 | Version 1.0.4 | Install |
2020-7-23 | 1.0.3 | 85 | Version 1.0.3 | Install |
2020-7-12 | 1.0.2 | 551 | Version 1.0.2 | Install |
2020-7-12 | 1.0.1 | 81 | Version 1.0.1 | Install |
2020-7-12 | 1.0.0 | 104 | Version 1.0.0 | Install |