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 !
Thx xD
Found some bugs in version 1.0.7's siege spawning. Will be fixing tonight.
@BotMaster3000
Current snapshot of UVVillagers for 1.5.1 here:(once it's approved)
Seems to work fine. My current target server is still on 1.4.7, however, so I'll still be focusing on 1.4.7 dev for the moment.
@BotMaster3000
Correct, it will not work for 1.5. That's on my to-do list for next week.
Seems not too work for bukkit 1.5... would be nice if you could update it soon because the plugin sounds cool.
Currently, using this plugin in conjunction with Citizens, will result in problems with this plugin firing "village abandoned" events when it shouldn't. See https://github.com/jcornwellshiel/uvvillagers/issues/19
I'm looking into a fix.
@AlmostLuckyDucky
Were the console errors from UVVillagers or something else?
Regardless, the reason you're not seeing a siege every night is that my siege code waits for a siege to occur in core (see http://www.minecraftwiki.net/wiki/Zombie_siege) then spawns extra mobs. According to mcwiki that will only occur about 10% of nights, though I'm not sure what the specific triggers are. I'm considering detaching it from that event so that you can configure the likelihood of a siege in the UVVillagers configs.
unless iam doing something completely worng it didnt work for me at all.
i used default config to start out and was notified when entering villages but nothing ever spawned. i then changed the config so everythign woudl spawn 100% with 1 villager and still nothing. i then thought it may be the MCPC bukkit core could be the problem so i changed it to a craftbukkit jar and still didnt work but got a long list of NPE and "Could not pass events.." spamming the console.
Though it shouldn't crash, it looks like there might be a potential incompatibility with the way Citizens creates NPCs. I'll have to investigate further.
@olivier_firelook
You know, it's actually probably the asynchronous task I had in there touching the API. Uploading 1.0.3 which fixes that.
@olivier_firelook
Can you copy the relevant section of the crash log for me and post it either here or as new issue at https://github.com/jcornwellshiel/uvvillagers/issues?
plugins crash when you have some npc allready inside a village (citizens plugins with dtlTraders,...)
Would it be possible to join you on your test server and record a video for this plugin? I think I could market this to my audience, and I would use it as a main feature to my upcoming server.
Please PM me if possible. This looks seriously seriously (Super cereal) impressive
@toxictroop I believe there are a few plugins out there that do that already. A quick google search yielded http://dev.bukkit.org/server-mods/npc-village-creator/ (Note, I've not tested that plugin myself.)
However, if it's decided that including that functionality within this plugin's scope is important, I'll consider it.
can we have a command to generate a village in an area? :3
Posting a total rewrite in a few minutes. Already pushed to github.
New version to be posted soon. Had some issues with testing... namely I accidentally set my dev world to "easy" where zombie sieges don't occur. Bunches and bunches of improvements.
Posted version 0.1.0 (waiting on approval, I think?)
Code updates were successful. Expect a new package to be posted tomorrow evening.
Major code rewrites coming tonight. I discovered the wonders of referencing CraftBukkit instead of Bukkit, so I should be able to access some things more easily instead of hacking them.