Save-Point

Full Version: Save-Point
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Board Message
Sorry, you do not have permission to access this resource.
Save-Point - Problems with the script Micko's Skill Tree

Save-Point

Full Version: Problems with the script Micko's Skill Tree
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Greetings!

I'm having problems with the script Micko's Skill Tree.
From what I understand, this problem appears when you try to add someone to the group.

Here's the script.

Skill Tree Thread


When trying to use the 'Change Group', the error appears:
Content Hidden

I do not know what to do ...
I'm testing the demo itself, so there is no incompatibility.

Bonus Problem:
If it is not asking too much, there is something else wrong in the script that had been bothering me.
In lines 293-315, there is a part of the customization like this:

Code:
# == SHOW ALL RANKS ==
# If this value is set to false, skills with only 1 rank (default) will
# not show their 1/1 ranking. All others will show. But if set to true,
# every skill will show their rank
#
RANK_SHOW_ALL = false


# == SHOW ALL INFO ==
# If this value is set to false, the information window will not be visible
# if the player highlights an unavailable skill. But if set to true, every
# skill will show the information screen.
#
INFO_SHOW_ALL = false


# == SHOW ALL TREE FEATURES
# If this value is set to false, skills that are not available will not
# show arrows directed to them, nor will they show the skill's rank. All
# others will show. But if set to true, every skill will show their rank
# unless other switches have been used.
#
SHOW_ALL_TREE = true

When I set INFO_SHOW_ALL = false As written above, nothing happens and it's like I had put true. That is, even if the information appears to be unavaliable skill for the character. But when I set INFO_SHOW_ALL = false and SHOW_ALL_TREE = false then the first (INFO_SHOW_ALL) is finally considered false. This has forced me to keep SHOW_ALL_TREE = false and I do not want it.

Thank you in advance.
Sorry for my bad English.


NOTE: NO MATTER WHAT I DO, THE POST IS SO I UNFORMATTED SHIPPING, BUT IS RIGHT IN PREVIEW!

I can send the doubt attached as a .docx or .txt if needed.
Well, your primary issue is that you are confusing actor ID with actor_index
Code:
#  SCRIPT CALL
#
#  $scene = Scene_SkillTree.new(actor_index, from_map)
#
#  actor_index    This is the index value of the actor in your party, not in
#                 your actor's database.  Thus an actor_index of 0 would set
#                 the system to display your party leader.  Default = 0
The actor_index is based on who you have in your current party, with a value of '0' being the party leader (typically Aluxes), and a value of '1' being the second party member. A value of '2' would be the third member in your party and is usually 'Gloria' and not 'Cyrus'.

Had it been going by actor_id, then you would be going based off the order of the actors in the Actor Database..... but it's not. That is where your confusion originates, and what caused the error. Looked into too....

Insofar as the second dilemma, look at line 2012:
Originally it read unless SkillTree::SHOW_ALL_TREE || SkillTree::INFO_SHOW_ALL
and change it to unless SkillTree::INFO_SHOW_ALL

Oh, and look into the CODE bbcode to paste scripts. Winking
Mr. DerVVulfman,

The second question was answered perfectly, and the error disappeared. Thanks for that.
Already the first question, well, I knew actor_index was referring to the group's current character, not the database, as it was very well explained in the Demo.
What happens is that, when trying to add or remove characters to the group - without using script commands to call or anything - this error appears. This occurs even in tests Battle at database.

Seizing the opportunity, two new questions:
1st. Can I remove the visualization of the 'ranks'? If the player tries to choose the skill with her ​​rank is improved, if not possible more improved or if she does not have ranks, a characteristic sound occurs - as is the script. Just want to get the numeric display 'x / x' screen.
2nd. How can I use the 'call script' by an Actor Id? In my game, the order of the characters of the group changes constantly. It's really not feasible to use actor_index (I planned that only the leader had a Skill Tree, if impossible).

Thanks in advance, and sorry for the bad English.
One of the caveats about this system is that you need to have a skill tree available for every actor in your active party. This means that if you have 4 members in your party, you need to have skill trees for all 4 members. Sure, you may have a roster of 8 in your actor database.... but if you want to add a member to your existing party, that member must have a skill tree ready for him too. To be safe, make a tree for every member in your actor's database.

I started off a new game with just Aluxes in my party and setting that event hopping around to just read the lead actor's skill tree.
$scene = Scene_SkillTree.new(0, true)
Along with that, I made another event that added Basil to the party. Whether I added Basil to my party before or after checking my skill tree, the system worked. Even if I checked the 'initialize' flag in the 'add party member' command.


Regarding how to get it to read your 'actor' rather than party member.... it only reads if the person is in your party.
To determine the actor_index of an individual actor in the party, use this
Code:
def get_mah_partymember(my_id)
  result = nil
  for actor in $game_party.actors
    result = actor.index if actor.id == my_id
  end
  return result
end
This will return the actor_index in the party, or return a value of 'nil' if the actor is not present.
Thanks Mr. DerVVulfman!
I have not tried creating a Skill Tree for each member, but I'm sure it will work.

As part of Actor_Index see my problem: I have fixed a leader, and a group of 3 (or more) characters that change all the time, the player's control. So I will not be sure who the Actor_Index 2, for example, when the player access the Skill Tree. I may want to open any NPC Skill Tree Cyrus (his master, or whatever). So I need a command to open the Skill Tree Cyrus - or, if it is not on the team, show a message.
I could send a check condition if Cyrus is on the team and not show the message, but if yes, how can I call the Skill Tree him specifically?

And the second question: How can I NOT show has a skill ranks?
Look at line 1587 on down. It should look like this:
Code:
def refresh
    self.contents.clear
    draw_skill_icon
    draw_skill_name
    draw_skill_currank
    draw_skill_currank_desc
    draw_skill_points_needed
    draw_skill_pointsintree_needed if $data_skills[@skill_id].spentpoints_needed > 0
    draw_required_skills
    draw_unavailable
  end

You just need to comment out line 1561 like this
Code:
def refresh
    self.contents.clear
    draw_skill_icon
    draw_skill_name
#   draw_skill_currank
    draw_skill_currank_desc
    draw_skill_points_needed
    draw_skill_pointsintree_needed if $data_skills[@skill_id].spentpoints_needed > 0
    draw_required_skills
    draw_unavailable
  end
And that removes the thing that says 'Current Rank: 4' in the window.

Meanwhile, you know the basic statement used is designed so it can be put into your main menu, right? Think how the SKILL menu works in the main menu.... you hit SKILL, then you bring up a window asking which actor is using a skill. You can insert the Skill Tree system into your main menu to work the very same way so you can choose to look at the tree of any actor in your party. Such changes would be in your update_command and update_status methods along with adding a new option to your menu.

You may find some fun in tinkering with the menu system if you're new to scripting and would like to have the Skill Tree there. Kind of a learning exercise.... the new edits should look like the ones that handle the Skills.

Just in case... $scene = Scene_SkillTree.new(0, true) looks to the lead actor (if in the field map) and you can switch between actors with the [Q] and [W] keys.