Inactive [FUN/MECH] ExperienceMod v.2.5.0 - Customize XP for blocks, mobs and items. [1.3.1-R2.0]

Discussion in 'Inactive/Unsupported Plugins' started by Comphenix, Jun 16, 2012.

  1. Offline

    Comphenix

    [​IMG]

    ExperienceMod - Customize experience to be like MC 1.3 (and much more)​
    Latest version: 2.5.0​

    This plugin makes it possible to add, or change, the types of player activity that awards experience points. This can be anything from mining blocks (with no silk touch cheating), placing blocks, crafting, brewing or even smelting.

    Configure the experience system to be more like Minecraft 1.3 before it has even been released. Or you can experiment, finding a system that works better for you. It's all configurable.

    I'm open to suggestions on how to improve this plugin.

    Features
    • Modify or remove the dropped experience by a number of factors:
      • Name of mob or creature
      • The type of damage that killed the mob/creature. Deny experience from using splash potions!
      • Whether or not a mob has spawned from a monster spawner
    • Drop experience or items when placing and breaking blocks, as well as crafting, brewing and smelting items:
      • By block/item name and durability, and whether or not it was placed by a player.
      • By potion effect, level, extended duration, and more.
    • Set how much experience a player will get for killing another another.
    • Prevent experience loss upon death.
    • Guarantee getting the highest enchant level on the enchantment table.
    • Broadcast a message to the server or a specific channel (HeroChat only) when experience is being awarded.
    • Use a different configuration for every world, or even particular players or groups.
    • Add experience to fishing!
    • Set a range of experience to drop. Can handle decimal numbers.
    • Use (optionally) permissions to decide who will be affected by the modifications.
    • Reward experience through currency (requires the Vault plugin)
      • Drop currency items instead of being given currency directly.
    • Change the maximum enchanting level from 30 to anything you'd like.
    • Set the amount of bookcases you need to get the maximum enchanting level.
    • Set how much experience you need to level up a level. Recreate the 1.2.5 experience system completely.
    Where to get it

    BukkitDev: http://dev.bukkit.org/server-mods/experiencemod/
    Source: https://github.com/aadnk/ExperienceMod

    The documentation is currently on BukkitDev.

    Compatibility

    This mod supports Tekkit servers and its custom blocks. Simply download and install ExperienceBridgeMod to enable the feature.

    The following client and server-side mods are supported:
    Videos
    Show Spoiler

    damnnicholas (v. 1.3.2):



    Commands
    • /experiencemod reload -Reloads the configuration files.
    • /experiencemod debug - Toggles debug mode.
    • /experiencemod warnings - Displays the most recent parsing warnings.
    • /experiencemod item [action] [block] - Displays the experience worth of a block/item.
    • /experiencemod mob [mob-name] - Displays the experience worth of a mob.
    • /spawnexp amount - Spawn the given amount experience at the target location of the cursor.
    Planning
    • More message parameters.
    Changelog
    Version 2.5.0
    • The mod now natively supports altering the vanilla block experience. But you will still need the NoVanillaExperienceMod to change any smelting experience.
    • Added a "multiplier" option to queries. Only the matched blocks or entities will be affected by this multiplier.
    • Added the ability to set the amount of experience rewarded when killing other players. The amount can be based on the player's name and group, or the killing method.
    • Added custom reward expressions, allowing you to use the reward "EXPERIENCE * 0.33" - give 33% of a player's total experience - for player deaths.
    • Added some useful mathematical functions to custom expressions and the "levels" section.
    • The penalty system now prevents entity damage instead of respawning killed mobs.
    • Potentially breaking change: Queries are now longer ordered by their specificity. For more details, read the commit message.
    • The standard vanilla block experience is now affected by the multiplier.
    • Fixed a NullPointerException that would sometimes occur when using furnaces/crafting tables.
    • Investigating the bug above more thoroughly revealed a Bukkit event bug. Added a workaround.
    • Fixed currency rewards not working properly,
    • Fixed currency drops not being counted correctly.
    • Fixed configuration files not being inherited properly.
    • Added custom variables/parameters to every expression. Other mods can extend this system.

    Version 2.4.0
    • Added the ability to change how much experience the enchanting level requires:
      • Change the maximum enchanting level from 30 to anything you'd like.
      • Set the amount of bookcases you need to get the maximum enchanting level.
    • Leveling rates:
      • Added a way of changing how much experience you need to level up a level. This can be set either level by level, or by using a general mathematical expression. This will allow you to revert the experience system back to 1.2.5 flawlessly.
    • Added support for ChannelChat.
    • Made the default configuration more in line with the rate of 1.3. Delete config.yml to receieve this update.
    • Ranges can now be expressed as '1 - 10', in addition to the old format of [1, 10].
    • Switched to a more efficient virtual experience system that should scale well with the new leveling rate feature.
    • The AutoUpdate feature now checks that the version online is newer before informing of an update.
    • Added a preset cache - this should improve performance if the underlying permission system doesn't cache options.
    • Fixed a bug preventing the drops reward from being displayed in the command line.
    • Forgot to cancel block breaking if there's insufficient funds (penalties).
    • Fixed the configuration not loading in virtual rewards.
    • Fixed a couple of NPE errors in reward virtual.
    • API:
      • Renamed "Range" to "SampleRange".
    Version 2.3.0
    • Note: The mod doesn't yet prevent the new experience drops from occurring in 1.3. Use this hack or wait until the next version for this to be fixed.
    • Note: If you're still using 1.2.5, then you'd want ExperienceMod 2.2.4 instead.
    • Updated experience and maxenchant (which is now obsolete) for 1.3.
    • Made it possible to distinguish between slimes of different sizes.
      • Example: slime|?|small: 3
    • Added the "drops" reward type (in addition to experience, virtual and economy) that allows you to reward players with items.
      • Example:
        Code:
        items:
          diamond ore:
            bonus source:
              drops:
                gold ingot: 0.5 # 50%
                ice: [1, 3]
    • Added metrics. To opt-out or disable it, to go PluginMetrics/config.yml.
    • Added a new version notification, along with automatic download. To disable it, set auto update to false in global.yml.
    • Added a error report generator, instead of relying on Bukkit.
    • Broadcast warnings to users with the admin permission whenever they occur.
    • Massive changes to the reward system. Any classes extending RewardProvider or RewardService must be updated.
    • Fixed mChat causing NullPointerExceptions. Note that you will need a permission plugin for mChat to work.
    • Fixed a bug giving an incorrect amount of experience when stacks are divided in furnaces.
    Version 2.2.3
    • ExperienceBridgeMod has been updated to 1.1.0.
    • Fixed a bug preventing certain mob names from working.
    • Fixed an error that occurs when water bottles are taken from a brewing stand.
    • Added a workaround for a bug in Railcraft, allowing us to support it.
    • Made it possible to extend mob types. Potential support for Mo's Creatures through ExperienceBridgeMod in the future.
    • Removed an exploit giving people endless experience when the take potions from brewing stands.
    Version 2.2.2
    • Fixed Vault not being found, even when it's correctly installed.
    Version 2.2.1
    • Fixed not getting the correct multiplied experience from blocks.
    • Fixed a NullPointerException that occurs due to ConcurrentHashMap.
    Version 2.2.0
    • You can now prevent players from getting experience or currency when mining blocks they or other player have placed. Simply add |!player at the end of your item queries. Note that you must be using LogBlock or HawkEye for this feature to work with blocks placed more than ten minutes in the past.
    • A message queue system. Now messages about similar actions, such as mining diamond, will be combined and occur less frequently (configurable).
    • Negative rewards are counted as penalties, and will revoke certain actions when a player has insufficient funds (currency or experience). If you add, say, a cost of 5 exp to place TNT, a player will be unable to place TNT if he or she has zero experience.
    • Support for Tekkit Servers! Along with RedPower2, IndustrialCraft2, EquivalentExchange and custom blocks in general.
    • Added global settings:
      • Disable the use of permissions.
      • Prevent ExperienceMod from connecting to certain plugins.
      • Some simple memory settings.
    • You can now use the abbreviation "expmod" instead of "experiencemod" in the command line.
    • Added getMobReward() and getPlayerReward() to the main plugin class.
    • Cleanup after player logs out of the server.
    • Prepare code for multithreading.

    Old:
    Show Spoiler

    Version 2.1.0
    * Added a permission that ensures a player will always get the maximum enchant level.
    * Added the ability to send private messages (private channel) without using HeroChat.
    * Added a parameter matching whether or not a mob is killed by a player.
    * Added the ability to match mobs by category (passive, hostile, ect.)
    * Made it possible to use colors (with &) in messages.
    * Prevented crashes with invalid channel names.
    * Fixed potions never giving experience.

    Version 2.0.3
    * Fixed a bug causing problems when giving too much virtual experience at once
    * Some versions of HeroChat may crash the plugin with a NullPointerException.

    Version 2.0.2
    * Fixed a bug causing the virtual experience reward giving way too many levels and not working with properly with enchanting.

    Version 2.0.1
    * Fixed a crash bug that occurs when Vault has not been loaded.

    Version 2.0.0
    * Removed an exploit discovered by shakeable_drip.
    * Added the ability to send a message when experience has been handed out.
    * Supports channels and HeroChat.
    * Added parameters to the message (like {player} or {experience}).
    * Added presets - separate configuration files for different players and worlds.
    * Adding the ability to merge configuration files in the presets.
    * Added logic to handle queries with multiple parameters (like wool|red,blue).
    * Added the ability to set multiple types of awards (giving both experience AND currency).
    * Added "currency items" to the economy reward system.
    * Drops slime balls that are automatically converted to currency when picked up.
    * Added the experiencemod item and experiencemod mob commands that retrieves the rewards for a particular item and player.
    * Added a number of warnings.
    * Fixed the probability distribution of ranges. They are now correctly producing uniformly distributed integers.
    * Fixed a NullPointerException that occurred when parsing potions.
    * Fixed a problem causing integers to be parsed multiple times.
    * Fixed handling of unknown arguments when parsing items.
    * Prevent player deaths from potentially messing up experience drops.
    * Fixed handling of multiple Boolean values with the same name
    * A ton of small bug fixes.

    Version 1.3.2:
    * Fixed a bug allowing commands to be executed without proper permissions.
    * Added support for fishing experience.
    * Added color coding to most of the messages.
    * Added a warnings command, allowing administrators to view the list of parsing warnings since last reload.
    * Added automatic display of the most recent parsing warnings.
    * Improved error messages slightly.

    Version 1.3.1:
    *Fixed a problem causing the plugin not to load without Vault installed.

    Version 1.3.0:
    *Adding the ability to spawn experience points at a given location.
    *Adding new reward types: experience, virtual and currency (economy).
    *Adding support for Economies with the Vault plugin.
    *Fixed a bug preventing the reload command from working.

    Version 1.2.3:
    * Fixed a problem causing entity death events not being recognized if it wasn't killed by a player.

    Version 1.2.2:
    * Fixed a problem causing the default configuration file not being copied to the data folder.

    Version 1.2.1:
    * The global experience multiplier now also alters the default (or unspecified) mob experience.

    Version 1.2.0:
    * Updated for R4.

    Version 1.1.0:
    * First release.
     
  2. Offline

    md_5

    Approved, some pictures may be nice.
     
  3. Offline

    Theboxofilms

    Cooooooooooooooooooooool
     
  4. Offline

    Cilerba

    Now do experience orbs actually drop from blocks and such, or does experience get added directly to the amount of EXP you already have?
     
  5. Offline

    Comphenix

    It can do both.

    If you set reward type in the configuration file to experience, everything drops experience orbs. If you set it to virtual, the experience will be awarded directly.

    That's the theory anyways. In practice, most experience orbs are too short lived to be noticed. I suspect it's because they haven't got a pickup delay, and is consumed even before the server gets to inform the client about their presence. I'm looking into it.

    In any case, I only really notice them when I'm quickly mining coal ore and they're all clogged up, circling my field of view. It's a rather interesting effect. :)
     
  6. Offline

    MaximusMJ

    Hello!
    Sorry for my bad english, I live in Switzerland.
    I've got an suggestion, while I was reading your description.
    Can you add changeable experiences per group?
    Example:
    Normal user will get 5 experience orbs when they mined a iron-oreblock.
    But VIP's get 7 exporbs, when they do the same...
    It would be great, if this works with permissionsex. and if this feature isn't inheritanceable... So I can work with inheritances, and the User will get 5 and the VIP 7, and don't 7 and 5.. Hope you now... (example like Dailybonus)
    Thanks for reading and answering.
     
  7. Offline

    Comphenix

    Sure, I'll put it on my todo-list.

    So you want to use permissions, but you don't want it to work like permissions? Sorry if I sound a bit snarky, but it does seem like a hack to me.

    Though, I can see the benefit of having preset experience levels within the permissions file - it certainly makes it easier to look over who has who. Maybe I can have both?

    Anyways, the other alternative is to configure it directly in ExperienceMod.

    Imagine a server with two worlds, World1 and World2, both with groups such as VIP, Members and Administrators. Then you might configure it like so:
    Code:
    ?:
      file: general.yml
     
    user1:
      file: forUser1.yml
     
    user2|members:
      # A seperate file for each user might be overkill
      items:
        diamond: 10
     
    ?|vip:
      file: vip_users.yml
     
    ?|members:
      file: members.yml
     
    ?|?|world2:
      file: justForWorldTwo.yml
    
    There is no inheritance here. If a configuration file matches, ONLY that one takes effect. From this, everyone in World2 would get justForWorldTwo.yml. If you wanted VIP members to have the file vip_users.yml in World2 also, you'd have to move ?|vip to the end of the configuration file.

    This is identical to the system I'm already using, so it would presumably be familiar to most users.
     
  8. Offline

    damnnicholas

    I made a little showcase of this plugin on my youtube channel :)

    Mind if you check it out?
     
    Comphenix likes this.
  9. Offline

    Comphenix

    Nice. It's short, but to the point, whilst covering the most important features. :)

    Though, I would have liked if you had also mentioned that you can get experience from crafting and brewing. But then again, I forgot to do the same myself. I'll add it right now.:p

    I'll also add a link to your video review.
     
  10. Offline

    damnnicholas

    yeah, its hard to remember stuff while recording and u become a bit nervous and ty for the link :)
     
  11. Offline

    shakeable_drip

    Hey AWESOME plugin real easy to use, but hey I found a bug. if your inventory and tool bar are full and you plull items out of an oven you get the XP for smelting it but the items stay in the oven... you can do this process infinitely... overall freacking awesome

    Justin
     
  12. Offline

    Comphenix

    Thanks. It's nice to know that someone else found this plugin useful. :D

    Yes, looks like it. Damn, it's pretty tricky to get this right. :oops:

    But I'm pretty sure I found the solution. Gotta say, the API is pretty weird at times (storing an air block at default in the cursor).

    I haven't pushed the fix to BukkitDev yet though. I'd like to finish the message system first (which informs players when experience is being awarded).

    --------

    On a side note - I've now completed the preset experience system. It ended up being a hybrid solution of what I previously presented. Presets are created in presets.yml:
    Code:
    # default for all worlds
    ?:
      local:
        multiplier: 1
        items:
          diamond:
            block source: 5   
     
    # default for every user in world1
    ?|world1:
      file: defaultForWorld1.yml
     
    # preset for every VIP member
    vipPreset:
      file: vip.yml
     
    # you can also combine files
    adminPreset:
      file: vip.yml
      file: admins.yml
    
    Then you simply set the preset at groups or individual players in your favorite permissions manager. Here in PermissionsEx:
    Code:
    groups:
      vip:
        permissions:
        # ect.
        options:
          experiencePreset: vipPreset
         
      admins:
        permissions:
          - '*'
        options:
          experiencePreset: adminPreset
    
     
  13. Offline

    shakeable_drip

    So I guess my previous post might have been tactless sorry. Do I have the ability to award XP for creating bakery items? overall great plugin!
     
  14. Offline

    Comphenix

    Oh, not at all. You found a pretty serious bug/exploit, which I'm happy to correct.

    And yeah, I'll post the updated version soon. I just gotta add some finishing touches, and write the documentation.

    You can get experience from crafting, so yes:

    Code:
    items:
      cookie:
        crafting: 5
    But if you're talking about some kind of bakery mod, then I'm not entirely sure. I suppose it would work if you used the item ID instead:
    Code:
    items:
      500: # Or whatever it might be
        crafting: 5
     
  15. Offline

    shakeable_drip

    no , the code is solid! now my sis who bakes all the time can earn xp... if she spends it is hole nutha ball park
     
  16. Offline

    Comphenix

    I've uploaded the new version (2.0.0) to BukkitDev. I'm just waiting for it to be approved. :)

    It's also on GitHub.

    EDIT: Version 2.0.1 here: GitHub (v. 2.0.1)
     
  17. With ur new version i got this message on Serverstart.
    Last version was working without any problems.

     
  18. Offline

    Comphenix

    Looks like I didn't take the proper precautions when hooking into Vault. Sorry about that.

    I've uploaded a hotfix on GitHub (v. 2.0.1). It should be live on BukkitDev in a few hours, depending on how long it takes the team to approve it.
     
  19. ยด
    Yeah. Thx. Now it works perfectly!
     
  20. Offline

    Dysp

    Seriously... A webbased GUI to be able to configure this would be so extremely awesome. Juggling with item names, id's and so on, just seems to be .. too much for me to cope with right now! Thank about it, i would be awesome.

    Otherwise great plugin.
     
  21. Offline

    Comphenix

    Maybe, but I think in-game commands are of higher priority. Especially the ability to change default reward type, or perhaps the current multiplier.

    I'll look into it, but I'm off for vacation next week. I will be able to respond to questions, along with fixing critical bugs, but I won't have time to code any big features. And a GUI is certainly a big feature, I'm afraid.
     
  22. Offline

    JLBGreenBay13

    Thanks for this plugin, but I am having problems adding other blocks to get xp from, such as iron and gold. From what I've read I need to put this into the config:
    items:
    gold (ore?ingot?idk)
    block source: (xp amount)
    but now do I have to put "items:" before each new block, because in the default config all of blocks are under one "items:", and the most confusing part for me is what the item name or id should be, like in the case of gold, is it gold, gold ingot, gold ore, or gold block?
     
  23. Offline

    Comphenix

    There's no need to put "items" before every block. You just need to make sure they're all under "items" by using indentation (spaces):
    Code:
    items:
      redstone ore:
        block source: 5
      glowing redstone ore:
        block source: 5
      diamond ore:
        block source: 10
    It's a good idea to use the default configuration as a template.

    You're right - this is slightly confusing - you have to use gold ore if you want to reward experience from mining gold:
    Code:
    items:
      gold ore:
        bonus source: 10
    But that's probably not a good idea. Gold ore drops itself, and so a player can easily place it and mine it again for infinite experience. I could have implemented a tracking system - a database to keep track of every ore that has been placed by a user - but that seemed overkill. It's better to just reward experience when iron or gold has been smelted:
    Code:
    items:
      iron ingot:
        smelting result: 10
      gold ingot:
        smelting result: 40
    Now, here's the confusing bit. The name has to be the RESULT (gold ingot) of the smelting, not the ingredient (gold ore). This difference comes down to a limitation in the Bukkit API.
     
  24. Offline

    lewiso574

    Ok i want to use this plugin on my server it is white-listed for me and my friends we all play legit, but it does not work unless you are an Op and i choose not to use permissions how do i disable use of permissions on this plugin and get it to work ?
     
  25. Offline

    Comphenix

    There's no option for disabling permissions, unfortunately. I figured most people would be using Permissions if they installed plugins, so I didn't bother to add it.

    But you CAN change the defaults, using some good old Minecraft modding tricks:
    1. Stop the server.
    2. Open ExperienceMod.jar in a ZIP-program (Like WinRAR or 7-zip)
    3. Extract the file plugin.yml to any folder
    4. Open the file in notepad. Replace all occurrences of false with true. Save the file.
    5. Copy the changed file into ExperienceMod.jar again. Answer YES to overwrite it.
    6. Start the server.
    Or just download this no permission version.
     
  26. Offline

    Comphenix

    I've released a new minor version. :)

    It's now possible to force the enchantment table to give you the highest possible level (level 50 with 30 bookcases), just like in 1.3. All you need to do is give the permission experiencemod.maxenchant.

    Version 2.1.0
    • Added a permission that ensures a player will always get the maximum enchant level.
    • Added the ability to send private messages (private channel) without using HeroChat.
    • Added a parameter matching whether or not a mob is killed by a player.
    • Added the ability to match mobs by category (passive, hostile, ect.)
    • Made it possible to use colors (with &) in messages.
    • Prevented crashes with invalid channel names.
    • Fixed potions never giving experience.
    Download: BukkitDev
     
  27. Offline

    Intrepid5

    aadnk,
    Thanks for writing this plugin! I have a question about an error I'm receciving and I was wondering if you know what is causing it? My short config is at the end. Thanks!

    2012-07-19 01:20:15 [SEVERE] Could not pass event InventoryClickEvent to ExperienceMod
    Caused by: java.lang.IllegalArgumentException: Can only create potion queries from potions.
    2012-07-19 01:20:22 [SEVERE] Could not pass event InventoryClickEvent to ExperienceMod
    Caused by: java.lang.IllegalArgumentException: Can only create potion queries from potions.
    2012-07-19 02:21:55 [SEVERE] Could not pass event PaintingBreakByEntityEvent to iZone
    Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.entity.CraftLightningStrike cannot
    be cast to org.bukkit.entity.Player
    -------------------------------------------------------------
    Code:
    multiplier: 2
    default rewards disabled: false
    reward type: experience
    economy drop: slime ball
    economy drop worth: 1
    virtual scan radius: 20
    default channels: [global]
    items:
      diamond ore:
        block source:
          default: 200
          message: '{player} has found a diamond and got {experience} experience!'
          channels: [global]
      potion|regen|1:
        brewing result: 50
      potion|fire resistance|1:
        brewing result: 60
      potion|instant damage|1:
        brewing result: 75
      potion|instant heal|1:
        brewing result: 75
      potion|poison|1:
        brewing result: 20
      potion|speed|1:
        brewing result: 20
      potion|weakness|1:
        brewing result: 20
      potion|strength|1:
        brewing result: 50
    
     
  28. Offline

    Comphenix

    What version are you using? I think I already fixed this bug with the potion system in 2.1.0. Try upgrading and see if the problem persists.

    It would also be helpful if you could tell me what you were doing when the error occurred. I suspect you must have put in ingredients a brewing stand, though.
     
  29. Offline

    Intrepid5

    I'm using 2.1.0. I don't know what the player was doing, but I'll ask. I will keep an eye on the log and see if it happens again. Thank You.
     
  30. Offline

    Comphenix

    Another release! We're now up to 2.2.0. :)

    This time the biggest features are support for Tekkit mods, the ability to prevent experience from blocked placed by players and some new global settings.

    An example of the new player-prevention feature: Experience without using smelting.

    And here's the full changelog for 2.2.0:
    • You can now prevent players from getting experience or currency when mining blocks they or other player have placed. Simply add |!player at the end of your item queries. Note that you must be using LogBlock or HawkEye for this feature to work with blocks placed more than ten minutes in the past.
    • A message queue system. Now messages about similar actions, such as mining diamond, will be combined and occur less frequently (configurable).
    • Negative rewards are counted as penalties, and will revoke certain actions when a player has insufficient funds (currency or experience). If you add, say, a cost of 5 exp to place TNT, a player will be unable to place TNT if he or she has zero experience.
    • Support for Tekkit Servers! Along with RedPower2, IndustrialCraft2, EquivalentExchange and custom blocks in general.
    • Added global settings:
      • Disable the use of permissions.
      • Prevent ExperienceMod from connecting to certain plugins.
      • Some simple memory settings.
    • You can now use the abbreviation "expmod" instead of "experiencemod" in the command line.
    • Added getMobReward() and getPlayerReward() to the main plugin class.
    • Cleanup after player logs out of the server.
    • Prepare code for multithreading.
     

Share This Page