• 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.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Carmaniac's Speech Bubble Script for v18 (Plug-and-Play)

Resource Carmaniac's Speech Bubble Script for v18 (Plug-and-Play) v1.0

Nomi

Trainer
Member
Joined
Feb 24, 2018
Posts
77
Avery submitted a new resource:

Carmaniac's Speech Bubble Script for v18 - Blah blah blah

Since I noticed Carmaniac's Speech Bubbles script wasn't compatible with v18, I've decided to update it!

Instructions:
1) Download the files and place the images in the corresponding folders of Essentials, while ignoring the PokemonMessages text file.

2) In the Settings script section, add a new line add with $Bubble = 0

3) Next, in the SpriteWindow script, on line 13, under DARKTEXTSHADOW, add this:
BUBBLETEXTBASE = Color.new(22,22,22)...

Read more about this resource...
 

dreamaurua

Rookie
Member
Joined
Oct 7, 2020
Posts
5
2) In the Settings script section, add a new line add with $Bubble = 0

Im sorry i am such a rookie. but I cannot find where to put this change anywhere.
 
D

Deleted member 253

Guest
Syntax error is raised during compilation for Line 15 on default V18:
:credits => "Carmaniac","Avery","Boonzeet",

I just replaced it with "Carmaniac and Avery and Boonzeet" and it's fine from there.
 
Correct syntax for crediting multiple people is ["Person 1", "Person 2", "Person 3"]
 

thedizzygamer

Rookie
Member
Joined
Nov 4, 2020
Posts
2
I don't see

3) Next, in the SpriteWindow script, on line 13, under DARKTEXTSHADOW, add this:

BUBBLETEXTBASE = Color.new(22,22,22)...

Where do I put this?
 

salar.kaplan

Rookie
Member
Joined
Dec 31, 2020
Posts
3
Hi! new here :) Type 2 works fine but type 1 doesn't center above the event.. is it supposed to be like that or have I missed something?
 

SakuraLilly

Rookie
Member
Joined
Feb 1, 2021
Posts
1
Is there a way to have the speech bubbles point to the player? The only way I've found is to have an event on the same spot that moves with the player.
 

st3rmy04

Novice
Member
Joined
Jun 6, 2021
Posts
11
With any error text ...

This is the error with plain text:

=================

[2021-06-07 10:34:36 +0200]
[Pokémon Essentials version 19.1]
[EBDX v1.1.6]

Exception: NameError
Message: uninitialized constant MessageConfig :: WindowOpacity

