[WIP] Rankmanager

Discussion in 'WIP and Development Status' started by wutata, Jun 3, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    wutata

    Yo,

    I'm developing a simple and light plugin for autopromotion.

    Currently employs Vault for permissions (and thus GroupManager) and mcMMO for skill levels. It's purpose is to automatically promote/demote users when they meet certain requirements. I couldn't find a plugin that could auto-promote using both time played and mcMMO (and mix these as you want) - and didn't feel like putting two plugins just for that. I'm planning on adding at least Towny support to it.

    It uses a config file to read some parameters:
    - rank to promote from
    - requirements (mcmmo power level, specific skill levels, time played on server...)
    - rank to promote to
    - is it temporary, if so how long (uses a simple flatfile to store this data)

    The plugin runs once a minute or on every level up to check the player's stats and attempts to promote them.

    Once I get the plugin up and ready - I'll put it on here.

    Which plugins should I incorporate?
    Is there a better way to check for time-played, other than doing a repeating task?
     
  2. Offline

    LlmDl

    When it comes time to add Towny come talk to us in the Towny IRC, link in my signature.
     
  3. Offline

    wutata

    I sure will! Hopefully that time will be this weekend.
     
  4. Offline

    wutata

    Below is a work-in-progress config.yml - so you guys can get a better idea what this plugin is capable of.

    Code:
    #
    # Rank manager configs.
    #
    # Don't be scared - the groups here are those you have
    # defined in your GroupManager (or other permission system of your choice)
    # and these won't mess anything up or touch anything else than adding or
    # removing groups for players.
    #
    #
    # Don't add any rank that you don't want to automatically resolve! (This includes
    # moderator-tier ranks that explicitly given to trusted players.)
    #
    # the format is simple:
    #
    #
    # Rank:
    #  promote-from:
    #  - Rank
    #  - OtherRank -- List of possible ranks a player can be promoted from
    #  requires:
    #    list.of-requirements: required_value -- requirements - they can use any of the supported plugins. See "reference.yml" for list of available requirements
    #  temporary: <0-*> (in minutes) or 0/false for disabling this feature -- Will this rank fade off eventually
    #  regain-multiplier: <0.0-*> -- If the player loses this rank, by how much will the requirements be multiplied by
    #  priority: <0-*> -- If two unstacking ranks are available to user, higher priority rank is given. Zero (0) means the rank is inactive!
    #  stacks: <false/true> -- whether or not this rank removes any previous un-stacking rank ('main ranks').
    #                        -- Stacking is handy for giving additional permissions and ability unlocks
    #                        -- you don't want to mess with the main rank.
    #  replaces:
    #  - A rank -- Acquiring this rank, even if marked to stack, still removes each rank in this list from the player.
    #
    #
    # In addition to giving directly the ranks in a list, you can specify keywords and wildcards.
    #
    # %stacking% -- applies the effect for any stacking rank
    # %temporary% -- applies the effect for any temporary rank
    # %unstacking% -- applies the effect for any unstacking rank
    #
    # * -- any rank
    # ? -- any letter
    # Type-*  -- any rank that starts with Type- but can contain anything after
    #        -- this is especially useful if you want to group your ranks in some manner
    #
    # Advanced tip: If you didn't realize this already: apart from the keywords,
    # the system uses regular expressions when searching for applicable ranks.
     
     
    Survior:
      promote-from:
      - 'Shipwreck'
      requires:
        mcmmo.power-level: 40
        mcmmo.skills.mining: 10
        mcmmo.skills.herbalism: 10
        mcmmo.skills.smelting: 10
        mcmmo.skills.woodcutting: 10
        vanilla.time-alive: 7200
        vanilla.level: 25
      temporary: false
      priority: 100
      stacks: false
     
    Crusoe:
      promote-from:
      - 'Survivor'
      requires:
        mcmmo.power-level: 120
        mcmmo.skills.mining: 80
        mcmmo.skills.herbalism: 80
        mcmmo.skills.smelting: 10
        mcmmo.skills.woodcutting: 10
        mcmmo.skills.woodcutting: 10
      temporary: false
      priority: 100
      stacks: false
     
    Combatant:
      promote-from:
        - 'Survivor'
        - 'Crusoe'
      requires:
        mcmmo.swords: 80
        mcmmo.axes: 40
        mcmmo.unarmed: 40
      temporary: false
      priority: 50
      stacks: true
     
    Gladiator:
      promote-from:
        - 'Survivor'
        - 'Crusoe'
      requires:
        mobarena.mob-kills: 500
        mobarena.battles: 50
      temporary: false
      priority: 50
      stacks: true
     
    Leader:
      promote-from:
      - '*'
      requires:
        towny.town-population: 10
        towny.is-mayor: true
      temporary: false
      priority: 50
      stacks: true
     
    General:
      promote-from:
      - '*'
      requires:
        towny.nation-population: 60
        towny.nation-towns: 3
        towny.is-king: true
      temporary: false
      priority: 60
      stacks: true
      replaces:
      - 'Leader'
     
Thread Status:
Not open for further replies.

Share This Page