Lune Unlimited Skill Tree

Raizen

Veteran
Veteran
Joined
Oct 24, 2012
Messages
381
Reaction score
660
First Language
Portuguese
Primarily Uses
RMMV
Awesome script. I have a question for you. How would you change it so a point isn't added every level?

I think it's this section of the script:

  #--------------------------------------------------------------------------

  # * Level increase

  #--------------------------------------------------------------------------

  def level_up

    lune_sk_level_up

    @skill_tree[0] += 1 if Lune_Skill_Tree::Add_Skill_pt

  end

end

I just don't know how to modify this to make it different. Like can it be changed to every other level? Every 5 levels? How can this be done?
Yeah xD, your in the right part of the script.you can make it like this.

  #--------------------------------------------------------------------------  # * Level increase  #--------------------------------------------------------------------------  def level_up    lune_sk_level_up    @skill_tree[0] += 1 if Lune_Skill_Tree::Add_Skill_pt && @level % 5 == 0  endend@level is the variable that has that actor current level, and % is an operator of rest, basically14 % 5 equals 4, so to make every five level you can use @level % 5 == 0 ( you can change the 0 to 0-4, depending on what level you want the skill point, == 0 means every number divisible by 5: 5, 10, 15... if it was == 3 for example it would be: 3, 8, 13...)
 
Last edited by a moderator:

Zero0018

Apprentice
Member
Joined
Dec 24, 2014
Messages
133
Reaction score
1
First Language
English
Primarily Uses
Oh ok awesome, thank you! Have you tried making this work for multiple heroes? When I setup a separate section for another actor number, I get the same picture for them all.

Actor[1][0] = {

# Images of the skill trees, put as many as wanted

# if you do not wish to have images, put '' on the name place

'Tree_Images' => ['', ''],

# Position of the cursors that change between the trees.

'Tree_Shift' => [[400, 50], [400, 80]],

}

 

I've tried leaving the field blank with the ' symbol and tried completely changing the names of the files in the folder. I tried changing the script the way Osaed suggested in a post, but the game crashes with an error.
 
Last edited by a moderator:

Raizen

Veteran
Veteran
Joined
Oct 24, 2012
Messages
381
Reaction score
660
First Language
Portuguese
Primarily Uses
RMMV
It should work.. doesn't o_o?, if you can send me a demo or something kk, I made it to work for many characters as you want xD.
 

Zero0018

Apprentice
Member
Joined
Dec 24, 2014
Messages
133
Reaction score
1
First Language
English
Primarily Uses
Maybe it's conflicting with another script. I'll fiddle some more.
 

GundorfTheBlu

Villager
Member
Joined
Mar 24, 2015
Messages
5
Reaction score
1
First Language
English
Primarily Uses
RMMV
More in specific, in this case I removed every skill in the tree except for the first, plus I removed 'Tree_Images' and 'Tree_Shift' for the second tree (so this is how you remove trees?) anyway, I've also set near skills to 0 and when I test the skill tree, if I try to move from the skill in the tree it gives me an error:

Script "Skill Tree" line 520: TypeError occured

no implicit conversion from nil to integer

and this is the line 520

    draw_text(0, 0, self.width, line_height, Actor[actor_id][skill]['Desc1'], 0)
Hey there, I'm having the same problem as LarryRiver here and was wondering if you ever came up with a solution to this. I've modified the script just a bit and have been having some trouble trying to figure this out, and this script is awesome so far.
 

bwr1123

Warper
Member
Joined
Jan 3, 2015
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Everytime I try to run my game with this script, I get this error:

Script 'Skill Tree' line 78: NoMethodError occurred.