Backtrace:
378: Carmaniac's Speech Bubbles: 173: in `pbCreateMessageWindow '
089: Messages: 809: in `pbMessage '
034: Interpreter_Commands: 204: in `command_101 '
034: Interpreter_Commands: 21: in `execute_command '
033: Interpreter: 127: in `block in update '
033: Interpreter: 87: in `loop '
033: Interpreter: 87: in `update '
032: Scene_Map: 157: in `block in update '
032: Scene_Map: 155: in `loop '
032: Scene_Map: 155: in `update '


And this is instead the error it encounters when running the pbCallBub script:

=================

[2021-06-07 10:36:55 +0200]
[Pokémon Essentials version 19.1]
[EBDX v1.1.6]

Exception: NameError
Message: uninitialized constant BitmapCache

Backtrace:
378: Carmaniac's Speech Bubbles: 128: in `pbCreateMessageWindow '
089: Messages: 809: in `pbMessage '
034: Interpreter_Commands: 204: in `command_101 '
034: Interpreter_Commands: 21: in `execute_command '
033: Interpreter: 127: in `block in update '
033: Interpreter: 87: in `loop '
033: Interpreter: 87: in `update '
032: Scene_Map: 157: in `block in update '
032: Scene_Map: 155: in `loop '
032: Scene_Map: 155: in `update '



Can you help me?
 

ThatWelshOne_

Champion
Member
Here's a quick edit to get it work in v19.1 (no need to credit me). Note: this won't work in base v19 because of a name change for one of the MessageConfig constants, but all you'd need to do is replace WINDOW_OPACITY with WindowOpacity in the script.
It should be easy to make use of the new Plugins folder for this as well.

Ruby:
Expand Collapse Copy
#-------------------------------------------------------------------------------
# Carmaniac's Speech Bubbles for v18
# Updated by Avery
#-------------------------------------------------------------------------------
# To use, call pbCallBub(type, eventID)
#
# Where type is either 1 or 2:
# 1 - floating bubble
# 2 - speech bubble with arrow
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
# Class modifiers
#-------------------------------------------------------------------------------

class PokemonTemp
  attr_accessor :speechbubble_bubble
  attr_accessor :speechbubble_vp
  attr_accessor :speechbubble_arrow
  attr_accessor :speechbubble_outofrange
  attr_accessor :speechbubble_talking
end

module MessageConfig
  BUBBLETEXTBASE = Color.new(22,22,22)
  BUBBLETEXTSHADOW = Color.new(166,160,151)
end

#-------------------------------------------------------------------------------
# Function modifiers
#-------------------------------------------------------------------------------

class Window_AdvancedTextPokemon
  def text=(value)
    if value != nil && value != "" && $PokemonTemp.speechbubble_bubble && $PokemonTemp.speechbubble_bubble > 0
      if $PokemonTemp.speechbubble_bubble == 1
        $PokemonTemp.speechbubble_bubble = 0
        resizeToFit2(value,400,100)
        @x = $game_map.events[$PokemonTemp.speechbubble_talking].screen_x
        @y = $game_map.events[$PokemonTemp.speechbubble_talking].screen_y - (32 + @height)
            
        if @y>(Graphics.height-@height-2)
          @y = (Graphics.height-@height)
        elsif @y<2
          @y=2
        end
        if @x>(Graphics.width-@width-2)
          @x = ($game_map.events[$PokemonTemp.speechbubble_talking].screen_x-@width)
        elsif @x<2
          @x=2
        end
      else
        $PokemonTemp.speechbubble_bubble = 0
      end
    end
    setText(value)
  end
end 

def pbRepositionMessageWindow(msgwindow, linecount=2)
  msgwindow.height=32*linecount+msgwindow.borderY
  msgwindow.y=(Graphics.height)-(msgwindow.height)
  if $game_temp && $game_temp.in_battle && !$scene.respond_to?("update_basic")
    msgwindow.y=0
  elsif $game_system && $game_system.respond_to?("message_position")
    case $game_system.message_position
    when 0  # up
      msgwindow.y=0
    when 1  # middle
      msgwindow.y=(Graphics.height/2)-(msgwindow.height/2)
    when 2
      if $PokemonTemp.speechbubble_bubble==1
       msgwindow.setSkin("Graphics/windowskins/frlgtextskin")
       msgwindow.height = 100
       msgwindow.width = 400
     elsif $PokemonTemp.speechbubble_bubble==2
       msgwindow.setSkin("Graphics/windowskins/frlgtextskin")
       msgwindow.height = 102
       msgwindow.width = Graphics.width
       if $game_player.direction==8
         $PokemonTemp.speechbubble_vp = Viewport.new(0, 0, Graphics.width, 280)
         msgwindow.y = 6
       else
         $PokemonTemp.speechbubble_vp = Viewport.new(0, 6 + msgwindow.height, Graphics.width, 280)
         msgwindow.y = (Graphics.height - msgwindow.height) - 6
         if $PokemonTemp.speechbubble_outofrange==true
           msgwindow.y = 6
         end
       end
      else
        msgwindow.height = 102
        msgwindow.y = Graphics.height - msgwindow.height - 6
      end
    end
  end
  if $game_system && $game_system.respond_to?("message_frame")
    if $game_system.message_frame != 0
      msgwindow.opacity = 0
    end
  end
  if $game_message
    case $game_message.background
      when 1  # dim
        msgwindow.opacity=0
      when 2  # transparent
        msgwindow.opacity=0
    end
  end
end
 
def pbCreateMessageWindow(viewport=nil,skin=nil)
  arrow = nil
  if $PokemonTemp.speechbubble_bubble==2 && $game_map.events[$PokemonTemp.speechbubble_talking] != nil # Message window set to floating bubble.
    if $game_player.direction==8 # Player facing up, message window top.
      $PokemonTemp.speechbubble_vp = Viewport.new(0, 104, Graphics.width, 280)
      $PokemonTemp.speechbubble_vp.z = 999999
      arrow = Sprite.new($PokemonTemp.speechbubble_vp)
      arrow.x = $game_map.events[$PokemonTemp.speechbubble_talking].screen_x - Graphics.width
      arrow.y = ($game_map.events[$PokemonTemp.speechbubble_talking].screen_y - Graphics.height) - 136
      arrow.z = 999999
      arrow.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/","Arrow4")
      arrow.zoom_x = 2
      arrow.zoom_y = 2
      if arrow.x<-230
        arrow.x = $game_map.events[$PokemonTemp.speechbubble_talking].screen_x
        arrow.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/","Arrow3")
      end
    else # Player facing left, down, right, message window bottom.
      $PokemonTemp.speechbubble_vp = Viewport.new(0, 0, Graphics.width, 280)
      $PokemonTemp.speechbubble_vp.z = 999999
      arrow = Sprite.new($PokemonTemp.speechbubble_vp)
      arrow.x = $game_map.events[$PokemonTemp.speechbubble_talking].screen_x
      arrow.y = $game_map.events[$PokemonTemp.speechbubble_talking].screen_y
      arrow.z = 999999
      arrow.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/","Arrow1")
      if arrow.y>=Graphics.height-120 # Change arrow direction.
        $PokemonTemp.speechbubble_outofrange=true
        $PokemonTemp.speechbubble_vp.rect.y+=104
        arrow.x = $game_map.events[$PokemonTemp.speechbubble_talking].screen_x - Graphics.width
        arrow.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/","Arrow4")
        arrow.y = ($game_map.events[$PokemonTemp.speechbubble_talking].screen_y - Graphics.height) - 136
        if arrow.x<-250
          arrow.x = $game_map.events[$PokemonTemp.speechbubble_talking].screen_x
          arrow.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/","Arrow3")
        end
        if arrow.x>=256
          arrow.x-=15# = $game_map.events[$PokemonTemp.speechbubble_talking].screen_x-Graphics.width
          arrow.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/","Arrow3")
        end
      else
        $PokemonTemp.speechbubble_outofrange=false
      end
      arrow.zoom_x = 2
      arrow.zoom_y = 2
    end
  end
  $PokemonTemp.speechbubble_arrow = arrow
  msgwindow=Window_AdvancedTextPokemon.new("")
  if !viewport
    msgwindow.z=99999
  else
    msgwindow.viewport=viewport
  end
  msgwindow.visible=true
  msgwindow.letterbyletter=true
  msgwindow.back_opacity=MessageConfig::WINDOW_OPACITY
  pbBottomLeftLines(msgwindow,2)
  $game_temp.message_window_showing=true if $game_temp
  $game_message.visible=true if $game_message
  skin=MessageConfig.pbGetSpeechFrame() if !skin
  msgwindow.setSkin(skin)
  return msgwindow
end

def pbDisposeMessageWindow(msgwindow)
  $game_temp.message_window_showing=false if $game_temp
  $game_message.visible=false if $game_message
  msgwindow.dispose
  $PokemonTemp.speechbubble_arrow.dispose if $PokemonTemp.speechbubble_arrow
  $PokemonTemp.speechbubble_vp.dispose if $PokemonTemp.speechbubble_vp
end

def pbCallBub(status=0,value=0)
  $PokemonTemp.speechbubble_talking=get_character(value).id
  $PokemonTemp.speechbubble_bubble=status
end
 

Miralys

Rookie
Member
Joined
May 19, 2018
Posts
3
I've never had this issue before in v18, but I recently started a new project in v20 and I've been hit with this error when trying to call for the speech bubble:

============================================

[Pokémon Essentials version 20.1]
[v20 Hotfixes 1.0.5]

Script error in event 7 (coords 4,2), map 2 (Lappet Town)
Exception: NoMethodError
Message: undefined method `speechbubble_talking=' for nil:NilClass

