Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 MicKo's Skill Tree - Revised
#21
no i get that what I mean is where do I put the zero in this script
$scene = Scene_SkillTree.new( actor_index [, from_map ])
I mean do I write
$scene = Scene_SkillTree.new( actor_index = 0 [, from_map ])
really really sorry to keep being a pain.
Reply }
#22
$scene = Scene_SkillTree.new( actor_index = 0 [, from_map ])

Or

$scene = Scene_SkillTree.new( 0 [, from_map ])

If you haven't already, download the demo and extract the event script from there by simply opening the demo in the rmxp editor and copying thr event used to open it there.
[Image: onBsjEH.jpg]
Reply }
#23
Well, more accurately (assuming you are using it in a menu and not from a map, either:
Code:
$scene = Scene_SkillTree.new( 0 )
or
Code:
skilltree( 0 )

But if you are working with a map event, so your skill tree shows up because you talked to some map NPC, try either:
Code:
$scene = Scene_SkillTree.new( 0, true )
or
Code:
skilltree( 0, true )

The actor_index value indicates which member is selected in your party (0 =the first or party leader, 1 = the second, etc....). You would normally just go with the syntax $scene = Scene_SkillTree.new(@status_window.index) within a menu just as you would $scene = Scene_Skill.new(@status_window.index), assuming you this system to a custom menu ... and seeing how @status_window.index is the actor_index.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }
#24
oh thank god I can finally bring up the skill tree now just one more question if I wanted to make it so the player can only get skill points from items left around the map how would I do that?
Reply }
#25
The typical syntax to add skillpoints that can be spent will either be:
Code:
$game_party.actors[actor_index].skillpoints += value
Going by the members within the party...

or

Code:
$game_.actors[ID].skillpoints += value
If you want to specify the actual actor in your actor database.


Now you're looking to make it so items can bestow skill points? That can be done, but it needed a little work. *COUGH COUGH COUGH* This little script, placed below the Skill Tree system, can actually let you make some items grant skill points to the user or users (if you have the item work on a single actor or the party).

I cranked it out fast, but hey... it works.

Code:
module Item_Points
  POINTS = {}
  
  # THE LIST OF ITEMS
  # =================
    POINTS[33] = 25   # Makes my demo's ITEM #33 (the book) bestow 25 points
  
end


#==============================================================================
# ** Scene_Item
#------------------------------------------------------------------------------
#  This class performs item screen processing.
#==============================================================================

class Scene_Item
  #--------------------------------------------------------------------------
  # * Frame Update (when target window is active)
  #--------------------------------------------------------------------------
  alias skilltree_addon_target update_target
  def update_target
    # Check to make sure enough items...
    @effected = false
    @effected = true if $game_party.item_number(@item.id) > 0
    # Perform the call
    skilltree_addon_target
    # Don't bother unless actually in use and enough items
    return unless Input.trigger?(Input::C)
    return unless @effected
    # If target is all
    if @target_window.index == -1
      for i in $game_party.actors
        i.skillpoints += Item_Points::POINTS[@item.id]
      end
    end    
    # If single target
    if @target_window.index >= 0
      # Apply item use effects to target actor
      target = $game_party.actors[@target_window.index]
      target.skillpoints += Item_Points::POINTS[@item.id]
    end
  end
end
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }
#26
still getting those syntax errors how do I make it so the script add points to character with the actor index=0 in my game I only have the one character which can use the skill tree.
I have been trying.
$game_party.actors[ actor_index = 0].skillpoints += 1
thank again we will get my skill trees working in the end :)
Reply }
#27
When someone describes the syntax of a statement, they include parameter values that are replaced. Even the default scripts work like that. So the 'Game_Actor' initialize method in the default scripts that read:
Code:
def initialize(actor_id)
    super()
    setup(actor_id)
  end
... When you load the 2nd actor, the value of actor_id is set to the value 2. When RPGMaker XP passes the value of 2 into the method 'using' the actor_id value as a placeholder, it treats the method as...
Code:
def initialize(2)
    super()
    setup(2)
  end


So when I said the syntax read as
Code:
$game_party.actors[actor_index].skillpoints += value
.... you replace both the 'actor_index' value with 0 and the value applied.

So if you ONLY want to apply points to the lead party member, use...
Code:
$game_party.actors[0].skillpoints += 4
(where this one is applying 4 points)
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }
#28
THANK YOU THANK YOU this is just what I needed
Reply }
#29
I'm using this script in my game and one of my skilltree has recently reached a 5th row and now the skilltree seems to be buggy.
When calling the script and selecting the skill tree it immediately highlights the last skill in row 5 and will not let me move freely about the skill tree.

It just happens in that skilltree with the 5th row. Everything else works fine.
Reply }
#30
It could be the configured data. *shrugs* You could try creating a totally new skill tree (for another character or something) and do a start-over from scratch... for that tree. See if a fresh re-draw of the tree does the trick, then use it to replace the buggy one.

*Sigh* It's a tendency to have issues and bugs crop up when one must manually configure complex systems. I so wish to make systems with built-in editors that plug away your values so it is error free. It is my dream... Ahh... one day....

EDIT: Should see a skill tree a friend made. It would drive the poor guys at SquareEnix insane... looks like the goofball ring thing from Final Fantasy X.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Skill Item Kost ACE kyonides 0 337 01-03-2024, 12:07 AM
Last Post: kyonides
   Skill Roulette kyonides 0 580 06-16-2023, 07:10 AM
Last Post: kyonides
   Fast Skill Grouping DerVVulfman 3 3,802 06-12-2023, 05:28 PM
Last Post: DerVVulfman
   DoubleX RMMV Skill Hotkeys DoubleX 2 5,141 02-13-2021, 04:59 AM
Last Post: DoubleX
   DoubleX RMMZ Skill Item Cooldown DoubleX 4 5,066 02-07-2021, 04:11 PM
Last Post: DoubleX
   DoubleX RMMZ Skill Item Triggers DoubleX 3 4,626 12-26-2020, 04:00 PM
Last Post: DoubleX
   DoubleX RMMV Skill Hotkeys Compatibility DoubleX 0 2,769 09-06-2019, 09:56 AM
Last Post: DoubleX
   Skill Casting Delay DerVVulfman 1 10,344 11-20-2018, 05:38 AM
Last Post: DerVVulfman
   MicKo's Skill Tree DerVVulfman 48 83,489 11-08-2016, 08:04 PM
Last Post: DerVVulfman
   Skill Success Fix Taylor 0 4,657 03-23-2015, 12:15 PM
Last Post: Taylor



Users browsing this thread: