• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
BW 'Shout' Message Effect

BW 'Shout' Message Effect 1.1

Pokémon Essentials Version
v18.1 ➖
angry_text.gif


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.

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 the linked 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 only 2 changes you'll need to make in v18.
1. Add the 'sh' message command to the text parser

Look for this line:
Code:
Expand Collapse Copy
isDarkSkin = isDarkWindowskin(msgwindow.windowskin)

And insert these lines ABOVE it:
Code:
Expand Collapse Copy
shout = 0
if text=~/\\sh/i
  text.gsub!(/\\sh/i,"")
  msgwindow.setSkin("Graphics/Windowskins/shout",false)
  shout=16
  startSE="shout"
end

2. Add the window shake effect

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

Insert these lines above it:
Code:
Expand Collapse Copy
    if shout != 0
      shout=(shout*-0.9).floor
      if atTop
        msgwindow.y=shout
      else
        msgwindow.y=Graphics.height-(msgwindow.height + shout)
      end
    end

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

Look for this line:
Code:
Expand Collapse Copy
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:
Expand Collapse Copy
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:
Expand Collapse Copy
signWaitCount=0

And insert this line below it:
Code:
Expand Collapse Copy
shout = false

3. Set up the shout command

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

And insert these lines below it:
Code:
Expand Collapse Copy
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:
Expand Collapse Copy
if signWaitCount>0
      signWaitCount-=1

Change the if to elsif and insert these lines above it:
Code:
Expand Collapse Copy
    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!
Credits
Boonzeet
Author
boonzeet
Downloads
1,610
Views
4,982
First release
Last update

Ratings

5.00 star(s) 1 ratings

More resources from boonzeet

Latest updates

  1. Update for v18, easier install

    Updated to work with v18. As a plus side, the install is muuuuch easier!

Latest reviews

I've been looking everywhere for this; Thank you! This will definitely help with my game.
Back
Top