Critical Sound for Blizz-ABS
Authors: Blizzard
Version: 1.0
Type: Blizz-ABS Plugin
Key Term: Blizz-ABS Plugin
IntroductionThis script will play a sound effect each time a critical hit is dealt.
This script is to be distributed under the same terms and conditions like the script it was created for: Blizz-ABS.
Features
- special sound effect during critical damage
- easy to configure
ScreenshotsN/A
DemoN/A
ScriptJust make a new script above main and paste this code into it.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Critical for Blizz-ABS by Blizzard
# Version: 1.0
# Type: Blizz-ABS Add-on
# Date: 25.12.2008
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This script is to be distributed under the same terms and conditions like
# the script it was created for: Blizz-ABS.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Information:
#
# This script must be placed below Blizz-ABS and require Blizz-ABS v2.2 or
# higher to work properly. It will play a sound effect each time a critical
# hit is dealt.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
if !$BlizzABS || BlizzABS::VERSION < 2.2
raise 'ERROR: The "Critical Sound" plugin requires Blizz-ABS 2.2 or higher.'
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# ('FILENAME', VOLUME, PITCH)
CRITICAL_SOUND_FILE = RPG::AudioFile.new('060-Cheer01', 80, 100)
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#==============================================================================
# BlizzABS::DamageRequest
#------------------------------------------------------------------------------
# This class was modified to play a sound effect when creating a damage
# request.
#==============================================================================
class BlizzABS::DamageRequest
#----------------------------------------------------------------------------
# override Initialization
#----------------------------------------------------------------------------
alias init_criticalsound_blizzabs_later initialize
def initialize(char, damage, color, critical = false)
init_criticalsound_blizzabs_later(char, damage, color, critical)
$game_system.se_play(CRITICAL_SOUND_FILE) if critical
end
end
InstructionsNone required.
CompatibilityRequires Blizz-ABS to work.
Credits and Thanks
- Boris "Blizzard" Mikić
- Thanks to MeVII for requesting this.
Author's NotesKeep in mind that this plugin comes UNDER Blizz-ABS. This script was done on request and is not fully supported by me as my other scripts are.
If you find any bugs, please report them here:
http://forum.chaos-project.com
That's it! N-Joy! =D
You know, I think people underestimate the quality of this script!
Its pretty great, Blizzard!
It IS the little things that count, like SFX for crits :D
I agree. The small things and details show that the developer put effort into the game.
well i put this idea/request in the suggestions for Blizzabs..... but it seems thats not good idea.... and im going to put it here...
here i go:
Maybe its possible do a little shake screen effect when the critical sound appear in game.... it maybe gives another good small detail.... :haha:
its only a idea ^_^
Oi, its not too hard, so how about I do it for ya?
There are new CONSTANTS in the script that you are welcome to edit at your leisure to get the effect you seek.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Critical for Blizz-ABS by Blizzard
# Version: 1.0
# Type: Blizz-ABS Add-on
# Date: 25.12.2008
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This script is to be distributed under the same terms and conditions like
# the script it was created for: Blizz-ABS.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Information:
#
# This script must be placed below Blizz-ABS and require Blizz-ABS v2.2 or
# higher to work properly. It will play a sound effect each time a critical
# hit is dealt.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
if !$BlizzABS || BlizzABS::VERSION < 2.2
raise 'ERROR: The "Critical Sound" plugin requires Blizz-ABS 2.2 or higher.'
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# ('FILENAME', VOLUME, PITCH)
CRITICAL_SOUND_FILE = RPG::AudioFile.new('060-Cheer01', 80, 100)
# These are the new constants for Shaking.
# Just set the shake to false if you don't want to use it.
SHAKE = false
S_FORCE = 5 # Higher force = bigger shake (1~9)
S_SPEED = 5 # Higher speed = faster shake
S_DUR = 5 # count in frames the shake lasts
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#==============================================================================
# BlizzABS::DamageRequest
#------------------------------------------------------------------------------
# This class was modified to play a sound effect when creating a damage
# request.
#==============================================================================
class BlizzABS::DamageRequest
#----------------------------------------------------------------------------
# override Initialization
#----------------------------------------------------------------------------
alias init_criticalsound_blizzabs_later initialize
def initialize(char, damage, color, critical = false)
init_criticalsound_blizzabs_later(char, damage, color, critical)
$game_system.se_play(CRITICAL_SOUND_FILE) if critical
$game_screen.start_shake(S_FORCE,S_SPEED,S_DUR) if critical && SHAKE
end
end
Is this whatchu were lookin' for?
Quote from: jragyn00 on May 16, 2010, 01:07:23 am
Oi, its not too hard, so how about I do it for ya?
There are new CONSTANTS in the script that you are welcome to edit at your leisure to get the effect you seek.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Critical for Blizz-ABS by Blizzard
# Version: 1.0
# Type: Blizz-ABS Add-on
# Date: 25.12.2008
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This script is to be distributed under the same terms and conditions like
# the script it was created for: Blizz-ABS.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Information:
#
# This script must be placed below Blizz-ABS and require Blizz-ABS v2.2 or
# higher to work properly. It will play a sound effect each time a critical
# hit is dealt.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
if !$BlizzABS || BlizzABS::VERSION < 2.2
raise 'ERROR: The "Critical Sound" plugin requires Blizz-ABS 2.2 or higher.'
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# ('FILENAME', VOLUME, PITCH)
CRITICAL_SOUND_FILE = RPG::AudioFile.new('060-Cheer01', 80, 100)
# These are the new constants for Shaking.
# Just set the shake to false if you don't want to use it.
SHAKE = false
S_FORCE = 5 # Higher force = bigger shake (1~9)
S_SPEED = 5 # Higher speed = faster shake
S_DUR = 5 # count in frames the shake lasts
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#==============================================================================
# BlizzABS::DamageRequest
#------------------------------------------------------------------------------
# This class was modified to play a sound effect when creating a damage
# request.
#==============================================================================
class BlizzABS::DamageRequest
#----------------------------------------------------------------------------
# override Initialization
#----------------------------------------------------------------------------
alias init_criticalsound_blizzabs_later initialize
def initialize(char, damage, color, critical = false)
init_criticalsound_blizzabs_later(char, damage, color, critical)
$game_system.se_play(CRITICAL_SOUND_FILE) if critical
$game_screen.start_shake(S_FORCE,S_SPEED,S_DUR) if critical && SHAKE
end
end
Is this whatchu were lookin' for?
:D oh my godness.....just that???....so simply???... this work its awesome!!!.... My project have many martial arts attacks, and this its going to give more realistic effects.... thank you very much.....
Maybe some boss have to put this like a new version of this add on in the topic!!!^_^
It's called "Critical Sound" and not "Critical Animation" or "Critical Visual Effects".
Quote from: Blizzard on May 16, 2010, 09:46:38 am
It's called "Critical Sound" and not "Critical Animation" or "Critical Visual Effects".
:^_^': damn!! Somebody is a little upset o_o.... Sorry!.... but i only want to cooperate a little ^_^
His point is that this should have gone in script requests instead of the script thread.
I don't mind if you wanna use it, I'm just saying that I won't change the purpose of the original script. There are infinite ways and features you can add to a critical hit. This was one of them, I made it on request after all.
:^_^': Understand!
i use it and i says line 53 stack error too deep.....what does that mean?
You either have a an alias name defined twice, or a method is calling itself, either in the method or in a loop of methods.
ex.
def method1
# Some code here...
method2 # Calls method2
end
def method2
# Some code here...
method1 # Calls method1
end
See how it is trapped in a loop?
Ruby is not a recursive language.