Alright, done. Here is the modified script:
ScriptAnd you will need
this script and
this dll for the script to work. The disappearance animations are not fully documented yet, but I'll get to that soon.
Edit - Added a little more functionality, as well as fixed a few errors in my Transitions module. Also properly documented the disappearance animations.
Edit2 - Fixed the Damage Achievement Mod, and also added a new mod for gold spent. Also added another mod for items in inventory. Here they are:
#===============================================================================
# X Damage Achievement Mod
# Author game_guy
#-------------------------------------------------------------------------------
# Info:
# Small snippet to give the player an achievement when one attack deals X
# damage. It only works with any attack except items. Added code to allow total
# damage dealt to trigger achievements.
#
# Instructions:
# Edit list of awards below.
#
# Place below the achievements script.
#===============================================================================
DMG_AWARDS = []
# Add new lines here
# Type in
# DMG_AWARDS[number] = [award_id, total?, amount_of_damage]
DMG_AWARDS[0] = [3, false, 500]
DMG_AWARDS[1] = [13, false, 1000]
DMG_AWARDS[2] = [14, true, 5000]
if $gg_achievements == nil || $gg_achievements < 2.0
raise 'Damage Achievement Mod requires game_guy\'s Achievements v2.0 or higher'
end
class Game_Battler
alias gg_init_damage_award_lat attack_effect
def attack_effect(attacker)
if attacker.is_a?(Game_Actor)
old_hp = self.hp
result = gg_init_damage_award_lat(attacker)
if result
damage = self.damage.is_a?(String) ? 0 : self.damage
$game_system.damage += damage
DMG_AWARDS.each {|i|
if !i[1] and damage > i[2]
Awards.gain(i[0])
elsif i[1] and $game_system.damage > i[2]
Awards.gain(i[0])
end
}
end
return result
else
return gg_init_damage_award_lat(attacker)
end
end
alias gg_init_damage_skill_award_lat skill_effect
def skill_effect(user, skill)
if user.is_a?(Game_Actor)
old_hp = self.hp
result = gg_init_damage_skill_award_lat(user, skill)
if result
damage = self.damage.is_a?(String) ? 0 : self.damage
$game_system.damage += damage
DMG_AWARDS.each {|i|
if !i[1] and damage > i[2]
Awards.gain(i[0])
elsif i[1] and $game_system.damage > i[2]
Awards.gain(i[0])
end
}
end
return result
else
return gg_init_damage_skill_award_lat(user, skill)
end
end
end
class Game_System
attr_accessor :damage
alias tdks_xdmg_init initialize
def initialize
tdks_xdmg_init
@damage = 0
end
end
#===============================================================================
# X Gold Spent Achievement Mod
# Author ThallionDarkshine
#-------------------------------------------------------------------------------
# Info:
# Small snippet to give the player an achievement when they spend a certain amount
# of gold either total or in a single purchase.
#
# Instructions:
# Edit list of awards below.
#
# Compatibility:
# Probably won't work with Scene_Shop scripts.
#
# Place below the achievements script.
#===============================================================================
GOLD_AWARDS = []
# Add new lines here
# Type in
# GOLD_AWARDS[number] = [award_id, total?, amount_of_gold]
GOLD_AWARDS[0] = [15, false, 500]
GOLD_AWARDS[1] = [16, false, 1000]
GOLD_AWARDS[2] = [17, true, 5000]
if $gg_achievements == nil || $gg_achievements < 2.0
raise 'Gold Spent Achievement Mod requires game_guy\'s Achievements v2.0 or higher'
end
class Scene_Shop
alias tdks_xgold_updt_num update_number
def update_number
gold = $game_party.gold
tdks_xgold_updt_num
if $game_party.gold < gold
$game_system.gold_spent += gold - $game_party.gold
GOLD_AWARDS.each { |i|
if !i[1] and gold - $game_party.gold >= i[2]
Awards.gain(i[0])
elsif i[1] and $game_system.gold_spent >= i[2]
Awards.gain(i[0])
end
}
end
end
end
class Game_System
attr_accessor :gold_spent
alias tdks_xgold_init initialize
def initialize
tdks_xgold_init
@gold_spent = 0
end
end
#===============================================================================
# X Item Achievement Mod
# Author ThallionDarkshine
#-------------------------------------------------------------------------------
# Info:
# Small snippet to give players achievements when they have a certain number of
# items in their inventory.
#
# Instructions:
# Edit list of awards below.
#
# Compatibility:
# Probably won't work with Scene_Shop scripts.
#
# Place below the achievements script.
#===============================================================================
ITEM_AWARDS = []
# Add new lines here
# Type in
# ITEM_AWARDS[number] = [award_id, amount_of_items]
ITEM_AWARDS[0] = [18, 10]
ITEM_AWARDS[1] = [19, 25]
if $gg_achievements == nil || $gg_achievements < 2.0
raise 'Item Achievement Mod requires game_guy\'s Achievements v2.0 or higher'
end
class Game_Party
def num_items
num = 0
@items.each { |i| num += i[1] }
@weapons.each { |i| num += i[1] }
@armors.each { |i| num += i[1] }
num
end
alias tdks_item_awrds_gain_item gain_item
def gain_item(id, n)
tdks_item_awrds_gain_item(id, n)
if n > 0
ITEM_AWARDS.each { |i|
if num_items >= i[1]
Awards.gain(i[0])
end
}
end
end
alias tdks_item_awrds_gain_weapon gain_weapon
def gain_weapon(id, n)
tdks_item_awrds_gain_weapon(id, n)
if n > 0
ITEM_AWARDS.each { |i|
if num_items >= i[1]
Awards.gain(i[0])
end
}
end
end
alias tdks_item_awrds_gain_armor gain_armor
def gain_armor(id, n)
tdks_item_awrds_gain_armor(id, n)
if n > 0
ITEM_AWARDS.each { |i|
if num_items >= i[1]
Awards.gain(i[0])
end
}
end
end
end