Author Topic: [XP] Critical Sound for Blizz-ABS  (Read 8926 times)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19930
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
[XP] Critical Sound for Blizz-ABS
« on: December 25, 2008, 01:41:01 AM »
Critical Sound for Blizz-ABS
Authors: Blizzard
Version: 1.0
Type: Blizz-ABS Plugin
Key Term: Blizz-ABS Plugin

Introduction

This 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

Screenshots

N/A

Demo

N/A

Script

Just make a new script above main and paste this code into it.
(click to show/hide)

Instructions

None required.

Compatibility

Requires Blizz-ABS to work.

Credits and Thanks

  • Blizzard
  • Thanks to MeVII for requesting this.

Author's Notes

Keep 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
« Last Edit: December 29, 2010, 02:09:41 AM by game_guy »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Jragyn

  • Ethereal Devastator
  • ****
  • Posts: 311
  • LV: 20
  • Gender: Male
  • A prodigy... maybe? Hoo hah.
    • View Profile
    • facenbooken.
Re: [XP] Critical Sound for Blizz-ABS
« Reply #1 on: February 27, 2010, 04:00:50 AM »
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
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19930
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Critical Sound for Blizz-ABS
« Reply #2 on: February 28, 2010, 01:10:22 PM »
I agree. The small things and details show that the developer put effort into the game.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline elmangakac

  • Transcended Spirit
  • ***
  • Posts: 171
  • LV: -3
    • View Profile
    • Cesar&Friends (My Manga in Spanish)
Re: [XP] Critical Sound for Blizz-ABS
« Reply #3 on: May 15, 2010, 03:44:00 PM »
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 ^_^

Offline Jragyn

  • Ethereal Devastator
  • ****
  • Posts: 311
  • LV: 20
  • Gender: Male
  • A prodigy... maybe? Hoo hah.
    • View Profile
    • facenbooken.
Re: [XP] Critical Sound for Blizz-ABS
« Reply #4 on: May 16, 2010, 07: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.
Code: [Select]
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# 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?
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Offline elmangakac

  • Transcended Spirit
  • ***
  • Posts: 171
  • LV: -3
    • View Profile
    • Cesar&Friends (My Manga in Spanish)
Re: [XP] Critical Sound for Blizz-ABS
« Reply #5 on: May 16, 2010, 03:41:14 PM »
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.
Code: [Select]
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# 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!!!^_^


Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19930
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Critical Sound for Blizz-ABS
« Reply #6 on: May 16, 2010, 03:46:38 PM »
It's called "Critical Sound" and not "Critical Animation" or "Critical Visual Effects".
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline elmangakac

  • Transcended Spirit
  • ***
  • Posts: 171
  • LV: -3
    • View Profile
    • Cesar&Friends (My Manga in Spanish)
Re: [XP] Critical Sound for Blizz-ABS
« Reply #7 on: May 16, 2010, 03:55:45 PM »
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 ^_^

Offline winkio

  • Epiq
  • Administrator
  • Guardian of Chaos
  • *****
  • Posts: 4506
  • LV: 199
  • Gender: Male
  • I am lying.
    • View Profile
Re: [XP] Critical Sound for Blizz-ABS
« Reply #8 on: May 16, 2010, 03:58:07 PM »
His point is that this should have gone in script requests instead of the script thread.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19930
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Critical Sound for Blizz-ABS
« Reply #9 on: May 16, 2010, 04:00:03 PM »
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.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline elmangakac

  • Transcended Spirit
  • ***
  • Posts: 171
  • LV: -3
    • View Profile
    • Cesar&Friends (My Manga in Spanish)
Re: [XP] Critical Sound for Blizz-ABS
« Reply #10 on: May 16, 2010, 04:07:50 PM »
 :^_^': Understand!

Offline megaman30796

  • Transcended Spirit
  • ***
  • Posts: 227
  • LV: -60
  • Gender: Male
  • BEST TOILET EVER!!!!
    • View Profile
    • 99% Loading
Re: [XP] Critical Sound for Blizz-ABS
« Reply #11 on: December 28, 2010, 03:47:43 AM »
i use it and i says line 53 stack error too deep.....what does that mean?
"You know the world is going crazy," Chris Rock declared in 2003, "when the best rapper [Eminem] is a white guy, the best golfer [Tiger Woods] is a black guy, the tallest guy in the NBA [Yao Ming] is Chinese, the Swiss hold the America's Cup, France is accusing the U.S. of arrogance, Germany doesn't want to go to war, and the three most powerful men in America are named 'Bush,' 'Dick,' and 'Colon.' Need I say more?"

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3247
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [XP] Critical Sound for Blizz-ABS
« Reply #12 on: December 28, 2010, 03:58:11 AM »
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.

Code: [Select]
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.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.