Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Letter by Letter Message Window

Warning: I haven't update this script in years, it works fine but you may wont be able to download the demo or such...

Letter by Letter Message Window
Version: 1.1


Last Update

September 8, 2006

Introduction

This script introduce many new features to the RMXP's message window.

Version History

Version 1.11 (08/09/06)
  • fixed: Smooth autoclose
  • added: Frames before close
  • added: Hide pause graphic

Version 1.1 (16/08/06)
  • fixed: Path
  • added: Picture above message
  • added: Autoclose
  • added: Shadow and Outline text

Demo

http://www.uploadpower.com/en/download.php?id=D5FD4ABA1
http://www.fileul.com/view.php?file=KqdJbz

Features
Script

Code:
#==============================================================================

# ** Letter by Letter Message Window

#------------------------------------------------------------------------------

# Sheol (creationasylum.net)

# Version 1.11

# September 8, 2006

#------------------------------------------------------------------------------

# Thanks to:

#  - Dubealex, for some of the features.

#  - RPG Advocate, for the hexadecimal color.

#==============================================================================

 

#------------------------------------------------------------------------------

# SDK log

#------------------------------------------------------------------------------

SDK.log('Letter by Letter Message Window', 'Sheol', '1.11', '08.09.06')

 

#------------------------------------------------------------------------------

# Begin SDK Enabled Check

#------------------------------------------------------------------------------

if SDK.state('Letter by Letter Message Window')

 

# Loads the maps' names

$data_map_infos = load_data('Data/MapInfos.rxdata')

 

#==============================================================================

# ** Game_Message

#------------------------------------------------------------------------------

#  This class handles the message data

#==============================================================================

 

class Game_Message

  #--------------------------------------------------------------------------

  # * Public Instance Variables

  #--------------------------------------------------------------------------

  attr_accessor :letter_by_letter, :speed, :can_skip, :height, :font,

    :sound_enable, :sound, :path, :face_rect, :fit, :skin, :nb_skin,

    :nbyo, :opacity, :shadow, :outline, :pause, :autoclose_frames

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    # Letter by letter mode

    @letter_by_letter = true

    # Lettter by letter mode's speed

    @speed = 3

    # If this option is false, the player can't skip the message

    @can_skip = true

    # Height of each line, used within the fit or above event options

    @height = 32

    # Always resize the message

    @fit = false

    # Font for the mesage text

    @font = Font.default_name

    # Sound enable

    @sound_enable = false

    # Sound for letter by letter, ['filename', vol]

    @sound = ['032-Switch01', 80]

    # Folder for the message pictures

    @path = 'Graphics/Pictures/'

    # Face rect (only the last two numbers are used)

    @face_rect = Rect.new(0, 0, 96, 96)

    # Skin for the message window, nil = default

    @skin = nil

    # Skin for the name box, nil = default

    @nb_skin = nil

    # Name box y offset

    @nbyo = 20

    # Message window's opacity

    @opacity = 160

    # Outline text

    @outline = false

    # Shadow text

    @shadow = false

    # Show or not the pause graphic

    @pause = true

    # Frames before the message autoclose

    @autoclose_frames = 8

  end

end

 

#==============================================================================

# ** Game_System

#------------------------------------------------------------------------------

#  Adds Game Message

#==============================================================================

 

class Game_System

  #--------------------------------------------------------------------------

  # * Public Instance Variables

  #--------------------------------------------------------------------------

  attr_reader :message

  #--------------------------------------------------------------------------

  # * Alias Listing

  #--------------------------------------------------------------------------

  alias slipknot_lblms_initialize initialize

  #--------------------------------------------------------------------------

  # * Load Database

  #--------------------------------------------------------------------------

  def initialize

    slipknot_lblms_initialize

    @message = Game_Message.new

  end

end

 

#==============================================================================

# ** Game_Event

#------------------------------------------------------------------------------

#  Adds a reader to the Event Name

#==============================================================================

 

class Game_Event < Game_Character

  #--------------------------------------------------------------------------

  # * Name

  #--------------------------------------------------------------------------

  def name

    @event.name

  end

end

 

#==============================================================================

# ** Spriteset_Map

#------------------------------------------------------------------------------

#  Adds a reader to the Character Sprites

#==============================================================================

 

class Spriteset_Map

  #--------------------------------------------------------------------------

  # * Public Instance Variables

  #--------------------------------------------------------------------------

  attr_reader :character_sprites

end

 

#==============================================================================

# ** Window_Message

#------------------------------------------------------------------------------

#  Rewrites Window_Message

#==============================================================================

 

class Window_Message < Window_Selectable

  #--------------------------------------------------------------------------

  # * Alias Listing

  #--------------------------------------------------------------------------

  alias slipknot_lblms_initialize initialize

  alias slipknot_lblms_terminatemessage terminate_message

  #--------------------------------------------------------------------------

  # * Initialize

  #--------------------------------------------------------------------------

  def initialize

    slipknot_lblms_initialize

    @autoclose = -1

  end

  #--------------------------------------------------------------------------

  # * Terminate Message

  #--------------------------------------------------------------------------

  def terminate_message

    slipknot_lblms_terminatemessage

    [@name_box, @picture].each do |x|

      x.dispose if x && ! x.disposed?

    end

  end

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    self.opacity = $game_system.message_frame == 0 ? 255 : 0

    self.back_opacity = system.opacity

    unless system.fit

      self.width, self.height = 480, 160

      skin = system.skin ? system.skin : $game_system.windowskin_name

      self.windowskin = RPG::Cache.windowskin(skin)

      self.contents = Bitmap.new(448, 128)

    else

      contents.clear

      contents.font.color = normal_color

      contents.font.size = Font.default_size

    end

    contents.font.name = system.font

    @x = @y = @wait_count = indent = 0

    @fit_size, @sound = false, system.sound_enable

    @start_x = 4

    @cursor_width = [0, 0, 0, 0]

    @x = 8 if $game_temp.choice_start == 0

    return if ! (@text = $game_temp.message_text)

    @text.gsub!(/\\\\/) { "\000" }

    @text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }

    @text.gsub!('\$') { $game_party.gold.to_s }

    @text.gsub!(/\\[Nn]\[([0-9]+)\]/) do

      $game_actors[$1.to_i] ? $game_actors[$1.to_i].name : ''

    end

    @text.gsub!(/\\[Nn][Pp]\[([\d+])\]/) do

      $game_party.actors[$1.to_i] ? $game_party.actors[$1.to_i].name : ''

    end

    @text.gsub!(/\\[Cc]lass\[(\d+)\]/) do

      $game_actors[$1.to_i] ? $game_actors[$1.to_i].class_name : ''

    end

    @text.gsub!(/\\[Mm]ap/) { $data_map_infos[$game_map.map_id].name }

    gold_set = @text.gsub!(/\\[Gg]/, '')

    if @text[/\\[Nn]ame/]

      if @text.sub!(/\\[Nn]ame\[(.*?)\]/, '')

        name_text = $1

      elsif @text.sub!(/\\[Nn]ame/, '')

        name_text = $game_map.events[$game_system.map_interpreter.event_id].name

      end

    end

    if @text[/\\[Ff]ace/]

      # Left

      if @text.sub!(/\\[Ff]ace{(.+?)}/, '')

        face, face_name = 1, $1

      # Right

      elsif @text.sub!(/\\[Ff]ace\[(.+?)\]/, '')

        face, face_name = 2, $1

      end

    end

    picture = $1 if @text.sub!(/\\[Pp]ic\[(.+?)\]/, '')

    if @text[/\\[Pp]/]

      if @text.sub!(/\\[Pp]\[([-1,0-9]+)\]/, '')

        event = $1.to_i

      elsif @text.gsub!(/\\[Pp]/, '')

        event = $game_system.map_interpreter.event_id

      end

    end

    @text.gsub!('\$') { $game_party.gold.to_s }

    @text.gsub!(/\\[Cc]\[([0-9A-Fa-f #]+?)\]/) { "\001[#$1]" }

    @text.gsub!(/\\[Cc]/) { "\001[0]" }

    @text.gsub!(/\\[Ii]con{([IiWwAaSs])}\[(\d+)\]/) { change_icon($1, $2.to_i) }

    @text.gsub!(/\\[Ii]con\[(.*?)\]/) { "\002[#$1]" }

    @text.gsub!('\!') { "\003" }

    @text.gsub!('\.') { "\004" }

    @text.gsub!(/\\[Ss]\[([Xx\d]+)\]/) { "\005[#$1]" }

    @text.gsub!(/\\[Bb]/) { "\006" }

    @text.gsub!(/\\[Ii]/) { "\007" }

    @text.gsub!(/\\[Ff]\[(.*?)\]/) { "\010[#$1]" }

    @text.gsub!(/\\\%\[(\d+)\]/) { "\011[#$1]" }

    @text.gsub!('\%') { "\011" }

    if @fit_size = (event || system.fit)

      lines_size = [0, 0, 0, 0]

      save, lines = @text.clone, 0

      while (c = @text.slice!(/./m))

        if c == "\n"

          lines += 1

          break if lines == 4

          if lines >= $game_temp.choice_start

            lines_size[lines] += 16

          end

          next

        end

        lines_size[lines] += eval_text(c, true)

      end

    end

    if face

      if @fit_size

        mh = system.height

        fh = system.face_rect.height

        lines = (fh.to_f / mh.to_f).ceil if (lines * mh) < fh

        f_x = face == 2 ? 0 : lines_size.max + 16

        f_y = (lines * mh) <= fh ? 0 : (lines * mh - fh) / 2

        @start_x += system.face_rect.width + 4 if face == 2

        indent += system.face_rect.width + 8

      else

        f_x, f_y = face == 2 ? 16 : 336, 16

        @start_x += system.face_rect.width + 36 if face == 2

      end

      f_bitmap = RPG::Cache.load_bitmap(system.path, face_name)

    end

    if @fit_size

      @text = save

      self.height = lines * system.height + 32

      self.height += 32 if $game_temp.num_input_variable_id > 0

      self.width = lines_size.max + indent + 40

      windowskin = system.skin ? system.skin : $game_system.windowskin_name

      self.windowskin = RPG::Cache.windowskin(windowskin)

      self.contents = Bitmap.new(self.width - 32, self.height - 32)

      contents.font.name = system.font

    end

    contents.blt(f_x, f_y, f_bitmap, system.face_rect) if face

    if ! event

      h2 = self.height / 2

      self.y = $game_temp.in_battle ? 96 - h2 + system.nbyo :

        case $game_system.message_position

        when 0 then 96 - h2 + system.nbyo

        when 1 then 240 - h2

        when 2 then 384 - h2

        end

      self.x = 320 - self.width / 2

    else

      c = event > 0 ? $game_map.events[event] : $game_player

      mx, my = 636 - self.width, 476 - self.height

      fx = [[c.screen_x - self.width / 2, 4].max, mx].min

      sy = name_text ? system.nbyo + 4 : 4

      ch = [$scene.spriteset.character_sprites[event - 1].bitmap.height /

        4 + 4, 48].max

      fy = [[c.screen_y - (ch + self.height), sy].max, my].min

      self.x, self.y = fx, fy

    end

    if name_text

      @name_box = Window_NameBox.new(x, y - system.nbyo, name_text)

      @name_box.back.opacity = 0 if $game_system.message_frame == 1

    end

    if picture

      @picture = Sprite.new

      @picture.bitmap = RPG::Cache.load_bitmap(system.path, picture)

      @picture.x = self.x + self.width - @picture.bitmap.width

      @picture.y = self.y - @picture.bitmap.height

    end

    if gold_set

      @gold_window = Window_Gold.new

      @gold_window.x = 560 - @gold_window.width

      if $game_temp.in_battle

        @gold_window.y = 192

      else

        @gold_window.y = self.y >= 128 ? 32 : 384

      end

      @gold_window.opacity = self.opacity

      @gold_window.back_opacity = self.back_opacity

    end

  end

  #--------------------------------------------------------------------------

  # * Evaluate Text

  #--------------------------------------------------------------------------

  def eval_text(c, read = false)

    case c

    when "\000"

      c = '\\'

    when "\001"

      @text.sub!(/\[(.*?)\]/, '')

      return 0 if read

      h, c = $1, $1.to_i

      contents.font.color = h.slice!(/./) == '#' ? hex_color(h) : text_color(c)

      return

    when "\002"

      @text.sub!(/\[(.*?)\]/, '')

      return 24 if read

      y = @fit_size ? system.height * @y + (system.height - 24) / 2 : 32 * @y + 4

      contents.blt(@x + @start_x, y, RPG::Cache.icon($1.to_s), Rect.new(0, 0, 24, 24))

      @x += 24

      return unless @y >= $game_temp.choice_start

      @cursor_width[@y] += 24

      return

    when "\003"

      return 0 if read

      @stop = true

      return

    when "\004"

      return 0 if read

      @wait_count += 10

      return

    when "\005"

      @text.sub!(/\[([x\d]+)\]/, '')

      if $1.downcase == 'x'

        contents.font.size = Font.default_size

      else

        contents.font.size = [[$1.to_i, 6].max, system.height].min

      end

      return 0

    when "\006"

      contents.font.bold = (! contents.font.bold)

      return 0

    when "\007"

      contents.font.italic = (! contents.font.italic)

      return 0

    when "\010"

      @text.sub!(/\[(.*?)\]/, '')

      if $1.downcase == 'x'

        contents.font.name = system.font

      else

        contents.font.name = [$1.to_s, system.font]

      end

      return 0

    when "\011"

      @text.sub!(/\[(\d+)\]/, '')

      return 0 if read

      @autoclose = $1 ? $1.to_i : system.autoclose_frames

      return

    when "\n"

      @y += 1

      @x = 0

      @x = 8 if @y >= $game_temp.choice_start

      return

    end

    w = contents.text_size(c).width

    return w if read

    y = @fit_size ? system.height * @y : 32 * @y

    if system.outline

      color = contents.font.color.dup

      contents.font.color.set(0, 0, 0, 255)

      contents.draw_text(@x + @start_x + 1, y, w * 2, system.height, c)

      contents.draw_text(@x + @start_x, y + 1, w * 2, system.height, c)

      contents.draw_text(@x + @start_x - 1, y, w * 2, system.height, c)

      contents.draw_text(@x + @start_x, y - 1, w * 2, system.height, c)

      contents.font.color = color

      contents.draw_text(@x + @start_x, y, w * 2, system.height, c)

    elsif system.shadow

      color = contents.font.color.dup

      contents.font.color.set(0, 0, 0, 192)

      contents.draw_text(@x + @start_x + 2, y + 2, w * 2, system.height, c)

      contents.font.color = color

      contents.draw_text(@x + @start_x, y, w * 2, system.height, c)

    else

      contents.draw_text(@x + @start_x, y, w * 2, system.height, c)

    end

    @sound = (system.sound_enable && c != ' ')

    @x += w

    return if @y < $game_temp.choice_start || @y > 3

    @cursor_width[@y] += w

  end

  #--------------------------------------------------------------------------

  # * Finish

  #--------------------------------------------------------------------------

  def finish

    if temp.choice_max > 0

      @item_max, self.active, self.index = temp.choice_max, true, 0

    end

    if temp.num_input_variable_id > 0

      digits_max = temp.num_input_digits_max

      number = $game_variables[temp.num_input_variable_id]

      @input_number_window = Window_InputNumber.new(digits_max)

      input_number.number = number

      input_number.x = x + 8

      input_number.y = y + temp.num_input_start * (@fit_size ? system.height : 32)

    end

  end

  #--------------------------------------------------------------------------

  # * Database Icon

  #--------------------------------------------------------------------------

  def change_icon(option, index)

    s = case option.downcase

      when 'i'  then $data_items[index]

      when 'w' then $data_weapons[index]

      when 'a'  then $data_armors[index]

      when 's'  then $data_skills[index]

      end

    return sprintf("\002[%s]%s", s.icon_name, s.name) if s.name

  end

  #--------------------------------------------------------------------------

  # * Hexadecimal Color

  #--------------------------------------------------------------------------

  def hex_color(string)

    return normal_color if string.size != 6

    r = g = b = 0

    5.times do |i|

      s = string.slice!(/./m)

      v = hex_convert(s.downcase)

      case i

      when 0 then r += v * 16

      when 1 then r += v

      when 2 then g += v * 16

      when 3 then g += v

      when 4 then b += v * 16

      when 5 then b += v

      end

    end

    return Color.new(r, g, b)

  end

  #--------------------------------------------------------------------------

  def hex_convert(c)

    return c.to_i if c[/[0-9]/]

    case c

    when 'a' then 10

    when 'b' then 11

    when 'c' then 12

    when 'd' then 13

    when 'e' then 14

    when 'f' then 15

    end

  end

  #--------------------------------------------------------------------------

  # * Game Message

  #--------------------------------------------------------------------------

  def system() $game_system.message end

  #--------------------------------------------------------------------------

  # * Game Temp

  #--------------------------------------------------------------------------

  def temp() $game_temp end

  #--------------------------------------------------------------------------

  # * Input Number Window

  #--------------------------------------------------------------------------

  def input_number() @input_number_window end

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

  def update

    if @contents_showing

      super

      if @fade_in

        self.contents_opacity += 24

        if input_number

          input_number.contents_opacity += 24

        end

        @fade_in = contents_opacity != 255

        return

      end

      if @text

        if Input.trigger?(13)

          if @stop

            self.pause = @stop = false

            return

          end

          @skip = system.can_skip

        end

        return if @stop

        if @wait_count > 0 && ! @skip

          @wait_count -= 1

          return

        end

        loop do

          if (c = @text.slice!(/./m))

            eval_text(c)

            if @stop

              self.pause = system.pause

              return

            end

            if ! @skip && @sound

              Audio.se_play('Audio/SE/' + system.sound[0], system.sound[1])

              @sound = false

            end

            @wait_count += system.speed

          else

            @text = nil

            break

          end

          break if ! @skip

        end

        return if @text || @autoclose != -1

        finish

        return

      else

        if @autoclose > 0

          @autoclose -= 1

          return

        elsif @autoclose == 0

          terminate_message

          @autoclose = -1

          return

        end

      end

    end

    if input_number

      input_number.update

      if Input.trigger?(13)

        $game_system.se_play($data_system.decision_se)

        $game_variables[$game_temp.num_input_variable_id] = input_number.number

        $game_map.need_refresh = true

        input_number.dispose

        @input_number_window = nil

        terminate_message

      end

      return

    end

    if @contents_showing

      self.pause = ($game_temp.choice_max == 0) & system.pause

      if Input.trigger?(12)

        if $game_temp.choice_max > 0 && $game_temp.choice_cancel_type > 0

          $game_system.se_play($data_system.cancel_se)

          $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)

          terminate_message

        end

      end

      if Input.trigger?(13)

        if $game_temp.choice_max > 0

          $game_system.se_play($data_system.decision_se)

          $game_temp.choice_proc.call(self.index)

        end

        terminate_message

      end

      return

    end

    if ! @fade_out && $game_temp.message_text

      @contents_showing = temp.message_window_showing = true

      @stop = false

      @autoclose = -1

      @skip = (! system.letter_by_letter)

      reset_window

      refresh

      @wait_count, self.visible = 0, true

      return

    end

    return if ! visible

    @fade_out = true

    self.opacity -= 48

    if self.opacity == 0

      self.visible = @fade_out = false

      $game_temp.message_window_showing = false

    end

  end

  #--------------------------------------------------------------------------

  # * Updates Cursor Rectangle

  #--------------------------------------------------------------------------

  def update_cursor_rect

    if index >= 0

      n = $game_temp.choice_start + @index

      y = (@fit_size ? system.height : 32) * n

      cursor_rect.set(4 + @start_x, y, @cursor_width.max + 8,

        @fit_size ? system.height : 32)

    else

      cursor_rect.empty

    end

  end

end

 

#==============================================================================

# ** Window_NameBox

#------------------------------------------------------------------------------

#  This window is used to display the box above the message.

#==============================================================================

 

class Window_NameBox < Sprite

  #--------------------------------------------------------------------------

  # * Public Instance Variables

  #--------------------------------------------------------------------------

  attr_reader :back

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize(x, y, text)

    dumb = Bitmap.new(160, 42)

    dumb.font.name = system.font

    size = dumb.text_size(text).width

    dumb.dispose

    @back = Window_Base.new(x, y, size + 12, 32)

    skin = system.nb_skin ? system.nb_skin : $game_system.windowskin_name

    @back.windowskin = RPG::Cache.windowskin(skin)

    viewport = Viewport.new(x + 6, y + 5, size, 22)

    @back.z = viewport.z = 9999

    super(viewport)

    self.bitmap = Bitmap.new(size, 22)

    bitmap.font.name = system.font

    bitmap.draw_text(0, 0, size, 22, text)

  end

  #--------------------------------------------------------------------------

  # * Game Message

  #--------------------------------------------------------------------------

  def system() $game_system.message end

  #--------------------------------------------------------------------------

  # * Dispose

  #--------------------------------------------------------------------------

  def dispose

    @back.dispose

    @back = nil

    super

  end

end

 

#==============================================================================

# ** Interpreter

#------------------------------------------------------------------------------

#  Adds a reader to the Event ID and Game Message

#==============================================================================

 

class Interpreter

  #--------------------------------------------------------------------------

  # * Public Instance Variables

  #--------------------------------------------------------------------------

  attr_reader :event_id

  #--------------------------------------------------------------------------

  # * Game Message

  #--------------------------------------------------------------------------

  def message

    $game_system.message

  end

end

 

#==============================================================================

# ** Scene_Map

#------------------------------------------------------------------------------

#  Adds a reader to the Spriteset

#==============================================================================

 

class Scene_Map

  #--------------------------------------------------------------------------

  # * Public Instance Variables

  #--------------------------------------------------------------------------

  attr_reader :spriteset

end

 

#------------------------------------------------------------------------------

# End SDK Enabled Test

#------------------------------------------------------------------------------

end

Instructions

You need paste the code before Main, but below SDK.
Every command is explained in the demo.

To remove the SDK dependency, delete these lines:
Code:
#------------------------------------------------------------------------------

# SDK log

#------------------------------------------------------------------------------

SDK.log('Letter by Letter Message Window', 'Slipknot', '?.?', '??.??.??')

 

#------------------------------------------------------------------------------

# Begin SDK Enabled Check

#------------------------------------------------------------------------------

if SDK.state('Letter by Letter Message Window')
Code:
#------------------------------------------------------------------------------

# End SDK Enabled Test

#------------------------------------------------------------------------------

end

Compatibility

This script couldn't work with other message window script.

F.A.Q.

Q: The text doesn't show, how I make it appear?
A: Paste this above Main: Font.default_name = 'Tahoma'

Q: How I can use the name box?
A: With \Name[text], this is explained in the demo.">
 

xroth

Member

Very Nice!!! I have been needing a message script that lets you put in Icon images!!! I give it a 10 out of 10! Slipknot you are the best!
 
Bravo, Slipknot! :)

How do you change the speed of the letter by letter script? I presume the default speed can be changed within the script somewhere, but to be able to change it via a command in the message box would take additional scripting? During my intro I need to be able to pause the text... and then start it up again... and then slow it down, for example. And as it's timed to music, I don't want the player to be able to hit buttons to accelerate the speed of the text - sorta forcing them to sit through it at the right pace. Thinking of implementing that at all?

Game.exe crashes (illegal operation and all that) when I speak to the girl who starts to explain how to use the name box. I'm not sure why, it's not at a specific letter, but within the first couple of words she says.

It hangs (no crash, just hangs) when I speak to the girl on the top left after choosing EXIT EVENT (first floor). Perhaps a new page has been set to auto-start there and that's responsible.

Also, the staircase event on the first floor of the tower that pushes you upstairs won't let you return back downstairs. Once I went upstairs and wanted to go back down to test the crashes again, every time I walked down the stairs it threw me back up again. ^_^

Aside from that, seems pretty great and easy to use. Feels cleaner than Dubealex's, somehow.
 
Why lie? The truth is always better even if its a bad thing. Someday, i will buy the legal one but for now, im just using it to pratice, thats all.
 
Rules and Guidelines":1ikay1m8 said:
RMXP.org has an extremely strong anti-piracy stance. RPG Maker XP is NOT a freeware program, and we will not tolerate use of pirated copies.

Um, if a mod or someone finds out...
 
I can't get my fonts to work either. I don't think the message I input does anything because I inputted a Name Box and I didn't get it.
 
Grab the trial version, see how you like it after 30 days - and if you're still with it, chances are it's worth it to you :). 30 days is a long time! My trial hasn't expired yet, so I'm okay, though I did use the other version for ages. I only have to wait a couple of days for a money transfer to get through to my family so they can use their credit card - live on my own and haven't been able to pay for it all this time for the apparent lack of payment alternatives. It's certainly worth it, though, and a better expenditure than many alternatives people waste on, and then noone can tell me off any more).

Several people have font problems, even if they're not using the illegal version, because they may have screwed up their Main script. So this advice should be useful to everyone. Replace your Main script with this one and it should take care of your problems.

But I think there are bugs still in the script anyway, btw.

Code:
#====================================================
# ** Main
#--------------------------------------------------------------------
#  After defining each class, actual processing begins here.
#======================================================

begin
  $showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ''
  # Font used in windows
  $defaultfonttype = $fontface = $fontname = Font.default_name = "Arial"
  # Font size used
  $defaultfontsize = $fontsize = Font.default_size = 18
  Graphics.freeze
  $scene = Scene_Title.new
  while $scene != nil
    $scene.main
  end
  Graphics.transition(20)
rescue Errno::ENOENT
  filename = $!.message.sub("No such file or directory - ", "")
  print("File #{filename} was not found.")
end
 
:) I think the problem is many people wrote scripts for two different old pirated versions, where the scripts had been rewritten - so important words like "fonttype" were "fontname" and "fontface" and therefore the confusion... whereas that script reminds the game that all three are the same thing, and thus, voila, no problems whatsoever. :)
 
First don't talk about illegal versions!
second, to fix the font, just paste this in Main:
Code:
Font.default_name = 'Tahoma'
this is needed in the japanese version of the program.
 
I've tried out the script and so far I've not had any major problems. However, the Windowskin that I happen to be using has a somewhat ornate border (ie more than the simple border in the basic skin). As a result, the letters in the namebox are sometimes going over the border.

