Griswold – NPCs repair your items
Griswold
NPCs now can repair and enchant your items! – Without any commands!
Show your stuff to blacksmith and he'll tell you how much he wants for the job. If you agree – just pass him the item. Users have no commands (because they don't need them)!
Simple!
Features:
-
Command-free native minecraft game experience.
-
Repairing does not clear enchantments on enchanted items!
-
Items that are fully repaired can be enchanted (optional)!
-
Multiworld support.
-
Mod items support!
-
Citizens support.
-
Fully multilingual. There are english, german and russian out-of-the-box, but you can add more!
-
All major economy systems supported. If Vault supports something - than it'll work with Griswold.
-
Lightweight!
Video
NPC Types:
When you use /blacksmith create command you can specify a type of NPC. Available types are:
-
"all" – can repair everything and enchant repaired things.
-
"weapon" or "armor" – can repair only one type of items, cannot enchant.
-
"both" – can repair everything but cannot enchant.
-
"enchant" – these guys are just enchanters and cannot repair things.
Permissions:
-
griswold.admin - lets you create and remove repairmen
-
griswold.tools - lets users talk to repairmen who repair their weapons and tools
-
griswold.armor - lets users talk to repairmen who repair armors
-
griswold.enchant - lets users to enchant their gear at repairmen
Commands:
These commands are for administrative purposes, users don't need them.
-
/blacksmith create name - creates new repairman. You can also specify more parameters: /blacksmith create name type cost. Name can be anything and will be displayed in chat when user talks to repairman. NPC types are described below. Cost is repairman's multiplier of cost – it can be greater than 1 to make prices higher or below 1 to make prices lower. Prices are rounded to 2 digits after comma.
-
/blacksmith list - lists all the repairmen ever created
-
/blacksmith remove name - removes a particular repairman
-
/blacksmith despawn / respawn - despawns or respawns all repairmen. Config is not re-read, you have to use next command to reload config.
-
/blacksmith names – toggles names above their heads.
-
/blacksmith sound name bukkitsoundid – sets the interaction sound for the repairman. Use standard bukkit Sound names (you can find those here). You can set sound to "mute" to be silent.
-
/blacksmith reload - reloads config, despawns and then respawns all the repairmen.
All commands require griswold.admin permission and fallbacks to OP if something bad happens.
/blacksmith command has an alias – /bsmith to avoid conflicts with other plugins.
NPC Types:
When you use /blacksmith create command you can specify a type of NPC. Available types are:
-
"all" – can repair everything and enchant repaired things.
-
"weapon" or "armor" – can repair only one type of items, cannot enchant.
-
"both" – can repair everything but cannot enchant.
-
"enchant" – these guys are just enchanters and cannot repair things.
Config:
All parameters are stored in config.yml and are reloadable without restarting the server (/blacksmith reload).
Debug is for debugging stuff and not usually useful if you don't know why you need it. Default is "false".
Timeout is for timeout of blacksmiths "remember" your item and are waiting for you to confirm the repair. Default is "5000" (5 sec).
Language is a name of language file (without .yml at the end) stored next to config.yml and containing all the text in preferred language. Default is "en_US".
UseEnchantmentSystem tells the plugin if he should allow spawning of enchant-type repairmen and allow all-type ones to add enchantments.
PriceToAddEnchantment sets the price to add one random set of enchantments. Default - 50.
ClearOldEnchantments says to repairmen whether they should blank the item before they enchant it or just add new enchantments to it. Default - true that means "yes, blank it".
EnchantmentBonus is a number of "virtual bookshelves" around blacksmith. Greater the number - cooler are enchantments. Default - 5.
UseEnchantmentSystem switches the whole enchantment routine on and off.
ShowNames – shows names over NPC heads.
DuplicateFinder – when a new NPC spawns it will check for possible duplicates that may be there because of server crash in the past. It is off by default, but you can set it to true if you have NPC duplicate issues.
DuplicateFinderRadius is a radius where plugin will search for duplicate NPCs. Smaller means slightly less work for server and probably little bit safer (won't delete wrong guys). You don't usually want it to be more than 10 blocks anyways.
You also can alternate price calculation by changing basic armor and tool prices and enchantment cost. Modify parameters BasicArmorPrice, BasicToolPrice and BasicEnchantmentPrice.
Prices are calculated like this: repairman cost parameter * (basic item type cost + (basic enchantment price * number of enchantments * sum'd enchantment levels)).
This formula makes repairment of simple non-enchanted items quite cheap, items with 1-2 enchantments are at moderate cost and uber-enchanted items repairment cost a fortune.
If you want to change sound that NPC are making on interact – you can use ingame command or change it in the config part of the NPC.
All other config parameters are configurable in-game, so you don't have to bother about them. But if you want – they are quite self-explanatory.
Citizens integration
You can add traits to your npcs to act like respective Griswold NPC types.
Following traits can be added:
-
griswold_tools
-
griswold_armor
-
griswold_both
-
griswold_enchant
-
griswold_all
Please don't add multiple traits at once, lol.
How to add a custom item
You have to create a new entry in config with name CustomItems. This entry will contain two more entries: Tools and Armor. Under those you add your items in "'id': name" format. Yes, it sounds complicated, but it is not! Here, look at my sample config:
CustomItems:
Tools:
'BOW': Bow
'FLINT_AND_STEEL': Flint and steel
Armor:
'LEATHER_CHESTPLATE': Leather Armor
'CHAINMAIL_CHESTPLATE': Some other armor
You can just copy-paste it in your config at the very end of it and change the IDs. Names after ":" are just for your convenience and are not used anywhere in the code.
How to blacklist items
You can prohibit players to repair certain items and also, separately, prohibit them from adding enchantments to certain items.
This is achieved through ItemBlacklist.Repair and ItemBlacklist.Enchant config sections, respectively.
Here is an example of such config:
ItemBlacklist:
Enchant:
- DIAMOND_SWORD
- GOLD_SPADE
Repair:
- GOLD_SPADE
- DIAMOND_SWORD
By default, this setting is not in your config and you have to add it manually.
You can copy-paste this snippet to the end of your config.
Give author a dollar!
I started to develop for Minecraft more than two years from now and only did it in my spare time. I still don't have a legit Minecraft account. Having one would be helpfull to give support in-person on online-mode servers. So if you want me to come to your server or just want to say "Thanks, Tony!" – feel free to use the button below. I will buy myself a minecraft account from these money.
Stats:
This plugin utilises Hidendra's plugin metrics system, which means that the following information is sent to mcstats.org:
unique identifier, server's version of Java, whether the server is in offline or online mode, Griswold's version, Bukkit version, OS version and architecture, CPU core count, number of players online, metrics version.
You can opt-out of this service by editing plugins/Plugin Metrics/config.yml and changing opt-out to true.
@toxuin
Sweet thank you for the reply
and one more thing it seems that every time I start my server or restart it the npc blacksmith spawn's a normal minecraft villager. Not sure if its thing i did wrong in the config file or it because it use tekkit for a server
@DiabloTheDark
I'll try to add this feature in next version – thank you for the suggestion!
is it possible to add Tekkit support so that the black smith can repair Tekkit weapons and armor like EG: Dark matter, red matter, ruby, sapphire and emerald weapons and armor and also the tools like pick axe, hoe, shovle, axe for the new Tekkit stuff
Whoa, thanks for 1000+ downloads, guys! Version 0.06 is in testing phase now and will be available to download in next few days. It will bring the new npc-stand-still algorithm that will make Griswold even more lightweight (no more dancing in invisible cages, lol)!
@RasCas
I could not reproduce the bug you are talking about. Can you please send me your plugin list?.. However, I noticed that NPCs do not show up immediately after entering the game, they need about 5 sec to appear. Have you tried to wait?:-)
@HackerFinn
Hej, Martin!:-) Du kan skrive mig på toxuin[#]gmail.com eller i skype - toxuin. Nej, jeg kan ikke Dansk, bare lidt Norsk:-D
Hi. I would like to translate your plugin to Danish. If you give me an address, to send the result to, i would be happy. I could also keep it updated if you notify me about updates. :)
Thank you in advance.:) -Martin.
Interaction Bug is fixed, but now the Blacksmith does not spawn automatically. I have to typ /Blacksmith reload to let them appear. /Blacksmith respawn has no effect.
PS: Blacksmith behave to Users without permissions as normal NPC and try to trade. Imho it would be better if they refuse to work for those missing the rights.
@puksa - Great job! The update is working perfectly. Thank you.
@toxuin
lol. No pressure, you enjoy your vacation. :)
Edit: I just noticed the edit on your last post. Thank you for this cool plugin.
@AcidSikeO
Oh my god, this is a real nasty bug we've got here! Actually, this bug is caused by my dirty "compatibility" patch for minecraft 1.3.1 and I already know the solution to fix it but I am on vacation with no java-enabled device with me. Expect patch in few days and have my apologies for this bug.
UPD: Update is now awaiting approval. If you're impatient - go grab it from github!:)
@Dinastya
Citizens is big, clumsy and heavy-weight plugin that will make your server lag. No offense, Citizens team. I will not/can not support two different implementations of the same functionality, sorry. You can actually place Griswold right next to Citizens and it won't cause much overhead to your server since Griswold is rather lightweight.
@all: thank you for 500+ downloads, guys! I really appreciate this!:)
Great Plugin. But, I can't leave it enabled as it stops animal interactions. Griswold v.0.051, Bukkit devbuild #2327
Amazing Plugin, but it stops me interacting / trading with other NPC. Any ideas why? (using 0.051 with Dev Build 2303)
Could you make something like this for Citizens?
Citizens 2.0 got a amazing api and don't really like to have 2 npc creation plugins.
But this repairing seems really useful though.
am geting spam of erros :LANG NOT FOUND ? enyone no whats up with that
@EfReeZe
Кузнец, но он может зачаровывать вещи. Кто еще нужен? Если есть какие-то предложения - предлагай их, с удовольствием выслушаю тебя.
Пока только кузнец?
thank you fellow diablo fan, for your fine work.
Okay, got a cool fix for you. It's on the waiting queue now ^_^
Guys, new version is awaiting approval - with enchantment stuff. But there's one thing - I totally forgot to make enchant system non-mandatory. I'll fix it tomorrow or in few days. Sorry for that.
Thanks, puksa. :)
I wouldn't mind him patrolling, or walking around a small area. But, from what I've seen with Citizens - that's hard to really accomplish. In Citizens, you can set waypoints for them to use, but there's no control on the speed and they just walk no matter what. It makes it hard to get your stuff repaired if he keeps walking away from you. LOL
Thanks for the work, though. We're very happy with it so far!
@Snazzie
Enchanters will be a separate type of "blacksmiths", so if you don't need this functionality - just don't switch it on:) Others still can specify "all" as blacksmith type. The dancing of blacksmith is kind of the less laggy way to stop them from running away. If i'll think of some other way to make them stand still - I'll surely implement it. For now there's a workaround: just build a workshop around the blacksmith so he'll just won't be willing to run away:)