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 Dec 22, 2013This is an error I get in console when players login and out. Also the default_player.yml file does not generate.
Running Bukkit Dev Beta build 3
-
View User Profile
-
Send Message
Posted Dec 19, 2013@LordVerlion
This is just brainstorming, but here is a possible method to implement this kind of leveling system that I think might work well for you as well as other servers.
I really like this concept because it fills a missing role in the settings. It is good for when you want your performance level to steadily rise over time.
As for dynamically changing the mob's health, I see a few issues that would need to be addressed.
The first issue is what happens to the mob's health when two players with different performance levels fight the same mob. There are several things that could happen. For example, the mob could target the higher performance level player, then switch to the lower performance level player, or it could start out targeting the lower then switch to higher. It would be tricky handling the mob's health in all of this.
Second, the calculation for auto performance level is based on the fact that mobs have a set maximum health. By changing and increasing the mob's max health, the calculation would think the player is more skilled than they really are.
Even with those two issues, changing the mob's health could be done, but I would have to be very, very careful in how to implement it properly. The first issue is not too big. I already have an idea for how it could work, but I do not know if it would work out. The second issue would be a big problem. I would have to think about how to solve that one.
-
View User Profile
-
Send Message
Posted Dec 18, 2013@siege1313
In short :
Holy crap. When I post on a plugin, I do not expect such detailed replies. Most plugin creators say the minimum and let it go. Thanks a lot for all that information.
In long:
On my server, I have several custom plugins that go beyond typical Vanilla experience. Such as both increasing the health and damage of players through specifically named and 'enchanted' armor/weapons. These armor/weapons are awarded through quests and drops from Custom NPC's and Boss's. (Item Plugin).
For this reason alone, I wanted the ability for mobs to exceed what is generally considered 'safe' zones. I do believe the config should be kept defaulted to your natural numbers, but allowing owners to perhaps increase said damage/health.
I also have a custom world (Roughly built using World Painter, then smoothed out and 'world-afied' with Voxel Sniper and World Edit), that is divided into territories. Each progressively getting harder as you get further into the game and world. Hence, I'd like quests that execute a command to raise a player's performance levels, to match what they'd accomplished.
Whereas your plugin is designed to dynamically alter the 'stats' of mobs based on past performance of fighting mobs, and other games (such as Skyrim being the most obvious recent I can think of) where the difficulty of the wild monsters reflect the character's level. This change would allow a different dynamic system, in which it's based on quest's being completed (at least for me). I have no idea about other server's needs, so no idea if this is only something I'd be interested in or not.
I understand that these changes may not be within your realm of intentions for this plugin, just wanted to clarify the reasons.
Many thanks for the long reply, love to know how and why plugins were created. Definitely hope that you keep this updated incase it ever breaks for sure. Even without changes, I will be using this. (At very least to manually make all mobs harder).
P.S. - This is another feature suggestion, but just realized it. Would the dynamic be able to work with health as well? To increase the damage it takes to kill the mobs as well. Thanks again!
-
View User Profile
-
Send Message
Posted Dec 18, 2013@LordVerlion
In order to answer your questions, allow me to provide a bit of background on why I made the plugin:
"DynamicDifficulty" was my senior research project for college. I ended up doing a lot of research on how to properly implement dynamic difficulty in a videogame. One of the issues to consider when implementing dynamic difficulty is that changing the difficulty in the middle of gameplay can be distracting for the player and break immersion. The maximum values for the attributes are set where they are primarily because these are the maximum values that still remain not too terribly distracting.
Here is a more detailed rundown of the maximum attribute values and why they are set where they are:
As for your questions regarding new features:
Previously, I had no plans to implement new features for a while. Seeing as this was my senior research project, I completed all of the features I set out to do for the class. Additionally, I could not think of any good new features that I felt this plugin desperately needed.
However, I do want to add new features in the future, and I definitely want them to be features that users of the plugin, such as yourself, would want and find useful. I am very open to taking in suggestions and discussing new features.
Allowing the commands to target specific players would be doable. I will look into it. Depending on how that goes, I will let you know if I decide to add it and how long I think it will take. I don't want to say anything definite one way or the other until I have had a chance to look into it first.
I am a little more hesitant about allowing AutoPerformanceMin and AutoPerformanceMax to be set in a config below and above the current min and max values. Most of my reasons are for the same reasons I listed under the max attribute values explanations. It would be doable, but it would be tricky to pull off given the way the values are calculated currently. For example, if AutoPerformanceMax could be set at 300, then the mob's speed could reach 200% which is getting ridiculously high.
However, I could see AutoPerformanceMin and AutoPerformanceMax being set higher than 50 and lower than 200, respectively. With that, the mob attribute values would not get out of control.
I will be happy to look into this too and see what can be done. Do you have any thoughts / comments on this?
-
View User Profile
-
Send Message
Posted Dec 18, 2013How have I not seen this plugin yet? Will be uploading it to my test server later today when I get home from work to play around with it. Love the idea.
Quick questions:
-
View User Profile
-
Send Message
Posted Dec 16, 2013@blakfyr999
This plugin is compatible with "MobVariants". "DynamicDifficulty" spawns the normal mobs as well (or rather, it does not spawn custom mobs).
Two things to consider:
When I tested both plugins at the same time and had my manual performance level at 200, mobs did x4 damage, so "MobVariants" will double the modified damage from "DynamicDifficulty".
Also, the calculation for a player's auto performance level is based partially on how much damage a player deals to a type mob. If a player has to deal more damage to a mob to kill it because the mob's health is doubled, this might skew the calculation slightly and boost the player's auto performance level.
This may not be that big of an issue though. After all, if a player can fight well enough to kill a mob with double health, defense, and/or damage, then they deserve to have a higher auto performance level.
-
View User Profile
-
Send Message
Posted Dec 12, 2013Curious if this is compatible with "MobVariants", since it spawns the normal Creepers, Skellies, Zombies, and etc
Just altered~
Would love it if an admin can answer this for me~
-
View User Profile
-
Send Message
Posted Nov 16, 2013@siege1313
Ok thanks :)
-
View User Profile
-
Send Message
Posted Nov 15, 2013@Seaboiii
Great news! It turns out I was wrong about the whole "spigot uses bukkit.jar, not craftbukkit.jar" thing. It turns out that spigot does use all of the features of craftbukkit.jar.
The problem was nothing more than a compatibility issue between spigot 1.7 and the version of spigot/bukkit that DynamicDifficulty expects. DynamicDifficulty 1.0.0 will only work with spigot 1.6.2 and bukkit 1.6.2. I tested the plugin using spigot-1.6.2-R1.1.jar and no errors occurred. If you use spigot 1.6.2, the plugin will work fine. Just for reference, the link to download spigot 1.6.2 is here: http:ci.md-5.net/job/Spigot/1098/
In order for DynamicDifficulty to be compatible with other versions, I will have to update the plugin to work with that specific version.
-
View User Profile
-
Send Message
Posted Nov 14, 2013@Seaboiii
The problem is definitely due to a compatibility issue between DynamicDifficulty and Spigot 1.7.
In order to change certain attributes of the mobs, I had to tap into craftbukkit.jar. Most plugin developers just use bukkit.jar to make their plugins and that works fine for those plugins.
Spigot includes the features of bukkit.jar, but it does not include the extra features that craftbukkit.jar provides. This is why most Bukkit plugins work on Spigot, but DynamicDifficulty does not.Whenever you see "org.bukkit.craftbukkit.<version number>" or "net.minecraft.server.<version number>" in the error, this usually indicates that the plugin expected a specific version of craftbukkit, but another version of craftbukkit
or another type of Minecraft server (in this case Spigot)was in use.Unfortunately, I do not currently know of a way to resolve the issue that would make DynamicDifficulty compatible with Spigot.-
View User Profile
-
Send Message
Posted Nov 11, 2013@siege1313
2. I am using group manager :)
3. This is the error when disabling.
http://pastebin.com/yav02WUG
This is the error when an entity tries to spawn
http://pastebin.com/7XPQ6jaP
4. Nope. Internal error and bam. Doesnt work
-
View User Profile
-
Send Message
Posted Nov 11, 2013@siege1313
I am using Spigot 1.7... That might be the problem
-
View User Profile
-
Send Message
Posted Nov 10, 2013Thank you, Seaboiii. I'm glad you enjoy DynamicDifficulty.
And don't worry. I definitely plan to continue updating the plugin.
As for the internal server error that occurs whenever you use any /dynamic command, I cannot produce the error myself when testing the plugin. I have a feeling that it may be a result of a conflict with another plugin, possibly a permissions plugin. Can you tell me a few pieces of information about the problem to better help me solve it:
1. What version of Bukkit are you using?
2. What other plugins are you using, specifically any permission plugins?
3. Can you post the error message you get?
4. Do the commands still take effect or does the error completely block the command from working?
Thank you for your help in answering these questions. I will do my best to solve the issue.
-
View User Profile
-
Send Message
Posted Nov 8, 2013Absolutely love it! Great plugin. Continue updating this :)
Getting Internal Server Error when I do any /dynamic commands