RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Learn Skills By Use 2.0

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 75
RMRK Junior
I was wondering the same thing as jdillon88. Is it possible for you to edit the script so you learn the skill after battle, instead of at a level up?

Also, I am using Modern Algebra's Skill Teaching Equipment & Items Version 2.0b. I am trying to make it possible for weapons to teach skills when equipped and permanently learned after X amount of skill uses. I am trying to pair both the Skill Teaching Equipment script with the Learn Skills by Use script to achieve this. Is this the best way to do this?

Any advice would be appreciated.

**
Rep: +0/-0Level 75
RMRK Junior
*BUMP*

If this is impossible, just let me know. LOL. Thanks!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
No, it's not impossible - are you using default battle system?

**
Rep: +0/-0Level 75
RMRK Junior
I am using Tankentai Sideview Battle System 3.4d & ATB 1.1i. I have done a little MOD-ing to the script but, for the most part, it is the same as it was intended by its creators (great script, by the way). Let me know if my requests are compatible. I hope they are! LOL. Thanks for responding to this post, Modern Algebra!

**
Rep: +0/-0Level 75
RMRK Junior
I think you don't really need a script if you want to get a skill after a battle you can set conditions for it using an event unless you want to learn skills for every battle.

**
Rep: +0/-0Level 75
RMRK Junior
Preferably, I would like to learn skills after every battle. I can't wait until level up to learn a skill later in the game. It would even be cool if right when you met the requirement for the skill uses, you would learn it (in the midst of battle). Just an idea but after each battle would be awesome. Thanks for any help.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Well, I can do it, but it'll require Zeriab's Dialog System

**
Rep: +0/-0Level 75
RMRK Junior
Done. Got it archived. Just tell me what I need to do and I will do it. Thank you very much for the time you are putting into this.

**
Rep: +0/-0Level 75
RMRK Junior
Just checking on the status of this request. I know you are busy MA  :)

Also, I am using your "Show Skill Count in Help Window" script. Right now it displays:

Used: X amount of times

Is there a way to make it display:

Used: X amount of times / X amount of times to master (ex. 4/15)

And then after you master the skill, it would display:

MASTERED

Just an idea...hehe. Thanks!
« Last Edit: September 07, 2010, 01:51:35 AM by camelmenow »

**
Rep: +0/-0Level 75
RMRK Junior
Bump. Please and thank you. Let me now if there is anything I can do to help :)

***
Rep:
Level 76
~Crazy Lazy Workaholic~
camelmenow has nice taste I think. it would be a nice option if you could have a string that could be input into the menu information upon Completion. it could be "MASTERED" or "MAX" or "FULL" or whatever someone wants. And knowing how far until the next level is also a nice features :3

~My Projects~

~ VocaloidVX ~ Second Life Project ~
~ RPG Maker Collective ~
To support this forum, it's the first place that will gets posted some updates of mine, check it out ^_~

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
I don't know; I don't really like the idea as it unnecessarily limits the script. It would really only make sense when skills are built linearly. This script allows for multiple skills to contribute to the same path, among other things. For most people who use the script, the "mastery" could make no effectual difference if the next level of the skill, for instance, required another skill. Secondly, what would deem the upper limit of "mastery" if the skill itself could potentially contribute to two new skills, each requiring a different number of uses. What about for skills that do not lead to another skill? Would they be "mastered" as soon as you learn them or would there be some artificial limit.

As a player, I would prefer to not see how many times I needed to use a skill in any case.

I don't know, I'll probably add it since it won't be that hard with the changes I am making to it already, but it will only be a useful feature in very limited applications of this script.

**
Rep: +0/-0Level 75
RMRK Junior
Well, for my project, I have it set up (or would like to have it set up) so weapons have skills attached to them and those skill are mastered after a certain amount of uses. I don't have any skills leading to another skill. I have been experimenting with a view different scripts. I like the ease of this one best. However, I do like the KGC skill mastery script. I just don't like the way it distributes the TP per battle. You don't have to even use the skill to master it. What sense does that make? LOL.

A lot of these requests vary depending on the project. I applaud Modern Algebra for being so congenial.

***
Rep:
Level 76
~Crazy Lazy Workaholic~
You may be into the Remodel MA's looking into for me which is Level Skills By Use then. Since those finer details would count for something there.

~My Projects~

