Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

World of Warcraft "Talent" Skill Tree Request

Hi,

I'm looking for a skill tree system similar to that used in such games as World of Warcraft, Diablo, and Hellgate: London. For those of you who have not played any of those games, the system works as follows.

Characters have a set skill tree. This means that only one or two skills are initially available, but as these skills are obtained, more options become available. However, the first skill must be obtained before these other skills can be accessed. A graphical representation would look like a tree and its branches.

Each time a character levels, one or more points is received which can then be used to obtain a skill from the skill tree. Characters can then subsequently access the later skillls. Here is a screenshot to better demonstrate what I am referring to:

http://img185.imageshack.us/img185/3466/talentjj6.jpg[/img]

As you can see, players in World of Warcraft must begin at the top of the tier and subsequently add points per level in order to reach later skills. Games such as those mentioned before typically have multiple sets of trees; however, just one tree would be fine.

As with World of Warcraft, I would like for stat bonuses or other skill related "talents" to be available. To better exemplify this, in the World of Warcraft skill tree, such bonuses as additional strength, health, or agility are available to have points placed into them as well as skills. Other talents allow for skills to be powered up by increasing their damage or decreasing their MP cost. Skills like these typically are multi-level, meaning they have multiple levels of quality that each require a skill point. (For example, a skill that would increase strength in 5 levels: 1/5 - 10 STR  2/5 - 20 STR etc.)

Sorry if this is a big request, but I would greatly appreciate it if somebody could work out something like this. I found other posts requesting similar systems, but they are all months old for the most part.

Thanks in advance!
 

poccil

Sponsor

I've sketched how such a skill could be represented in Ruby:

Code:
class Module
 private
 # Convenience method for defining default values.
 def attr_accessor_def(name,defvalue)
  module_eval <<-__END__
   def #{name}; @#{name} ? @#{name} : #{defvalue}; end
   def #{name}=(value); @#{name}=value; end
  __END__
 end
end


class TreeSkill
 # Name of the skill.
 attr_accessor_def :name, "\"\""
 # ID of the skill.
 attr_accessor_def :id, "0"
 # Points required to learn skill.  If 0, this is an initial skill.
 attr_accessor_def :pointsRequired, "0"
 # Skill required to learn skill.  If 0, no skill is required.
 attr_accessor_def :skillRequired, "0"
 # SP cost.
 attr_accessor_def :spCost, "0"
 def initialize; end
end

There could be an array of tree skills for each class, and depending on the number of talent points received, the skills available could differ.
 
So just to clarify, the framework you posted is just the coding for one "talent" on the tree, correct?

Thank you, poccil. It's a good start to what I hope will be a working system. I don't know much about scripting, but maybe somebody else might be inspired by this.
 
bump

Edit: I recently downloaded RTH's FFXII demo script and noticed that he had implemented a License Board. For those who don't know what this is, this is a big board that contains stat+ and skill learnings. Each square requires a certain number of LP, which can be obtained by killing monsters.

I don't know how his coding works, as once again, I know nothing about scripting, but maybe this is something a little closer to what I'm looking for that can be used as a reference? Unfortunately, his script is half-Portuguese, so it might be a little difficult to decipher.

Anyway, just trying to make this request a little more managable. Thank you.
 
Hey guys, this is my first post here, and my first attempt at Scripting but I'm pretty experienced at other programming languages. I believe I've got a working Script of what your looking for. I took Momomo's AP Skill System and added a few simple paragraphs and now learning new skills is dependent on knowing old ones. It should be exactly like World of Warcraft's tree without the pretty pics. Letme know how it works.

Code:
Momomo# Ability System
# By Momomo Edited by Perfectedge
#
# Calling ability, it equips and/or removes skill
# and/or we would like to see mono is
# Setting AP, consuming that, you attach and it
# reaching the point where you can remove, you increase.
# Only the ability which is in the midst of equipping,
# is regarded acquisition skill
# 
# Event Command
# $scene = Scene_Set_Ability.new(ActorID)
# So, it moves to the equipment scene
# 
# When we would like to make equip mandatorily
# in the event and the like, in "event command"
# $game_actors[ActorID].equip_ability(SkillID)
# When with it inputs, it becomes a state where it is equipped
# Furthermore, this time ignoring AP, it is equipped mandatorily
# When the skill which you have not remembered is appointed
# However it is not recorded before the equipment picture, it
# becomes to have equipped
# To forget:
# $game_actors[ActorID].remove_ability(SkillID)
# 
#
# By the way with the largest AP decrease by the decrease of level
# Doing, increase the processing when entire AP which is in the midst
# of equipping exceeds maximum AP it is. (-3/16 it is indicated)
#
# 2005.4.29 æ›´æ–°
# 強化属性ã
 
I have a system similar to what you want.  I call it the Ability Grid, but it could be edited to become a tree.  Take a look if you're interested.  His script would probably be more customized, but mine is probably more customizable.  Anyway, the script is probably closer to what you're looking for, but I figured I'd give you options.

~Guardian1239
 
Ok I've fixed the glitches I found. It works as I described before except now if you want no skills to be required to learn something simply dont make a treeReq field for that skill(Rather than entering a zero). Also The glitch that I found was that when you unlearn a skill you could manipulate the tree. To fix this I have the Tree reset everytime you unlearn a skill like World of Warcraft. Please check it out, I think it should work right now. If you find any errors please let me know. Like I said this is my first script and am still working on my 1337 skillz so be patient. ;p Peace.


Updated code ->
# Ability System
# By Momomo
#
# Calling ability, it equips and/or removes skill
# and/or we would like to see mono is
# Setting AP, consuming that, you attach and it
# reaching the point where you can remove, you increase.
# Only the ability which is in the midst of equipping,
# is regarded acquisition skill
#
# Event Command
# $scene = Scene_Set_Ability.new(ActorID)
# So, it moves to the equipment scene
#
# When we would like to make equip mandatorily
# in the event and the like, in "event command"
# $game_actors[ActorID].equip_ability(SkillID)
# When with it inputs, it becomes a state where it is equipped
# Furthermore, this time ignoring AP, it is equipped mandatorily
# When the skill which you have not remembered is appointed
# However it is not recorded before the equipment picture, it
# becomes to have equipped
# To forget:
# $game_actors[ActorID].remove_ability(SkillID)
#
#
# By the way with the largest AP decrease by the decrease of level
# Doing, increase the processing when entire AP which is in the midst
# of equipping exceeds maximum AP it is. (-3/16 it is indicated)
#
# 2005.4.29 æ›´æ–°
# 強化属性ã
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top