Basic Message SE

Basic Message SE v1.0
By Vlue
​
Introduction
If you ever played a game that has a sound effect played every letter or so while a message is in the process of being displayed then you know what this script does. That. Even comes with script calls to change the se, volume, pitch, frequency in game. High pitched girly noises and deep monster noises! Oooh.

Compatible with Basic Options Menu to give the player the option of disabling the sound effect.

Features
- Plays a se while a message is being displayed.
- Options to alter se between messages.

How to Use
Plug and play and customize as needed. More details in the script itself

Script
You can find the script here on the pastebin: http://pastebin.com/mTnyr8xh

FAQ
Nada

Credit and Thanks
- By Vlue
- Free to use in any project, commercial or otherwise, with credit given

Author's Notes
bluh blah blah bluh blee
Cool, I've come to expect nothing but greatness from your scripts man.
Hey, I hope someone's still alive here to respond this.

What can I do to match the SE volume to the volume the player sets on your other script Basic Options Menu?

When I decrease SFX volume in options, the message sound effects don't change volume.
You make great stuff, man! Thanks!
Is there a way to disable this for battles?
I'm pretty new to vx ace. Can anyone tell me how I can change a value like "DEFAULT_AUDIO_SOUND = "Cancel2" in an event?
I'm pretty new to vx ace.
Interested in reading some tutorials? Look at my signature block below.

As for your question, it's written in the script header what to do.
Ruby:
#Usage:    Plug and play, script calls to change details in game:
#
#           message_freq(value)      - changes the frequency of the se
#           message_se("string")     - name of the se to play
So that means to use the script command in the event.
Interested in reading some tutorials? Look at my signature block below.

As for your question, it's written in the script header what to do.
Ruby:
#Usage:    Plug and play, script calls to change details in game:
#
#           message_freq(value)      - changes the frequency of the se
#           message_se("string")     - name of the se to play
So that means to use the script command in the event.
I figured it uses the script command, but what do I actually put in it? I can't figure it out for the life of me.
I tried just putting "message_se("name of the sound effect im trying to use")" into the script box, but the game just crashes and I get this error message:
e899c5e321e35b6a1099eae2b4315178.png

Thank you for putting up with my stupidity.
and I get this error message:
What did you put in the script command?
Looks like you used message_se=(blah
that would be wrong.
The script does not say message_se=(
it says message_se(
What did you put in the script command?
Looks like you used message_se=(blah
that would be wrong.
The script does not say message_se=(
it says message_se(
I'm actually not putting in an = sign. I've been copy and pasting "message_se(blah)" from the main script into the script event to make sure of it. Here's a screenshot of exactly what I'm putting in the script event (with Absorb1 being used as an example):
no = sign.png

I still get the same error message when I do this by the way. It's weird that the game thinks I'm using an = sign when I'm not at all.
I tried this without the quotation marks as well of course. Still crashes.

Edit: Just tried the rest of the script calls. All of them seem to crash the game for me. I'm not having any issues using script calls from other scripts, so I'm starting to think that this script is just broken.
Still crashes.
Interesting.
I changed the code and got it working.
add this below vlue script
Ruby:
class Game_Interpreter
  def message_set(string, value, array, freq = -1)
    message_se(string)
    message_volume(value)
    message_pitch(array)
    message_freq(freq) if freq >= 0
  end
  def message_freq(value)
    $game_party.message_se_details[:freq] = value
  end
  def message_se(string)
    $game_party.message_se_details[:se] = string
  end
  def message_pitch(array)
    $game_party.message_se_details[:pitch] = array
  end
  def message_volume(value)
    $game_party.message_se_details[:volume] = value
  end
  def message_reset
    $game_party.reset_se_details
  end
end
Interesting.
I changed the code and got it working.
add this below vlue script
Ruby:
class Game_Interpreter
  def message_set(string, value, array, freq = -1)
    message_se(string)
    message_volume(value)
    message_pitch(array)
    message_freq(freq) if freq >= 0
  end
  def message_freq(value)
    $game_party.message_se_details[:freq] = value
  end
  def message_se(string)
    $game_party.message_se_details[:se] = string
  end
  def message_pitch(array)
    $game_party.message_se_details[:pitch] = array
  end
  def message_volume(value)
    $game_party.message_se_details[:volume] = value
  end
  def message_reset
    $game_party.reset_se_details
  end
end
Thank you so much man!
Got it working. I started getting an error that said something like "Line 51: Divide by 0" but I managed to fix it by switching it to a 1, starting the game, and then switching it back to 0. Doesn't happen anymore for some reason even though the code is exactly what it was before I tried to fix it lmao
I figured out that using script calls before the show message you can set specific "voices" to specific characters and it works fine except when in battles, it seems to crash it.
if anyone got some ideas to how to fix it i would be more than thankful.

iam new to rpgmakervxa and i dont know where better to ask the question than in here.
iam using yanfly's battle engine.
but it also dosent work in the default battle system.

Original thread: https://forums.rpgmakerweb.com/threads/basic-message-se.18475/