[MECH] CustomDifficulty v4.5.0 - Monsters too strong or too weak for you? Change it! [1240]

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

  1. Offline

    Pasukaru

    CustomDifficulty
    The Plugin to adjust the difficulty in SMP
    Latest version: 4.5.0
    blank line
    [​IMG]
    BLANK LINE : D : D
    CustomDifficulty provides a lot of features to change the all around difficulty in Minecraft.
    You can change the monster's HP, damage, aggressiveness and more! You are also able to modify the player's damage.
    Each difficulty is stored in its own file - which enables you to create as many difficulties as you like! It's possible to set a difficulty for a certain region only (Use the built-in regions, or WorldGuard regions). This enables you - for example - to create hard dungeons with ease.
    For more information, take a look at the 'Features' section below.

    Please report any bugs you may encounter!

    If you are a developer and take a look at the source, please let me know if you have some improvements! I'm still new to this (Java/programming in general) and want to get better. :)

    Features:
    • Change monster's hp (200 HP is max - but that should be enough, a player has 20)
    • Change monster's damage - Let them beat you up - or not even scratch you :>
    • Change aggressiveness of monsters and animals. (Aggressive, Passive, Friendly)
    • Change if monsters burn in sunlight.
    • Spawn any mob, anywhere - naturally! Giant, 'monster' and sheep in any color included!
    • Define spawn chance.
    • Define min/max height for mobs to spawn.
    • Define min/max light level for mobs to spawn.
    • Define block types mobs will only/will never spawn on.
    • Define custom drops for each mob in each difficulty.
    • Define a loot-multiplier to let monsters drop more items!
    • Limit mobs per server/world/chunk
    • iConomy support! (For monster-killing rewards)
    • Change player's damage.
    • Multi-world support!
    • Permissions support!
    • WorldGuard support!
    • Create regions, each with a custom difficulty!
    • No need to restart/reload the server to apply changes, simply use the /difficulty reload command!
    • All (reasonable) commands can be used from the console!
    If you download, please also click the 'like' button at the lower right corner of this post - Thanks!

    If you need a more detailed explanation, feel free to drop me a message and I'll try to help as much as I can. :)
    This text is only used to have an empty line! :>
    How to use:
    Click me :)

    • Copy CustomDifficulty.jar into the /root/plugins folder.
    • Download WorldEdit (If you want to use regions) and place it into the /root/plugins folder as well.
    • Difficulties are located in the /root/plugins/CustomDifficulty/difficulties folder. Each difficulty is in its own [difficulty].yml file.
    • Simply change the values of the default configs and/or create new config files. The plugin will load all *.yml files inside the difficulties folder automatically on reload.
    • If you remove a configuration node, this plugin won't change anything of the corresponding event, thus preventing conflicts with other plugins.
    • You can create regions with the /difficulty region [regionCommand] commands and set difficulties for each of them independently! (See 'Commands and Permissions' below)
    Note that you must notuse tabs in *.yml (YAML) files. If you do, it will mess up the format and Bukkit will throw you a million errors (something like *snakeyaml* ) :>
    Important notes:
    Click me :)

    • All configuration nodes are case sensitive and your world's names shouldn't contain special character, as it might mess up the configuration nodes!
      If a configuration node does not exist, Bukkits default will be used - or nothing happens at all.
      The plugin will check if the monster/player is in a region first (if enabled - see below)
      If the monster/player is in no region, the world's difficulty settings will be used.
    • Slimes are handled according to their size.
    • Wolves are handled according to their tamed/untamed status.
    • Creepers are handled according to their powered/unpowered. status.
    • The last three points exclude the following nodes:
      spawnChance, spawnOnlyOn, spawnNotOn, lightLevelMin, lightLevelMax
    • Creepers have a floating point (e.g. 1.65) damage value and it's used as multiplier, not as fixed damage. This value applies to the damage only, not the explosion range/radius.
    • Wild wolves can be aggressive. They will attack a player on sight, but it is still possible to tame them - unless the player fights back.
    • Tamed wolves HP will always be read from the worlds difficulty! (To avoid exploits like healing it in a region where it as a maximum of 100 hp and then move to a region with a maximum of 50 hp)
    • Player's damage will be calculated like this:
      Round( (usualDamage * damageMultiply) + damageAdd )
      damageAdd is an integer.
      damageMultiply is a floating point value.
      usualDamage is the players default damage (e.g. 2 with fists, 5 with diamond pickaxe) - might be different if another plugin modified the event damage before CustomDifficulty did!
      You can use different values for Player vs Player and Player vs Monster. You can also set negative values - but a negative multiplier is not recommended.
    • Regions are disabled by default! If you want to use them, go to your config.yml(not difficulty.yml!) and set useRegions for the specified actions to 'true' (without quotes!)
      I disabled them by default do increase performance (a tiny, tiny bit :p, unless you have 1 million regions in one world) and I guess not everyone will use them.
    • Change difficulty of (regions or worlds) by using the corresponding command where difficulty = one of your /difficulties/[difficulty].yml without the ".yml" extension!
    Commands and Permissions:
    Click me :)
    Permission node to receive rewards: 'CustomDifficulty.reward'
    Ops can use all commands and permission nodes are case sensitive!
    bold = mandatory
    underlined = optional
    " | " = "or"

    Difficulty-related commands:
    • /difficulty help - Displays the help / lists commands and descriptions.
      Permission node: 'CustomDifficulty.help'
    • /difficulty - Displays difficulty of the world the player is currently in - or of all worlds if the command user is no player (e.g. console)
      Permission node: 'CustomDifficulty.check'
    • /difficulty check <World | all> - Displays the difficulty of <World>, <all> worlds or the world the player is currently in if <World> is not specified. If the command user is no player, it will list all worlds.
      Permission node: 'CustomDifficulty.check'
    • /difficulty <change | set><World> <Difficulty> - Change difficulty of <World>, or the world you are currently in if none specified.
      Permission node: 'CustomDifficulty.change'
    • /difficulty reload - Reloads the config files. Use this after changing/adding difficulties or other configurations!
      Permission node: 'CustomDifficulty.reload'
    • /difficulty performance - Counts the used time for each feature for the next 10 seconds. Use this if you think the plugin causes lag, and to find out which part of it.
    Region-related commands (These require WorldEdit and WorldGuard):
    All commands start with /difficulty region *** - Replace "***" with one of the below:
    • help - Displays help about region commands.
      Permission node: 'CustomDifficulty.region.help'
    • <set | change> <World> <Difficulty> - Change difficulty of world <World>, or the world you are currently in, if <World> is not specified, to <Difficulty>
      Permission node: 'CustomDifficulty.region.set'
    • info <World> <RegionName> - Displays some information about region <RegionName> on world <World> or the world you are currently in.
      Permission node: 'CustomDifficulty.region.list'
    Note:
    If you are using WorldGuard regions, only the region commands 'info' and 'set | change' are available. To define new regions, you WorldGuard's '/region define' command.
    Changelog:
    Version 4.5.0 | 10/6/2011
    • Fixed: Squid spawn - for real this time
    • Fixed: min/max spawn distance works now.
    • Fixed: Ghats can now be friendly. (passive too, but they will behave as friendly. :/) Friendly ghasts hardly move though.
    • Added: OPs will receive a message on login, if a new of CD is available. Can be turned off, config.yml -> global.checkForUpdates
    • Added: Some code to make squids follow their targets. They don't do that naturally like other mobs. -.-
    • Ghasts and PigZombies take damage over time to simulate burning in sunlight. (If enabled)
    Old versions (open)
    Version 4.4.0 | 9/28/2011
    • Changed: Mob limit configuration; Nodes you have to use now:
    Code:
    global:
        mobLimit: 500 #= server Limit
    worlds:
        [worldname]:
            mobAggressiveLimit: 75
            mobPassiveLimit: 75
            mobFriendlyLimit: 75
            mobChunkLimit: 1
    
    You can remove all other limit nodes, they aren't used anymore.
    • Added: A new config node inside the difficulty files:
    Code:
    global:
        dropOnlyWhenKilledByPlayer: false
    
    Should be self-explanatory, but you have to add it manually if you want to enable it.
    • Fixed: Squid spawning. Was checking for lava instead of water..
    • Fixed: A NPE inside the spawn algorithm.
    • Fixed: Another NPE inside spawn algorithm (dev build only)
    • Added: Multiverse-Core will now load before CD does.
    • Added: Register support. All major economy plugins should work with CD now.
    • Removed: iConomy5 support. If you use iConomy5, you also have to download and use Register.
    Version 4.3.0 | 9/24/2011
    • Fixed: Feeding wolf in 1.8; Item amount decreases and Raw Flesh added as food.
    • Fixed: Getting rewards with projectiles (arrows) works now.
    • Fixed: Giants spawning in walls and small caves. - Some still spawn in walls or weird locations and suffocate, but they will be removed immediately.
    • Added: Configuration nodes for the new mobs Enderman, CaveSpider and Silverfish.
    • Added: Now spawn-able: Electrified Creeper, Spider-Jockeys, coloured sheep.
    • Changed: Mobs will now spawn in at least 2 block high rooms instead 1 block only. (To prevent Zombies and other tall mobs to suffocate.)
    Version 4.2.3 | 7/28/2011
    • Changed: Giants attack players up to 3 blocks below them instead of 1.
    • Changed: config.yml nodes: spawnInterval, aggressivenessInterval and burnsInSunlightInterval are now in the worlds.worldname section. You can remove the global ones.
    • Probably fixed: ClassCastException in aggressiveness task. (?)
    • Changed: performance command.
    • Fixed: Another bug, I just don't remember which one... I should start writing it down immediately :eek:
    Version 4.2.2 | 7/27/2011
    • Fixed: BurnsInSunlight now reads the interval correctly from the config. (=Slight performance increase if you don't use an interval of 1. Default is 20.)
    • Fixed: Mobs can now spawn in snowy areas.
    • Added: Giants should attack players now, they don't do it naturally... (Please test this :))
    • Changed: Aggressiveness check is now performed every X ticks for every player, instead of every X move-events for the corresponding player only.
    Version 4.2.1 | 7/26/2011
    • Fixed: NPE in mobCleanup
    • Removed: Creation of unused node 'ignoreInvalidWorldDifficulty' in config.yml
    Version 4.2.0 | 7/25/2011
    • Added: command '/difficulty performance'
    • Added: another way of reading the difficulty of a mob (for testing purposes). change useOldGetDifficulty in your config.yml if you want.
    Version 4.1.0 | 7/15/2011
    • Removed built-in regions. (Use WorldGuard, it provides more features for regions)
    • Added customizable drops.
    • Added: Players will receive rewards if their wolf kills a mob
    • Changed spawn-algorithm, it will use the chunks around a random player per run, instead of chunks around all players.
    • Changed check for old iConomy versions.
    Version 4.0.6 | 7/13/2011
    • Fixed an 'out of bounds exception' in the reward calculations.
    • Mobs shouldn't suffocate anymore if they spawn next to a wall.
    Version 4.0.5 | 7/12/2011
    • fixed automatically created node burnInSunlight to burnsInSunlight in the config.yml
    • probable fix for a concurrent modification exception.
    Version 4.0.4 | 7/11/2011
    • Added fix for incompatible iConomy versions.
    Version 4.0.3 | 7/10/2011
    • Major bug fixed within the spawn-algorithm. To be specific: instead of reading the maximum light level for a mob to spawn, it was reading the minimum height - this, of course, messed everything up.
    Version 4.0.2 | 7/10/2011
    • NPE fix regarding the loot multiplier. - A weird one :confused:
    Version 4.0.1 7/9/2011
    • Mobs shouldn't spawn in water anymore if spawnNotOn WATER and/or STATIONARY_WATER is used.
    Version 4.0.0 | 7/9/2011
    • Aggressiveness is now split into aggressivenessDay and aggressivenessNight.
    • Added option on which blocks mobs will only spawn, or will never spawn on.
    • Reward now requires permission 'CustomDifficulty.reward' to receive it.
    • Added option for min/max light level for mobs to spawn.
    • Added option for min/max height for mobs to spawn.
    • large rewrite of the plugin.
    Version 3.6.0 | 7/7/2011
    • Depreciation of rewards if you kill the same mob type repeatedly.
    • Bugfix of the isDay() function which resulted in wrong calculations for the BurnInSunlight feature. (It was checking for night instead of day - fail)
    • SpawnChance will only affect naturally spawned mobs. (I was too stupid to find it previously - lol). Also, It will never affect the spawn behaviour of 'monster' and giant in any way, even if a plugin spawns them as 'naturally'. If you use another plugin to make them spawn, it should be possible to change the spawn amount there.
    • isAggressive and burnsInSunlight features are now available for animals as well.
    Version 3.5.1 | 5/7/2011
    • Added check for a nearby mob spawner for reward and lootMultiplier.
    • Added success-rate of a mob spawning.
    Version 3.5.0 | 7/5/2011
    • NPE fix within the reward system.
    • Added WorldGuard-Regions support.
    • Added option to disable startup messages.
    • Region Commands now have their own classes.
    • Difficulties with uppercase letters work properly.
    Version 3.4.2 | 7/3/2011
    • Fixed another bug regarding region-persistence. :eek:
    Version 3.4.1 | 7/3/2011
    • Fixed monsters (except skeletons & zombies) starting to burn during night if burnsInSunlight was set to true.
    Version 3.4.0 | 7/2/2011
    • Fixed regions not saving into database due to a wrong function call.
      Thanks to @Kytsune for spotting this bug!
    • Added iConomy support for mob-killing rewards.
    • Added lootMultiplier feature
    Version 3.3.1 | 7/1/2011
    • NPE fix
    Version 3.3.0 | 7/1/2011
    • Added some (possible) bugfixes
    • Added possibility to change if (hostile) monsters burn in sunlight.
    Version 3.2.0 | 6/24/2011
    • Added changeable aggressiveness.
    • Changed the way I hooked into WorldEdit / Permissions.
    • Different settings for wild wolves and tamed wolves.
    • Tested against RB 928.
    Version 3.1.0 | 06/16/2011
    • Added configuration nodes for "monster" (the 'human' mob)
    Version 3.0.0 | 06/16/2011
    • Added regions. (Requires WorldEdit and HSQLDB)
    • Added possibility to create as many difficulties as you want
    • Changed commands a bit to clean up source code - it was a mess!
    • Some minor bug fixes.
    • Something else I don't remember right now. :eek:
    Version 2.2.2 | 06/14/2011
    • Removed "Error in [world].yml - Check HP settings for [monster]" debug message.
    Version 2.2.1 | 06/07/2011
    • Added option to change Player's damage for each difficulty (multiply and [add or subtract damage] or both)
    • Added checks if config nodes are set. (If not - Plugin won't touch the corresponding event)
    • Changed "/difficulty" command - displays now the current world - or all worlds if the command user is no player (e.g. console)
    • Added "/difficulty all" - will display the difficulty on all worlds.
    • Priorities of 'CREATURE_SPAWN' and 'ENTITY_DAMAGE' events have been set to 'Lowest'.
    • Bug-fix - Fixed error with slimes - it was looking for node "slime[size]..." instead of "slime.[size]..."
    • Some minor changes in the source code (e.g. refactoring)
    Version 2.1.1 | 06/06/2011
    • Added Multi-World support.
    • Added Permissions support.
    • Bug-fix - Slimes are now handled according to their size.
    Version 1.0.0 | 06/05/2011
    • Initial release.

    To-do
    • Limit mob spawning to biomes.
    • Suggestions!
    • Change Player's HP | Out of the scope of this plugin as it requires a custom health system. I might add later though... who knows.
    If you like this plugin and want to help me a lil bit - please [​IMG]. Thanks!

    ~Pardon my imperfect English. :>
     
    Snatch, bluehasia, Smokie23 and 27 others like this.
  2. Offline

    Pasukaru

    @morizuki
    Ah, okay no problem. Glad you found the error. :)
     
  3. Offline

    M1sT3rM4n

    Can you explain the global configuration numbers?

    Also getting this error:

    [​IMG]
     
  4. Offline

    Flenix

    Whenever I use a command, it says "/difficulty [region] help | If you see this message, the plugin is not enabled!"

    I have no way of enabling/disabling plugins on my server... Or at least not that I know of (and it shouldn't load up disabled)

    If I type /plugins it appears there in green just like everything else...

    Configs are in spoiler:

    Show Spoiler

    Code:
    global:
        savePlayerKills: 3
        initMessages: true
        burnInSunlightInterval: 20
        spawnInterval: 1
        aggressivenessInterval: 1
        useWorldGuardRegions: true
        minSpawnDistance: 24.0
        maxSpawnDistance: 222.0
        mobSpawnerRadius: 5.0
        naturalMobLimit: 450
        mobLimit: 500
    worlds:
        world:
            mobLimit: 250
            naturalMobLimit: 225
            mobChunkLimit: 5
            difficulty: none
            useRegions:
                aggressiveness: false
                burnsInSunlight: false
                mobHP: false
                mobDamage: false
                playerVsPlayer: false
                playerVsMonster: false
                reward: false
                lootMultiplier: false
                spawnAlgorithm: false
        nether:
            mobLimit: 250
            naturalMobLimit: 225
            mobChunkLimit: 5
            difficulty: none
            useRegions:
                aggressiveness: false
                burnsInSunlight: false
                mobHP: false
                mobDamage: false
                playerVsPlayer: false
                playerVsMonster: false
                reward: false
                lootMultiplier: false
                spawnAlgorithm: false
        world_skylands:
            mobLimit: 250
            naturalMobLimit: 225
            mobChunkLimit: 5
            difficulty: none
            useRegions:
                aggressiveness: false
                burnsInSunlight: false
                mobHP: false
                mobDamage: false
                playerVsPlayer: false
                playerVsMonster: false
                reward: false
                lootMultiplier: false
                spawnAlgorithm: false
        Atremos:
            mobLimit: 250
            naturalMobLimit: 225
            mobChunkLimit: 5
            difficulty: none
            useRegions:
                aggressiveness: false
                burnsInSunlight: false
                mobHP: false
                mobDamage: false
                playerVsPlayer: false
                playerVsMonster: false
                reward: false
                lootMultiplier: false
                spawnAlgorithm: false
        Vetanus:
            mobLimit: 250
            naturalMobLimit: 225
            mobChunkLimit: 5
            difficulty: none
            useRegions:
                aggressiveness: false
                burnsInSunlight: false
                mobHP: false
                mobDamage: false
                playerVsPlayer: false
                playerVsMonster: false
                reward: false
                lootMultiplier: false
                spawnAlgorithm: false
        Freeplay:
            mobLimit: 1000
            naturalMobLimit: 225
            mobChunkLimit: 5
            difficulty: survival
            useRegions:
                aggressiveness: true
                burnsInSunlight: false
                mobHP: true
                mobDamage: true
                playerVsPlayer: true
                playerVsMonster: true
                reward: false
                lootMultiplier: false
                spawnAlgorithm: false
    
    Code:
     global:
        rewardDepreciation: 10.0
        possibleSpawnCreatures:
        - chicken
        - creeper
        - pig
        - sheep
        - skeleton
        - slime
        - spider
        - squid
        - wolf
        - zombie
        - monster
    player:
        vsMonsterDamageAdd: 0
        vsPlayerDamageAdd: 0
        vsPlayerDamageMultiply: 1.0
        vsMonsterDamageMultiply: 1.0
    zombie:
        hp: 30
        damage: 5
        spawnChance: 100.0
        burnsInSunlight: true
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 5
        spawnNotOn:
        - GLASS
        - STEP
        - WOOD_STAIRS
        - COBBLESTONE_STAIRS
    skeleton:
        hp: 30
        damage: 5
        spawnChance: 100.0
        burnsInSunlight: true
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnNotOn:
        - GLASS
        - STEP
        - WOOD_STAIRS
        - COBBLESTONE_STAIRS
    creeper:
        spawnChance: 100.0
        spawnNotOn:
        - GLASS
        - STEP
        - WOOD_STAIRS
        - COBBLESTONE_STAIRS
        powered:
            hp: 40
            damage: 1.0
            burnsInSunlight: false
            aggressivenessDay: aggressive
            aggressivenessNight: aggressive
            reward: 0.0
            lootMultiplier: 1
        unpowered:
            hp: 30
            damage: 1.0
            burnsInSunlight: false
            aggressivenessDay: aggressive
            aggressivenessNight: aggressive
            reward: 0.0
            lootMultiplier: 1
    spider:
        hp: 30
        damage: 3
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: passive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnNotOn:
        - GLASS
        - STEP
        - WOOD_STAIRS
        - COBBLESTONE_STAIRS
    slime:
        spawnChance: 100.0
        huge:
            hp: 50
            damage: 4
            burnsInSunlight: false
            reward: 0.0
            lootMultiplier: 1
        big:
            hp: 40
            damage: 4
            burnsInSunlight: false
            reward: 0.0
            lootMultiplier: 1
        average:
            hp: 30
            damage: 2
            burnsInSunlight: false
            reward: 0.0
            lootMultiplier: 1
        small:
            hp: 20
            damage: 1
            burnsInSunlight: false
            reward: 0.0
            lootMultiplier: 1
            reward: 1
    pigzombie:
        hp: 30
        damage: 6
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
    ghast:
        hp: 10
        damage: 7
        spawnChance: 100.0
        burnsInSunlight: false
        reward: 0.0
        lootMultiplier: 1
    giant:
        hp: 50
        damage: 10
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnNotOn:
        - GLASS
        - STEP
        - WOOD_STAIRS
        - COBBLESTONE_STAIRS
    monster:
        hp: 40
        damage: 6
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnNotOn:
        - GLASS
        - STEP
        - WOOD_STAIRS
        - COBBLESTONE_STAIRS
    wolf:
        spawnChance: 100.0
        spawnOnlyOn:
        - GRASS
        wild:
            hp: 8
            damage: 2
            burnsInSunlight: false
            aggressivenessDay: aggressive
            aggressivenessNight: aggressive
            reward: 0.0
            lootMultiplier: 1
        tamed:
            hp: 16
            damage: 1
            burnsInSunlight: false
            aggressivenessDay: passive
            aggressivenessNight: passive
            reward: 0.0
            lootMultiplier: 1
    cow:
        hp: 10
        damage: 3
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnOnlyOn:
        - GRASS
    pig:
        hp: 10
        damage: 2
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnOnlyOn:
        - GRASS
    chicken:
        hp: 10
        damage: 8
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnOnlyOn:
        - GRASS
    sheep:
        hp: 10
        damage: 2
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnOnlyOn:
        - GRASS
    squid:
        hp: 100
        damage: 20
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnOnlyOn:
        - GRASS
    
    


    Also, I set all the usually passive creatures to aggressive (maybe thats the issue) - will that work? I love the idea of water being so dangerious :D its for our new Survival world which I want to be a real challenge...
     
  5. Offline

    Pasukaru

    @Flenix
    CraftBukkit version?
    And paste your server log on startup please.
    Also, read this please, for future reference. No offense, but what the title says is true - we need some information - help us to help you.
    Changing all passive mobs to aggressive is possible - that's what I made this plugin for. ;)

    @M1sT3rM4n
    Hmm, I don't know how this error could happen, but I'll upload a fix in a minute.
     
  6. Offline

    M1sT3rM4n

    That event only occurs when I die from "modified" mobs.
     
  7. Offline

    Pasukaru

    Yea, it's about the loot multiplier - it either doesn't get initialized or read properly... I'll add a check to avoid this error - if the loot multiplier shouldn't work, please tell me.

    [Edit]
    Uploaded v4.0.2. Should at least avoid the error message.

    [Edit2]
    @M1sT3rM4n
    Oh, totally forgot about your question..
    here we go:
    blank line
    config.yml, global nodes:
    • savePlayerKills - saves the last X mobs the player killed (Only used for reward depreciation)
    • initMessages - display messages on startup true/false
    • burnsInSunlightInterval - performs check for mobs burning in sunlight every X ticks (20 ticks = 1 second)
    • spawnInterval - perform mob spawning algorithm every X ticks. The lower the value, the faster mobs will spawn.
    • useWorldGuardRegions - Choose between whether you want to use WorldGuard's regions or CustomDifficulty's built-in regions. (built-in regions will be removed in the next larger update)
    • aggressivenessInterval - perform aggressiveness check of mobs every X playerMove events (not necessarily ticks). Setting this value too high may result in mobs attacking a player very late if they are aggressive.
    • minSpawnDistance - minimum distance to any player for a mob to spawn
    • maxSpawnDistance - maximum distance to any player for a mob to spawn
    • naturalMobLimit - if limit is reached, no more mobs will be spawned by the mob spawning algorithm. this is a server-limit - (will count mobs on all worlds)
    • mobLimit - no mob will be spawned if this limit is reached (Will block commands as well)
    blank line
    difficulty.yml global nodes:
    • rewardDepreciation - reward will be depreciated by x per cent for every consecutive player monster kill - the limit of this is defined in config.yml 'savePlayerKills'
    • possibleSpawnCreatures - a list of all possible creatures that can spawn in this difficulty (region or world). possible values are the 'nodes' eg: creeper, slime, skeleton - but NOT something like slime.small or creeper.powered.
    blank line
    i hope this helps :)
    blank line
    About the error - only when YOU (a player) dies? (PVP / PVM / both?) - That might be the hint I need to solve this error properly. :>
     
  8. Offline

    bajansam

    hi, :D
    Look, i have tried everything and nothing seems to work...:'(

    i have "spawn monsters" set to true in my server properties, how do i make ALL monster mobs (creepers, skeletons, spiders ect..) friendly, so they dont attack people in my server?

    OR

    how do i stop all monster mobs spawning THEMSELVES, but when i spawn monsters with my 'monster spawner plugin' it allows the spawn.

    (Im basically trying to make a zoo! :p)

    Thanks a lot!!! :)

    By the way i tried everything in the config but i dunno :/

    oh sh*t, this is a bukkit server plugin right?

    wow so many questions :p please respond!! :D THANKS!
     
  9. Offline

    Pasukaru

    @bajansam
    It's actually pretty easy, all you need is this in your config.yml:
    Code:
    global:
        naturalMobLimit: 0
    
    This will all prevent any mob to spawn naturally, but commands will still work to spawn them. ;)
    To make them friendly, change aggressivenessDay and aggressivenessNight to friendly. Here's an example:
    Code:
    zombie:
        aggressivenessDay: friendly
        aggressivenessNight: friendly
    
    And yes, this is a Bukkit plugin, that's why it's in the Bukkit > Plugin Releases section o.o
     
  10. Offline

    M1sT3rM4n

    What I've noticed is that both regular and enemy mobs spawn at fast rates when you set the rate to 1 in global configs. Can you make them separate? Or do I have to lower the spawn % for the mobs I don't want?
     
  11. Offline

    Pasukaru

    Set the rate to 1 in global configs? What do you mean, the interval?
    If so - yea, thats how fast mobs will spawn.
    To lower the chance of a certain mob to spawn, reduce the spawn percent of it. (or remove it completely from the list)
     
  12. Offline

    M1sT3rM4n

    I noticed that the mobs only seem to spawn in the water.
     
  13. Offline

    Pasukaru

    They spawn only in water?
    Do they have this setting:
    spawnOnlyOn:
    - WATER
    or
    - STATIONARY_WATER
    ?
    It's running fine on my server.
     
  14. Offline

    M1sT3rM4n

    Here's mine:

    Code:
    zombie:
        hp: 35
        damage: 1
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 5
        spawnNotOn:
        - GLASS
    skeleton:
        hp: 25
        damage: 4
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnNotOn:
        - GLASS
    creeper:
        spawnChance: 45.0
        spawnNotOn:
        - GLASS
        powered:
            hp: 10
            damage: 30
            burnsInSunlight: false
            aggressivenessDay: aggressive
            aggressivenessNight: aggressive
            reward: 0.0
            lootMultiplier: 1
        unpowered:
            hp: 5
            damage: 20
            burnsInSunlight: false
            aggressivenessDay: aggressive
            aggressivenessNight: aggressive
            reward: 0.0
            lootMultiplier: 1
    spider:
        hp: 25
        damage: 3
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnNotOn:
        - GLASS
    
    They only spawn in the water then come out.
     
  15. Offline

    Pasukaru

    hmm, is that the complete file?
    because the possibleSpawnCreatures node is missing o.o
     
  16. Offline

    M1sT3rM4n

    The entire thing was too big but I'll attach it:

    Code:
    global:
        rewardDepreciation: 10.0
        possibleSpawnCreatures:
        - chicken
        - creeper
        - pig
        - sheep
        - skeleton
        - slime
        - spider
        - squid
        - wolf
        - zombie
    player:
        vsMonsterDamageAdd: 0
        vsPlayerDamageAdd: 0
        vsPlayerDamageMultiply: 1.0
        vsMonsterDamageMultiply: 1.0
    zombie:
        hp: 35
        damage: 1
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 5
        spawnNotOn:
        - GLASS
    skeleton:
        hp: 25
        damage: 4
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnNotOn:
        - GLASS
    creeper:
        spawnChance: 45.0
        spawnNotOn:
        - GLASS
        powered:
            hp: 10
            damage: 30
            burnsInSunlight: false
            aggressivenessDay: aggressive
            aggressivenessNight: aggressive
            reward: 0.0
            lootMultiplier: 1
        unpowered:
            hp: 5
            damage: 20
            burnsInSunlight: false
            aggressivenessDay: aggressive
            aggressivenessNight: aggressive
            reward: 0.0
            lootMultiplier: 1
    spider:
        hp: 25
        damage: 3
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnNotOn:
        - GLASS
    slime:
        spawnChance: 100.0
        huge:
            hp: 32
            damage: 4
            burnsInSunlight: false
            reward: 0.0
            lootMultiplier: 1
        big:
            hp: 16
            damage: 4
            burnsInSunlight: false
            reward: 0.0
            lootMultiplier: 1
        average:
            hp: 16
            damage: 2
            burnsInSunlight: false
            reward: 0.0
            lootMultiplier: 1
        small:
            hp: 12
            damage: 0
            burnsInSunlight: false
            reward: 0.0
            lootMultiplier: 1
            reward: 1
    pigzombie:
        hp: 10
        damage: 5
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: passive
        aggressivenessNight: passive
        reward: 0.0
        lootMultiplier: 1
    ghast:
        hp: 10
        damage: 7
        spawnChance: 100.0
        burnsInSunlight: false
        reward: 0.0
        lootMultiplier: 1
    giant:
        hp: 50
        damage: 10
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: passive
        aggressivenessNight: passive
        reward: 0.0
        lootMultiplier: 1
        spawnNotOn:
        - GLASS
        - STEP
        - WOOD_STAIRS
        - COBBLESTONE_STAIRS
    monster:
        hp: 30
        damage: 5
        spawnChance: 100.0
        burnsInSunlight: false
        aggressivenessDay: passive
        aggressivenessNight: passive
        reward: 0.0
        lootMultiplier: 1
        spawnNotOn:
        - GLASS
        - STEP
        - WOOD_STAIRS
        - COBBLESTONE_STAIRS
    wolf:
        spawnChance: 100.0
        spawnOnlyOn:
        - GRASS
        wild:
            hp: 10
            damage: 3
            burnsInSunlight: false
            aggressivenessDay: passive
            aggressivenessNight: aggressive
            reward: 0.0
            lootMultiplier: 1
        tamed:
            hp: 20
            damage: 5
            burnsInSunlight: false
            aggressivenessDay: passive
            aggressivenessNight: passive
            reward: 0.0
            lootMultiplier: 1
    cow:
        hp: 10
        damage: 0
        spawnChance: 75.0
        burnsInSunlight: false
        aggressivenessDay: friendly
        aggressivenessNight: friendly
        reward: 0.0
        lootMultiplier: 1
        spawnOnlyOn:
        - GRASS
    pig:
        hp: 10
        damage: 0
        spawnChance: 75.0
        burnsInSunlight: false
        aggressivenessDay: friendly
        aggressivenessNight: friendly
        reward: 0.0
        lootMultiplier: 1
        spawnOnlyOn:
        - GRASS
    chicken:
        hp: 10
        damage: 0
        spawnChance: 75.0
        burnsInSunlight: false
        aggressivenessDay: friendly
        aggressivenessNight: friendly
        reward: 0.0
        lootMultiplier: 1
        spawnOnlyOn:
        - GRASS
    sheep:
        hp: 10
        damage: 0
        spawnChance: 75.0
        burnsInSunlight: false
        aggressivenessDay: friendly
        aggressivenessNight: friendly
        reward: 0.0
        lootMultiplier: 1
        spawnOnlyOn:
        - GRASS
    squid:
        hp: 10
        damage: 1
        spawnChance: 75.0
        burnsInSunlight: false
        aggressivenessDay: aggressive
        aggressivenessNight: aggressive
        reward: 0.0
        lootMultiplier: 1
        spawnOnlyOn:
        - GRASS
     
  17. Offline

    Pasukaru

    Hmm okay - file seems to be alright. I guess I'll just add another check to avoid mobs spawning in water completely
     
  18. Offline

    M1sT3rM4n

    Here's the global:

    Code:
    global:
        savePlayerKills: 3
        initMessages: true
        burnInSunlightInterval: 10
        spawnInterval: 1
        aggressivenessInterval: 1
        useWorldGuardRegions: true
        minSpawnDistance: 10.0
        maxSpawnDistance: 75.0
        mobSpawnerRadius: 5.0
        naturalMobLimit: 150
        mobLimit: 500
    worlds:
        world:
            mobLimit: 500
            naturalMobLimit: 150
            mobChunkLimit: 3
            difficulty: Apocalypse
            useRegions:
                aggressiveness: false
                burnsInSunlight: false
                mobHP: false
                mobDamage: false
                playerVsPlayer: false
                playerVsMonster: false
                reward: false
                lootMultiplier: false
                spawnAlgorithm: false
                burnInSunlight: false
                damage: false
     
  19. Ugh this plugin is getting huge, and I deny to believe it will not have a performance impact with full server and thousands of mobs...

    Anyways, how do I disable EVERY option except monster difficulty in 1 world, like this?

    Code:
    global:
        savePlayerKills: 0
        initMessages: true
        burnInSunlightInterval: false
        spawnInterval: false
        aggressivenessInterval: false
        useWorldGuardRegions: false
        minSpawnDistance: false
        maxSpawnDistance: false
        mobSpawnerRadius: false
        naturalMobLimit: false
        mobLimit: false
    worlds:
        world_dungeon:
            mobLimit: false
            naturalMobLimit: false
            mobChunkLimit: false
            difficulty: Hard
            useRegions:
                aggressiveness: false
                burnsInSunlight: false
                mobHP: false
                mobDamage: false
                playerVsPlayer: false
                playerVsMonster: false
                reward: false
                lootMultiplier: false
                spawnAlgorithm: false
    
    Or do some options need 0? I have failed to find a config reference in the OP.
     
  20. Offline

    Pasukaru

    @Joy
    To disable functions, simply remove the nodes (in your difficulty.yml, not config.yml), and it will be ignored. ;)
    Also, a server with thousands of mobs will always have performance impacts :eek:
    If you want to disable every function for a world completely, set the world's difficulty to a non-existent difficulty.
    [Edit]
    You can use the default.yml as reference - I'll create a file every possible node later (It'll take some time and a lot of writing)

    okay good news everyone - I fixed mob-spawning now.
    I still want to test a bit and upload v4.0.3 once I'm done... sorry about this mess.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  21. Wont the settings in the [global] section still apply if I set worlds to "none" difficulty? Or does global only apply to a world with an existing difficulty?
     
  22. Offline

    Pasukaru

    @Joy
    Do you mean the 'global' section of the config.yml - or difficulty.yml?
    Anyways - for every action the plugin is going to take (spawn mobs / check aggressiveness / etc ) it checks if the world's difficulty is a valid one before it's going to do anything. If it's an invalid/non-existent difficulty it wont do anything. This means that the global section can't have any effect, because this part isn't even reached if the world's difficulty is invalid.

    I hope this helps, I'm not that good at explaining stuff, sorry. :)

    Also: I found a major bug inside the spawn-algorithm that will be fixed with 4.0.3 - I bet this was messing up everything.

    Alright - here's version 4.0.3 with the bugfix that was literally messing up everything. Downloading is highly recommended if you use version 4.x.x

    [Edit]
    I also changed the lootMultiplier for zombies to 1 in the default.yml (It was set to 5 for some odd reason)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  23. Offline

    M1sT3rM4n

    Now that I've updated, the mobs don't look like they're spawning at all.
     
  24. Offline

    bajansam

    Do you change the aggressiveness in config or the other one?
    LOL yeah good point xD and oh yeah i completely didnt dee that :L THANKSS!!! great plugin now! :D

    ok, i tried both of your suggestions and they didnt work :/ mobs still spawn in the world?

    do any of these plugins cause an error or something?
    worldgaurd
    worldedit
    controller block
    magic carpet
    mother nature
    spawnmob

    ???

    thanks

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  25. Offline

    Flenix

    I did pretty much include all of that, there wasn't an error output and no need for a screenshot, only thing I forgot was my CB (which is 953) And the version of the plugin (Which is either 4.0.3 or 4.0.4, I saw you just released a new one since my last post and its the one I have before that)

    To save the effort of going through the whole log (unless you need to), here is the error related to the plugin:
    Code:
    
    2011-07-10 19:22:49 [INFO] [CustomDifficulty] Hooked into WorldEdit v4.3.
    2011-07-10 19:22:49 [INFO] [CustomDifficulty] Found the following 2 difficulties:
    default, survival.
    2011-07-10 19:22:49 [INFO] WorldGuard: Permissions plugin detected! Using Permissions plugin for permissions.
    2011-07-10 19:22:49 [INFO] WorldGuard: (world) Single session is enforced.
    2011-07-10 19:22:49 [INFO] WorldGuard: (world) TNT ignition is PERMITTED.
    2011-07-10 19:22:49 [INFO] WorldGuard: (world) Lighters are PERMITTED.
    2011-07-10 19:22:49 [INFO] WorldGuard: (world) Lava fire is blocked.
    2011-07-10 19:22:49 [INFO] WorldGuard: (world) Fire spread is UNRESTRICTED.
    2011-07-10 19:22:49 [INFO] WorldGuard: Loaded configuration for world 'world"
    2011-07-10 19:22:49 [INFO] WorldGuard: 25 regions loaded for 'world'
    2011-07-10 19:22:49 [INFO] WorldGuard 5.0-alpha8 enabled.
    2011-07-10 19:22:49 [SEVERE] Error occurred while enabling CustomDifficulty v4.0.1 (Is it up to date?): com.sk89q.worldguard.bukkit.WorldGuardPlugin.getRegionManager(Lorg/bukkit/World;)Lcom/sk89q/worldguard/protection/managers/RegionManager;
    java.lang.NoSuchMethodError: com.sk89q.worldguard.bukkit.WorldGuardPlugin.getRegionManager(Lorg/bukkit/World;)Lcom/sk89q/worldguard/protection/managers/RegionManager;
        at Pasukaru.CustomDifficulty.hooks.WorldGuard.initializeFlags(WorldGuard.java:63)
        at Pasukaru.CustomDifficulty.hooks.WorldGuard.initialize(WorldGuard.java:48)
        at Pasukaru.CustomDifficulty.util.Manager.useWorldGuardRegions(Manager.java:341)
        at Pasukaru.CustomDifficulty.CustomDifficulty.initialize(CustomDifficulty.java:70)
        at Pasukaru.CustomDifficulty.CustomDifficulty.onEnable(CustomDifficulty.java:50)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:857)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:264)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    I'm assuming its because I don't have HSQLDB installed, but I saw this: "Copy hsqldb.jar into the /root/lib folder. (Only required for regions, but you should copy it anyways, because it will throw a lot of errors if you don't)"
    and didn't install. Well, I tried it, but my server crashed and I got scared and removed it again :p (Something about running out of memory, although we have a good server)

    2011-07-10 19:22:49 [SEVERE] Error occurred while enabling CustomDifficulty v4.0.1 (Is it up to date?): com.sk89q.worldguard.bukkit.WorldGuardPlugin.getRegionManager(Lorg/bukkit/World;)Lcom/sk89q/worldguard/protection/managers/RegionManager;
    java.lang.NoSuchMethodError: com.sk89q.worldguard.bukkit.WorldGuardPlugin.getRegionManager(Lorg/bukkit/World;)Lcom/sk89q/worldguard/protection/managers/RegionManager;
    at Pasukaru.CustomDifficulty.hooks.WorldGuard.initializeFlags(WorldGuard.java:63)
    at Pasukaru.CustomDifficulty.hooks.WorldGuard.initialize(WorldGuard.java:48)
    at Pasukaru.CustomDifficulty.util.Manager.useWorldGuardRegions(Manager.java:341)
    at Pasukaru.CustomDifficulty.CustomDifficulty.initialize(CustomDifficulty.java:70)
    at Pasukaru.CustomDifficulty.CustomDifficulty.onEnable(CustomDifficulty.java:50)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:857)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:264)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  26. Offline

    Pasukaru

    @bajansam
    They spawn with naturalMobLimit: o ? :eek:
    Are you sure the plugin was able to load properly?

    @Flenix
    That's most likely an outdated WorldGuard version - try downloading WorldGuard 5.2.2.
     
    1born2kill and Flenix like this.
  27. Offline

    M1sT3rM4n

    Just following up with the problem. Anyone else having that?

    My mobs don't spawn at all now instead of having spawned in the water before.
     
  28. Offline

    Pasukaru

    @M1sT3rM4n
    That's weird - it's working on both, my linux and windows server.
    I even downloaded the zip again and performed a clean install to check if i uploaded a wrong file - but it works for me without problems :eek:
     
  29. Offline

    M1sT3rM4n

    Hmm.... I will run a clean server and see what's up.

    After testing, the normal non-enemy mobs spawn fine, but the others aren't

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  30. Offline

    morizuki

    oh another bug.. only sheep doesn't give reward..
     
  31. Offline

    Pasukaru

    @M1sT3rM4n
    Have you tried deleting the 'default' config, let it generate a new one and use it for testing?
    I can't confirm this bug, or have something to work with, I'm sorry I can't help.

    @morizuki
    Yeah, that's a bug in bukkit - they don't fire a deathEvent. We need to wait for the bukkit devs to fix this.
     
    morizuki likes this.

Share This Page