• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[v17.2] BW-Style 'Shout/Scream' Effect

Boonzeet

Pokémon Secrets of the Ages Developer
  • 188
    Posts
    15
    Years
    I wanted to include the BW 'shout/scream' effect in my games, and thought I would make it available to everyone as I hadn't seen it before.

    [PokeCommunity.com] [v17.2] BW-Style 'Shout/Scream' Effect


    To use
    Start a message with '\sh' and the message box, sound effect and shake effect will all be applied.

    To set up
    First, download this zip file which contains a windowskin and sound effect. Add the Windowskin to your Graphics/Windowskins folder, and the .ogg file to Audio\SE.

    Open the Script editor, and head to Messages. There's 3 changes you'll want to make:

    1. Add the 'sh' message command to the text parser

    Look for this line:
    Code:
    while text[/(?:\\([WwFf]|[Ff][Ff]|[Tt][Ss]|[Cc][Ll]|[Mm][Ee]|[Ss][Ee]|[Ww][Tt]|[Ww][Tt][Nn][Pp]|[Cc][Hh])\[([^\]]*)\]|\\([Gg]|[Cc][Nn]|[Ww][Dd]|[Ww][Mm]|[Oo][Pp]|[Cc][Ll]|[Ww][Uu]|[\.]|[\|]|[\!]|[\x5E])())/i]

    And replace it with:
    Code:
    while text[/(?:\\([WwFf]|[Ff][Ff]|[Tt][Ss]|[Cc][Ll]|[Mm][Ee]|[Ss][Ee]|[Ww][Tt]|[Ww][Tt][Nn][Pp]|[Cc][Hh])\[([^\]]*)\]|\\([Gg]|[Cc][Nn]|[Ww][Dd]|[Ww][Mm]|[Oo][Pp]|[Ss][Hh]|[Cc][Ll]|[Ww][Uu]|[\.]|[\|]|[\!]|[\x5E])())/i]

    2. Add the flag for shout

    Look for this line:
    Code:
    signWaitCount=0

    And insert this line below it:
    Code:
    shout = false

    3. Set up the shout command

    Look for these lines:
    Code:
    elsif control=="op"
          signWaitCount=21

    And insert these lines below it:
    Code:
    elsif control=="sh"
          shout=true
          signWaitCount=16
          startSE="shout"
          msgwindow.setSkin("Graphics/Windowskins/shout")
          msgwindow.width=msgwindow.width  # Necessary evil

    4. Add the window shake effect

    Look for these lines:
    Code:
    if signWaitCount>0
          signWaitCount-=1

    Change the if to elsif and insert these lines above it:
    Code:
        if signWaitCount != 0 && shout == true
          signWaitCount = (signWaitCount*-0.9).floor
          if atTop
            msgwindow.y= signWaitCount
          else
            msgwindow.y=Graphics.height-(msgwindow.height + signWaitCount)
          end

    And there you have it! It didn't seem like monkey patching this bit of code was possible so it's a little more awkward to set up - but it works great once it's in place. Hope this helps someone!
     
    Last edited:
    Code seems to work fine, but you dont seem to have leaved the attached zip. totally forgot this was a feature and glad someone went ahead and made it ^^
     
    Code seems to work fine, but you dont seem to have leaved the attached zip. totally forgot this was a feature and glad someone went ahead and made it ^^

    He made an thread in Relic Castle. You can download it there: (broken link removed)
     
    Code seems to work fine, but you dont seem to have leaved the attached zip. totally forgot this was a feature and glad someone went ahead and made it ^^

    My bad! I've updated the post with the link and fixed an issue with how it was displaying at the top.

    If you have the existing code, please change this line:
    Code:
    if atTop
            msgwindow.y=-(msgwindow.height+signWaitCount)

    to:
    Code:
    if atTop
            msgwindow.y=signWaitCount

    And startSE="angry" to startSE="shout"
     
    Last edited:
    I followed all the steps, added the image and sound... but nothing happens when I use \sh in a message. The text appears with that command before anything.

    This is the part of the Message Script with the changes. I did something wrong???

    Spoiler:
     
    I followed all the steps, added the image and sound... but nothing happens when I use \sh in a message. The text appears with that command before anything.

    This is the part of the Message Script with the changes. I did something wrong???

    Spoiler:

    I don't have so much experience to give you the solution.

    But...

    Check if you are using another script that rewrites the messages. It happened to me, for example, with one for the Name Box.
     
    Yes, I'm using that script to.

    I'll check that and write again if I find the solution. Thanks!

    If you're using Mr. Gela's name box, you can just do the same steps you'd have done in Messages in this script section.

    Look for:
    Code:
    while text[/(?:\\([Xn][Nn]|[WwFf]|[Ff][Ff]|[Tt][Ss]|[Cc][Ll]|[Mm][Ee]|[Ss][Ee]|[Ww][Tt]|[Ww][Tt][Nn][Pp]|[Cc][Hh])\[([^\]]*)\]|\\([Gg]|[Cc][Nn]|[Ww][Dd]|[Ww][Mm]|[Oo][Pp]|[Cc][Ll]|[Ww][Uu]|[\.]|[\|]|[\!]|[\x5E])())/i]

    And replace it with:
    Code:
    while text[/(?:\\([Xn][Nn]|[WwFf]|[Ff][Ff]|[Tt][Ss]|[Cc][Ll]|[Mm][Ee]|[Ss][Ee]|[Ww][Tt]|[Ww][Tt][Nn][Pp]|[Cc][Hh])\[([^\]]*)\]|\\([Gg]|[Cc][Nn]|[Ww][Dd]|[Ww][Mm]|[COLOR="Red"][Ss][Hh]|[/COLOR][Oo][Pp]|[Cc][Ll]|[Ww][Uu]|[\.]|[\|]|[\!]|[\x5E])())/i]

    This tells the parser to look out for the '\sh' combination - [Ss][Hh] matches any combination of capitals of the two letters in that order, and the '|' symbol is an 'OR' rule in the parsing.

    Then complete the rest of the steps inside the same script.
     
    Back
    Top