UVVillagers
Note from the author:
This was my first plugin, built for use on the survival server I run for a few friends. It's far from the robust village infrastructure I originally envisioned, mainly because I didn't want to completely rewrite all of the core minecraft village code and villager behavior... but I think it accomplishes enough. Since it reached a point that I'm fairly happy with several months ago, most of the time the only updates I do are to address major bugs or bukkit upgrades.
This was also my first foray into Java. As such, the code can be a bit of a mess in places. If you want to poke around to see how I did what I did, or fork it and add functionality (or fix bugs!) check out the git repository on GitHub. You might have to poke me extra hard with pull requests merging functionality back in unless I'm expecting them. And hey, if you've looked at the code and aren't completely turned off by it, a co-maintainer would be welcomed to the project. I'm sure some of my users would appreciate your contributions! ;)
- James
The Goal
To make NPC Villages (and the expansion and defense thereof) a more integral part of the game.
Installation and Documentation
https://github.com/jcornwellshiel/uvvillagers/wiki - Lots of details here, and it's almost up to date! Go go go!
Important note on bukkit versions:
This plugin hits core minecraft classes, and thus can be only run on the appropriate bukkit versions. You can't use UVVillagers for CB1.6.4 on a 1.7.2 server, or vice versa. Starting January 2014, if there is not a recommended build for the latest minor bukkit version (for example, at the time of this writing, 1.7 only has dev, alpha, and beta builds available) I will publish two copies of this plugin for each update I do:
- One for the current Recommended Build (Currently 1.6.4-R2.0)
- One for the most stable recent build (currently Beta 1.7.2-R0.2).
If you need more than this, feel free to contact me.
Basic Features
- Player popularity tracking with villages.
- Greeting displayed on entering villages.
- Receive daily tributes from villages that you maintain and defend, based on population and popularity.
- Extra-awesome zombie sieges.
- Rewards for defending villagers from zombie sieges.
Details
- Villages: Villages expand the core minecraft NPC Village functionality to include:
- Villages are named after the first player to discover them (after installing the plugin), and can be renamed by whomever is most popular with the village.
- Per-village-per-player reputation, broken down into configurable tiers.
- Information about physical size, population, etc is reported to users.
- Notifications are displayed upon entering a village, a village being abandoned, etc.
- Commands to get information about villages are accessible via /uvv
- Villages will pay nearby players a configurable daily tribute every day at dawn based on the players' reputation and the village's population.
- Sieges: Zombie Sieges expand on the core minecraft Zombie Siege functionality, and are strongly enhanced and configurable.
- Any mob can potentially spawn. Yes, including withers and ender dragons.
- Siege statistics are tracked, and killing mobs that are part of a siege grants reputation with the village under siege.
Currently working: (version 1.3.8)
- Citizens support
- Configuration files! (All values and % chances can be changed!)
- Configurable messages!
- Village population and reputation announced upon nearing a village.
- Zombie Sieges can spawn all sorts of crazy stuff.
- Override core Zombie Siege mechanic in favor of ours.
- Spawn a siege on-demand.
- Village-Player reputation tracking
- Villager tributes! (Player receiving tribute must be near the village at exactly dawn)
- 0-3 emerald tribute per 20 villagers in nearby villages every day at dawn.
- 1 emerald tribute bonus per 20 villagers.
- 1-2 emerald tribute bonus per zombie siege kill during the previous night.
- multiplier based on current reputation
- Dynmap support is now integrated
- Multiworld support
- Some prevention of typical zombie siege avoidance tactics (like using floating platforms) by spreading spawns out over a radius.
- Can now select items other than emeralds for tribute!
- Collecting tribute from a mayor instead of it magically appearing (requires CB 1.5.1)
- Set whether tribute is collected from the Mayor or appears directly in your inventory
- Configurable minimum village size
- Preventing villager purchases if your reputation is too low
- Iron Golem aggro on extremely low reputation
- Overriding core popularity effects (cancel iron golem attack if it's caused by your reputation being too low)
- Chest tribute
- Better mayor retention
- Server-owned villages with /uvv setserver
Known Bugs
- Null exception thrown for some people using dynmap (properly caught since 1.2.5, still not sure of root cause... for some people dynmap is returning null when creating new markers, even though the marker is created)
- Mayors sometimes teleport into occupied blocks, suffocating them. This might be addressed now.
Enjoy! Post your bugs, exploitable aspects, and suggestions in comments here or at the GitHub repo !
@CommodoreAlpha
I use my own reputation system. However, In the ranks.yml settings (which configures the various reputation ranks), each rank has an isHostile flag. This is used to override the core reputation by setting it either to -15 or to 10.
I don't touch the core behavior of the iron golems as far as targeting, and wasn't actually aware of the long-range assassination behavior. Might be worth throwing in though, if I get the chance.
Do you use the reputation that MC uses, or your own system? The reason I'm asking is because I saw this on the Minecraft Wiki:
The bolded part within the quote is the part I'd like to emphasise. I do realise that iron golems cannot walk onto unloaded chunks to reach players, but the mere notion of an iron golem being able to "assassinate" a player is preposterous. I was wondering if you could give iron golems the ability to "aggro" a low-rep player, only if the player enters a certain range. I do know you have "Overriding core popularity effects (cancel iron golem attack if it's caused by your reputation being too low)" on your list, but I interpreted this feature as canceling all iron-golem attempts at player-targeting; I feel my suggestion is a bit more nuanced.
@B3fuddled
No, dynmap is not a requirement. It does play nicely with dynmap, though.
I apologize for the lack of updates of late, I've been swamped with work and life.
I've uploaded versions for 1.6.4 and 1.7.2. There are no new feature changes from the last version. They'll be available as soon as staff approves them.
Again, I apologize for not keeping up with this. I'll try to make sure I at least get bukkit compatibility updates in regularly in the future.
Is dynmap a requirement to use this plugin?
Is there a plugin or a way to spawn more villages?
How I can find a village easily?
@tordo27
This plugin hooks Minecraft's core village classes, which consist of a list of doors and a list of villagers. If there are no villagers (zombies don't count), there is no village. If there are no doors, there is no village. (I don't think. There might be. Don't quote me on that one, I don't remember. :P). If core Minecraft thinks there's a village there, there is. If it doesn't, there isn't.
So:
1) Will this plugin register griefed/raided NPC villages as "npc villages"? Only if there is at least 1 villager and 1 door.
2) How does the plugin interact with destroyed villages? When does a village become no longer a village? It doesn't interact at all with destroyed villages. A village is destroyed (and thus forgotten by this plugin) when it has 0 villagers (and possibly when it has 0 doors).
3) How does the plugin handle spawned villagers outside of a village, or saved villager-zombies that are not in a village? Spawned villagers outside a village will likely create a new core minecraft village (and thus a village recognized by this plugin). Definitely if they are near a door. Zombie Villagers who have been cured are villagers again, and will thus create new villages as per usual (seek out a door and be recognized as a village by core minecraft).
4) Does this plugin offer the capacity to repair/regenerate npc villages? Nope.
I've got some questions about this plugin if someone could help me out.
I run a decently sized raid server with a large map that we haven't reset for many months now. As you can probably guess, most of the npc villages within our world border (30k blocks in all directions from spawn) are raided/griefed to shit, or at the very least all the villagers have turned to zombies.
So:
1) Will this plugin register griefed/raided NPC villages as "npc villages"?
2) How does the plugin interact with destroyed villages? When does a village become no longer a village?
3) How does the plugin handle spawned villagers outside of a village, or saved villager-zombies that are not in a village?
4) Does this plugin offer the capacity to repair/regenerate npc villages?
Thanks for your help in advance
Awesome plugin ! Thanks very much for you work on this plugin :)
Ok, 1.3.2 got approved. Let me know if anything doesn't work for you!
I realize there's no in-game documentation on chest tribute.
You should be notified that you've created a tribute chest. All player tributes for that village will be placed in that communal chest. (No individual chest inventories at this point, maybe ever... Mayors are more appropriate for that)
Since it hasn't been approved yet, http://functionnull.net/UVVillagers-1.3.2-SNAPSHOT.jar
Just uploaded version 1.3.2, adding chest tribute (with uvv in chest mode, place a single chest, put an item frame on it, put an emerald in that), mayor control, server-owned villages with /uvv setserver, multiworld controls, etc.
So far no issues, but test and report. Thanks!
I've worked all of the features except additional permissions into a version I'll be testing tonight. Don't ask why I did them all at once. Definitely not my standard practice.
@Gilder559
None are jumping out at me, unless someone is using MobCatcher to catch the mayors... :P
On that server that has the disappearing mayors I have:
craftbukkit-1.5.2-R1.0.jar and BukkitGUI v1.4.8.276
with the following plugins:
chesscraft 2.3.2 coreprotect 2.07 craftarrows RC2.0 craftbook 2282-a5a431a dynmap 1.7.1-714 dynmap essentials .50 dynmap mobs .60 dynmap worldguard .40 essentials pre2.11.1.6 essentials antibuild pre2.11.1.6 essentials chat pre2.11.1.6 essentials protect pre2.11.1.6 essentials spawn pre2.11.1.6 fishing plus 1.5.2a gates 2.2a healthbar 1.6 lockette 1.7.12 mobcatcher 3.10 protocolLib 2.4.5 UVVillagers 1.2.5 worldEdit 5.5.6 worldGuard 5.7.5
Do any of these look suspicious?
@der_Kernschatten
I'll add the chest feature to the list.
@jcornwellshiel
Is the Chest feature functioning yet?
I prefer that to the fallibility of a villager. For the time being, if chests aren't working, I will try direct payment.
I'm compiling a list of tickets to work on this week, from the comments thread. So far I have:
Did I miss anything?
Overriding minecraft's core village detection and setting custom village boundaries are outside of the scope of this plugin currently. All village dimensions are taken directly from what Minecraft defines as a village.
@Gilder559
Huh. Not sure how they could have reverted unless another plugin changed their DisplayName attribute back (all UVVillagers does is change their DisplayName attribute to mark them as the mayor). I should have some time this week to glance at things, so I'll take a look.
@pimsserver
The version for 1.6.1 is not compatible with 1.6.2. I'll have to upload a fresh copy tonight for ya. And yeah, looks like in my haste I didn't update the plugin version in the plugin.yml, so it reports itself as 1.2.5 still. :P