<Deity's SkillTree>
Version: <1.0>
Author: <Deity>
Date: 4,8,2010
Version History
- <Version 1.0> 04.08.2010 Script become published
- 4.10.2010 Update to v 1.1
- 5.12.2010 Update to v 1.2
Planned Future Versions
- better control with all 4 directions
- Hide not possible Skills
- Line Addons
Description
This Script allow you tu use your own individual SkillTree for your Game.
Features
- Up to 99 Skills possible
- Individual SkillTree for everyone
- Simple using
- Modify the Drawn Lines
- Hide Skills which conditions aren't sufussed
Screenshots
(https://rmrk.net/proxy.php?request=http%3A%2F%2F250kb.de%2Fu%2F100408%2Fp%2FRr8ZYRpUUS8u.png&hash=bd21a46fc75b6f2b401fb5ef7b6d63bb5572ade8)
(https://rmrk.net/proxy.php?request=http%3A%2F%2F250kb.de%2Fu%2F100408%2Fp%2Fs80X2MNEDY6c.png&hash=824c24e28ea4a680f734b9bd75c970752ff417d2)
Settings
(https://rmrk.net/proxy.php?request=http%3A%2F%2F250kb.de%2Fu%2F100408%2Fp%2FG5J3M9b8l9BR.png&hash=e2bbd653633c3f7eff394d315530a1aa9bea154b)
Instructions
[/list][/list]
# Using: #
# As first you have to setup the Settings as you wish. #
# To call the SkillTree you have to write this in the "Call ..." #
# $scene = Scene_SkillTree.new(party_member_id) #
# If you use this line: #
# add_skill_points(party_member_id,points) #
# the partymember with the id (party_member_id) get points #
# skillpoints. #
# Just add the skills an actor can learn as ever in the database.#
# Now you have following notes which you can place into the note #
# of a skill. #
# <skills> needed_skill_id,needed_skill_id <skills_end> #
# <costs> skillpoint_costs_to_learn <costs_end> #
# <coords> x-coordinate,y-coordinate <coords_end> #
# If you skip <skills> the script notice that there no skills #
# which the actor need to learn this skill. #
# If you skip <costs> the script give the skill automaticaly #
# the cost of 1 skillpoint. #
# The coordinates are important so dont skip them. #
# You have a window of 272*328 pxl to place you skills(icons). #
# So you can place about 99 Skills in you skilltree #
# The biggst x-ccordinate you should use is: 244 #
# The biggst x-ccordinate you should use is: 300 #
Script
- SkillTree v 1.2 *new(With 4 directions.) (http://paste.pocoo.org/raw/1C2HFeLE7F1kLJHHZISw/)
- SkillTree v 1.1 *new (http://paste.pocoo.org/raw/25jxwDUxOQkPpRKD488r/)
- Bitmap Addon*new (http://paste.pocoo.org/raw/gqy1bX03UGeb8qRxQqz5/)
- SkillTree v1.0 (http://paste.pocoo.org/raw/199388/)
- Bitmap Addon (http://paste.pocoo.org/raw/li41t152WackUA0OPTYA/)
Credit
- Deity
- Bresenham's (draw_line Addon)
Thanks
- I think I have to thanks RO for the idea. :)
Support
I'm active in this forum: http://www.rpgvx.net. Send me a PM or post here to get support.
Known Compatibility Issues
- No known -
Demo
Demo hasnt the newst Version of Script!!!
Demo v1.1 *new (http://dc187.2shared.com/download/12521969/b82912d9/Skilltree_v10_-__engl_.rar?tsid=20100413-092000-70dbb3f6) (2shared)
Demo v1.1 *new (http://www.mediafire.com/?qhgmqwjnxmz) (Mediafire)
Demo v1.0 (http://www.mediafire.com/?njz2gzxlijn)
Author's Notes
If the script will find an user I would like to see my name in the credits. If you use this script and your SkillTree is ready you should maybe show the other members the result so they become impressed. ^^
Sorry for my english if it's impossible to understand it just let me know.
Bye
Deity
Wonderful idea Deity. So many people have requested this, and the layout is very pretty.
OMG. I LOVE YOU.
WILL YOU MARRY ME?
I've been looking for something like this, as many others have looked, for forever. (Since my first uncompleted game.)
Looks AWESOME. Gonza test it outs now :D
nice script
Thanks for your comments.
It's nice to read such things about the script. :D
I've added an idea for the future:
Quotebetter control with all 4 directions
Maybe it will work soon. ^^
Gonza test it outs now Cheesy
Telll me your results.
QuoteWonderful idea Deity. So many people have requested this, and the layout is very pretty.
Thank you again. :D
Quotenice script
Thanks to you too.
Bye
Deity
Is there a way to change the type of line that connects the icons, instead of that one pixel red/green line? Maybe a thicker, dotted or some other type of line?
Jes for sure.
But if you maybe know it's hard to draw diagonals which doesn't has the 8 directions. :(
Therefore is the Bitmap-Addon and I would be able to make some options for the drawn lines but when I tested a line which was taller (2pxl) the line becomes very ugly. :D
If it's important I will write some options for the lines. ^^
Bye
Deity
One idea for that might be to simply throw this in underneath:
class Bitmap
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Width for Draw Line
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias malg_bmpadon_wideline_8ik2 draw_line
def draw_line (x0, y0, x1, y1, colour, w = 1, *args)
malg_bmpadon_wideline_8ik2 (x0, y0, x1, y1, colour, *args)
if w > 1
draw_line (x0 + 1, y0, x1 + 1, y1, colour, w - 1, *args)
end
end
end
What it does is simply draw the same line to the right of the original line for however many pixels you specify. You may need to modify the x values of your script in order to keep it centred, but the above method shouldn't make the line look too ugly. It is not optimal by any means though.
Your demo has a little error in it though. You use Variable 1 for collecting extra skill points from the girl, but you don't reset it, and for some reason you pass Variable 1 to Scene_SkillTree when talking to the guy, so if you select a number of skill points over the number of actors in the database and then go talk to the guy, you will get an error. That's just an error with the event setup in the demo though, not the script itself.
My version of an taller line is a bit "bigger":
class Bitmap
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Line
# x0, y0 : the coordinates of the start of the line.
# x1, y1 : the coordinates of the end of the line.
#``````````````````````````````````````````````````````````````````````````
# This uses Bresenham's algorithm to draw a line
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_line (x0, y0, x1, y1, colour = font.color,width = 1,height = 1,skip = 0)
# Set boolean for steep lines
steep = (y1 - y0).abs > (x1 - x0).abs
if steep
# Reflect across y=x
tmp = x0
x0, y0 = y0, tmp
tmp = x1
x1, y1 = y1, tmp
end
# If in negative direction
if x0 > x1
# Swap initial points
tmp = x0
x0, x1 = x1, tmp
tmp = y0
y0, y1 = y1, tmp
end
ystep = y0 < y1 ? 1 : -1
deltax = x1 - x0
deltay = (y1 - y0).abs
error = deltax / 2
y = y0
# Advance by Rows
lop = skip * height
for x in x0.to_i...x1.to_i
if lop == skip * height
for w in 0...width
for h in 0...height
steep ? set_pixel (y+h, x+w, colour) : set_pixel (x+w, y+h, colour)
end
end
lop = 0
else
lop += 1
end
error -= deltay
if error < 0
y += ystep
error += deltax
end
end
end
end
But I will test your version for sure!
Your demo has a little error in it though. You use Variable 1 for collecting extra skill points from the girl, but you don't reset it, and for some reason you pass Variable 1 to Scene_SkillTree when talking to the guy, so if you select a number of skill points over the number of actors in the database and then go talk to the guy, you will get an error. That's just an error with the event setup in the demo though, not the script itself.
Jeah I already mentioned this error but I was to lazy to make a new version of the demo. :(
Thanks for report!!
Damn this 4 direction Curssor Move System is harder as I thought. I've already tested 3 Ideas without succes but my newest idea have potential.(I think.)
I hope I will be able to finisch it. :D
I also want to write an <hide> comment which let the skills become hidden as long there conditions are not sufussed.
If I'm allowed to say this. To lvlup in this Forum seems a bit to easy.
12 Posts and lvl 19. xD
As long
Deity
_______
I've made an Update. :D
Happy testing!
That site the download is on is crap.
Can you precise your post? ^^
What ist the "crap"? It doesn't work or you cant find the download? (I've changed it to a direct download.)
But anyway I added a downloadlink from Mediafire.
I thik I won't use the site anymore cause you're not the only one who dislike this page. ^^
Deity
I can find A download, but it goes to some software. The text download link I hover over and some other site like that Microsoft search engine site pops up. Speaking of pop ups, there are quite a few of them.
I think maybe one of the ads just says download. I never found the real download out of 3 links to download on that site.
Ok I understood. :)
I hope it wasnt to worse and you had fun while testing.
Deity
After trying for several times, I never downloaded it and I just found another script to use. I'm sorry, but sometimes that happens. If the store is closed, you buy from another.
Lol, your metaphor is fucking retarded. You're too lazy to read.
If only you had eyes.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi39.tinypic.com%2Fneu5gp.png&hash=7332a0995bf52557d49487c26e51544096372c0a)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi43.tinypic.com%2F123kyft.png&hash=f14f07d85d55f369b4061e0cba33849ad2d09a27)
QuoteI'm sorry, but sometimes that happens. If the store is closed, you buy from another.
I laughed while reading this. :D
Don't understand the last line to offensive.
It is sad hat you even didn't try it out when I reuploaded but it's your decision and I accept your decision. ^^
Deity
At least you laughed, I was kind of fearing that it would be offensive.
Grafikal... that download button was never on 2shared. In fact its not there now. There is a download button at the bottom, but that is an ad. Speaking of ads, uggg I am getting overwhelmed with them at that site.
That was 2 different images, not 1. The first was from 2shared. The second was from MediaFire.
Well, the MediaFire download wasn't up at the time he posted, and 2shared is kind of a gross uploading site :P
In any case, it doesn't make much of a difference. But just so you know Deity, you can also upload script demos to RMRK itself by attaching it to your post under the Additional Options feature.
I knew that MediaFire wasn't up, I just posted the place of both downloads for reference. I agree that 2shared is ugly, however, I still easily found the download link. It was simple enough to read through the page.
:)
true enough
Error: Stack level too deep? ???
I'm sorry but the Demo working fine.
Can you tell me in which line the Error happen?
This error normally hapens if there is any loop with no end but I'm fixing such things imidiently so its just strange. :(
Deity
You have 2 of the same script in your project. Delete one.
I'll check which line...
Oh Xzygon is on the right track. If you have the same Script two time in the same scriptlist it could cause the error,also. Check it ouf maybe it was just a mistake.
Deity
_______________________________________________
EDIT:
I'm just finished a better controll of the cursor with all 4 directions. I hope you'll like it!
Have fun while testing.
Deity
The cursor movement is much more intuitive. Looks great Deity!
great script just one minor question is it possible to make skills unlearnable depending wot direction you go eg
a mage has 2 trees one for offensive and one for defencive. would it be possible to have it so if u choose defencve then u cnt choose from the offencive brance
To call the SkillTree you have to write this in the "Call ..."
what does that mean? :o
ah ok i opened the demo....
i have to unpack the thing because i got an error.
now i know how to open demos, thanks.
(i mean to open it to edit and so on, not the game)
It's like an improvement of Diablo 2's skill tree! :D
EDIT: I finally found a game to use this this in that I think I'll finish! BTW I search skill tree and my reply is how I found this :D
EDIT2:LOL same smily in both posts
one question, does it allow learning of passive skills or only active skills?
(active = skills that we can/have to use ; passive = always active, we don't have to use it -e.g.: Standard Defense Up skill-)
Nvm the question o.O found a script for passives that would go with this well
I having trouble with you skill tree system every time I call the script this pops up.
Script 'Skill Point' line 446: NoMethodError occurred.
undefined method 'learnings'for NilClass:Class
What do I do?
is it possible to set this so you can access the skill-tree from the menu, or do you have to set a call event every time you want to use it?
You could alter your Scene_Menu to include an option for the skill-tree, or better yet, alter Scene_Skill. For example, in the update method of Scene_Skill,if Input.trigger?(Input::X)
$scene = Scene_SkillTree.new(@actor_index)
end
should work, if you're having trouble doing this just ask me to do a rewrite of the class for you.
LE EDIT:: Alternatively, stick this below the skill tree script, but still above main. class Scene_Skill < Scene_Base
alias pac_deity_skltr_updsklselect update_skill_selection
def update_skill_selection
pac_deity_skltr_updsklselect
if Input.trigger(Input::X)
$scene = Scene_SkillTree.new(@actor_index)
end
end
end
Hi! Great, great script! :)
I've included access to the skill tree in my party menu but right now using it only allows you to access the skill tree of the first member in your party. Is there any way I can make it to where once you select the option to access the skill tree, it allows you to choose which character in your party you want to customize?
EDIT: Also, is there a way to add text above a tree? To specify what kind of tree it is? (defense, attack etc,.)
LAST EDIT: Not to keep adding to the problems here (haha) but I get an "comparison of Fixnum with nil failed" error when I go to learn a new ability.
Thankyou Thankyou!! You have no idea how long I've been looking for a script like this, and I cant create my own since I'm still a beginner Scripter.... Wonderful.
I got a question about adding points to use for multiple characters:
Since you can select which actors get points by using 'add_skill_points(party_member_id,points)', I noticed that the actor_id you have to put in is the ID (actor 001) minus 1 from it, so to add points to Actor 1, you put add_skill_points(0,3)
and I thought that was odd.
and
Is there a way where I can gain points after defeating an enemy and only the people in my party get 'X points'?