skillsets

#5 - published a year ago

SkillSets

SkillSets

Sets of skills provided with permissions/commands

This plugins allows you to create several sets of skills for your arena or RP server.
You can assign one or more SkillSets to PermissionGroups.

If a player never ran the command /skillsets skillsetname and is eligible to two or more default SkillSets, the plugins will
select the first most skilled SkillSet.

If a player want to have a specific skillset, he can list them through the command /skillsets
and select one of them with the command /skillsets skillsetname (skillsetname is the <Name> defined in the configuration file)

Commands

  • /skillsets show the command usage and skill list relative to your permissions
  • /skillsets yourskillsetname set your skills according to the configuration

Permissions

<Permission Cooldown="0">skillsets</Permission>
<Permission Cooldown="0">skillsets.police</Permission>
<Permission Cooldown="0">skillsets.yourskillsetname</Permission>

<SkillSetsConfiguration>

Xml tag name Default value Description
StorageType file file: to save skillsets assignation on the disk
memory: to save them into the memory (when the server is shutdown, nothing is saved)
FilePath EnabledSkillSets.xml The path where the file is located (only StorageType: file)
PeriodicSave 10000 The delay between saves in milliseconds (only StorageType: file (for now))

<SkillSet>

Xml tag name Example Value Description
Name offense The name of the skillset
Default true Define which SkillSet will be automatically assigned to player (you can set all your SkillSet/Default to true or false)
Skills
<Skill Name="Agriculture" Level="7" />
<Skill Name="Engineer" Level="3" />
The skill list to be updated. All skills not referenced in this list will be Leveled to zero by default.

Example

All skills maxed for people with vip permission group (eg for an arena)

Rocket/Plugins/SkillSets/SkillSets.configuration.xml

In this example, you dont need to give the ‘skillsets’ permission. The command will never be used by your players because all skillsets have <Default>true</Default>.

The <Default>true</Default> of skillsets.maxed will assign automatically to the player all skills on connection or after death.

<?xml version="1.0" encoding="utf-8"?>
<SkillSetsConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <StorageType>file</StorageType>
  <FilePath>EnabledSkillSets.xml</FilePath>
  <PeriodicSave>10000</PeriodicSave>
  <SkillSets>
    <SkillSet>
      <Name>maxed</Name>
      <Default>true</Default>
      <Skills>
        <Skill Name="Agriculture" Level="7" />
        <Skill Name="Cardio" Level="5" />
        <Skill Name="Cooking" Level="3" />
        <Skill Name="Crafting" Level="3" />
        <Skill Name="Dexerity" Level="5" />
        <Skill Name="Diving" Level="5" />
        <Skill Name="Engineer" Level="3" />
        <Skill Name="Exercise" Level="5" />
        <Skill Name="Fishing" Level="5" />
        <Skill Name="Healing" Level="7" />
        <Skill Name="Immunity" Level="5" />
        <Skill Name="Mechanic" Level="5" />
        <Skill Name="Outdoors" Level="5" />
        <Skill Name="Overkill" Level="7" />
        <Skill Name="Parkour" Level="5" />
        <Skill Name="Sharpshooter" Level="7" />
        <Skill Name="Sneakybeaky" Level="7" />
        <Skill Name="Strength" Level="5" />
        <Skill Name="Survival" Level="5" />
        <Skill Name="Toughness" Level="5" />
        <Skill Name="Vitality" Level="5" />
        <Skill Name="Warmblooded" Level="5" />
      </Skills>
    </SkillSet>
  </SkillSets>
</SkillSetsConfiguration>
Rocket/Permission.config.xml
<RocketPermissions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <DefaultGroup>default</DefaultGroup>
  <Groups>
    <Group>
      <Id>default</Id>
      <DisplayName>Guest</DisplayName>
      <Prefix />
      <Suffix />
      <Color>white</Color>
      <Members />
      <Priority>100</Priority>
      <Permissions>
        <Permission Cooldown="0">p</Permission>
      </Permissions>
    </Group>
    <Group>
      <Id>vip</Id>
      <DisplayName>VIP</DisplayName>
      <Prefix />
      <Suffix />
      <Color>FF9900</Color>
      <Members />
      <ParentGroup>default</ParentGroup>
      <Priority>100</Priority>
      <Permissions>
        <Permission Cooldown="0">skillsets.maxed</Permission>
      </Permissions>
    </Group>
  </Groups>
</RocketPermissions>

TODO

  • Handle Cooldown for skills.
  • Permit to set the an absolute FilePath to a shared location

Default configuration


