03-03-2015, 05:00 AM
The typical syntax to add skillpoints that can be spent will either be:
Going by the members within the party...
or
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:
$game_party.actors[actor_index].skillpoints += value
or
Code:
$game_.actors[ID].skillpoints += value
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