[MECH/FUN] AngryWolves v1.9 - Randomly spawn aggressive wolves, Hellhounds! [1.7.2-R0.2+]

Discussion in 'Archived: Plugin Releases' started by Mike Primm, Apr 4, 2011.

  1. Offline

    Mike Primm

    AngryWolves - Randomly spawn aggressive wolves, now with Hellhounds!
    Version: v1.9
    Verified on 1.7.2-R0.2

    This plugin offers the option to have some (or even all) wolves that spawn be already angry. In addition, angry wolves can be substituted for a portion of the normal monster spawns, but (optionally) only in appropriate biomes and on appropriate terrain. Both of these options can be enabled at the same time (or individually, as before), and individually configured. Wolves can also be configured to have loot drops.

    A portion of angry wolf spawns can, optionally, be made to be Hellhounds! Hellhounds are flaming, fire-proof angry wolves - which mostly makes them look a whole lot cooler :). Unlike regular angry wolves, though, they can spawn in The Nether.

    Settings are controlled at three tiers - global, world-specific and polygon-defined areas within specific worlds. In all cases, the settings of the more specific tier, if defined, override those of the higher tiers (area supersedes world, which supersedes global settings).

    The settings file includes the following attributes:
    • spawn-anger-rate - Percentage of normal wolf spawns that appear as angry wolves. Disabled if zero.
    • mob-to-wolf-rate - Ten times the percentage of monster spawns (zombie,creeper,skeleton,spider) are replaced by angry wolves (e.g. 50 = 5%, 1000=100%). Disabled if zero.
    • spawnmsg - optional message to broadcast to all players in world where an angry wolf has spawned, due to either method (limited to once per 60 seconds per world). Color codes can be included using &0-&F format (similar to Essentials).
    • spawnmsgradius - optional parameter that, if set above zero, limits the sending of the 'spawnmsg' to players within the provided number of blocks of the spawn event
    • creeper-to-wolf-rate, skeleton-to-wolf-rate, zombie-to-wolf-rate, spider-to-wolf-rate - when defined, these values override the mob-to-wolf-rate for the corresponding mob type (e.g. creeper-to-wolf-rate, if set, will define the rate (in tenths of a percent) of creeper spawns that are replaced with angry wolves)
    • mobtowolf-ignore-terrain - when defined and set to 'true', this option removes the biome and terrain restriction on mob-to-wolf spawn replacements - angry wolves can replace spawns in any biome or terrain when this is set.
    • wolf-loot-rate - when defined, this integer is the percentage chance that a dying wolf drops loot (default is 0)
    • wolf-loot - when defined, this integer list is the set of one or more item IDs to be picked from randomly when determining a wolf's loot drop. Duplicate IDs are allowed, and makes the given item more likely to drop (default is [ 344 ], leather).
    • pigzombie-to-wolf-rate - when defined, this value overrides the mob-to-wolf-rate for the pig-zombie spawns, and sets the rate (in tenths of a percent) that pig-zombies will spawn as angry wolves instead. Angry wolf spawns in The Nether are always Hellhounds.
    • hellhound-rate - when defined, this value indicates the percentage of angry wolves that are Hellhounds (flaming, fire-proof angry wolves).
    • wolf-xp - when defined, the number of experience orbs dropped for kills of normal wolves
    • angry-wolf-xp - when defined, the number of experience orbs dropped for kills of angry wolves
    • hellhound-xp - when defined, the number of experience orbs dropped for kills of hellhounds
    • hellhound-fireball-rate - when defined and above 0, this is the number of seconds between fireballs hurled by hellhounds (default= 0, no fireballs)
    • hellhound-fireball-range - when defined, range of hellhound fireballs
    • hellhound-fireball-incendiary - when defined and set to true, hellhound fireballs can cause fires
    • mob-to-wild-wolf-rate - when defined, rate at which monster mobs are replaced by normal (wild) wolves, in tenths of a percent (e.g. 100 = 10%).
    • pup-on-sheep-kill-rate - when defined, rate at which wolf pups are spawned when a wolf eats a sheep (in percent)
    • villager-werewolf-rate - decimal percentage of villagers that become Angry Wolves during the full moon (they return to normal at the end of the night) (new to 1.2)
    • angrywolf-hunts-villagers - boolean that, if true, causes Angry Wolves to hunt villagers (like Zombies do) (new to 1.2)
    In addition, you can configure a "full moon" night - one night out of every N (where N is the setting for the days-between-fullmoons attribute), 'anger-rate-fullmoon' percent of the untamed wolves will become angry. At the end of that night, all angry wolves (even ones angry before the night started) will revert to normal. The attribute for this include:
    • days-between-fullmoons - if non-zero, the number of daytime periods between 'full moon' nights (e.g. 1 = every night, default is 8, setting to zero disables the feature). Note: unlike other attributes, this attribute can only be defined at the world and global level - no area-specific full moon cycles! Setting this to 8 will result in the lunar cycle matching the MC 1.0.0 lunar cycle.
    • 'anger-rate-fullmoon' - the percentage of already-spawned wild wolves that turn angry at the start of the 'full moon' night (if zero, feature is disabled). Note: tamed wolves are unaffected.
    • 'fullmoonmsg' - optional broadcast message sent at the start of each 'full moon' night. Color codes can be included using &0-&F format (similar to Essentials).
    • 'fullmoon-mob-to-wolf-rate' - if set, this is the 'mob-to-wolf-rate' used during 'full moon' nights - choose to spawn more angry wolves during the full moon!
    • 'fullmoon-stay-angry-rate' - if set, this is the percentage of angry wolves that stay angry at the end of a full moon night (default is 0%)
    The "wolves in sheep's clothing" option is also available. Disabled by default, the option allows for a probability that a sheep, when damaged by a player, turns out to be an angry wolf in disguise. This feature is controlled with the following attributes:
    • wolf-in-sheep-rate: chance that a sheep is an angry wolf in disguise (in tenths of a percent). Default is zero (disabled).
    • wolf-in-sheep-msg: message sent to player that damaged the wolf-in-sheep's-clothing. Color codes can be included using &0-&F format (similar to Essentials).
    The "wolf-friends" feature is also available. This is a Permissions based privilege that, when granted to a user, makes them not be attacked or targeted by angry wolves. This feature is controlled (globally, per-world, or per-area) with the following attribute:
    • wolf-friends: if set to true, the 'angrywolves.wolf-friend' permission is enabled, and players with that permission will not be attacked or targetted by angry wolves. Note: if enabled on a per-area level, the location of the PLAYER determines if the friend permission will prevent attack.
    Permissions 2.7.x or later has been tested. Without Permissions, Bukkit Permissions ('Superperms') will be used instead.

    To install, simply copy the AngryWolves.jar to your plugin directory and start CraftBukkit normally. A sample configuration file, config.yml, will be created in the AngryWolves subdirectory.

    Features:
    • Multi-world support
    • Global settings, per-world settings, and per-area settings
    • Set percentage of wolves that spawn already angry (spawn-anger-rate > 0)
    • Set percentage (x10) of monster spawns to replace with angry wolves (mob-to-wolf-rate > 0)
    • When replacing monster spawns, will only do so in forest and tiaga biomes, and only when spawn is over grass terrain. mobtospawn-ignore-terrain can be used to disable this restriction.
    • Optional world-level broadcast messages when an angry wolf is spawned
    • Optional "full moon" nights - one night out of every N days-between-fullmoons, a settable fraction of all wild wolves go angry for the night, but return to normal in the morning.
    • Optional "wolf-in-sheep's-clothing" - settable probability that a sheep damaged by a player turns out to be an angry wolf in disguise!
    • Optional "wolf-friends" privilege - if enabled, players with the 'angrywolves.wolf-friend' privilege, via Permissions or GroupManager, will not be attacked or targetted by angry wolves.
    • Optional spawn message radius, to limit which players are warned if an angry wolf spawns and a 'spawnmsg' has been defined.
    • Option polygon-defined areas within each world that can have their own settings (defined as list of 2-D coordinates - 2 for rectangle, 3+ for polygon).
    • Optional mob-type-specific mob-to-wolf rates, allowing the rate of mobs being replaced by angry wolves to be set for each mob type (spiders, skeletons, zombies, creepers - and pig-zombies)
    • Optional loot drops from wolves - controlled rate (using wolf-loot-rate), and list of item IDs to be randomly picked from (using wolf-loot). Option for angry wolf specific loot and loot drops (using angry-wolf-loot-rate and angry-wolf-loot, respectively). Option for Hellhound specific loot and loot drops (using hellhound-loot-rate and hellhound-loot, respectively).
    • Option for a settable percentage of angry wolves to be flaming Hellhounds (using hellhound-rate)
    • Option to set different mob-to-wolf rate during full moons, using fullmoon-mob-to-wolf-rate setting (percentage x10, like mob-to-wolf-rate). Also, optional settable rate that angry wolves stay angry at end of full moon (in percent - default 0).
    • angrywolf-health and hellhound-health settings, which control the initial health of these spawns - used to make them less wimpy than normal wild wolves!
    • hellhound-damagescale - allows damage received by Hellhounds to be reduced (it is multiplied by this settings, so making it below 1.0 reduces damage).
    • angrywolf-pop-limit - allows limit on total population of Angry Wolves and Hellhounds on your server (mob-to-spawn sidesteps the normal spawn population limits).
    • Enable hellhounds to attack with fireballs (at settable range and rate) that do (or don't) cause fires
    • Configure normal wolves, angry wolves, and hellhounds to drop experience orbs
    • Add options to make normal wolves more common - mob-to-wild-wolf-rate (like mob-to-wolf-rate, but it causes normal 'wild' wolves), and pup-on-sheep-kill-rate (percent chance of getting a wolf puppy when a wolf eats a sheep)
    • Color codes can be included using &0-&F format (similar to Essentials) in any custom message.
    • (new to 1.2) Optional rate for villagers to become werewolves (Angry Wolves) on full moons - which revert back to villagers in the morning
    • (new to 1.2) Option for Angry Wolves to hunt villagers (like Zombies do)
    Download AngryWolves ZIP from HERE. Unzip in plugins directory to install.

    Source Code on GIT is https://github.com/mikeprimm/AngryWolves

    Change Log:

    Version 1.9:
    • Update to work on v1.7.2 (Will no longer work on v1.6.2 or earlier)
    Version 1.7:
    • Update to work on v1.6.2 (Will no longer work on v1.6.1 or earlier)
    Version 1.6:
    • Update to work on v1.6.1 (Will no longer work on v1.5.2 or earlier)
    Version 1.5:
    • Update to work on v1.5.2 (Will no longer work on v1.5.1 or earlier)
    Version 1.4:
    • Updated to work on v1.5.1 (Note: will no longer work on v1.4.7 or earler)
    • Fix error with setting wolf health
    Version 1.3:
    • Updated to work with v1.4.7 (Bukkit package breaks...)
    • Added wolf howl when wolf spawns angry
    Version 1.2:
    • Add 'villager-werewolf-rate' setting - allows settable rate for villagers to become Angry Wolves during full moon
    • Add 'angrywolf-hunts-villagers' setting - if true, Angry Wolves will hunt villagers like Zombies do
    • Add mcstats.org usage tracking
    Version 1.1:
    • Fix problem caused by arbitrary, unnecessary CB 1.3.1 Biome change....
    Version 1.0.3:
    • Make wolves angry again - workaround lame CB/Vanilla v1.2 wolf behavior - Angry Wolves are back to attacking anyone they find, versus just folks that attack them!
    Version 1.0.2:
    • Updated to 1.2.4-R1.0
    Version 1.0.1:
    • More 1.1-R5 prep (more 1.1-R5 READY)
    Version 1.0.0:
    • Update to 1.1 event model (1.1-R5 READY)
    Version 0.9.5:
    • Update for new 1.1 biomes - support wolf-friendly biomes, FOREST_HILLS and TAIGA_HILLS
    Show Spoiler

    Version 0.9.4:
    • Add color code support for custom messages (using &0 to &F format codes)
    • Prevent spawning of non-hellhounds in nether
    • Migrate configuration file to config.yml
    Version 0.9.3:
    • Make default month length 8 days (matches Bukkit/Minecraft lunar cycle)
    • Adjust day-of-month calculation so that 8 day month results in full moon matching Mineacraft moon
    Version 0.9.2:
    • Fix inaccurate version number reported by 0.9 and 0.9.1 (was still 0.8.7)
    • Defend against bogus/broken Permissions plugin causing exception
    Version 0.9.1:
    • Fix typo in default angrywolf-pop-limit attribute
    Version 0.9:
    • Add Hellhounds-With-Frickin-Fireballs options!
    • Add Experience Orb options for all wolf types
    • Add normal wolf population aides - mob-to-wild-wolf-rate
    • Add optional chance of wolf pup when a wolf eats a sheep
    Version 0.8.7:
    • Prevent exceptions in 1.0.0 CB builds (null creature type in spawn events, health limit exceptions on wolves)
    Version 0.8.6:
    • angrywolf-health and hellhound-health settings, which control the initial health of these spawns - used to make them less wimpy than normal wild wolves!
    • hellhound-damagescale - allows damage received by Hellhounds to be reduced (it is multiplied by this settings, so making it below 1.0 reduces damage).
    • angrywolf-pop-limit - allows limit on total population of Angry Wolves and Hellhounds on your server (mob-to-spawn sidesteps the normal spawn population limits).
    Version 0.8.5
    • Add angry wolf and hellhound specific loot and loot rates (angry-wolf-loot, angry-wolf-loot-rate; hellhound-loot, hellhound-loot-rate)
    • Add full-moon specific mob-to-wolf-rate (fullmoon-mob-to-wolf-rate), to alter mob-to-wolf replacements during full moon nights
    • Add optional rate for angry wolves to stay angry at end of full moon (fullmoon-stay-angry-rate).
    • Fix Hellhounds becoming not angry at end of full moon.
    Version 0.8
    • Add support for Hellhounds (flaming, fireproof angry wolves)
    • Add support for pig-zombie-to-wolf-rate (substituting pig-zombies with Hellhounds)
    Version 0.7
    • Add support for wolf loot drops
    Version 0.6
    • Add support for mob-type-specific mob-to-wolf replacement rates
    • Add option to not restrict mob-to-wolf replacements to wolf-appropriate biomes and terrain
    • Fix problem with blank chat messages being send when corresponding optional messages were not set
    Version 0.5.1
    • Preliminary support for v1.5 (CB709) along with v1.4 (CB684)
    Version 0.5
    • Added rectangular or polygon defined areas, allowing angry wolf settings to be defined distinctively on different parts of a given world
    • Added optional spawn message radius, to limit spawn notifications to players within a provided distance of an angry wolf spawn event, if a spawn message has been defined.
    Version 0.4
    • Added "angrywolves.wolf-friend" privilege, via Permissions 2.5.4+ or GroupManager 1.0-alpha-3+, to prevent angry wolves from attacking players with the privilege.
    Version 0.3.1
    • Minor fix for problem with wolves reverting to normal at end of full moon on CB670
    Version 0.3
    • Add "wolf-in-sheep's clothing" option
    Version 0.2.1
    • Fixed problem with 'full moons' making tamed wolves go angry
    Version 0.2
    • Reformat configuration file
    • Allow both spawn-angry and replace-mobs-with-angry-wolf options to be used at the same time
    • Add 'full moon' nights, where even more wolves can become angry, but then to return to normal in the morning.
    Version 0.1
    • Initial release

    Known Issues:
    • None
    Planned Features:
    • Weapon immunity for Hellhounds: Configurable to be damaged only by certain materials.
    • Configurable spawning biomes and rates per biome
    • Configure spawn drop per biome
    • Angry wolves only spawn in Tiaga and Swampland, Normal Wolves spawn in Forest
    • AngrySquids?
    • Add some wolf management commands, including in-game creation of areas
    • Other spawn population controls
    Other Wolf Plugins:
     
  2. Offline

    Dreadreaver

    ha nice idea =)
     
    Kevinwjsm likes this.
  3. Offline

    Joeyy

    Really like this idea. Also i got an idea:
    If its night it should spawn more angry wolves then on day
     
  4. Offline

    Mike Primm

    Yep - I definitely was shooting for more night spawning. I'm still verifying it, but it seems that wolves follow an "animal" style spawning pattern (that is, on grass and in moderate-to-high light levels), which is why I wound up adding the "asaltmob=true" option. With that set, I wind up (randomly) replacing some (10% times (angerrate/100) of the time) of the 'classic' monster spawns with angry wolves instead - but at the same location that the other spawn was going to occur. I further only consider the replacement if-and-only-if the location is a forest or tiaga biome, and the location is above a grass block (to keep wolves from spawning in mines or buildings and such). Since monster spawns require low light levels, I figured this would result in them being a more "classic" mob spawn (and, also, result in them NOT happening in places where monster spawns were disabled, such as by other plugins).

    At present, a given world can only have one or the other mode (that is, either you get some of the normal wolf spawns that turn angry, or you get some fraction of your monster spawns 'converted' to angry wolves), but I'd be happy to support both (with different rates for each), if anyone is interested.

    Plans for the next version include a "wolf-in-sheep's-clothing' option - basically set a chance that sheep (maybe of only certain colors? Just black ones?), when attacked, turn into angry wolves. Seemed like the sort of thing that would be kind of fun to do at a low percentage rate :)

    I'm also playing with the idea of being able to mark locations that have higher 'anger rates' - perhaps an area that is supposed to be a graveyard or ancient castle or the like - probably something that would tie in with WorldEdit-style cuboid selection.
     
  5. Offline

    Dreadreaver

    maybe add a function to have all neutral wolves become angry wolves at night until daytime again
     
  6. Offline

    Mike Primm

    That would be fun :) I'd been kicking around a "werewolf" notion, as well, but hadn't settled on a good way to approach it (having a player BECOME a wolf would be a blast, if anyone knows how to do it without a client mod!). Maybe the "wolves go angry at night" thing could be set to 1 night out of every N, and include in a broadcast message for when it's a "wolf moon". Far as I can tell, making a wolf "unangry" could be done by just deleting and respawning the wolf at the same location and with the same health, which should be easy enough.
     
  7. Offline

    Dreadreaver

    that would be so great! having random angry wolves at day is not what I want, having some angry wolves at night + normal mobs would be fine, but having ONE night per month with ONLY angry wolves, that would be truly epic!
     
  8. Offline

    Kahl

    it would be cool if wolves were friendly during the day but attacked at night ;) definitely would use it if you implemented that
     
  9. Offline

    GiantCreeper

    This should add a little more variation to my survival server, Nice plugin :)
     
  10. Offline

    Xemnas33

    Aww. I thought the name implied this would be some sort of Angry Birds spin off ^_^

    Nice plugin :)
     
  11. Offline

    OrtwinS

    Is it possible to enable only the full-moon, and make EVERY wild wolf instantly aggressive that night?
     
  12. Offline

    Mike Primm

    You should get that behavior using the following settings:
    Code:
    # Turn off anger-on-spawn and mob-to-wolf-spawn
    spawn-anger-rate: 0
    mob-to-wolf-rate: 0
    spawnmsg:
    # If you want one full moon per "month"
    days-between-fullmoons: 28
    # If you want one every night, use
    # days-between-fullmoons: 1
    #
    # Makes 100% of candidate wolves angry
    anger-rate-fullmoon: 100
    # Broadcast message
    fullmoonmsg: There is an ill moon tonight....
    
     
  13. Offline

    OrtwinS

    Thanks! My users will not like this.... like I intend it.
     
  14. You should add ">(" to the plugin name if you can.
     
    Mike Primm likes this.
  15. Offline

    freeflo

    Could you make it so Wolves attack a specific group? (Group Manager/Permissions?) So we have group 1.Citizen and group 2.Underworld. Make the Wolves neutral with one group and always attack the other?
     
  16. Offline

    Mike Primm

    That's a cool idea - I don't know how to do it yet, but research projects are fun :)
     
  17. Offline

    Mike Primm

    Just finished up the v0.3 release - added option for some sheep to be angry wolves in disguise, revealed when the sheep takes damage from a player. I'm going to look at adding the requested option to make angry wolves not attack certain groups of players (based on having a Permissions-based attribute, like maybe "angrywolves.wolffriend").
     
    freeflo likes this.
  18. Offline

    Matt114

    Love it! Gonna make certain nights like COD Zombies FETCH ME THEIR SOULS!!!
     
  19. Offline

    freeflo

    I can't wait for the amazing release. Keep up the great work!
     
  20. Offline

    Mike Primm

    Updated to 0.3.1, as part of verifying CB 670. New build fixed a small issue I found on CB 670 with wolves reverting to normal at the end of a full moon, but the code should be fine on CB 617 or later.
     
  21. You should add the keyword "wolf" to the title of this thread, so someone can find all the wolf plugins with one search term!

    Great Plugin!
     
  22. Offline

    anon

    Very good plugin, thanks for that =)
     
  23. Offline

    Mike Primm

    V0.4 has been released - this one adds the option of a Permissions or GroupManager based privilege, angrywolves.wolf-friend, that prevents angry wolves from targetting or attacking players with the privilege. It is enabled using the wolf-friends setting in the AngryWolves.yml, and will make operators immune to wolf attacks if enabled when neither permissions system is found.

    For most admins, who tend to have '*' (all) privileges, you may need to revoke the privilege specifically ('-angrywolves.wolf-friend') for any admins that should still be targetted by angry wolves.
     
  24. Offline

    link2110

    Theres an error you really should look at. If you spawn a bunch of wolves, say something like 25, and there is at least one angry one that spawns, if you tame one of the friendly wolves and get it to attack the angry one, it crashes my server.
     
  25. Offline

    freeflo

    Plug-in works great. One final request. Can Wolves become instantly aggresive towards a group, without being attacked first?
     
  26. Offline

    Mike Primm

    Are you getting an exception? If so, please post it, along with any other configuration details (which CB, what AngryWolves settings you've got, etc).

    Follow up: I've tried the scenario you described a few times, but no luck with getting an error. or odd behavior. I'll probably need to know what other plugins you've got, as well.

    If you set the spawn-anger-rate to 100, along with using the angrywolves.wolf-friend priv to protect other groups, you should get this - all wolves will spawn angry, but will not attack the protected group(s). Now, if we want to add some sort of priv that makes wolves hate a particular group...make the wolves attack them even when not angry...that might be something else to consider... >:)

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

    link2110

    i've got a whole ton of them, i need to rework how i do everything in my server sometime this week.
    Heres a word doc i use to organise them.
    http://dl.dropbox.com/u/24168007/Plugin Version list.docx
     
  28. Offline

    Mike Primm

    Hmmm....that's quite a list! Did you catch an exception in your server.log (or anything interesting in your server.log corresponding to when you saw the issue?) Are you on CB670?
     
  29. Offline

    link2110

    I'm on CB 617, and it spammed with
    Code:
    2011-04-09 04:08:02 [SEVERE] at org.bukkit.craftbukkit.entity.CraftWolf.isAngry(CraftWolf.java:14)
    2011-04-09 04:08:02 [SEVERE] at org.bukkit.craftbukkit.entity.CraftWolf.toString(CraftWolf.java:36)
    2011-04-09 04:08:02 [SEVERE] at java.lang.String.valueOf(Unknown Source)
    2011-04-09 04:08:02 [SEVERE] at java.lang.StringBuilder.append(Unknown Source)
    (x300 not kidding)
    at org.bukkit.craftbukkit.entity.CraftWolf.toString(CraftWolf.java:36)
    at java.lang.String.valueOf(Unknown Source)
    at java.lang.StringBuilder.append(Unknown Source)
    (x300 again)
    
    
    Also i know its quite large :p i need to trim that down a lot sometime XD
     
  30. Offline

    Mike Primm

    Are there any lines of "at XXXX" AFTER the repeated set of "isAngry()/toString/StringBuilder" ones? It looks like someone (need to be sure it's me) is printing the Wolf, which prints a string of its values, including it's target, which is another wolf, who gets printed with his target, which is back to the first wolf, and so on, and so on.... the problem is in the Bukkit CraftWolf.toStirng() method, but someone needs to be calling it to precipitate the problem.


    Please try my latest code - v0.4 - which definitely doesn't print any of the wolves (I HAVE done this during debug, and I need to check to see if any of the released code ever did it....). If any of your other plugins might be printing out entities, that would be a problem too (and one I can't fix - basically, the Bukkit "toString()" method for wolf prints the wolf's target as an "owner" (its wrong), and it uses the same 'toString()" to get the string of the target...another wolf, with the first one as the target, and you've got an infinite recursion. As it turns out, the pull request I've got in to the Bukkit team for fixing and enhancing the Wolf class will fix this.... if it ever gets accepted :/.
     

Share This Page