Skill Upgrades Tree
Library mod for adding skill upgrades to skills that can be selected in lobby. Comes with own skill upgrades if there are no other skill upgrades
Screenshots 1 screenshots
About this mod Author’s original text
How to use (For modders)
Adding Skill Upgrades
SkillUpgradesTreeDef
- Create SkillUpgradesTreeDef ScriptableObject
- Fill SkillUpgradesTreeDef List> skillsToApply list with R2API.AddressReferencedAssets.AddressReferencedAsset to which skills add skill upgrades to. Please keep skills within the same SkillFamily
- Fill SkillUpgradesTreeDef List skills with SkillUpgrade
- Run Register method to register this skill upgrades tree
SkillUpgrade
- Create SkillUpgrade class
- Fill SkillUpgrade string id with your string identificator. MUST BE UNIQUE!!!
- Fill SkillUpgrade string nameToken with your name language token
- Fill SkillUpgrade string descriptionToken with your description language token
- Fill SkillUpgrade string loreToken with your lore language token
- Fill Sprite icon with your icon Sprite
- Fill List mutuallyExclusiveWith with SkillUpgrade.id that cannot be selected together. SkillUpgrade you included here will also have your SkillUpgrade as mutually exclusive
- Fill int selectiveUpgradesRequired with how much Selective RequiredUpgrade required to select this skill
- Fill List requiredUpgrades with required skill upgrades needed to be selected first
RequiredUpgrade
- Create RequiredUpgrade struct
- Fill string requiredSkillId with SkillUpgrade.id that is needed to be selected
- Fill RequiredUpgradeCondition condition either with Required if required skill needs to be selected or Selective if you want to make either of Selective required upgrades needed to be selected to satisfy selection condition
How it looks
Getting Skill Upgrades
- To get if the player has selected the skill upgrade run SkillUpgradesTreeApi.GetSkillUpgradeSelected(this SkillLocator skillLocator, string upgradeId) or SkillUpgradesTreeApi.GetSkillUpgradeSelected(this SkillLocator skillLocator, SkillUpgradeIndex skillUpgradeIndex)
Examples
- Mod has SkillUpgradesTreeDef TestDef in SkillUpgradesTreeApi that gets registered if there are zero SkillUpgradesTreeDef registered
- Functionality of the upgrades in the SkillUpgradesTreeDef TestDef are located in TestClass
How to use (For players)
- Select the skill that has skill upgrades and there will be a new menu to select skill upgrades. You cannot miss it
- Move skill upgrades screen with WASD on keyboard or right thumbstick on controller
- Close skill upgrades menu by selecting skill that doesn't have skill upgrades
- On controllers navigate through the menu using DPAD or left thumbstick. To navigate back to skill selection menu press left until you navigate back
TODO:
- Improve skill upgrades selection menu
- Add UnlockableDef unlock requirement to SkillUpgrade
- Add ability for director to spawn monsters with selected upgrades if possible
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Dependencies
Install these first, or the mod will not work:
RiskofThunder-HookGenPatcherRiskofThunder-R2API_Addressables