Jump to content

Skill System


BenGBoo

Recommended Posts

Hello everyone, this is my first modding attempt and I've gotten down making items, tools, blocks, and crafting recipes. I have a decent grasp on Java as a programming language but I'm still very new and unsure of Minecraft's modding. The mod I want to make relies heavily on a skill sort of system, where repeating an action like chopping down a tree gives you experience towards that skill, and leveling up increases your efficiency at that skill, so chopping just a tiny bit faster or maybe a chance at getting an extra log. I want this to be a feature of every part of the game, like a skill for farming, tree chopping, mining, etc., but I don't know exactly how to accomplish this. I was thinking that advancements would be a great way to track and see progress on these levels, but how would I go about tracking "blocks mined/xp gained", and how would I reward the player with a constant and permanent stat buff?

 

Thank you all very much for your help.

Link to comment
Share on other sites

Capabilities.

 

They really aren't that hard to work with, but do require creating a few classes that don't seem to make a lot of sense.

 

You can see an example I did for TE machines here, but the process will be the same for player capabilities. The only difference is how you attach the capability (for a player, I believe you would use the AttachCapabilityEvent, though I'm not 100% sure on that)

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

14 minutes ago, Draco18s said:

Capabilities.

 

They really aren't that hard to work with, but do require creating a few classes that don't seem to make a lot of sense.

 

You can see an example I did for TE machines here, but the process will be the same for player capabilities. The only difference is how you attach the capability (for a player, I believe you would use the AttachCapabilityEvent, though I'm not 100% sure on that)

Thank you very much! I don't know exactly what capabilities are but that's a great starting point, I'll do some research. Thanks again!

Link to comment
Share on other sites

Capabilities, generally speaking, is a cross-mod-compatible way of accessing extra data, methods, or interaction for TileEntities, ItemStacks, Entities, etc. without needing to create hard dependencies in your code.

 

For example, prior to 1.10, if you wanted a TE machine that accepted Redstone Flux, IC2 power, and RotaryCraft crank input, you had to implement 3 or more interfaces on your TE, then use Annotations to have Forge remove those interfaces and methods when those mods were not present.

 

With capabilities, everything's done through getCapability in a generic manner.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.