Is there a way to increase the size of the namebox? If so, how would I go about doing that? (I'm new to the coding/scripting ':| )

Thank you :)
 
darklord517 said:
How do you make text appear in the name box and how do you activate it at all?

There is a demo provided that explains the functions in the very first post. Though there is an error with the demo, I was still able to understand the different functions. You should really consider downloading it so that you can understand all the functions of the script :)

The namebox is activated by: \Name[text]
The "text" is whatever appears in the name box.

//Also, shameless bump for the question in my post above.\\:D
 
lunarea said:
Is there a way to increase the size of the namebox? If so, how would I go about doing that? (I'm new to the coding/scripting ':| )

Just put spaces around the name you're trying to put in. About three on either side should do it depending on the border.

@slipknot: Any chance you'll be adding an auto-close text box feature? I could REALLY use that for some of the cut scenes in my game.
 
Skyla_Doragono said:
Just put spaces around the name you're trying to put in. About three on either side should do it depending on the border.

The problem isn't really the length of the box, as that's easy to fix, but the height. The letters are sticking up and down over the border.

It's not a huge deal or anything, but I just thought I'd ask :)
 
Oh, my bad. I think you need to look for a part of the code that draws the actual name box, but I don't know enough of Ruby to know what to look for. Sorry. :<
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top