***Full script:
pbCallBub(2,007)

Backtrace:
380:Speech Bubbles:184:in `pbCallBub'
(eval):1:in `execute_script'
033:Interpreter:143:in `eval'
033:Interpreter:143:in `execute_script'
034:Interpreter_Commands:1112:in `command_355'
034:Interpreter_Commands:116:in `execute_command'
033:Interpreter:133:in `block in update'
033:Interpreter:90:in `loop'
033:Interpreter:90:in `update'
[Following Pokemon EX] Refresh.rb:255:in `update'

============================================

And this error when trying to open the debug menu

============================================

[Pokémon Essentials version 20.1]
[v20 Hotfixes 1.0.5]

Exception: NoMethodError
Message: undefined method `speechbubble_bubble' for nil:NilClass

Backtrace:
380:Speech Bubbles:113:in `pbCreateMessageWindow'
370:Debug_Menus:85:in `pbDebugMenu'
[Following Pokemon EX] Refresh.rb:117:in `pbDebugMenu'
[Voltseon's Pause Menu] 005_VoltseonMenu_Entries.rb:188:in `block in selected'
082:MessageConfig:570:in `pbFadeOutIn'
[Voltseon's Pause Menu] 005_VoltseonMenu_Entries.rb:188:in `selected'
[Voltseon's Pause Menu] 003_VoltseonMenu_Menu.rb:58:in `update'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:219:in `block in update'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:215:in `loop'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:215:in `update'

============================================

Wondering what I did wrong, and if anyone know how to help. Thank you in advance ^^
 

ThatWelshOne_

Champion
Member
I've never had this issue before in v18, but I recently started a new project in v20 and I've been hit with this error when trying to call for the speech bubble:

============================================

[Pokémon Essentials version 20.1]
[v20 Hotfixes 1.0.5]

Script error in event 7 (coords 4,2), map 2 (Lappet Town)
Exception: NoMethodError
Message: undefined method `speechbubble_talking=' for nil:NilClass

***Full script:
pbCallBub(2,007)

Backtrace:
380:Speech Bubbles:184:in `pbCallBub'
(eval):1:in `execute_script'
033:Interpreter:143:in `eval'
033:Interpreter:143:in `execute_script'
034:Interpreter_Commands:1112:in `command_355'
034:Interpreter_Commands:116:in `execute_command'
033:Interpreter:133:in `block in update'
033:Interpreter:90:in `loop'
033:Interpreter:90:in `update'
[Following Pokemon EX] Refresh.rb:255:in `update'

============================================

And this error when trying to open the debug menu

============================================

[Pokémon Essentials version 20.1]
[v20 Hotfixes 1.0.5]

Exception: NoMethodError
Message: undefined method `speechbubble_bubble' for nil:NilClass

Backtrace:
380:Speech Bubbles:113:in `pbCreateMessageWindow'
370:Debug_Menus:85:in `pbDebugMenu'
[Following Pokemon EX] Refresh.rb:117:in `pbDebugMenu'
[Voltseon's Pause Menu] 005_VoltseonMenu_Entries.rb:188:in `block in selected'
082:MessageConfig:570:in `pbFadeOutIn'
[Voltseon's Pause Menu] 005_VoltseonMenu_Entries.rb:188:in `selected'
[Voltseon's Pause Menu] 003_VoltseonMenu_Menu.rb:58:in `update'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:219:in `block in update'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:215:in `loop'
[Voltseon's Pause Menu] 002_VoltseonMenu_Main.rb:215:in `update'

============================================

Wondering what I did wrong, and if anyone know how to help. Thank you in advance ^^
Give this one a go.
 
Back
Top