[RMXP] Doing a SkillTree system and having an issue with Sprites...

I'm basically doing this Skill Tree system, which permits actors to learn their skills from multiple skill trees and level them up, and whatnot. But I'm not so experienced in the fields of scripting and having some trouble with Sprites.

screenshot.jpg

Here's a screenshot of how it looks. The core mechanics of the skill tree drawing and operation is almost done. The only thing I'm really unsure is how will I draw the arrows that show skill requirements. The arrows tend to vary in angle and size, and they must look good, or be able to look good with some custom sprites.

a_body.png a_header.png a_tail.png

I've done those 16x16 "tiles" of arrows, so they can be combined (and customized later) to form arrows of any size and... rotated... to any direction. But I wonder how the Sprite rotation works and how will that look...

screenshot2.png

For the moment I made this placeholder draw_arrow method, but right now it only does crazy stuff (already showing some of the intended logic, but since I don't know what is best, I don't know if I should keep on with the method)... Just un-comment the test lines and you'll see.

Is there a good way to make those multi-directional, multi-length arrows?

Skill Tree Demo.zip
More likely than not, this seems like a hard-code fix, but there are ways you could work around it.  Would it be worth the time?  Maybe, maybe not.  Hard to say.

You could just draw mathematical lines, with elbows for directions, using a function to determine the positions of which skills are required.

You can then begin to design arrows that fit the same functionality, with a more practical time-slot once you complete a line.

Would either take a long time, or a short time, depending how much work needs to be done, and how well you can maths.

Good luck.
Thanks for the suggestions. I thought about drawing manually with maths and stuff the arrows, but that would look kinda rough and wouldn't allow an easy customization. So I went for the rotated sprites.

This system is done, actually. I'm posting the updated demo while I prepare it to be posted in the script section.

skilltree.jpg

There are some seams visible at the arrows, but the result looks ok to me 😛 ... and removing the opacity and with a different sprite, it would overlay the tiles one on top of another and the seams wouldn't appear as those.

Skill Tree Demo.zip

Original thread: https://forums.rpgmakerweb.com/threads/rmxp-doing-a-skilltree-system-and-having-an-issue-with-sprites.43340/