Jump to content

Adding New Skills/Perks


Guy

Recommended Posts

Has anyone had any luck adding new skills to the game? I dug into the java docs, and it seems like it mostly comes down to the PerkFactory class.  There's a function called AddPerk which takes (among other things) a reference to a PerkFactory.Perks object.  PerkFactory.Perks appers to be a static enumeration defined in the Java code and containing all the skills currently in the game (farming, carpentry, blade, blunt, etc.). So, in order to add to the list of perks contained in PerkFactory, I would need a reference to one of the constants contained in the enum.

 

I feel like if I could add to the enum, the rest would mostly take care of itself. The skills window iterates through all the skills in PerkFactory.perkList to create the progress bars, and the XP system takes care of the leveling up, but as far as I can tell there is no way to add to this enum and therefore no way to add new perks.

 

I'm curious to know if anyone has found a way to circumvent this issue, or if it's even possible at this stage with what's available to us in lua.  Also, if it isn't possible currently, will this system eventually be made open to us?  I guess it's a bit of a long shot, but I'm grasping at straws here and I'd rather not tie my mod into an existing skill.

Link to comment
Share on other sites

Yeah, Kjulo and I have done it before in our respective mods Kjulo's Additions and, my tribute to this work that updates and expands upon said mod, Extra Traits Mod.  Some functions are harder to get the client to accept than others (basically almost all traits have to be tied to a lua event trigger to actually do anything post character creation) but it is possible.  Download and take a look at the scripts contained in the mods here to give yourself a primer: http://theindiestone.com/forums/index.php/topic/1697-kjulos-additions-new-traits-uses-for-useless-items-and-repair-weapons/

 

Let me know if you need any clarification or help!  Good luck!

Link to comment
Share on other sites

Hey, thanks for the quick response, but I feel like I may not be explaining what I'm going for very well.  What I'm really interested in is new skills.  For example, I'd like to have, say, a Lockpicking skill to go under the Agility section along with Nimbleness and Sneaking, or an Archery skill to go with Aiming, Reloading, etc.

 

I guess it's probably confusing to refer to them as "perks", but that seems to be how they're referred to in the Java, unless I'm completely misreading things (which is totally possible).

 

Again, though, I appreciate your help. I will most certainly crack your mod open if I decide to add new traits, which seems likely at this point.

Link to comment
Share on other sites

Hey, thanks for the quick response, but I feel like I may not be explaining what I'm going for very well.  What I'm really interested in is new skills.  For example, I'd like to have, say, a Lockpicking skill to go under the Agility section along with Nimbleness and Sneaking, or an Archery skill to go with Aiming, Reloading, etc.

 

I guess it's probably confusing to refer to them as "perks", but that seems to be how they're referred to in the Java, unless I'm completely misreading things (which is totally possible).

 

Again, though, I appreciate your help. I will most certainly crack your mod open if I decide to add new traits, which seems likely at this point.

 

Ah, I understand what you mean now.  Yeah, I'm afraid I can't help you there.  Most of the script framework that dictates how those systems operate and interface with the rest of the client are contained in the source code as methods that don't always have public means of being called publicly (I hope *I* made sense there, lol.  I've learned most of what I know about java and lua through hands on trial and error so my terminology isn't always correct.)

 

Good luck to you in your search for a means of adding new skills though!  I would definitely be interested to see your approach if you manage to find a working method!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...