MyPet icon indicating copy to clipboard operation
MyPet copied to clipboard

Skilltree Requirements

Open zerafox opened this issue 6 years ago • 11 comments

With the introduction of Inheritance introduced back into 3.0, it would be ideal to be able to restrict which Skilltrees can be selected due to the Inheritance for the player.

For example, I have created a Skilltree A that progress upwards to Skilltree A1 or Skilltree AA.

However, I do not want players who are on the Skilltree B to be able to select my Skilltrees A1 or Skilltrees AA without already being on Skilltree A.

Required Skilltree: Would require the pet already be on Skilltree A in order to choose A1 for example.

This would allow complex trees to go from something like this: A: Level Maximum 25. A1: Level Requirement 25 + Skilltree Requirement A AA: Level Requirement 25 + Skilltree Requirement A A2: Level Requirement 50 + Skilltree Requirement A1 A2A: Level Requirement 72 + Skilltree Requirement A2

zerafox avatar Dec 26 '18 19:12 zerafox

I thought about this a bit more and having different requirements that can be combined would be a great feature.

Do you think I should make the current permissions you need for a skilltree to be selectable one of these requirements too? This way the permissions are optional and it would be a lot easier for simple servers to setup MyPet as I would remove the permission requirement completly for the default skilltrees.

scomans avatar Jan 22 '19 12:01 scomans

Yes, I think a permission requirement per tree should be included. If the permission isn't provided for the tree, it shouldn't be selectable/visible at all.

Removing the permissions needed for the packaged trees would be a lot easier on new users. Since it appears they forget it's a thing needed to include for players. :P

zerafox avatar Jan 22 '19 15:01 zerafox

I meant that the permission is converted to the new requirement system which means if no permission requirement is set a permission is not needed and it's available for everyone (if all other requirements are met)

It will work like the LeashFlags.

scomans avatar Jan 22 '19 15:01 scomans

Are there any requirements that come to your mind that I could add?

I have the following atm:

  • NoSkilltree
  • Permission (will replace the permission)
  • PetLevel (will replace RequiredLevel & MaxLevel)
  • ~~PetType (not sure if it will replace MobTypes)~~
  • Skilltree

scomans avatar Jan 22 '19 15:01 scomans

I meant that the permission is converted to the new requirement system which means if no permission requirement is set a permission is not needed and it's available for everyone (if all other requirements are met)

It will work like the LeashFlags.

Of course.

Are there any requirements that come to your mind that I could add?

I have the following atm:

  • NoSkilltree
  • Permission (will replace the permission)
  • PetLevel (will replace RequiredLevel & MaxLevel)
  • ~~PetType (not sure if it will replace MobTypes)~~
  • Skilltree

I think keeping PetType and MobType separate would be ideal? Though I am unsure how this would work in unison? I understand MobType are the Types can use the Skilltree in the first place, so what PetType would do as it's own thing, I cannot quite comprehend. I do think that MobType/PetType whatever you want to call it should be the first condition checked above all else. I will consider other possibilities and get back to you though. :P

zerafox avatar Jan 22 '19 16:01 zerafox

PetType would be a duplicate to MobTypes so I will not add that as a requirement.

scomans avatar Jan 22 '19 18:01 scomans

Would the "NoSkilltree" prevent players from swapping to a "NoSkilltree" requirement Tree from swapping from say "SkillTree A" to "SkillTree B" if they were both set to have this requirement for selection?

What about a condition/requirement of "NotSkilltree" ? This can be in the form of a list.

With a system like mine, each pet is given a Tree originally. The basic Stats and abilities each Mob is given. For example a Knockback (a charge and push) for cows, a Sprint & Ride for Horses, etc; This assigned immediately on tame to the pet when the player tames/obtains the pet. From here, they can choose their skilltree to "train" their pet in. This would be were their Tree A, B, C which gives their pet unique boosts or skills according to their choice. However with a system like this it's impossible to use a "NoSkilltree" condition because the pet is automatically granted one on taming, which is the basic skills of the pet to begin with.

These skills still allow a pet to be ridden, carry a small amount of items and so-forth just having a particular pet-type. With a "NotSkilltree" system I can say "You cannot choose Skilltree B if the pet already knows Skilltree A or any variation of A" and force them to move along the B track or any other track I wanted them to be following.

zerafox avatar Jan 22 '19 19:01 zerafox

NoSkilltree simply means that the skilltree cannot be selected if the pet already has a skilltree. This could be used for the initial skilltree selection. This also makes the ChooseOnce setting obsolete.

scomans avatar Jan 22 '19 19:01 scomans

I implemented (24baa6ac684e7c5fd0c73af5c2fe8f2f7c38abbc) the requirements I mentioned above (except for the level requirement in the editor). It would be great if you could try them out and give me some feedback 🤗

scomans avatar Jan 22 '19 19:01 scomans

I could also add some of the leashflags like Baby, Adult, Size and mcMMO-Skilllevel 🤔

scomans avatar Jan 26 '19 12:01 scomans

McMMO Skilllevel I could see, but requiring something like Adult/Baby may cause an issue should the player decide to obtain a baby then use the grow-up item after selecting the tree.

zerafox avatar Jan 26 '19 13:01 zerafox