UsefulVillagers
RIP
Unfortunately, yeah, this plugin is dead. I've repeatedly said that I've no time left for it. The source are available but nobody's dare to maintain it, only complain that it doesn't evolve. Sorry internet, blame yourself for that. There's no charge for this plugin, I've never asked for donations. Now if you want to make it live (if it's worth it as "many other plugins are better" as i've read sometimes), use your brain, use your skills, use your own time. By now, I'm done.
Summary
This plug-in aims at adding some purpose to the villagers. Instead of walking around, villagers can also performs tasks depending on their profession. As they walk around, they will grow food, cut trees, gather sugar cane to make books, get wool, use furnaces, mine, etc.
Changelog for 0.4.0
- Added a configuration key in 'config.yml' that avoid 'not useful villagers' messages.
- Blacksmith now also cook pork (how strange it is ...).
- Various internal technical improvement.
Quote from Some Random GameDev:There's now a dependency to Gson. You'll have to download the third library jar, store it somewhere and update the -Djava.ext.dirs parameter.
Usage
First, a complete manual is available here.
Villagers professions can be set by right-clicking with the appropriate items:
- Wheat : Transforms a villager into a 'farmer'. A farmer will harvest wheat, melon and pumpkin, sugar cane.
- Book : Transforms a villager into a 'librarian'. Librarians take sugar cane from chest, use nearby workbench to produce books and put back produced books in the next encountered chest. Librarian can also 'study' weird items, such has glowstone dust, blaze powder, ghast tears, and give back experience points to players (study time depends on the given item).
- Iron ingot : Transforms a villager into a 'blacksmith'. Blacksmith with furnaces and chests in there surrounding will automatically transfer goods from furnace to chest and start smelting job from chest content. If interacted with a gold pickaxe, the blacksmith gain (or loose) mining ability (see manual for full description/usage).
- Leather : Transforms a villager into a simple 'butcher'. Butcher, for now, uses shear to collect wool from sheep.
- Glass Bottle : Transforms a villager into a 'priest'. Priest heal and defend villager (and player) with spells.
A villager can be provided with items by right-clicking on it.
- Give an hoe to a farmer and it will be able to transform dirt/grass to soil and plant seeds.
- Give seeds to a farmer to allow him planting seed.
- Give an axe to a farmer and it will be able to cut tree (if the tree is marked for cutting).
- Give sugar cane to librarian and it will craft books as soon as it cans.
- Give interesting stuff to librarian and it will study them and give back experience to you after time.
- Give shears to butcher and it will collect wool from sheep.
- Give stone or iron pickaxes to blacksmith and if it has a mining ability, it will mine below iron blocks.
- Give glowstone dust to priest and it will heal surrounding players and villagers.
- Give blaze rod to priest and it will set nearby monsters on fire (creepers/spider/skeleton/zombie).
(Extra : Give torches to a golem and it will place them in encountered dark places).
When a chest is encountered, the villagers will put their products in it (wheat, melon, pumpkin, wood logs, sugar cane, books, wool).
Disclaimer
It is not a 'active AI'. It is not experimental and rely totally on bukkit API. Hence, this plugin doesn't override villager behaviour but add some features to it. The villagers will continue to move and act as they're used to. But, periodically, player-activated villagers will modify their environment accordingly to their profession.
Roadmap
- Add priest brewing capabilities.
- Add more flexible serialization (XML or other) to allow easy migration without blasting all !
- Add blacksmith charcoal production management.
- Add butcher management (animals breeding and processing).
- Add commands for live administration.
Any suggestions are welcome.
Rejected Suggestions
First of all, keep in mind that I can't alter villagers movement.
- Fishing : Heart breaking, but it's not possible ...
- Villager self-defense : out of my range (only passive area of effet enabled via priest).
- Structure building
Commands
None for the moment. See Roadmap.
Configuration and Permissions
Again, a complete manual is available here with details concerning configuration and permissions. Check this out and read it !
Requests
Don't hesitate to report any problems or make any suggestions here.
Could you not just spawn an EntityFish (fishing bobber) in the water? and have him stay in the same place by A. teleporting him to that location constantly, or B. looking at the packet pathing code used in citizens or something similar.
Hi love the idea for this plugin maby you could add a shopkeeper where he will take experience points from you and sell you items like diamond, wood, wool, etc....
also maby you could make it so that the kid of say maby a farmer will become a farmer or the kid of a blacksmith will become a blacksmith so basicly the child of the villager will inherit a job
so ye if you want any more ideas or help with any thing pm me and ill give you my skype other than that awsome plugin :D
DIAMONDS: 8 - D D D D D D D D
- John Shone (AKA Isramon)
@Goullou
Sure. It could be simple to implement. I'll try to do this as soon as I can.
Hi, nice plugin !
Could you add a simple command to enable/disable the right-click to avoid any kind of mistakes ?
This is actually very nice :)
@SomeRandomGameDev
Thanks :) glad to have such quick and informative response yet again.
@xzero121
Thank you :)
And yeah, I know that blacksmith may seem to do nothing. In fact, a blacksmith only "do stuff" if there's a chest AND a furnace in its scanning area (which is 3x3x5 by default). It is a very narrow window for a little guy like the blacksmith. I've tested its features by stucking it in a 1x1 room, surrounded by chests and furnaces. It's more a poor slave than a blacksmith in that case.
Perhaps I should add configuration for specific scanning window. I remember that I've chosen not to use the blacksmith as a transporter (take stuff from a chest, travel at random, oh, a furnace, use this, etc.) because the villager can potentially die and your goods are gone with it.
So ! Ok, i'll add a configuration for the blacksmith scanning area (5x5 could be more useful).
@SomeRandomGameDev
i always restart with /save-all /stop i dont really know what that means but thank you for the quick responce, amazing plugin, only real problem i have had is that blacksmiths dont really seem to do anything for me. but that is not really a big deal.
@xzero121
It depends on how you've restarted your server. If it consisted in a cold restart, you've probably lost the villagers data has everything is serialized at server shutdown.
I've planned to implement a better (and more upgrade-friendly) way to save villager information on disk.
I could be doing something wrong but after a while my villagers seem to lose profession, i have recently restarted the server which might have caused this but i was just curious if there was a way to fix this.
@AlmostLuckyDucky
Do you mean a config.yml ? The default one is here : https://github.com/SomeRandomGameDev/bukkit-workers/blob/master/Workers/config.yml
Place your own in the directory plugins/UsefulVillagers of your server.
By the way, I'm currently working on a "graphic" manual, with screenshots. I hope to finish it soon.
is there anywhere where i csn see a example config so i can copy and change as iam having some issues writing my own :(
0.3.2 is on its way. I've not done many thing. The only addition is sheep shearing by butcher. Right click on a villager with a leather, and it becomes a butcher. Next, give it shears and it will start collecting wool. It can run out of shears ! I've not implemented tool research in chest (the butcher won't "recharge" in shears if there's one in a chest nearby). It will be for the next time.
As for mining blacksmith. Working on it. It will probably comes next week with a new set of permission for sub-task affectations.
Thank you all for your support !
@WingedSpear
Villagers specialisation is "by hand". I can't control job attribution at spawning, especially when it comes with spawning eggs.
Love this! Keep up the good work
<<reply 731775="">>
i like the experience thing for priest, but i dont like too much the bone meal option, if ur able to add permissions for each kind of villager i will agree (so i can add these lazy options to VIP ranks) and i like a lot the butcher, that will be nice, also a butcher for take the wool from sheeps. Will be nice if the villager change hes clothes for each profesion (like natural spawned villagers) cuz i added a quest for sell villager eggs but these eggs just spawn normal ones.
@WingedSpear
You're so right.
I must admit that I'm a bit reluctant about the mining aspect of the blacksmith. During the week, I've think about it, about how to implement it. I've imagined complicated solutions and very simple one. But the mining stuff always seems 'too much'.
Crafting stuff is way over what I'm intending to do (except for books ;p). Armors, stuff like that ... it'll be managed in some way by the trading system.
Even the small study-thing of the librarian should have been in another plug-in (perhaps I'll remove it later, dunno ...).
Look at the 'Gods' or 'MagicBookShelf' plug-ins. They are very simple plugins but yet so powerful. Not a swiss army knife. And this is because of plugins like this that I've decided to make one.
SO ! To sum up. I'm very hesitating on the mining stuff. If I do it, it will consist in a chest placed on an iron block, and each time a farmer pass on it, it will mine the next non-air/bedrock/obsidian block below (with a cooldown or so - and given the fact that the farmer has been provided a pickaxe).
I'm also questioning myself about the priest as a gardener, using bone meal or glow dust to grow stuff around him (but not an instant grow like the bone meal - I diluted grow in a 3x3 zone around him, just for crops/stems).
<<reply 729901="">>
Ok its working fine now, i didnt right clicked the villager with a sappling, thx.
Suggestion: Dont make this plugin so complicated, add basic works and improve em like the way ur doing, cuz i like this plugin a lot but some developers add a lot of innecesary stuff and i dont want that to happen with u... =$, so will be weird see villagers mining while the players sleep, wood cutting and farming are an awesome idea, but crafting armors, weapons or doing things that the players should do will make em too lazy.
@WingedSpear
So ! I've run some tests about trees : Everything is fine (I was pretty sure about it by checking the code, but who knows ?). So, perhaps you've missed one of the conditions:
+ Your farmer has been provided an axe. + The tree is marked with a plank block or your farmer is a lumberjack. + There's a tree ( ;p ok, just kidding)
@WingedSpear
Ok. I'll investigate on that this evening and fix the problem if any. Have you marked the trees ? (Plank block, then dirt/grass block, then the tree) It is mandatory for regular farmers. In case of no markers, have you right clicked your farmer with a sapling to change it into a lumberjack ? Oh and, have you gave them an axe ? They can't chop logs without axes (I've been tricked many times with this).
By the way, what is the message displayed by the villager when you right click on it with a stick ? If it doesn't say : "I can chop wood" or something like that, the villager won't cut any tree.
(If this continues, I'll have to make testsheets for non-regression ;p No, not this process again ! :) )
(by the way, there's a possible bug here : https://github.com/SomeRandomGameDev/bukkit-workers/blob/master/Workers/src/org/randomgd/bukkit/workers/info/FarmerInfo.java at line 421. The farmer will plant a sappling even if the tree is not completely down - out of axe during the process).
pff i love this plugin, tyvm, my players have already farms for villagers, i made a quest for get villager eggs so they can get them in their farms. but i have a problem...i cant make them cut trees, i tryed everything in the manual and they just walk to the trees and nothing happen (ya they are birch trees).