I have been following the official tutorial for several days now. I got to part 3.5 where Touchfuzzy instructs on how to add scripts in Ace. So I followed the instructions and then add the Skill Self Effect, made by Jet, that was included in the tutorial. Spoiler #===============================================================================
I have been following the
official tutorial for several days now. I got to part 3.5 where Touchfuzzy instructs on how to add scripts in Ace.
So I followed the instructions and then add the Skill Self Effect, made by Jet, that was included in the tutorial.
#===============================================================================
# Skill Self Effects
# By Jet10985 (Jet)
# Requested by Touchfuzzy
#===============================================================================
# This script will allow you to specify a skill's effects to target the user
# instead of the target, on skills that don't already effect the user.
# This script has: 0 customization options.
#===============================================================================
# Overwritten Methods:
# None
#-------------------------------------------------------------------------------
# Aliased methods:
# Game_Battler: item_effect_apply
#===============================================================================
=begin
To specify the effects, use this notetag in the skill's notebox:
or
to specify more than 1 effect
--------------------------------------------------------------------------------
Use of this script could be as the following.
You make a "Berserk Strike" skill, which does 200% damage to an enemy.
You make the 2nd effect "Defense Down 50%" and want it applied to the user.
You'd use this notetag:
=end
class RPG::Skill
def self_effects
if @self_effects.nil?
@self_effects = []
self.note.each_line {|a|
scan = a.scan(//i)
scan[0][0].scan(/\d+/).each {|b|
@self_effects.push(@effects[b.to_i - 1]) if b.to_i >= 1
}
}
end
@self_effects
end
end
class Game_Battler
alias jet3745_item_effect_apply item_effect_apply
def item_effect_apply(user, item, effect, reffed = false)
if item.is_a?(RPG::Skill) && item.self_effects.include?(effect) && !reffed
user.item_effect_apply(user, item, effect, true)
return
end
jet3745_item_effect_apply(user, item, effect)
end
end
[>
The thing is that after I include the script in the game and uses a skill which has a self effect on it, the game crashes. The first time I used it it was fine, then the crash come and I tried it on a brand new project but the result was the same. Sometimes it would work and other times it would crash as soon as I issued a command in the battle scene. The image below is what the game shows if it crashes:
Anyone know how to fix this?
Protected download