~ VocaloidVX ~ Second Life Project ~
~ RPG Maker Collective ~
To support this forum, it's the first place that will gets posted some updates of mine, check it out ^_~

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Updated to version 2.0. It now has the option of teaching the skill immediately upon meeting usage requirements (rather than waiting for level up) and the show skill use addon was integrated into the actual script. I also included the mastery option that was requested. Tell me if anything goes wrong.

**
Rep: +0/-0Level 75
RMRK Junior
HOLY SCH-NIKES! INCREDIBLE! I have been battle testing for a little while now and everything is working great! I will report any bugs/problems if I find any. Thank you so much for tackling this request and doing a top-notch job.

*
Rep: +0/-0Level 74
RMRK Junior
Hello, thankyou for this amazing script!!

However, I have found a major flaw in this script...
For some odd reason the dialogue
"ACTOR has learned NEW SKILL" keeps reaapearing even after the new skill is learned.

This is what I am seeing:
Ralph has skill "Double Strike". In order for him to learn "Triple Strike" he must do this skill twice,
in the note section of Double Strike is as follows : "\ROOT_SKILL[1, 2]"
After Ralph has done Double Strike twice, a message pops up saying that he has learned
"Triple Strike" and it functions fine up until this point.
However, when Ralph decides to do Double Strike again, the same message saying that
he has learned "Triple Strike" keeps reaapearing. This effect is not unique to this battle
and the message keeps reaapearing everytime "Double Strike" is used.

I have opened up a new clean project with only this script and the dialogue system and
the same thing keeps happening. I have not modded any of the preexisting script that
comes with the new project.

I'm hoping it's not some mistake I'm making...
Let me know if you need more information or if I was unclear in my explanation.
Thanks!!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Nah, that's almost certainly my fault. I will fix it immediately.

EDIT:: You can now get the fixed script from the first post.
« Last Edit: October 29, 2010, 11:36:43 AM by Robot Unicorn »

*
Rep: +0/-0Level 74
RMRK Junior
Thanks for the quick fix!
It works perfectly!

***
Rep:
Level 82
The game keeps finding this line as an error:
LSU_SHOWCOUNT_ALIGN = 0 # Alignment of text if LSU_BUTTONSHOW is true

I have checked the Zeriab bolean to false. Do I still need Zeriab's dialog?

Oh and thanks for making all of these great scripts!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
That doesn't really make sense for there to be an error there, and no you don't need the Dialog script if you aren't using it. Copy all that configuration stuff you have in your project and paste it in a codebox for me to look at. It's probably a syntax mistake.

***
Rep:
Level 82
Uh boy codeboxes:

I have it in a blank new project too and it still doesn't work:

Code: [Select]
#==============================================================================
# Learn Skills By Use
# Version: 2.0b
# Author: modern algebra (rmrk.net)
# Date: October 29, 2010
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# NB: If you wish to use the learn immediately option of the script, then
# Zeriab's Dialog System is required and he should be credited. You can find
# it here: http://rmrk.net/index.php/topic,24828.0.html
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Description:
#
# This script allows you to have actors learn skills by using other skills.
# For instance, you could set it so that an actor will learn Fire II only
# after he has used Fire 50 times. You can also set it so that there can be
# multiple paths to learning a skill and multiple skill requirements. For
# instance, that same actor could also learn Fire II if he has used Flame
# 60 times and Flame II 25 times. However, you can also set class
# prohibitions and level requirements, so if you never want a Paladin to
# learn Fire II no matter how many times he uses its root skills, then it is
# easy to set that up, and if you don't want Fire II to be learned by any
# actor until they are at least level 7, then that can be setup too. You may
# also set it up so that it is like an upgrade - Fire becomes obsolete once
# Fire II is learned, and so you can simply forget Fire once you have Fire II
# It also has two options of ways to show the number of times you've used a
# skill.
#
# Also, you can set it so that the actor either learns the new skill
# immediately upon meeting use requirements, or at his/her next level.
#
# Further, this doesn't interfere with the regular skill learning system, so
# if you set it that a mage will learn Fire II at level 6 in the Class Tab
# of the database, than the mage will learn Fire II at level 6 no matter if
# she has met the use requirements of its root skills, and no matter what
# the class prohibitions or level requirements are.
#
# There are also a number of options you can set regarding how to show the
# number of uses in the help window, and you can do it by either pressing a
# button or it will show up at the same time as the description. There is
# also a new set of mastery options.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Instructions:
#
# Place this script above Main and below Materials in the Editor. It should
# also be below any custom levelup scripts you may have. If set to learn
# immediately, then Zeriab's Dialog System is required above this script:
# http://rmrk.net/index.php/topic,24828.0.html
#
# To set up a skill to be learned through use, you must use this code in a
# notes box:
#
# \ROOT_SKILL[skill_id, number_of_uses, <supplement_skills>, forget]
# skill_id : The ID of the root skill that leads to this skill.
# number_of_uses : An integer - the number of times the root skill has
# be used before it teaches this skill.
# <supplement_skills> : a list of skill IDs that also have to have their
# root requirements fulfilled before the skill will be learned. It is
# of the format: <x, y, z> where x, y, and z are the IDs of the other
# skills that must have usage requirements met. You can have as many
# as you like. Note, however, that you must set up one of these
# requirements notes for each of the other skills as well, and you
# must cross-reference the skills in this path. Defaults to <>,
# meaning that the only usage requirements needed to be filled is this
# one
# forget : If this is set to 1, then the root skills will be forgotten
# once this skill is learned. If left blank or set to any other digit,
# than the root skills will be retained.
#
# EXAMPLE A:
#
# This code in the notebox of a skill:
#
# \ROOT_SKILL[9, 100]
#
# There is only one path to learning this skill:
# (i) Use the skill with ID 9 at least 100 times.
#
# No skill is forgotten
#
# EXAMPLE B:
#
# These codes in the notebox of a skill:
#
# \ROOT_SKILL[1, 20, 1]
# \ROOT_SKILL[4, 15, <5>]
# \ROOT_SKILL[5, 8, <4>]
#
# With these codes, there are two paths to learning this skill.
# (i) Use the skill with ID 1 at least 20 times.
# (ii) Use the skill with ID 4 at least 15 times and use the skill with
# ID 5 at least 8 times.
#
# No matter which path is taken to the skill, the skill with ID 1 will be
# forgotten as soon as the new skill is learned.
#
# EXAMPLE C:
#
# The following codes in the notebox of a skill:
#
# \ROOT_SKILL[6, 100]
# \ROOT_SKILL[7, 100]
# \ROOT_SKILL[6, 20, <7, 8>]
# \ROOT_SKILL[7, 25, <6, 8>]
# \ROOT_SKILL[8, 15, <6, 7>]
#
# With these codes, there are three paths to learning this skill.
# (i) Use the skill with ID 6 at least 100 times
# (ii) Use the skill with ID 7 at least 100 times
# (iii) Use the skill with ID 6 at least 20 times, the skill with ID 7 at
# least 25 times, and the skill with ID 8 at least 15 times.
#
# No matter which path is taken, no skills will be forgotten.
#
# To prohibit a class from learning a skill through usage requirements,
# put this code in a notebox of a skill:
#
# \PROHIBIT_CLASS[class_id]
# class_id : ID of class not allowed to learn this skill through use
#
# To set a minimum level for learning a skill through usage requirements,
# put this code in the notebox of a skill:
#
# \MIN_LEVEL[x]
# x : an integer that is the minimum level. An actor cannot learn
# the skill until his level is at least equal to x.

# Next, you may want to setup if and how the use count is displayed. To, set the text that you
# want to signify the count under LSU_VOCAB_USECOUNT at line 159, and you can
# set the color of the text at line 165 - LSU_COUNT_FONTCOLOR. If this is an
# integer, it takes the color from the windowskin palette. You could also set
# it as an array of the form: [red, green, blue, alpha].
# Alternatively, you could set it up to only show the skill count if the
# player presses a specified button. You would not get to choose the color in
# that case, but would get to specify alignment.
#
# Lastly, there is now an option to show "Mastery". You can specify a number
# of uses to meet this threshold. When showing use count, it will show up as
# # of uses / mastery threshold, and once reached, it will be replaced by any
# text you choose. Those options are between lines 162 and 168. To set the
# threshold for a skill individually, use the following code:
# \MASTER[x]
# x : the number of uses to reach mastery.
#==============================================================================