undefined method `[][= ' for nil:NilClass
 

Raizen

Veteran
Veteran
Joined
Oct 24, 2012
Messages
381
Reaction score
660
First Language
Portuguese
Primarily Uses
RMMV
Everytime I try to run my game with this script, I get this error:


Script 'Skill Tree' line 78: NoMethodError occurred.


undefined method `[][= ' for nil:NilClass
That line is still on configuration settings, checkout the original line 78 x)
Actor[8][0] = {


It should be something like that, maybe yours is like this...


Actor[8][ = {

Hey there, I'm having the same problem as LarryRiver here and was wondering if you ever came up with a solution to this. I've modified the script just a bit and have been having some trouble trying to figure this out, and this script is awesome so far.
I was kind of off these days, I'll try to check that out as soon as I can x).
 
Last edited by a moderator:

bwr1123

Warper
Member
Joined
Jan 3, 2015
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Thanks for the reply, Raizen.

Unfortunately, now it's giving me a different error. Same line in the script (line 78), but now it's telling me "undefined method `[]= ' for nil:NilClass". I'm not one to work with script code and all that jazz, but maybe another one of my scripts is interfering with it?
 

Raizen

Veteran
Veteran
Joined
Oct 24, 2012
Messages
381
Reaction score
660
First Language
Portuguese
Primarily Uses
RMMV
Nah, its not another script, it is configuration, get the script again, maybe something has been changed.
 

bwr1123

Warper
Member
Joined
Jan 3, 2015
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Well, not sure how it worked, but for some reason, changing all of the Actor[8][#] to Actor [0][#], and then deleting a small section starting at line 497 seemed to do it.

Thanks anyhow, though! II hope to put this script to good use. :D
 

GundorfTheBlu

Villager
Member
Joined
Mar 24, 2015
Messages
5
Reaction score
1
First Language
English
Primarily Uses
RMMV
I solved my problem by rearranging how I had my skills and trees being set up, but now I am struck with another problem. I'm having some skills used in events and there can be different choices based on the skills level but I am a bit unsure how to check the level of a skill even after toying around with it a bit myself. For example: Actor 1 has a point in bartering, this would allow him to get a 5% discount on items in a shop. The more he has though, the better discount he could be getting. Skill level checks are also planned for other events in my game but I am still a bit confused as to how to check for them.
 

Raizen

Veteran
Veteran
Joined
Oct 24, 2012
Messages
381
Reaction score
660
First Language
Portuguese
Primarily Uses
RMMV
I solved my problem by rearranging how I had my skills and trees being set up, but now I am struck with another problem. I'm having some skills used in events and there can be different choices based on the skills level but I am a bit unsure how to check the level of a skill even after toying around with it a bit myself. For example: Actor 1 has a point in bartering, this would allow him to get a 5% discount on items in a shop. The more he has though, the better discount he could be getting. Skill level checks are also planned for other events in my game but I am still a bit confused as to how to check for them.
Well I didn't put it directly on the script, I'll put a snippet here for you x), this will return the value in number of the skill level, this way you can event things out of skill levels.

Code:
# Snippet for Lune Unlimited skill tree, # get_skill_level(actor_id, skill_id)# Put it on script calls, it will return the level of a certain skill id(from database)# based on the actor_id.class Game_Interpreter  def get_skill_level(actor_id, skill_id)    $game_actors[actor_id].skill_tree[0]  endend~
 
Last edited by a moderator:

GundorfTheBlu

Villager
Member
Joined
Mar 24, 2015
Messages
5
Reaction score
1
First Language
English
Primarily Uses
RMMV
Well I didn't put it directly on the script, I'll put a snippet here for you x), this will return the value in number of the skill level, this way you can event things out of skill levels.

# Snippet for Lune Unlimited skill tree, # get_skill_level(actor_id, skill_id)# Put it on script calls, it will return the level of a certain skill id(from database)# based on the actor_id.class Game_Interpreter def get_skill_level(actor_id, skill_id) $game_actors[actor_id].skill_tree[0] endend~
Thank you very much! I got it working, I just had to set 

$game_actors[actor_id].skill_tree[0]

to

$game_actors[actor_id].skill_tree[skill_id]

Now things can really get moving along  :D
 

CatQuest57

Warper
Member
Joined
Apr 26, 2015
Messages
1
Reaction score
0
First Language
English
Primarily Uses
Hi Raizen,

I've been playing around with this script for about a week now and I seem to have everything working except for one very large issue...

Only the Skill Tree for my last Actor shows up (who is actor 9 in the database).

I have the first Actor (actor 8 in the database) set up the same way, except with obviously different skills and then different background images. I have 4 actors, each of which has 2 trees each. But it seems I can only access one of the Actor's set of trees. Even if I have to use a separate scene to open each actor's trees, that is fine. But as of right now I just don't know what to do. Looking for help :/

Am I missing something here?
 

meoneko

Warper
Member
Joined
May 8, 2015
Messages
1
Reaction score
0
Primarily Uses
Hello raizen, I love this script but I'm a little lost on axis positioning? Is there anyway you could.provide instruction on how to positions skills on the tree?
 

Chemist

Warper
Member
Joined
May 17, 2015
Messages
4
Reaction score
1
First Language
Portuguese
Primarily Uses
I'm having problems on making skill trees for more than on heroes. The skills are conflicting, the first skill of one hero is being replaced by the first one of another hero. How can i solve this?
 

Raizen

Veteran
Veteran
Joined
Oct 24, 2012
Messages
381
Reaction score
660
First Language
Portuguese
Primarily Uses
RMMV
Hello raizen, I love this script but I'm a little lost on axis positioning? Is there anyway you could.provide instruction on how to positions skills on the tree?
Oh.. that is kind of a programming position D:
like this...


[0,0] [0,1] [0,2]


[1,0] [1,1] [1,2]


[2,0].....


I think you know that, but is having problem to find where to position xD... There are some scripts which help to show what position is on the screen, and photoshop also allows that if I am right, but I don't know how can I help you with that.

I'm having problems on making skill trees for more than on heroes. The skills are conflicting, the first skill of one hero is being replaced by the first one of another hero. How can i solve this?
well... that shoudn't happen, you changed the id of the actors?
 

Chemist

Warper
Member
Joined
May 17, 2015
Messages
4
Reaction score
1
First Language
Portuguese
Primarily Uses
I already solved, thanks. But i have one doubt, how can i start the game with a skill already leveled on level 1? My game will start direct on a battle.
 

Raizen

Veteran
Veteran
Joined
Oct 24, 2012
Messages
381
Reaction score
660
First Language
Portuguese
Primarily Uses
RMMV
Use this, I should've put that on the script already xD

Put that below the script, and 

Script Call: add_tree_skills(actor_id, points, skill_id)

that will give certain skills the points you want :D , or should...
 

Code:
#==============================================================================# ** Game_Interpreter#------------------------------------------------------------------------------# Um interpretador para executar os comandos de evento. Esta classe é usada# internamente pelas classes Game_Map, Game_Troop e Game_Event.#==============================================================================class Game_Interpreter#--------------------------------------------------------------------------# * Adicionar pontos para o personagem#--------------------------------------------------------------------------def add_tree_skills(actor_id, points, skill_id)$game_actors[actor_id].skill_tree[skill_id] += pointsendend
 

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
- Post removed -

Forget about that stuff, I found a workaround.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 3)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,015
Members
137,563
Latest member
MinyakaAeon
Top