<?xml version="1.0" encoding="utf-8"?>
<SkillSetsConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <StorageType>file</StorageType>
  <FilePath>EnabledSkillSets.xml</FilePath>
  <PeriodicSave>10000</PeriodicSave>
  <SkillSets>
    <SkillSet>
      <Name>default</Name>
      <Default>true</Default>
      <Skills>
        <Skill Name="Exercise" Level="2" />
        <Skill Name="Sharpshooter" Level="1" />
      </Skills>
    </SkillSet>
    <SkillSet>
      <Name>maxed</Name>
      <Default>false</Default>
      <Skills>
        <Skill Name="Agriculture" Level="7" />
        <Skill Name="Cardio" Level="5" />
        <Skill Name="Cooking" Level="3" />
        <Skill Name="Crafting" Level="3" />
        <Skill Name="Dexerity" Level="5" />
        <Skill Name="Diving" Level="5" />
        <Skill Name="Engineer" Level="3" />
        <Skill Name="Exercise" Level="5" />
        <Skill Name="Fishing" Level="5" />
        <Skill Name="Healing" Level="7" />
        <Skill Name="Immunity" Level="5" />
        <Skill Name="Mechanic" Level="5" />
        <Skill Name="Outdoors" Level="5" />
        <Skill Name="Overkill" Level="7" />
        <Skill Name="Parkour" Level="5" />
        <Skill Name="Sharpshooter" Level="7" />
        <Skill Name="Sneakybeaky" Level="7" />
        <Skill Name="Strength" Level="5" />
        <Skill Name="Survival" Level="5" />
        <Skill Name="Toughness" Level="5" />
        <Skill Name="Vitality" Level="5" />
        <Skill Name="Warmblooded" Level="5" />
      </Skills>
    </SkillSet>
    <SkillSet>
      <Name>farmer</Name>
      <Default>false</Default>
      <Skills>
        <Skill Name="Agriculture" Level="7" />
        <Skill Name="Cooking" Level="1" />
        <Skill Name="Exercise" Level="2" />
        <Skill Name="Mechanic" Level="1" />
        <Skill Name="Strength" Level="3" />
      </Skills>
    </SkillSet>
    <SkillSet>
      <Name>police</Name>
      <Default>false</Default>
      <Skills>
        <Skill Name="Cardio" Level="2" />
        <Skill Name="Dexerity" Level="2" />
        <Skill Name="Exercise" Level="2" />
        <Skill Name="Overkill" Level="2" />
        <Skill Name="Sharpshooter" Level="3" />
      </Skills>
    </SkillSet>
    <SkillSet>
      <Name>military</Name>
      <Default>false</Default>
      <Skills>
        <Skill Name="Cardio" Level="3" />
        <Skill Name="Dexerity" Level="3" />
        <Skill Name="Exercise" Level="3" />
        <Skill Name="Overkill" Level="4" />
        <Skill Name="Sharpshooter" Level="5" />
      </Skills>
    </SkillSet>
    <SkillSet>
      <Name>specops</Name>
      <Default>false</Default>
      <Skills>
        <Skill Name="Cardio" Level="5" />
        <Skill Name="Dexerity" Level="5" />
        <Skill Name="Exercise" Level="5" />
        <Skill Name="Overkill" Level="7" />
        <Skill Name="Sharpshooter" Level="7" />
      </Skills>
    </SkillSet>
  </SkillSets>
</SkillSetsConfiguration>

Default english translation


<?xml version="1.0" encoding="utf-8"?>
<Translations xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Translation Id="PERMISSION_MISSING" Value="You do not have permissions to execute this command." />
  <Translation Id="UNKNOWN_COMMAND" Value="Unknown command &quot;{0}&quot;" />
  <Translation Id="SKILLSET_APPLIED" Value="SkillSet applied" />
  <Translation Id="INVALID_USAGE" Value="Invalid usage" />
</Translations>

Commands and permissions


/skillsets [SkillSetName]

Permissions: skillsets

Set skillset to your avatar


Git changelog


bc1c9ad5ee2c613 2017-06-12 20:23:15

Updated git ignore

    88a65dbca2025a9 2017-06-12 20:19:17

    Rename AutoSkill to SkillSets

      8595cd2665fcaa0 2017-06-12 18:17:18

      README

        ecffd76ee89722a 2017-06-12 18:15:22

        Simplify command

        • Remove <PermissionGroug> from configuration. Use directly permission relative to the skillset name
        • Remove on|off
        • Always save on /skills <SkillSetName>
        • Remove enabled in IStorage#Save
        • Add IStorage#Remove
        • Add a ref to all max UnturnedSkill value (dont know how to get this value without an instance of UnturnedPlayer for now)
        • Add a bunch of configuration example
        • Rename AutoSkillPlugin#ReflectConfigurationSkills to AutoSkillPlugin#LoadSkillSets

        08d5359dc0ae7a4 2017-06-12 10:19:33

        Setup lib/ folder

          ee8da392bc8ed5e 2017-06-11 20:03:31

          Add support of PeriodicSave

          • Refactor some part of code

          a34acc27a758b80 2017-06-11 14:54:39

          /skills command update

            Download

            Build #5
            By downloading this file, you agree to our license terms.

            Repository

            github.com

            License

            MIT

            Author

            Kelgors