#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
# EDITABLE REGION
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LSU_LEARN_IMMEDIATELY = false # Whether to learn the skill immediately upon
# meeting usage requirements or to wait for level
# If true, you MUST have Zeriab's Dialog System:
# http://rmrk.net/index.php/topic,24828.0.html
LSU_VOCAB_OBTAIN_SKILL = "%n has learned %s!" # The message shown when an actor
# learns a new skill if immediate and not on level
LSU_SE_OBTAIN_SKILL = "Skill" # The SE that plays when an actor learns a new
# skill. Again, only applies if on immediate.
#``````````````````````````````````````````````````````````````````````````````
LSU_SHOW_USE = true # Whether or not to show use count at all in the
# the help window.
LSU_VOCAB_USECOUNT = "Used: " # Text to label skill count
LSU_BUTTONSHOW = false # Whether or not it shows up with the description
# or is drawn only when pressing a button
LSU_BUTTON = Input::SHIFT # If LSU_BUTTONSHOW is true, what button needs to
# be pressed to show the skill use count
LSU_SHOWCOUNT_ALIGN = 0 # Alignment of text if LSU_BUTTONSHOW is true
LSU_COUNT_FONTCOLOR = 16 # Font color if LSU_BUTTONSHOW is false
#``````````````````````````````````````````````````````````````````````````````
LSU_SHOW_MASTERY = false # Whether or not to show some the word for mastery
# when a script has been used to its maximum
# efficiency or to a stated goal.
LSU_DEFAULT_MASTERY = 100 # The default number of uses for mastery
LSU_VOCAB_MASTERY = "[MASTERED]" # The word to show once skill use reaches goal
LSU_MASTER_REPLACE = true # Whether to replace the Used: x text or simply be
# placed after it.
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# END EDITABLE REGION
#//////////////////////////////////////////////////////////////////////////////

if LSU_LEARN_IMMEDIATELY
#==============================================================================
# ** Dialog_DiscoverFavourite
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# This class processes when a favourite item is discovered
#==============================================================================

class Dialog_LearnSkill < Dialog
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * A show method
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def initialize(actor, skill)
@actor = actor
@skill = skill
begin
(RPG::SE.new (*skill.ma_learn_se)).play
rescue
(RPG::SE.new ("Skill")).play
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Create the windows
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def main_window
text = help_text
tw = [@background_sprite.bitmap.text_size (text).width + 40, Graphics.width].min
@learn_window = Window_Help.new
@learn_window.width = tw
@learn_window.create_contents
@learn_window.x = (Graphics.width - tw) / 2
@learn_window.y = (Graphics.height - @learn_window.height) / 2
@learn_window.z = STARTING_Z_VALUE + 1
@learn_window.set_text (text, 1)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Help Text
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def help_text
text = LSU_VOCAB_OBTAIN_SKILL.gsub (/%s/) { @skill.name }
text.gsub! (/%n/) { @actor.name }
return text
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Dispose the windows
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def main_dispose
@learn_window.dispose
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Frame Update
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def update
if Input.trigger?(Input::B) || Input.trigger?(Input::C)
mark_to_close
self.value = false
end
end
end
end

#==============================================================================
# ** Skill
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# new public variables - ma_root_skills; ma_descendant_skills;
# ma_level_requirement; ma_prohibited classes
# new methods - ma_learn_se; ma_cache_lsu_skill_stats
#==============================================================================

