Jump to content

Recommended Posts

Posted

Hello everybody, 

 

I am planning to make a mod that has a skill system as a main feature and i am not sure how to add this properly. I don´t want to mess around and just make it work, but not perfekt, it should be well done and not using forge features incorrectly. 

There will be a new kind of level and exp for the player additional with skillpoints and a skilltree.  

Are there any tips, hints, words for me or tutorials you would recommend?

 

Thanks for every answer, 

Kaneka

Posted

We cant answer everything for you but i might have a few tips.

 

First you need to define your skill system as a series of classes for instance maybe a class SkillManager to handle skills for players in the world

Second you need to define what your skills are probably a series of classes containing the skills name etc.

Third you need to be able to save and read to each Players NBT Data their skill information

Fourth each individual skill will have different ways of working most skills will probably make use of forge events so learn how to use forge events

and for individual help you can always just post topics here.

Posted

@jtsfour he should not be saving this to the player's NBT data directly, instead he should use a capability attached to the player that holds all the skill data.

Posted
10 minutes ago, XFactHD said:

@jtsfour he should not be saving this to the player's NBT data directly, instead he should use a capability attached to the player that holds all the skill data.

Why? Skill data will be very small.

Posted

Because accessing the player's NBT tag is not very clean and synchronisation is as far as I know only barely possible. If you use capabilities you can sync it yourself and accessing it is also much cleaner.

Posted

It's added by forge for Entities, ItemStacks, TileEntities and Worlds.

Posted

No, the Capability is for storing which skills the player has and what skill level they are.

 

The actual skill system can be totally separate and simply query the player's Capability when they interact with it.

 

If your skills need to store any information on a per player basis, that should be stored in the player's Capability.

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.

Announcements



×
×
  • Create New...

Important Information

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