CompatSkills

CompatSkills

8M Downloads

Dynamic Sword Skills level/tier system compatibility

Ariannae opened this issue ยท 1 comments

commented

I'd like to request the ability to lock specific Dynamic Sword Skills levels behind requirements.

Mod in question:
https://minecraft.curseforge.com/projects/dynamic-sword-skills

Its API:
https://minecraft.curseforge.com/projects/swordskillsapi

commented

Mainly just for my reference so that I don't have to look up the class names and methods when I get around to implementing this given it will need a decent amount of testing.

Getting their "skill info" by player: https://github.com/coolAlias/DynamicSwordSkills/blob/master/src/main/java/dynamicswordskills/entity/DSSPlayerInfo.java#L646

Checking if they have the skill:
https://github.com/coolAlias/DynamicSwordSkills/blob/master/src/main/java/dynamicswordskills/entity/DSSPlayerInfo.java#L175

Getting the skill by a name for purposes of having a string requirement syntax:
https://github.com/coolAlias/DynamicSwordSkills/blob/master/src/main/java/dynamicswordskills/skills/SkillBase.java#L149

I will also probably need to make it either always invalidate the requirement or come up with some way. If the skill can only be changed by right clicking with the "orb" this could be by having a listener for right clicking and then checking if it is from dynamic sword skills. (My best guess is that changing skill by command will end up requiring the player to relog due to no event being thrown when the skills level/info gets changed. This may be able to be bypassed if forge has an event for commands and I am able to parse/recognize that it was a command from dynamic sword skills.)

I may also end up needing to create a lock for it that can be registered to automatically be checked when items are checked. (This would be for making it so that you have to have certain requirements met to use an item with specific skills, given from what I understand items can bypass the players "level" if they have specific data). Ideally I won't have to do this given I hope that data is stored in the items NBT.