class RPG::Skill
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Public Instance Variables
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
attr_accessor :ma_root_skills
attr_accessor :ma_descendant_skills
attr_accessor :ma_level_requirement
attr_accessor :ma_prohibited_classes
attr_accessor :ma_master_uses
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Learn SE
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def ma_learn_se
# Not cached because it will only rarely be accessed. Better to use RAM
if self.note[/\\LEARN_SE\[(.+?),?\s*(\d*?),?\s*(\d*?)\]/i] != nil
learn_se = [$1.to_s]
learn_se.push ($2.to_i) unless $2.empty?
learn_se.push ($3.to_i) unless $3.empty?
else
return LSU_SE_OBTAIN_SKILL
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Cache LSU stats
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def ma_cache_lsu_skill_stats
# Get skill paths and descendants
@ma_root_skills, @ma_prohibited_classes = [], []
@ma_descendant_skills = [] if @ma_descendant_skills.nil?
@ma_master_uses, @ma_level_requirement = LSU_DEFAULT_MASTERY, 1
# Level Requirements
@ma_level_requirement = $1.to_i if self.note[/\\MIN_LEVEL\[(\d+)\]/i] != nil
@ma_master_uses = $1.to_i if self.note[/\\MASTERY?\[(\d+)\]/i] != nil && $1.to_i > 0
root_paths = {}
root_skills = []
(self.note.scan (/\\ROOT_SKILL\[(\d+),?\s*(\d*),?\s*?<?([\d ,;:]*?)>?,?\s*?([F1]?)\]/i)).each { |match|
id = match[0].to_i
n = match[1].to_i
supplement_skills = []
(match[2].scan (/\d+?/)).each { |id2| supplement_skills.push (id2.to_i) } unless match[2].empty?
forget = !match[3].empty?
root_skills.push ([id, n, forget, supplement_skills])
}
root_skills.each { |array|
key = ([array[0]] + array[3]).sort
root_paths[key] = [] if !root_paths[key]
root_paths[key].push (array[0, 3])
}
root_paths.each { |key, path|
if path.size < key.size
key.each { |key2|
exists = false
path.each { |array| exists = true if path[0] == key2 }
path.push ([key2, 0, false]) if !exists
}
end
path.sort! { |a, b| a[0] <=> b[0] }
@ma_root_skills.push (path)
}
@ma_root_skills.each { |path|
path.each { |d_id, n, forget|
$data_skills[d_id].ma_descendant_skills = [] if $data_skills[d_id].ma_descendant_skills.nil?
d_skills = $data_skills[d_id].ma_descendant_skills
d_skills.push (self.id) unless d_skills.include? (self.id)
}
}
# Prohibited Classes
(self.note.scan (/\\PROHIBIT_CLASS\[(\d+)\]/i)).each { |id|
@ma_prohibited_classes.push (id[0].to_i)
}
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Compatibility with Note Editor + General Compatibility Patch
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if self.method_defined? (:ma_reset_note_values)
alias malg_lsu_rsetnote_8uk2 ma_reset_note_values
def ma_reset_note_values (*args)
malg_lsu_rsetnote_8uk2 (*args) # Run Original Method
@ma_root_skills.each { |path|
path.each { |a| $data_skills[a[0]].ma_descendant_skills.delete (self.id) }
}
ma_cache_lsu_skill_stats # Recache skill stats for LSU
end
end
end

#==============================================================================
# ** Game_Actor
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# aliased method - initialize; level_up
# new method - lsu_skill_requirements_met?; learn_skill_by_use; skill_count;
# increase_skill_count; skill_mastered?
#==============================================================================

class Game_Actor
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias modalg_brnchskill_stp_1xc3 setup
def setup (*args)
@lsbu_skill_count = []
# Run Original Method
modalg_brnchskill_stp_1xc3(*args)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Level Up
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias malg_skl_brnches_byuse_lvlplus_0kb2 level_up
def level_up (*args)
# Run Original Method
malg_skl_brnches_byuse_lvlplus_0kb2 (*args)
# Check all skills to see if requirements have been met to learn the skill
skills.each { |skill|
skill.ma_descendant_skills.each { |descendant_id|
descen = $data_skills[descendant_id]
if !@skills.include? (descen.id) && lsu_skill_requirements_met? (descen)
# Learn Skill
learn_skill_by_use (descen.id)
end
}
}
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Check if this actor meets requirements to learn skill
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def lsu_skill_requirements_met? (skill)
return false if skill.ma_prohibited_classes.include? (@class_id)
return false if @level < skill.ma_level_requirement
skill.ma_root_skills.each { |path|
path_complete = true
path.each { |reqs|
if skill_count (reqs[0]) < reqs[1]
path_complete = false
break
end
}
return true if path_complete # If all requirements met
}
return false
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Learn Skill By Use
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def learn_skill_by_use (skill_id)
forgets = []
$data_skills[skill_id].ma_root_skills.each { |path|
path.each { |reqs| forgets.push (reqs[0]) if reqs[2] }
}
forgets.each { |forget_id| forget_skill (forget_id) }
learn_skill (skill_id)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Retrieve Skill Count
# skill_id : ID of skill checked
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def skill_count (skill_id)
@lsbu_skill_count[skill_id] = 0 if @lsbu_skill_count[skill_id].nil?
return @lsbu_skill_count[skill_id]
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Increase Skill Count
# skill_id : ID of skill increased
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def increase_skill_count (skill_id)
@lsbu_skill_count[skill_id] = skill_count (skill_id) + 1
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Skill Mastered?
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def skill_mastered? (skill)
return skill_count (skill.id) >= skill.ma_master_uses
end
end

#==============================================================================
# ** Window_Help
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# new method - lsu_set_secondary_text
#==============================================================================

class Window_Help
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Set Secondary Text
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def lsu_insert_secondary_text (text, align = 2)
# Check if real text has changed
if (@lsu_changed_text != @text) || (@lsu_changed_align != @align)
if LSU_COUNT_FONTCOLOR.is_a? (Integer)
self.contents.font.color = text_color (LSU_COUNT_FONTCOLOR)
else
self.contents.font.color = Color.new (*LSU_COUNT_FONTCOLOR)
end
self.contents.draw_text(4, 0, self.width - 40, WLH, text, align)
@lsu_changed_text, @lsu_changed_align = @text, @align
end
end
end

