[INACTIVE][ADMIN/RPG] RCSkills v1.2 - Leveling based on Permission groups [860-953]

Discussion in 'Inactive/Unsupported Plugins' started by silthus, Jun 6, 2011.

  1. RCSkills v1.2




    Legacy: v1.0 v1.1

    If you updated you will have to reconfigure your config.yml. A backup of the old one is made automatically and stored as config.yml_old.


    This plugin was originally created for my own server to be a framework for a RPG Levelsystem which doesn't rely on the plugin alone but rather uses the groups from Permissions to give out special ranks and skills.
    It uses Persistance to store information about the player, like what level he is at and how many skills he already bought. Since Persistance can be either MySQL or SQlite its easy for websites to get to data and build nice user profiles.

    Features:
    • Uses Permissions Groups and their Permissions for a Level System
    • Build in EXP System via MySQL or SQLite Database
    • Formula to calculate how many EXP are needed for the next Levelup
    • Exchange Items(Configurable) for EXP (e.g. Sponges)
    • Integrated Skillsystem which is based on Permissions
    • You can define groups that should not levelup but can buy all skills
    • You can buy new Skills for Coins and Skillpoints, which are dished out at configured Levelups
    • Daily EXP Bonus on the first login: Configurable for VIPs and Normal Players
    • Easy to use and a lot of Admin commands to make your life easier (e.g.: You can set Skillpoints, Exp and Level induvidually)
    • Highly configurable (even a own language file)
    • Supports any Major Economy Plugin (iConomy5, EssentialsEco, BOSEconomy)
    Configuration & Installation:

    Installation (open)

    1. Install and Setup Permissions & iConomy
    2. Download the RCSkills.jar and put it in your plugins folder
    3. Edit the bukkit.yml in your minecraft server root folder only if you want to use MySQL instead of SQLite
    4. Restart your server
    5. You should now find three file in the /plugins/RCSkills/ folder:
    6. Now InGame type /rcs reload and all your config settings will be loaded.
    7. Now the only thing left todo is to create some groups in permissions and give your users the right permission nodes.


    config.yml (open)

    Code:
    # Configversion - DO NOT TOUCH!
    configversion: 3
    ######################################################
    # Whats the name of your Server?
    title: RaidCraft
    # Set to 0 if you dont want to convert any items
    Item ID: 19
    # The name of the item (only relevant for the chat)
    Item Name: Sponge
    # What is the max Level a player can get?
    maxLevel: 25
    # In what intervall shall we grant skillponts?
    Skillpoints Interval: 5
    # How many skillpoints shall we give them?
    Skillpoints: 1
    # Configure the formula to calculate EXP for the next level here
    # Use "lvl" variable as the Level you want the xp to be calculated for
    # e.g.: expCalculation: '((((lvl) * (lvl)) - ((lvl) * 5) + 20))'
    expCalculation: '((((lvl) * (lvl)) - ((lvl) * 5) + 20))'
    # Config for the daily login bonus.
    DailyExp:
        # Set to true if you want to give players a daily exp bonus on their first login.
        giveDailyExp: false
        # How many EXP should players with lvlup.exp.normal get?
        normalExp: 20
        # How many EXP should players with lvlup.exp.vip get?
        vipExp: 40
    # Configure the groups that are not supposed to level here
    # only needed for groups that have the level permissions
    # Format: groupname: negativeLevel
    dontLevel:
        Admins: -20
        Mods: -10

    bukkit.yml (open)

    SQLite:
    Code:
    settings:
        update-folder: update
    database:
        username: bukkit
        isolation: SERIALIZABLE
        driver: org.sqlite.JDBC
        password: walrus
        url: jdbc:sqlite:{DIR}{NAME}.db
    MySQL:
    Code:
    settings:
        update-folder: update
    database:
        username: yourdbuser
        isolation: SERIALIZABLE
        driver: com.mysql.jdbc.Driver
        password: yourdbpw
        url: jdbc:mysql://127.0.0.1:3306/database

    skills.yml (open)

    Code:
    skills:
        # The name of the skill for the database. No spaces!
        SkillName:
            # A short name for the skill. Can contain spaces.
            name: Kaboom
            # A description of the skill.
            description: Makes a loud kaboooooom!
            # In what Permissions group is the skill defined?
            group: kaboom
            # Requirements for the skill
            requires:
                # At what level can a player get this skill?
                level: 5
                # How many skillpoints are needed for this skill?
                skillpoints: 1
                # How much of whatever your currency is costs this skill?
                costs: 1000

    Permissions Setup - groups.yml (open)


    Code:
        Level0:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: false
            inheritance:
            permissions:
                - 'rcs.player.*'
        Level1:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            - Level0
            permissions:
        Level2:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            - Level1
            permissions:
                - 'bar.foo'
        Level3:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            - Level2
            permissions:
                - 'bar.foo'
        Level4:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            - Level3
            permissions:
                - 'bar.foo'
        Level5:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            - Level4
            permissions:
                - 'bar.foo'
    This is an example of a simple group which will be used as a skill.

    Code:
        kaboom:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - '*'

    Commands (open)


    Permission Nodes (open)



    ToDo:
    • Make groups entirely configurable in config
    • Add customizable XP Calculation formula
    • Add some more config options for the skills
    • Fix bugs (please tell me if you find any)
    Thanks to:

    • Tagette for his great Template which I used for the framework of this plugin
    • Nijikokun for his great Register Libary
    • Keiler for joining the DEV Team
    • Everybody who awnsered my questions in the Dev Forum =)
    Changelog:

    Version 1.2
    • Formula for XP Calculation to the next level is now configurable in the config.yml
    • RCSkills now supports all major Economies
    • Fixed a lot of bugs
    • Tested working with RB#953
    Changelog (open)

    Version 1.1
    • Added option in config.yml to define groups that have the permission to level but shouldn't (old config will be renamed to config.yml_old)
    • If you are in one of these defined groups you can see and buy all skills but can't level
    • Added alias for /rcs player <playername> --> /rcs stats <playername>
    • Added Op support: (Ops now have access to all admin commands)
    • Fixed small bug in lang.yml (you need to redownload lang_german.yml)
    • Fixed pagination and now checks for correct page and number input
    • Fixed some other small bugs
    • Tested to work with RB#860
    Version 1.0

    • Initial Release of RCSkills
     
    kahlilnc likes this.
  2. Offline

    Juze

    Oh this seems interesting. So, when you earn experience, you get set into another group like a promotion by experience? :D
     
  3. Yes thats correct. So you could make some groups called Level0 - Level25 e.g. (thats how its on our server) and when a player reaches the needed XP amount for the next level he can lvlup or gets automatically leveled when he joins the server.

    On our server I had it set up so that each level you get an extra skill like beeing able to use TNT or build Bridges with Falsebook/Craftbook.
     
    kahlilnc likes this.
  4. Offline

    ItZ_MarviN

    Great plugin!
    Works like a charm :D
     
  5. Offline

    kahlilnc

    This is amazing.
     
  6. Offline

    Kainzo

    This uses some of the same methods that Heroes uses. Only a little different in the group type setup. Neat none-the-less.
     
  7. Just want to give you a heads up.
    I found a bug where, if a new player joined and his level got modified he gets set back to the Permissions Default group.
    This only happend once to me now and about 200 players already joined.

    I will fix this ASAP, but just wanted to give you a heads up if some of your players are suddenly in the Default group.

    A workaround is to let the player rejoin after his level got changed.
     
  8. Offline

    DJ_Idol

    I saw the dependencies list Permissions v3.x, is there any chance that this works with Permissions v2.7.3? I'd be willing to upgrade to v3 for this plugin, but seeing as it's still pretty buggy, and alot of the other plugins I use don't work with v3 yet, I just wanted to make sure before I try to set this up :)

    This plugin is something that I've been wanting for a VERY long time! :-D
     
  9. Unfortunatly any other version than Permissions 3.x wont work with this plugin since Permissions 3 implemented Multigroup support and without that this plugin wont work.
     
  10. Offline

    DJ_Idol

    Ok, that's what I figured. Oh well, looks like I'll be upgrading to v3 then :) This plugin looks excellent, just wanted to say thanks for making this!
     
  11. Offline

    alex123099

    and how do i make use of the skill i bought?
    for example if i have reached level 5 and i want to buy a skill called superjump which grants you the ability to jump 10 block in the air, so how do i make it work?
     
  12. First you need to create a group with Permissions in the groups.yml:


    Code:
    Superjump:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - permission.node.for.superjump
    After that you need to create the skill for RCSkills in skills.yml:

    Code:
    Superjump:
            name: Superjump
            description: Jump Jump jump baby!
            group: Superjump # needs to be the same as the group name in groups.yml
            requires:
            # Adjust as you like
                level: 5
                skillpoints: 1
                costs: 1000
    After that is done restart your server or do a:
    /permissions -reload all
    /rcs reload

    Now you can buy that skill with
    /rcs buy Superjump
    or
    /rcs buy SkillID

    The SkillID is shown in SquareBrackets behind the skill when u do /rcs skills
     
  13. Offline

    alex123099

    ok, but can i use it, like make it work, if i have bought the skill can i jump high?
     
  14. You need a plugin that does that and add the permission node to the group you defined in your skills.yml

    Update to v1.1:

    Your old configs will be renamed to config.yml_old and a new one will be created (you need to reconfigure it).
    Also there is a option to change the formula for the needed EXP. You dont need to touch that since it is for testing only and wont have any effect.

    • Added option in config.yml to define groups that have the permission to level but shouldn't (old config will be renamed to config.yml_old)
    • If you are in one of these defined groups you can see and buy all skills but can't level
    • Added alias for /rcs player <playername> --> /rcs stats <playername>
    • Added Op support: (Ops now have access to all admin commands)
    • Fixed small bug in lang.yml (you need to redownload lang_german.yml)
    • Fixed pagination and now checks for correct page and number input
    • Fixed some other small bugs
    • Tested to work with RB#860

    And let me know pls what you want to see in further updates.
     
  15. Offline

    fugue2005

    i have cb860
    permissions 3+
    ico 5+ and
    rcskills 1.1

    when a player logs in i get
    Code:
    2011-06-11 14:51:36 [SEVERE] Could not pass event PLAYER_JOIN to RCSkills
    java.lang.NullPointerException
        at com.silthus.rcskills.RCPermissions.getParents(RCPermissions.java:176)
        at com.silthus.rcskills.RCPlayer.setCanLevel(RCPlayer.java:235)
        at com.silthus.rcskills.RCPlayer.<init>(RCPlayer.java:55)
        at com.silthus.rcskills.listeners.RCPlayerListener.onPlayerJoin(RCPlayerListener.java:26)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:243)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
        at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:126)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:96)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    what am i doing wrong.
     
  16. Can you post your config.yml, users.yml and groups.yml pls.
    I think the problem is that your user does not have any parents(groups) and Level0 isnt the default group, but I need to reconfirm so can you please post the three files mentioned above?
     
  17. Offline

    DJ_Idol

    I have a huge question, I was planning on using this plugin to give certain groups certain skills. I have 3 seperate groups for 3 separate "professions" on my server, Fighter, Trader, and Builder. Each with their own permissions/skill set. I was planning on using this plugin to have each profession level-up separately and gain their own abilities, is there a way to do this with this plugin? Because to me, it looks like every player will get the same skills at the same levels, instead of having one group go down a level/abilities path that is different from anothers, such as:

    TraderLevel0:
    ----etc.
    ----etc.
    TraderLevel1:
    ----permissions:
    ---------- '*'
    ----inheritance:
    ---------- TraderLevel0
    BuilderLevel0:
    ----etc.
    ----etc.
    BuilderLevel1:
    -----etc.
    -----inheritance:
    ---------- BuilderLevel1

    is this possible with this plugin?
     
  18. Offline

    Wakko

    Could it be possible to have it work with MCMMO for group leveling?
    Just a thought.
     
  19. Offline

    Carve

    So this does everything but allow them to use the skill you actually create? You need an entirely seperate plugin for that?
     
  20. Offline

    DJ_Idol

    It's basically a system to allow users to level-up and gain access to skills, for example:

    You have the FalseBook plugin, once a user reaches level 5, you could make a skill that allows them access to all the FalseBook IC's by creating a skill with the 'falsebook.ic.*' permission node.

    It doesn't create actual skills/plugins/abilities, just groups to use them.
     
  21. Offline

    Carve

    Anyone have any requests / ideas for a "general" companion plugin for this that will provide skills (for example on right click with a item - set by configuration?). I mean I'll have to build one if I plan to use RCSkills anyway..
     
  22. At the moment something like that is not possible, but it's a nice idea. Since I wanted to make the group names configurable anyways I could build a path system into that.

    So you would then have a paths.yml in which you define certain paths for the users like so:


    Code:
    paths:
        LevelPath:
            - Level0
            - Peasent (would be treated as Level1)
            - Warrior (would be treated as Level2)
        TraderPath:
            - Merchant (Level0)
            - Trader (Level1)

    Maybe I will integrate the EXP cost for the levelup in there or do you guys rather want to have a formula which is configurable or both?

    So you mean instead of using the built in EXP system have an option to switch to the mcMMO EXP system? This might be possible to configure within the new path system (if I actually do that).
     
  23. Offline

    DJ_Idol

    That would be excellent!

    Here is my idea:

    Code:
    Paths:
        BuilderPath:
            - Builder (Level 0)
            - BLevel1
            - BLevel2
            - Etc.
        TraderPath:
            - Trader (Level 0)
            - TLevel1
            - Etc.
    
    As I'd rather keep the prefixes the same for each level in a profession (I.E. Trader would be [Trader]), but maybe certain levels would change, so say Trader level 5 would go from a light green [Trader] to dark green [Trader], then maybe level 10 would get light green [Merchant], level 15 would get dark green [Merchant], etc. etc.

    With the system you wrote up, it would just make it hard (for me anyways) to try and make up a new name for each level of a class haha.

    As far as the EXP, I think both would be great if you could have it to where the config.yml EXP cost is always used unless a separate EXP cost is defined in the paths.yml?

    BTW,

    Excellent fucking work! And if there's anything I can do to help you out with this (besides money as I'm already broke paying for my server/website fees as it is lol...and programming cause unfortunately I have no idea how to do that either) lemme know!
     
  24. Offline

    fugue2005


    ok there's the problem then, level0 is not my default group.
    but permissions also doesn't put a specific group on new users, it leaves the group line blank.
     
  25. If the user is still in the default group it doesnt show as a group under the groups tab in permissions.
     
  26. Offline

    DJ_Idol

    Also, one (or two) more suggestion(s). (To be added after the paths feature as I REALLY want that feature :p)

    I BELIEVE there is a plugin that allows you to pay to gain skill levels in mcMMO, and I was thinking it would be cool if you somehow implemented that feature into this plugin. Say, for instance, instead of giving a skill to a player using a permission, a certain level could instead add one level to the specified mcMMO skill (Axes, acrobatics, etc.). Also even require the user to have a certain skill level before being able to level up would be cool. It would also be cool if you were able to eventually hook into uQuest and add even more level-up checks/requirements. Such as having a certain quest # completed before you can level up, and/or a certain amount of quests completed before you can level up.

    For instance, I could require a user to have completed at least 10 quests, one of them being quest #5 from the uQuest quests file, be level 3 in mcMMO melee skill, and then the user would gain one level to the mcMMO herbalism skill when they level-up.

    I know that's alot of work, but I think it would help make this already amazing plugin stand-out even more :)
     
  27. I am currently coding an API so that other Plugin Devs can hook into my Plugin or create Bridges between those (like uQuest or mcMMO).
    I wont however build in all those bridges since that isn't the goal of RCSkills.
     
  28. Offline

    DJ_Idol

    Makes sense :) We can bug the uQuest and mcMMO authors then haha :p
     
  29. Offline

    hckarbiter

    Is this plugin compatible with BOSEconomy?
     
  30. It will be compatible with every major economy system in the next version.
     

Share This Page