iProfessions
Heypoday,
iProfessions is a complete plugin for making a job-based economy for your server. Players will have a profession (Miner, blacksmith, ... Whatever you want) and will be the only players who could do some actions. For instance, if you create a blacksmith profession and give them some craft skills, only blacksmith players could craft weapons, shovels, ...
Of course, you create your professions, this is not pre-defined professions. iProfessions tries to make professions as customizable as possible, you can give them craft skills, destroy block skills, use item skills and many others.
It also offers more features like tree-profession (Make specialisation of profession), economy support, required field to learn a profession,...
Last thing, you can use iProfessions with BeardStat to use the required features (Allow a job only when player has done some things)
Hope you'll enjoy the plugin, very usefull if you have a lot of player and you want to make a real job-based economy. :)
/!\ This plugin NEEDS PluginsBaker to work, don't forget to install it ! :)
French Topic | Github | Bukkit Thread
Authors: Ptibiscuit
How to use
Configuration
Open config.yml, there's 3 parts of this config. Players will be filled by itself. Config contains some config:
- max_profession: Number of professions that you're player can have. The professions' configuration is a bit hard, there's a tutorial for How to create your profession at the end of this page, hope you'll understand it well. :P
Commands
- /plearn <Tag's profession> (iprofessions.learn.<Tag>): Learn a profession. The permission for this command changes depending of the profession. If the player wants to learn the profession "miner", he would have to have the permission "iprofessions.learn.miner".
- /pforget <Profession> (iprofessions.forget): Forget one of your profession.
- /paddprofuser <Player> <Tag's profession> (iprofessions.user.profession.add): Add a profession to a player.
- /premprofuser <Player> <Tag's profession> (iprofessions.user.profession.remove): Remove a profession to a player.
- /pwhois [Player] (iprofessions.whois.other): Display job of an other player.
- /pwhois (iprofessions.whois.self): Display your job.
- /plist <Profession> (iprofessions.list): Display the list of all online players who has this profession.
There are some special permissions:
- iprofessions.god: Allows the player to do anything, even if he hasn't the good profession.
Create your profession - Step to step tutorial
Outch, outch, i'll try to be the cleariest as possible for this tutorial. First of all, here is a ready-to-fill yaml configuration to create your professions:
professions: [Tag]: name: [Name] price: [Price] parent: [Parent] required: - category: [Category] key: [Key] require: [Require] hasnot: [Hasnot] skills: breakBlock: - id: [Id] hasnot: [HasNot] smeltItem: - id: [Id] hasnot: [HasNot] craftItem: - id: [Id] hasnot: [HasNot]
For this tutorial, we're gonna create a blacksmith profession (Read those operations while looking at the result at the bottom):
The tag of this profession will be blacksmith, it means that player will have to use "/plearn blacksmith" to learn this professions.
The name of the profession will be "Blacksmith", this field is the clear name of the profession with capital letter, spaces, ...
The price is the money player will have to pay to learn this profession. I choose that learning blacksmith will cost 150 iConomy money.
The parent field is special, it will be explained in the following part, it is usefull for creating tree of profession. For my blacksmith, I'll delete this field. :)
Required field contains a list of all the required to learn this profession. For our profession, in addition to paying 150 iConomy money, players should already have broken 15 blocks of stone and 10 blocks of coal. Hasnot field is displayed when a player has not accomplished the required field. ("{LEFT}" will be replaced by the number of action left to accomplish the required (Need to break 15 blocks, I've broken 10 blocks, {LEFT} = 5 :P ))
Required field are handled by BeardStat plugin (You can use iProfessions without using BeardStat, but so, you can't use the required field)
At this point of the tutorial, here is our profession:
professions: blacksmith: name: Blacksmith price: 150 required: - category: blockdestroy key: stone require: 15 hasnot: You have to break {LEFT} block(s) of stone. - category: blockdestroy key: coalore require: 16 hasnot: You have to break {LEFT} block(s) of coal ore. # And the rest ....
Now, the most important part of the configuration, skills !
When you give a skill to a profession, only players of this profession will have this skill and be able to what the skill says. For our profession, only blacksmith can craft golden and diamond tools (shovel, sword, axe, ...), break gold ore and iron ore and smelt those ore. Exactly like with the required field, hasnot fields are displayed when a player tries to do an action when he hasn't the right profession. Here is the all configuration of our black-smith profession:
professions: blacksmith: name: Blacksmith price: 150 required: - category: blockdestroy key: stone require: 15 hasnot: You have to break {LEFT} block(s) of stone. - category: blockdestroy key: ironore require: 16 hasnot: You have to break {LEFT} block(s) of coal ore. skills: breakBlock: - id: 14,15 hasnot: This block is too strong, only a black-smith can break it ! smeltItem: - id: 14,15 hasnot: It's too hot for me, only a blacksmith can smelt that ! craftItem: - id: 283,284,285,286,276,277,278,279,293,294 hasnot: I can't craft this item, maybe a blacksmith can ? ...
There's a lot of type of skill. Here we've just used 3 of them, but you have a list of all type of skills below.
You can also specify a metadata, like with wool ("35-4", "35-14", ...) or stairs.
If you want others example, to see how make a complex schema of professions, you can check the Free sample, I'll try to create a lot of samples. :)
Types of skills
Tag | Purpose | Example of configuration |
---|---|---|
craftItem | Allows the craft of an item | id: 257 hasnot: You can't craft that. |
smeltItem | Allows the player to put an item in the smelt slot of a furnace | id: 14,15 hasnot: You can't smelt that. |
breakBlock | Allows the player to break a type of block (All players are able to break block that have been placed by a player during a same server instance (If you reload or restart the server, players won't be able to break blocks that have been placed).) | id: 1 hasnot: You can't break that. |
placeBlock | Allows the player to place a type of block | id: 2 hasnot: You can't place that block. |
gainMoneyOnBreakBlock | Player will win money when he'll break a block (Don't win money with a block they have placed) | id: 1 reward: 1 |
gainMoneyOnKillCreature | Player will win money when killing a creature. (List of all types of creature here) | type: PIG,CREEPER reward: 50 |
dropItem | Allow the player to receive drop when breaking an item. | id: 1,5,2 |
wearItem | Allow the player to wear an item (helmet, boot, ...) | id: 306 hasnot: You can't wear that |
Make a tree of profession (specialisations)
You can make specialisations for professions, those professions gets the skill of their parent profession with the skill they have. Also, learning one of those professions requires to have learn't the parent profession. For instance, I want to create 2 professions:
Miner, players would first have to learn that professon. Miners can break Iron ore and Redstone Ore.
Then, players can choose between 2 professions:
Gold Miner, they have all the skills of Miner plus breaking Gold ore.
Diamond Miner, I think you have understood the thing, they have miner skills plus breaking Diamond ore.
Here is a simple schema which explains the situation:
And here is the configuration to create those kind of professions:
professions: miner: name: Mineur skills: breakBlock: - id: 15,73,74 hasnot: This block is too hard. gold_miner: name: Mineur d'or parent: miner skills: breakBlock: - id: 14 hasnot: This block is too hard. diamond_miner: name: Mineur de diamant parent: miner skills: breakBlock: - id: 56 hasnot: This block is too hard.
Notice the "parent: miner" field added for the gold_miner and diamond_miner profession.
Last thing, you have to write sub-profession AFTER the parent profession !
Make group of professions
It's an other feature that allows you to force your player to take a specific combinaison of profession. For instance: Imagine I'm trying to make a server WoW-Like. In World of Warcraft, you have basically 2 kind of professions crafting and farming profession. Farming profession are like miner, herbalist, sheep shearer, ... Crafting profession are like blacksmith, tailor, alchemist, ... In my server, I have 6 profession: miner, herbalist, lumberjack, blacksmith, alchemist and engineer. The first three are my "farming" professions, and the last three are my "crafting" one. :) In my server, players can take 2 professin, but, I want that they can take only 1 farming profession and 1 crafting profession. Well, with iProfessions, that's possible ! :D Go to your config, and find the "professions_group" node. By default, you have that:
config: max_profession: 2 profession_groups: - max_profession: 1 professions: - farmer - miner
If you have nothing, try to generate a new configuration by deleting your actual config (Don't forget to make a copy ;X) and reload the plugin. For my server, I'll create 2 groups, set the max_profession for each group to 1, and list all my "farming" professions and my "crafting" professions. Here is the result:
config: max_profession: 2 profession_groups: - max_profession: 1 professions: - lumberjack - miner - herborist - max_profession: 1 professions: - blacksmith - tailor - alchemist
Logically, the sum of all the "max_profession" of all your groups should equal to the global "max_profession" of your config. (Here, 1+1=2) /!\ Last thing, if you're working with specialization (To set up a profession tree), "professions" node in your groups have to contain only root professions (Profession that has not parent).
Link a group to a profession
If you want that when a player learn a profession, he's added to a group, well, linked_group is for you ! :P To configure a linked group, just add this to a configuration of a profession:
professions: miner: name: Mineur linked_group: miner price: 50 ...
When a player will learn the profession "miner", he will be added to the group "miner". When he forgets or he specializes the profession "miner", he will be removed. /!\ If you use the linked_group feature, you can't change the profession of a player by modifying the file because it would desynchronized groups and professions !
List of all the category of required
In the tuto, we used the category "blockdestroy", but there are more than just this one. Actually, there isn't a list of all valid category-keys, cause this is managed by BeardStat. You can easily, if you turn the config to a Database, check your database too see all the possible category. Here is a little list of my database. :)
Category | Key | Description |
---|---|---|
blockdestroy | iron, dirt, ironore, stone, ... | Block destroyed, I don't think you need more explanation :P |
itempickup | sapling, dirt, ... | Idem |
crafting | wood, ... | This is crafting item |
blockcreate | ironore, ... | Placed and not craft item ! |
deaths | total, fall, ... | Number of deaths |
stats | chatletters, chat, login, move, playedfor, firstlogin, lastlogin, lastlogout, totalblockcreate, totalblockdestroy, damagehealed, move, | This is stand-alone stat |
kills | skeleton, spider, total, ... | People killed |
damagetaken | fall, arrow, skeleton, total,... | |
damagedealt | arrow, skeleton, entityattack, ... | |
itemdrop | wood, ... | |
exp | currentexp (The current level), lifetimeexp() | |
Use sign to make actions
You can create signs that make actions for player when they interact with them. It is simple, write "[iProfessions]" for the first line of the sign. For the second line, it depends of what you want the sign does:
- learn <tag's profession>: Will do exactly what "/plearn" does, try to learn a profession (permission: iprofessions.sign.learn.<Tag>). For instance, the permission to learn the profession "miner" with a sign is "iprofessions.sign.learn.miner".
- forget <tag's profession>: Will do exactly what "/pforget" does. The required permission to use the sign is iprofessions.sign.forget.<Tag>
- Maybe some other action, in the future. :)
Exemple, if you havn't understood: :P
We are already two .... I created a thread on the Bukkit forum to see if anyone decides to take charge:
http://forums.bukkit.org/threads/source-code-plugin-iprofessions-released-needs-to-be-fixed-plugin-very-demanded-volunteers.103152/
You can request there too, to take charge of the plugin, how many more interested there, better.
@Q2Lummox
Nice job. Now pray that someone will take this over :P
Okay, I managed that the author put the license in the "public domain" and update Github repositories.
@nhoclesnar
Thanks, I figured it out. It needed to be under block create. Thanks though.
I am trying make contact with the author, so much to change the license, and for to upgrade to the latest version of the source code available in "Github."
To see if we're lucky and responds :P
@Jemrada
It's BeardStat that tracks the crafting, destroying, etc. Perhaps you should head over there and tell them the problem.
@snoepje0
The author gave anyone who is interested the permission to take over the plugin: Link. You could PM the author but I doubt he/she would reply.
If the license would change, me or my Java class might take a look at it. I just do not want to get into trouble because of the license. I took a quick look at the code, and it seems doable to fix it, and a good lesson for my Java class to learn some more stuff. The only thing that holds me back is the license agreement.
Snoepje0
I wanted to do crafting requirement of a few Furnaces. They do not get recognized as I build them.
Is furnace recognized as crafting in iProfessions?
I get this message in console, "[iProfessions] [WARNING]You're using a stat that doesn't exist: crafting-furnace"
Is it possible to get a full list of existing stats in iProfessions?
Also, when I unlearn a profession. I get this message, "[iProfessions] You have forgotten {PROFESSION}!"
It's a shame you can not take care of this plugin. I can not find any other plugin to do something similar and even has support. We asked someone to take over for a while, only offered a person, and the end did not took over this plugin.
This plugin is very good, but it has several problems, especially in the "Required", and in other respects. If someone took charge of this plugin, and add more functions, would be a great plugin, but the way it is, does not serve the purpose for which it was created.
@Q2Lummox
Yep, StackableItems might very well be the cause. I'm sorry I don't have time right now to test it, but I will, later, if I remember.
About your suggestions, I share some common ideas with you, and I would love to implement them. However, I'm super busy right now, and will still be very busy for a long time. This is my junior year, and I'm buried with SAT, exams, clubs, colleges, AP classes, etc. Minecraft is just a 'fun' place for me to relax, and to practice my English.
I did try learning Java and making plugins, and very soon I realized that I need 'experience' the most to be good at this stuff. To gain experience, I need to practice a lot, which I can't at the moment. I also tried PMing a plugin developer who might be interested in maintaining this plugin, but he responded with the word 'busy' also.
Well, I suggest you finding a plugin developer who can pick this project up and continue it, because I just simply can't do it. For now, half of what you wanted can be done by using an external plugin. Check out SimpleItemPermissions and ModifyWorld for more info. I hope they would satisfy you.
I have found that to you, clicking on the item Crafted disappears much faster than me. I have no problem of lag.
Still, I checked out the plugin that giving me this error, "StackableItems". You can try using this plugin and tell me if you happen the same?.
Another thing that I think does not work are the signs, to join a profession.
Other function that is not fuction (in my opinion quite severe) is that you can not apply the same ID to two different jobs. You have to join those two jobs to do something. For example, I work two jobs, "Test1" and "Test2". They both I put that to break stone.
The logic is that if you belong to Work "Test1" or at work "Test2", can break the stone block. But no, you have to belong to both work to break it, and this should not be so. This way I can not do that several jobs share a function.
Another thing that's missing is 100x100 plugin and necessary, is the inclusions of Skill "useITEM" to add to a job using a unique item. For example "to the woodcutter the ax", "peak for the miner" and so .... this way if you do not belong at work, you can not use that tool / weapon.
Another addition that would be nice to include, will be an option to limit the number of blocks you can break in a day, or craftings, all skills I mean ..
e.g.
Time: 24h
professions:
miner:
name: Miner
skills:
breakBlock:
- Id: 15,73,74
hasnot: This block is too hard.
Time:
- 15: 100
- 73: 50
- 74: 75
In an actual day (24h) can break 100 blocks with the ID 15, you can also break 50 blocks of the ID 73, etc ...
This way you have much more control over the work.
I have more ideas that can greatly enhance this plugin, but without anyone to take charge of this plugin, are useless ... : (
@Q2Lummox
Here, take a look at my video. I could not reproduce your problem. Maybe you have another plugin that interfere with iProfessions? A recipes altering plugin has a high chance to do that.
What other bugs have you found? All the skill types work fine; I tested all of them.
@log234
I'm sorry, I don't use the BeardStats feature. You will get better answer if you ask @Jemrada :)
To begin, would be nice to solve several bug that has the plugin, and especially add the function to restrict certain work items, add useItem function. So you can restrict the tools and weapons.
And fix the problem with craftings I put in my previous message.
@nhoclesnar
I know a tiny bit Java aswell, and I really want this plugin to keep existing, so if you need me I can drop my mail in a PM?
P.S. Good luck! :D
I hope I've not started to annoy you by now, but I had one last question:
After getting things to work I discovered that the values in required doesn't change, it's like beardstats doesn't register when you break a block or similar. When I opened the database file I couldn't find any stats for breaking of specific blocks, only total blocks broken and that kinda stats. Do I have to make any changes to BeardStats to make this work?
Thanks yet again :)
@nhoclesnar
I created a video for you to understand better ... : D
http://youtu.be/zuptiUrU7W8
@Q2Lummox
I'm not sure how you can do that. When you try to craft an item you are not allowed to craft, it immediately undo what you just crafted. That means the crafted items would immediately disappear. How can you be fast enough to click on the crafted item, unless the server is super laggy?
About fixing bugs, I'll try hard to learn java when I'm free. I'm a newbie, and this plugin is way too complicated for me. Plus, real life takes almost all of my time. I don't think this plugin has any major bug at the moment tho.
I found a bug.
If you add a crafting a job, for example adding only the lumberjack can do wooden axes. If you do not have that job, you can not crafting ... Now, if you try crafting, instead of taking the ax and put it in the inventory, if you press Shift, and hit the ax just created, you add it to your inventory.
Nobody can take charge of this plugin and fix every bug that has?
It works!!! :D
Thank you very much for all the help!