DynamicDifficulty
Description
Are Minecraft’s mobs not challenging enough for you? Do you find that survival lacks the tension it once had because the mobs no longer pose any threat to you? On the other hand, maybe you find some of Minecraft’s mobs too challenging. Perhaps you wish that these mobs were less difficult and overwhelming. If you fall into either of these groups or just want more control over the difficulty of the mobs in general, then DynamicDifficulty may be the plugin you are looking for.
What is dynamic difficulty?
Dynamic difficulty is a system where the difficulty of the videogame scales up or down in the middle of game play to match how well the player is currently performing at the game. In the case of this plugin, DynamicDifficulty scales how tough the mobs are based on its assessment of the player’s capability to fight off the mobs.
Performance Levels
Each player has one “auto performance level” for each type of hostile mob (not including bosses). A player’s auto performance level can range anywhere from 50 to 200 with 100 being the default value. 100 means that the mob is at its normal level of difficulty. 200 means that the mob is twice as tough as normal, and 50 means that the mob is only half as tough.
As a player fights each type of mob, the plugin calculates the player’s auto performance levels based on how much damage a player receives from a type of mob on average and how much damage a player gives to a type of mob on average.
Players also have a “manual performance level” for each mob if they would prefer to set the difficulty manually rather than have the plugin calculate the difficulty for them.
The plugin scales certain attributes of the mobs based on the player’s performance level for that mob. The chart below shows how much the mob attributes scale in relation to some sample performance levels.
| Example Performance Level | 50 | 100 | 200 |
| Attack Damage (% of damage normally dealt) | 50 | 100 | 200 |
| Defense (% of damage normally taken) | 200 | 100 | 50 |
| Speed (% of normal speed) | 75 | 100 | 150 |
| Knockback Resistance (%) | 0 | 0 | 50 |
| Max Follow Distance (% of normal distance) | 100 | 100 | 200 |
| XP (multiply amount of xp normally dropped by this %) | 100 | 100 | 200 |
Loot* (multiply amount of loot normally dropped by this %) | 100 | 100 | 200 |
*Loot scaling does not affect items worn or held by the mob; it only affects standard drops.
Note that this plugin scales the mob's attributes based on the player the mob is currently targeting. This means that this plugin can cater the difficulty to each individual player on the server all simultaneously.
Settings
DynamicDifficulty provides several adjustable settings for each type of mob.
Difficulty Settings
There are three difficulty settings: auto, manual, and disabled.
| Setting | Description |
| auto | The plugin will calculate your auto performance level and use it to scale the mob’s attributes. |
| manual | The plugin will not calculate your auto performance level. It will change the mob’s attributes based on the manual performance level you provide. |
| disabled | The mob’s attributes will not change from their normal values. |
Max Increment
Every 30 seconds, the plugin will update a player’s auto performance level. The max increment setting determines the maximum amount that a player’s auto performance level can change by in a single update. For example, if the player’s max increment is 10 and the player’s current auto performance level is 100 and the plugin determines that the player’s auto performance level should be 150, during the first update, it will change it to 110. Every 30 seconds, the player’s auto performance level will change by 10 units until it reaches 150.
Scale Attributes
Scaling for the following attributes of the mob can be toggled to true or false so that the plugin either will scale them based on the player’s performance level or will not scale them.
- Attack
- Defense
- Speed
- Knockback resistance
- Max follow distance
- XP
- Loot
Commands
DynamicDifficulty features commands to allow players fine-tuned control over the difficulty of the mobs. Commands are listed here: Commands.
Permissions
DynamicDifficulty features permissions to allow or deny players from using certain commands. Permission nodes are listed here: Permissions.
Configuration
Each player has a config file, named <player-uuid>.yml. When the player logs onto the server, the plugin will generate this file if the file does not exist. It will be placed in the "players" folder. The plugin saves a player’s dynamic difficulty settings to their config file when they log out. The next time a player logs onto the server, their data will be loaded back up.
The plugin will also generate a default_player.yml file. Server owners can specify default values for players’ settings using this file. When the plugin goes to generate the player's config file for the first time, it will load the values from default_player.yml.
The default config for default_player.yml is listed here: Configuration.
Source Code
The source code can be viewed here: Source Code.
Important Information
- The descriptions here are for the most current version of DynamicDifficulty. Older versions of the plugin do not have some of the features listed here and some features have changed slightly between updates.
- Each version of DynamicDifficulty is only compatible with the version of Bukkit it is listed with.
- As of DynamicDifficulty v1.3.0, this plugin is compatible with the new UUID system. Previous versions use a player’s name to link them with a yml file. Under old versions, if a player changes their name, they will lose their old yml file and a new one will be generated for their new name.
-
View User Profile
-
Send Message
Posted Feb 7, 2014@Rockchaton
Don't worry. I don't plan on going away. It's just going to take more time to get things done is all.
-
View User Profile
-
Send Message
Posted Feb 5, 2014Don't go away like lot of developer and stay here for update cause this plugin is really good. :D
Regards.
-
View User Profile
-
Send Message
Posted Feb 2, 2014I can definitely work in a configurable rate in a future update.
Just a heads up to everyone waiting on new features:
I have a heavy workload from college this semester, so I will not have as much time to update the plugin as I would like. It will take me a little longer right now to work on these updates, but I do plan to continue updating the plugin. I know I dislike having to wait for a plugin to update, so I will try to at least keep the updates coming in at a reasonable pace.
-
View User Profile
-
Send Message
Posted Jan 31, 2014I would like to be able to configer the speed that the difficulty level rises and falls so that it is slower as it changes too fast for me
-
View User Profile
-
Send Message
Posted Jan 21, 2014@TacoGerbil
The list is preconfigured, so as of now, no custom mobs are supported. Although, I agree that adding support for custom mobs would be cool. I currently have no experience supporting custom mobs in a plugin, so I would have to look into learning how to do it first.
-
View User Profile
-
Send Message
Posted Jan 21, 2014@Eelviny
I'm glad you like the plugin, and thank you for your input on the dynamic loot idea. When I first made the plugin, I was worried that I would have no new cool features to add to the plugin because I was all out of ideas. You and others have proven me wrong on that because you all are suggesting great ideas.
-
View User Profile
-
Send Message
Posted Jan 20, 2014Does this plugin dynamically add mobs to the config list? (the list looks preconfigured) Similar to one of my favorite mob kill for pay plugins MoneyDrop , this particular plugin scans even your forge MODS for mobs to add to the config file.. This way you can tailor the difficulty for EVERY mob in the game. Now that would be frickin awesome :)
-
View User Profile
-
Send Message
Posted Jan 20, 2014woot, ticket no. 1! You guys should put ideas into tickets, it means that it can be ticked off when it's done, and it doesn't get buried in the comments section. I'm really liking the concept of this plugin, keep up the good work and if all goes well through testing, I'll be running this on my servers too ;)
-
View User Profile
-
Send Message
Posted Jan 1, 2014@UltiyTeam
The error you are getting is similar to the other two errors that other users are getting. I have explained what I know about it in other posts, but I'll also explain it here.
Basically, when a player logs on to a server, the plugin generates information about the player and keeps track of the information while the player is logged in. For some reason, the plugin loses the player information. When it needs to look up that information, it causes an error because it cannot find it.
I say "For some reason" because up until this point, I was not entirely sure why it loses the information. I actually think I just figured out why, but I need some information to confirm it. I need to know if there were other players logged on to your server when you got the error.
For anyone else who either has already gotten or who gets an error involving a java.lang.NullPointerException, it would help me greatly if you could let me know if there were two or more players on your server at the time of the error.
For everyone waiting for a solution to this problem, DynamicDifficulty v1.2.0, which is currently waiting for approval, has a solution in place, however if the error is caused by what I think it is, then this solution will only intercept the error when it occurs and fix it instead of preventing the error altogether.
I will look into a solution that prevents the error from occurring, but for now DynamicDifficulty v1.2.0 should at least block the error from affecting things on a server.
-
View User Profile
-
Send Message
Posted Jan 1, 2014Seems like a great plug-in, especially when teamed up with mcMMO It seems that I'm not able to view my levels, therefore I can't actually check f it works. An error code popped up so here's that code:
01.01 11:31:59 [Server] INFO ... 13 more 01.01 11:31:59 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at com.cjmcguire.bukkit.dynamic.commands.DynamicCommandExecutor.onCommand(DynamicCommandExecutor.java:59) [?:?] 01.01 11:31:59 [Server] INFO at com.cjmcguire.bukkit.dynamic.commands.AbstractDDCommand.executeCommand(AbstractDDCommand.java:78) [?:?] 01.01 11:31:59 [Server] INFO at com.cjmcguire.bukkit.dynamic.commands.InfoCommand.commandAction(InfoCommand.java:142) [?:?] 01.01 11:31:59 [Server] INFO at com.cjmcguire.bukkit.dynamic.commands.InfoCommand.printMobInfo(InfoCommand.java:155) [?:?] 01.01 11:31:59 [Server] INFO Caused by: java.lang.NullPointerException 01.01 11:31:59 [Server] INFO at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:446) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:540) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:259) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:657) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:147) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at net.minecraft.server.v1_7_R1.PacketPlayInChat.handle(PacketPlayInChat.java:65) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at net.minecraft.server.v1_7_R1.PacketPlayInChat.a(PacketPlayInChat.java:28) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:812) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at net.minecraft.server.v1_7_R1.PlayerConnection.handleCommand(PlayerConnection.java:937) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:546) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:196) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) [spigot-1.7.2-R0.2-SNAPSHOT.jar:git-Spigot-1204] 01.01 11:31:59 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'dynamic' in plugin DynamicDifficulty v1.1.0 01.01 11:31:59 [Server] INFO [11:31:59 ERROR]: null
Any Ideas?
Happy New Years ~ Ultiyplayer ~ www.ultiycraft.com
-
View User Profile
-
Send Message
Posted Dec 30, 2013@siege1313
As far as I know, none of the players who get that error have connection issues, though I will keep an eye out and ask players themselves if they've been having any issues. Hope Bukkit approves the file soon!
Edit: http://pastebin.com/iWqCSaUW This was one of my staff disconnecting. He said he got disconnected for a Java internal error, privileges or something. He has solid internet so it definitely isn't a connection issue, though the internal error might emulate something that a connection issue does in some manner.
-
View User Profile
-
Send Message
Posted Dec 29, 2013@Remi_Scarlet
Thank you for informing me of this error. I have come across this error as well when I was testing the plugin. It is caused by the same issue as the other one that Gamingoutlaws found.
I am curious though. Did you notice any players having connection issues before the errors started occurring? I believe that this is the ultimate culprit causing the errors.
DynamicDifficulty v1.2.0, which at this moment is awaiting approval, should solve these errors and prevent them from occurring.
-
View User Profile
-
Send Message
Posted Dec 29, 2013Updated my server to 1.7 today and for the most part, everything's been smooth sailing. There've been two errors from Dynamic Difficulty, one of which has already been mentioned by another user. I also have this error that I don't believe anyone's posted yet. http://pastie.org/8586403
I don't believe it's causing any game-breaking or otherwise noticeable changes but it is something that pops up in my console once in a while.
Again, thanks for the work on this plugin!
-
View User Profile
-
Send Message
Posted Dec 26, 2013@Remi_Scarlet
Thanks for the information on the damage causes. That will make it much easier to implement that feature in the future.
The problem with basing the damage calculation on the mob performance level is that a player does not have one global mob performance level. Players actually have one performance level per mob, so they have one for zombies, one for spiders, etc.
Even so, your method would still work. It would just require figuring out a global performance level based on all of the mob performance levels which is doable.
-
View User Profile
-
Send Message
Posted Dec 26, 2013@siege1313
Thanks for the response!
It's of course completely understandable that bugfixes and other features may get higher priority than this new feature, but I dug around the bukkit API (mainly because I'm bored lol) and found something that should help. As you mentioned you hadn't previously done anything to figure out damage causes, it turns out Bukkit already has that in its API, which you can find here http://jd.bukkit.org/rb/apidocs/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html
As for the damage calculation, I was thinking about it in the following way: if a player is good enough at the game to be highly "scored" with the performance level, then generally it's safe to assume that they've been playing the game for a long time and as such, would probably know how to be careful around other damage-inducing events such as fires, lava, etc. That said, I was imagining that the damage received from the environment would just use the mob performance level to scale damage.
Actually, an idea I just had would be to have separate performance levels for PvP and PvE(mobs). These would be two separate numbers and environmental damage, being much harder to "calculate", would simply utilize the "higher" of the two numbers - PvP or PvE - and scale accordingly to that. This would ensure that users who might rarely fight mobs and go entirely for other players - or vice versa - would still equally have to be mindful around environmental damages.
Again, thanks for your work on the plugin! Sorry about my slight ramblings :P
-
View User Profile
-
Send Message
Posted Dec 25, 2013@Remi_Scarlet
I do like the idea of making elements of the environment more hazardous and adding settings to enable or disable them. That way, survival in the wilderness, even apart from the mobs, can pose an appropriate level of challenge for each player. I find the idea of a pvp performance level particularly intriguing. It could be sort of like a handicap boost for players who are not as good at pvp or a handicap penalty for players that are really good at pvp.
As far as how difficult that would be to add, its doable, but as with any new feature, it would come with its own set of problems to solve. The biggest issues I see at the moment would be how to determine the player's performance level for each hazard and how to figure out what type of environmental hazard the player is suffering from as well as how to handle it. Performance levels for the mobs are determined by measuring damage given to and received from the mobs. Since a player cannot give damage to an environmental hazard, I would need a different system to determine it. As for figuring out the hazard and handling it, I have never coded that before, so I am not sure what would be involved in that.
Despite those issues, I could see environmental hazards being a new feature in the future. Of course, right now I have an error to solve and other features on the list of possible features to add, so I would not expect it too soon.
-
View User Profile
-
Send Message
Posted Dec 25, 2013@Gamingoutlaws
I have an update regarding the error you are getting.
A friend and I were using DynamicDifficulty on my server and the same error occurred. I looked back over the server log to see what happened. I know what the error is and can trace it back to a certain point, but after that point, I cannot figure out for certain what is causing it to happen. I will explain the situation as I currently understand it based on the information I have now.
Under normal circumstances, when a player logs in the plugin creates information about the player so that it can measure how well the player is doing against the mobs, and when the player logs out, it saves some information in the player's yml file and deletes the rest because it no longer needs it. If the player logs back in again, the plugin will create the information again with no problems.
During our play session, both my friend and I had internet connection issues that caused us to unexpectedly disconnect from my server. After we reconnected, that is when the error started occurring. What I think is happening is that when a player disconnects unexpectedly and logs back in, the plugin does not regenerate the information. Then, when the plugin needs to access that information, it causes an error because the information is not there.
The biggest problem I have in trying to pin down exactly what is going on is that I believe this error is caused by another error. This is very difficult to test because in order to get the plugin's error, I have to purposefully generate the internet connection error.
Despite this, I believe I have a solution to the error. The issue I have with this solution is that it is also difficult to test. My plan is to code the solution and test it myself for a little bit. If I find no issues with it, I will post the update, most likely as a beta version.
-
View User Profile
-
Send Message
Posted Dec 24, 2013Having read some of the most recent comments, before anything I just want to compliment you on how thorough and professional your responses are! I only wish more devs were as kind as you. That being said, amazing plugin! I've yet to actually implement it on my public server as I'm doing plugin haul overs for the 1.7 update (We were waiting for quite a few plugins to update)
That being said, I love the plugin features as-is, but was also wondering if it would be of much difficulty to implement an option, not a default, to scale the damage a player receives globally. What I mean is, based off of a user's performance level the damage they receive through things such as environmental damage would also increase. This would "force" a player to be more careful about their health both in and out of combat. (I know too many people who throw on good armor and stop caring about fall damage)
If it weren't too much trouble, maybe even having each damage event toggleable would allow for more customizability, eg
Something like that.
Again, great plugin! Can't wait to start using it on my public server!
-
View User Profile
-
Send Message
Posted Dec 24, 2013Errors with 1.1.0
Plugins installed: Enjin Minecraft Plugin 2.5.0 Essentials Dev2.13.44 EssentialsChat Dev2.13.44 EssentialsGeoIP Dev2.13.44 GroupManager GMBuildVer (Phoenix) EssentialsSpawn Dev2.13.44 Factions 2.3.0 FirstJoinPlus 2.0 LWC 4.4.0 BukkitCompat R22A - PhonicUK mcMMO 1.4.07-b3337 mcore 7.0.1 - Cayorion Multiverse-Core 2.5-b676 Multiverse-Inventories 2.5-b357 Multiverse-NetherPortals 2.5-b668 Multiverse-Portals 2.5-b698 Multiverse-SignPortals 2.5-b657 OpenInv 2.1.3 - lishid Prism 2.0Beta2-6-g936641f-SNAPSHOT SignShop 2.8.3Dev Vault 1.2.27-b349 Votifier 1.9 WorldEdit 5.5.8-1.6.2 WorldGuard "5.8" - Unknown Author
-
View User Profile
-
Send Message
Posted Dec 22, 2013@Gamingoutlaws
Regarding the default_player.yml file:
That is a new feature to DynamicDifficulty v1.1.0. Previous versions just use the default values listed in the description and do not give the server owner any control over the default values. I should have specified that in the description, and I will change it here shortly. I am sorry for the confusion.
As for the error you get:
I tested DynamicDifficulty v1.0.2 on craftbukkit-1.7.2-R0.3, and I could not get it to generate any errors.
Most errors with this plugin are usually due to a version mismatch between DynamicDifficulty and Bukkit as each version of DynamicDifficulty will only work on the version of Bukkit that it was intended for such as Bukkit 1.6.4 vs. 1.7.2, however, DynamicDifficulty v1.0.2 should work on craftbukkit-1.7.2-R0.3. I made v1.0.2 under craftbukkit-1.7.2-R0.1, but craftbukkit-1.7.2-R0.3 is still compatible with v1.0.2. Plus, I did test it under craftbukkit-1.7.2-R0.3 and could not get an error.
What I am curious about is why you are getting an error about an EntityDamageByEntityEvent when players are logging in and out of the server. Errors regarding an EntityDamageByEntityEvent usually occur only when one entity, such as a zombie, tries to damage another entity, such as a player.
Some additional information would be helpful in solving your problem:
1. What other plugins are you using?
2. Errors usually list additional information regarding where the error occurred at. If the error lists any additional information, what is it?
3. Does the error occur only once each and every time a player logs it or out, or does the error start occurring repeatedly only after one or more players has logged in?
4. Did the plugin load properly at the start up of the server? For example, you did not get any errors earlier stating that the plugin failed to load?
Thank you for informing me of this error. I will do my best to get it solved quickly.