#==============================================================================
# ** Window_Skill
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# aliased method - update_help
#==============================================================================

class Window_Skill
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Update Help Text
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias ma_lsu_updhelp_uses_8kh2 update_help
def update_help (*args)
if LSU_BUTTONSHOW
if Input.press? (LSU_BUTTON) && @actor
@help_window.set_text (ma_use_text, LSU_SHOWCOUNT_ALIGN)
else
ma_lsu_updhelp_uses_8kh2 (*args)
end
else
ma_lsu_updhelp_uses_8kh2 (*args)
return unless @actor && skill
@help_window.lsu_insert_secondary_text (ma_use_text)
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Get Use Text
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def ma_use_text
add = ""
if LSU_SHOW_MASTERY
if @actor.skill_mastered? (skill)
return LSU_VOCAB_MASTERY if LSU_MASTER_REPLACE
add = LSU_VOCAB_MASTERY
else
add = " / #{skill.ma_master_uses}"
end
end
return LSU_VOCAB_USECOUNT + @actor.skill_count(skill.id).to_s + add
end
end

#==============================================================================
# ** Scene_Base
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# new method - lsu_advance_skill_count
#==============================================================================

class Scene_Base
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Advance Skill Count
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def lsu_advance_skill_count (user, skill)
# Increase skill count
user.increase_skill_count (skill.id)
if LSU_LEARN_IMMEDIATELY
new_skills = []
skill.ma_descendant_skills.each { |descendant_id|
descendant = $data_skills[descendant_id]
# Check requirements
if !user.skill_learn? (descendant) && user.lsu_skill_requirements_met? (descendant)
new_skills.push (descendant)
end
}
for new_skill in new_skills
user.learn_skill_by_use (new_skill.id)
Dialog_LearnSkill.show (user, new_skill)
end
end
end
end

#==============================================================================
# ** Scene_Title
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# aliased methods - load_database; load_bt_database
#==============================================================================

class Scene_Title
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Load Database
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias malsu_lddata_5yj7 load_database
def load_database (*args)
malsu_lddata_5yj7 (*args) # Run Original Method
$data_skills.each { |skill| skill.ma_cache_lsu_skill_stats if !skill.nil? }
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Load Battle Test Database
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias malg_lsu_btdat_6yh1 load_bt_database
def load_bt_database (*args)
malg_lsu_btdat_6yh1 (*args) # Run Original Method
$data_skills.each { |skill| skill.ma_cache_lsu_skill_stats if !skill.nil? }
end
end

#==============================================================================
# ** Scene_Skill
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# aliased method - use_skill_nontarget
#==============================================================================

class Scene_Skill
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Use Skill Nontarget
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias ma_lsu_uskll_7uj2 use_skill_nontarget
def use_skill_nontarget (*args)
ma_lsu_uskll_7uj2 (*args) # Run Original Method
lsu_advance_skill_count (@actor, @skill) # Advance Skill Count
end
end

#==============================================================================
# ** Scene Battle
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# aliased methods - execute_action_skill
#==============================================================================

class Scene_Battle
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Execute Skill
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias mdrnalg_exctskl_lsbu_4nv2 execute_action_skill
def execute_action_skill (*args)
mdrnalg_exctskl_lsbu_4nv2 (*args) # Run Original Method
# Increase User's skill count if actor
lsu_advance_skill_count (@active_battler, @active_battler.action.skill) if @active_battler.actor?
end
end

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
When does it occur? I just tried it in a new project and didn't get an error. Just tell me how to recreate it and I will find and fix it

***
Rep:
Level 82
When I start the game it does it before anything loads.

Error

Scrit Mod_Learn line 164 syntax error occoured.

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Most Missed Member2014 Zero to Hero2014 Best IRC Quote2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
You've probably accidentally just put an unnecessary character in the line. This is what it should be, if I am not mistaken:

Code: [Select]
  LSU_SHOWCOUNT_ALIGN = 0    # Alignment of text if LSU_BUTTONSHOW is true

You could change the 0 to any other number (I would keep it default though) but don't change anything else. Make sure that the line is right, with no [s or {s or =s or # etc etc.
it's like a metaphor or something i don't know