RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
FaceSystem Someone Put a Video Seriusly Dont Know <--- =( [XP]

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 62
RMRK Junior
Someone PLSSS!! i Really Dont Know it make me Confusion!! and upset and i dont want to make
a game again plsss put a video for this script!!!!  :(
   
Code: [Select]
#==============================================================================
# ** Inserter
#------------------------------------------------------------------------------
#  This scripts automatically scans the folder Data/Scripts and inserts those
#  files into the scripts list by meta informations provided in these scripts.
#  It also takes care that the script error messages are formatted correctly.
#==============================================================================

# Don't run a second time! (Stupid F12 button)
if defined? Inserter
  $ONE_LIFE_NO_CONTINUES = true
end

class Range
  def length
    self.end - self.begin + (self.exclude_end? ? 0 : 1)
  end
end

module Inserter
  # Determines when to show a warning and log any errors.
  # Can be :always, :in_debug, or :never
  WARN_AND_LOG = :in_debug
  # Filename of the log file. If set to nil, no log will be written, regardless
  # of the setting above. A warning message might still be shown.
  LOG_FILE = 'Data/Scripts/inserter.log'
 
  # Gets the numeric ID for the script with the given name. If that script
  # doesn't exist, :invalid_script_id is returned.
  def self.get_script_id(id)
    if id.is_a? String
      $RGSS_SCRIPTS.each_index do |i|
        if id == $RGSS_SCRIPTS[i][1]
          id = i
          break
        end
      end
    end
    return ((0..$RGSS_SCRIPTS.length - 1) === id) ? id : :invalid_script_id
  end
 
  @@scripts = Array.new($RGSS_SCRIPTS.length) do |index|
    [[1..$RGSS_SCRIPTS[index][3].count("\n") + 2, [:internal, 1], index]]
  end
  def self.scripts() @@scripts; end

  # Modifies an existing script. script_id is either the name or the ID of the
  # Script, line the line number to modify, action one of
  # - :delete          To delete that line.
  # - :replace         To replace the line's contents with replacement.
  # - :insert_before   To insert replacement before that line.
  # - :insert_after    To insert replacement after that line.
  # Replacement can be left out (or == nil) if and only if action == :delete.
  # The modification will only be performed if the original line is the same as
  # expected. If expected is left out, this check will be left out and the line
  # is always modified. WARNING: Leaving the expected value out might easily
  # break other scripts. Not recommended for release versions.
  # File specifies a script file name. Only code from this file will be
  # modified. Leave this out or set it to :internal if you want to modify code
  # from the script editor only.
  # Filename and start can be supplied to display proper error messages if the
  # error occurred in the inserted code.
  # Return values:
  # - :invalid_script_id    script_id was not found in the scripts list
  # - :invalid_action       No valid action supplied (see above)
  # - :line_not_found       The given line was not found in this script (either
  #                         index too large or deleted by another script)
  # - :unexpected_content   The given line didn't contain the expected contents
  # - :success              All went well.
  def self.modify script_id, line, action, replacement = nil, expected = nil,
                  old_name = :internal, new_name = :external, start = 0
    if ![:delete, :replace, :insert_before, :insert_after].include? action
      return :invalid_action
    end
    # Find script by name
    script_id = get_script_id script_id
    return script_id if script_id == :invalid_script_id
    if action == :delete
      replacement.clear
    elsif not replacement.empty?
      # Remove trailing newlines and count lines
      replacement[-1].chomp!
      while replacement[-1].empty?
        replacement.pop
        break if replacement.empty?
        replacement[-1].chomp!
      end
    end
    length = replacement.length
    replacement = replacement.join ''
    # Find real place to insert
    insert_at = -1
    script = @@scripts[script_id]
    script.each_index do |i|
      range, place = script[i]
      if insert_at == -1
        if place[0] == old_name and (place[1]..place[1]+range.length-1)===line
          insert_at = i; line += range.begin - place[1]
        end
      end
    end
    return :line_not_found if insert_at == -1
    lines = $RGSS_SCRIPTS[script_id][3].split(/\r?\n/)
    if expected == nil or lines[line - 1] == expected
      case action
      when :delete then lines.delete_at line - 1
      when :replace then lines[line - 1] = replacement
      when :insert_before, :insert_after
        line += 1 if action == :insert_after
        lines.insert line - 1, replacement
      end
    else
      return :unexpected_content
    end
    $RGSS_SCRIPTS[script_id][3] = lines.join("\n")
    range, place = script[insert_at]
    if line > range.begin
      script.insert(insert_at, [range.begin...line, place.dup])
      insert_at += 1
    end
    if length > 0
      script.insert(insert_at, [line...line+length, [new_name, start]])
      insert_at += 1
    end
    shift = ((action == :delete or action == :replace) ? 1 : 0)
    place[1] += line - range.begin + shift
    if line + length >= range.end + length - shift
      script.delete_at(insert_at)
      insert_at -= 1
    else
      script[insert_at][0] = Range.new(
        line + length, range.end + length - shift, range.exclude_end?
      )
    end
    length -= shift
    if length != 0
      (insert_at+1..script.length-1).each do |i|
        # Move range back
        range = script[i][0]
        script[i][0] = Range.new(
          range.begin + length, range.end + length, range.exclude_end?
        )
      end
    end
    return :success
  end
  # Inserts a new script. script_id is either the name or the ID of the
  # Script that will be used as a reference point, action is one of
  # - :delete          To delete that script.
  # - :replace         To replace that script with the new one.
  # - :insert_before   To insert new script before that one.
  # - :insert_after    To insert new script after that one.
  # Script can be left out (or == nil) if and only if action == :delete.
  # If the name is left out, either the old name will remain (when
  # status == :overwrite), or else the new script's name will stay empty.
  # Return values:
  # - :invalid_script_id    script_id was not found in the scripts list
  # - :invalid_action       No valid action supplied (see above)
  # - :success              All went well.
  def self.insert script_id, action, script = nil, name = nil,
                  filename = nil, line = nil
    if ![:delete, :replace, :insert_before, :insert_after].include? action
      return :invalid_action
    end
    # Find script by name
    script_id = get_script_id script_id
    return script_id if script_id == :invalid_script_id
    case action
    when :delete
      @@scripts.delete_at script_id
      $RGSS_SCRIPTS.delete_at script_id
    when :insert_before, :insert_after
      script_id += 1 if action == :insert_after
      @@scripts.insert script_id, nil
      $RGSS_SCRIPTS.insert script_id, [0, nil, '']
    end
    if action != :delete
      @@scripts[script_id] =
        [[1..script.length, [(filename or :external), (line or 1)]]]
      $RGSS_SCRIPTS[script_id][1] = (name or '')
      $RGSS_SCRIPTS[script_id][3] = (script.join '')
    end
    return :success
  end
end

#==============================================================================
# ** Insert scripts
#------------------------------------------------------------------------------
#  This script uses the class defined above to insert scripts into the script
#  list. It also creates a log file according to the log settings above.
#==============================================================================

(Proc.new do
  # Import mode
  commandline = Win32API.new('kernel32', 'GetCommandLine', ['v'], 'P').call
  $IMPORT = (commandline.downcase[/\bimport\b/] != nil)
  # Cycle scripts in Scripts folder
  log = ($IMPORT or (
    Inserter::WARN_AND_LOG == :always or
    ($DEBUG and Inserter::WARN_AND_LOG == :in_debug)
  ))
  errors = [] if log
  k = -1
  Dir["Data/Scripts/**/*.rb"].sort.each do |filename|
    catch :next_file do
      script = File.readlines filename
      filename = filename[13..-1]
      mode = :pretext
      options = nil
      script.each_index do |i|
        line = script[i].dup
        if mode == :pretext_comment
          # End pretext comment blocks when =end found or go to next line
          mode = :pretext if line[/^=end\s+/]
          next
        end
        # Ignore comments and newlines in the beginning
        if mode == :pretext
          mode = :pretext_comment if m=line[/^=begin(?!\s+(?i:(script|block)))/]
          next if m or line[/^\s*(#.*)?$/]
        end
        # Determine if we're in the last line of the script
        lastline = (i == script.length - 1)
        # Read header line
        if mode == :header
          # Header end
          if line[/^=end(\s|$)/]
            # Add missing information
            options[2 + k] = []
            options[0] = $RGSS_SCRIPTS.length - 1 unless options[0]
            options[1 + k] = :insert_before unless options[1 + k]
            # (+2 because i is 0-based index, and we ignore the =end line)
            options[5 + 2*k] = i + 2
            if k == 1 # modify mode
              if not options[1]
                options[1] =
                case options[2]
                when :insert_before then 0
                when :insert_after
                  $RGSS_SCRIPTS[get_script_id(options[0])].count("\n") + 1
                end
                # Memorize the starting line of the inserted code
                insert_start = i
              end
              options[5] = :internal unless options[5]
            end
            mode = :body
            # Start to read the next line, or insert nothing if EOF
            lastline ? (line = nil) : next
          else
            # Only add aliases on first call (Debug mods + F12 FTW)
            unless $ONE_LIFE_NO_CONTINUES
              line.gsub!(/\s*alias\s+"([^"]+)"\s+/i) do
                if $1[/\A
                       ((?:[A-Z]\w*::)*[A-Z]\w*)  # Class name
                       \#(\w+)\s*=>\s*(\w+)       # Separators, method names
                      \z/x]
                  klass = eval("#{$1} rescue nil")
                  if not klass.is_a? Class
                    errors << [:alias_error, :class_missing, $1, options]
                  else
                    begin
                      klass.send :alias_method, $3, $2
                    rescue NameError
                      errors << [:alias_error, :method_missing, $1, $2, options]
                    rescue
                      errors << [:alias_error, :failed, $2, $3, options]
                    end
                  end
                else
                  errors << [:alias_error, :invalid_syntax, $1, options]
                end
              end
            end
            if options.length == 6
              line.scan(/\s*
                (delete|replace|insert_(?:after|before)|name)\s+
                "([^"]+)"\s+
              /ix) do |command, value|
                command.downcase!
                case command
                when 'name'
                  options[3] = value
                else
                  options[1] = command.to_sym
                  options[0] = value
                end
              end
            else
              line.scan(/\s*
                (script|file|delete|replace|insert_(?:after|before)|expect)\s+
                "([^"]+)"\s+
              /ix) do |command, value|
                command.downcase!
                case command
                when 'script'
                  options[0] = value
                when 'file'
                  options[5] = value
                when 'expect'
                  options[4] = value
                else
                  options[2] = command.to_sym
                  options[1] = value.to_i
                end
              end
            end
          end
        end
        # If new subscript started or last line
        if mode != :header and (lastline or
             line.sub!(/^=begin\s+(?i:(script|block))/, ' ')
           )
          new_k = ($1 == "block") ? 1 : 0
          # Insert old script / block
          if mode == :body
            # Convert script ID to Integer if it's a number
            if options[0].is_a? String and options[0][/\A\d+\z/]
              options[0] = options[0].to_i
            end
            # Append last line
            options[2 + k] << line if lastline and line
            result = (options.length == 6) ?
              Inserter.insert(*options) : Inserter.modify(*options)
            if log and result != :success
              errors << [result, *options]
            end
            # Continue with next file if EOF
            throw :next_file if lastline
          end
          mode = :header
          # Start new script / block
          k = new_k
          options = Array.new(6 + 2*k)
          options[4 + 2*k] = filename
        # Sourcecode in pretext mode means single script file
        elsif mode == :pretext
          # Insert complete script above main
          result = Inserter.insert($RGSS_SCRIPTS.length-1, :insert_before,
            script, File.basename(filename, '.rb'), filename, 1
          )
          if log and result != :success
            errors << [result, *options]
          end
          throw :next_file
        end
        options[2 + k] << line if mode == :body
      end
    end
  end
  # Log errors
  if log
    if Inserter::LOG_FILE
      File.open Inserter::LOG_FILE, 'w' do |file|
        errors.each do |error, *options|
          msg = "[file '%%s'] %s: %%s\n"
          error =
          if error == :alias_error
            msg = format msg, "Aliasing failed for script '%s'"
            alias_error, *alias_options = *options[0..-2]
            options = options[-1]
            case alias_error
            when :class_missing
              "Class '#{alias_options[0]}' is not defined."
            when :method_missing
              "'#{alias_options[1]}' is not a method of class "+
              "#{alias_options[0]}."
            when :failed
              "Failed to alias method #{alias_options[0]}. Is "+
              "'#{alias_options[0]}' a valid method name?"
            when :invalid_syntax
              "Invalid syntax (expected: AClass#a_method => new_method)."
            end
          else
            msg = format msg, "Script '%s' could not be " + (
              options.length == 6 ? "inserted" : "modified"
            )
            case error
            when :invalid_script_id
              "Script '#{options[0]}' not found in script collection."
            when :invalid_action then "Invalid action '#{action}'."
            when :line_not_found
              "Line #{options[1]} couldn't be found in script '#{options[0]}'."+
              ' Either the line number is too large or it has been removed by '+
              'a different script.'
            when :unexpected_content
              "Unexpected content in line #{options[1]} of script "+
              "'#{options[0]}'. Maybe the script has been modified manually."
            else "Unknown reason"
            end
          end
          if options.length == 6 # Script insertion error
            file.printf(msg, options[4], options[3], error)
          else # Script modification error
            file.printf(msg, options[6], options[0], error)
          end
        end
      end
    end
    if errors.length > 0
      print 'Some scripts could not be inserted or modified.' +
        (Inserter::LOG_FILE ? "\nSee '#{Inserter::LOG_FILE}' for details." : '')
    end
  end
end).call
# Import section
if $IMPORT
  CommandLine.start do
    puts 'Inserter - Import mode', ''
    warning 'This is beta quality software. If something goes wrong,',
         'don\'t blame me!', ''
    puts 'Import mode can be used to permanently import the scripts from',
         'the Data/Scripts directory into the project. This can be useful',
         'if you want to encrypt your project.'
    sleep 40
    puts '', 'Continue?'
    exit if yesno == :no
    if errors.length > 0
      puts ''
      warning "Inserter reported #{errors.length} errors while inserting",
         'the scripts. If you continue, results might be erroneous!'
      puts '', 'Do you really want to import a partially failed insertion?'
      exit if yesno == :no
    end
    puts '','If you press enter now, the modified scripts will be written to',
         '#{scripts_fname}. A backup copy will be created with the file',
         'name #{scripts_fname}.bakxxx, where xxx is an unused number.',
         'After this process is finished, the Data/Scripts folder is no',
         'longer needed (and will be ignored). Only start the import if you',
         'don\'t want to add other Inserter scripts later!'
    sleep 40
    puts '', 'Do you want the import to be performed now?'
    exit if yesno == :no
    puts '', 'Creating backup copy...'
    backupname = scripts_fname + '.bak000'
    while File.exist? backupname
      backupname = backupname.succ
    end
    begin
      File.open backupname, 'wb' do |file|
        file.write (File.open scripts_fname, 'rb' do |file|
          file.read
        end)
      end
    rescue
      error 'Failed to create the backup copy.',
            'See error message for more information.'
      pause
      raise
    end
    note "Successfully created backup #{backupname}."
    puts '', 'Deleting Inserter script...'
    begin
      unless __FILE__[/\ASection(\d{3,})\z/] and $RGSS_SCRIPTS.delete_at $1.to_i
        raise 'Failed to determine the script ID of Inserter.'
      end
    rescue
      error 'Failed to delete Inserter script.',
            'See error message for more information.'
      pause
      raise
    end
    note 'Successfully deleted Inserter script.'
    puts '', 'Re-compressing all scripts...'
    begin
      $RGSS_SCRIPTS.collect! do |script_ary|
        script_ary[2] = Zlib::Deflate.deflate script_ary[3]
        script_ary.delete_at 3
        script_ary
      end
    rescue
      error 'Re-compression failed.'
            'See error message for more information.'
      pause
      raise
    end
    note 'Successfully re-compressed the scripts.'
    puts '', 'Saving scripts to Data/Scripts.rxdata...'
    begin
      File.open scripts_fname, 'wb' do |file|
        Marshal.dump $RGSS_SCRIPTS, file
      end
    rescue
      error 'Failed to save the scripts file.'
            'See error message for more information.'
      pause
      raise
    end
    note 'Successfully wrote Data/Scripts.rxdata.'
    puts '',
         'The scripts have been imported. Re-open the project in RPGXP to',
         'see the changes. If all went well, the scripts should be present',
         'in the Script Editor. If everything\'s there, you can delete the',
         "Data/Scripts folder and #{backupname}."
  end
end


begin
  if __FILE__[/\ASection(\d{3,})\z/]
    i = $1.to_i + 1
  else
    print 'Error executing the scripts.'
    exit! 0
  end
  while i < $RGSS_SCRIPTS.length
    eval($RGSS_SCRIPTS[i][3], self, sprintf('Section%03d', i), 1)
    i += 1
  end
  exit! 0
end

~ Post edited by Pacman because I couldn't stand the lack of code tags.
« Last Edit: February 09, 2012, 08:48:05 AM by Pacman »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
That's not a face script, and, for future reference, you should use code tags when posting code.

They are:
[code]

[/code]

It will show up like this:

Code: [Select]


But yeah, that is not a face script and I don't see anything that would suggest it to be. Maybe you pasted the wrong script?

****
Rep:
Level 71
I'm so confused, do you need help with the script posted or are you requesting a face script? On a side note it can sometimes be confusing when you says something like this
Quote
i Really Dont Know it make me Confusion!!

**
Rep:
Level 62
RMRK Junior
Im a NEWBIE Dont know Qoute,Code,Script,Image,or something there is anyone can help me  :-\?
Okay Someone Plss Study this thing and Create a Video of This Script and Plsss Put it in Youtube and
Link it to me ThankYou Very Much if you Help me some people dont know also and they might find out of this thing
and be fan of this web and many thnxssss of ths help and be Big Pupular okay now Study this thing
i hop you can do best as you can and also ADMNISTRATOR of this web! and also Doctor Todd pls help me the one
who give me the Messege System PLss Someone help me  :( Tnx here is the code
Code: [Select]
[
Instructions

There are three ways to change settings for your messages in this script. The first is to change the defaults, the second is to use the Script event command, and the third is to use in-message commands. I'll make note of what options are available for each feature as we go along.

Mode

This is what mode the message window is currently in. Normal is a fixed size message window. Fit window to text will size the window to fit the contents.

By Default:
The default script is in normal mode by default. If, for some reason, you find it is not, look for this line:
@ums_mode = FIT_WINDOW_TO_TEXT
and change it to
@ums_mode = NORMAL_MODE

By Script
You can change the message system mode using the Script event command and typing the following:
$game_system.ums_mode = NORMAL_MODE
or
$game_system.ums_mode = FIT_WINDOW_TO_TEXT

By Message Code
You can change from fitted window to normal mode by using the \m code anywhere in the message.

Text Mode

This is whether or not the text is written one letter at a time or all at once (note that in battle, text is written all at once to avoid the very noticeable lag).

By Default
By default, text mode is one letter at a time.  To change this, find this line:
@text_mode = ONE_LETTER_AT_A_TIME
and change to:
@text_mode = ALL_AT_ONCE

By Script
You can change the text write mode ingame by using the following in a script command:
$game_system.text_mode = ONE_LETTER_AT_A_TIME
and:
$game_system.text_mode = ALL_AT_ONCE

By Message Code
There is at present no way to toggle between these modes using message codes.

Text Skip

This script has one letter at a time message writing. You can change whether or not the text can be skipped, and how it will be skipped.

Allowing/Disallowing Text Skip

By Default:
Text skip is on by default. To turn it off by default, look for this line:
@text_skip = true
and change it to:
@text_skip = false

By Script

You can turn text skip off using the Script command by typing the following:
$game_system.text_skip = false
and turn it on with:
$game_system.text_skip = true

By Message Code

You can toggle skipping on and off using the \skip code anywhere in the message. Note that the change won't take place until the \skip is reached.

Write-All Text Skip

This mode simply writes all the remaining text when the player presses the action key.

By Default:

Write all is set by default.

By Script

You can change the text skip mode to write all by typing the following:
$game_system.skip_mode = WRITE_ALL

By Message Code

This option is not available through a message code, because people won't presumably be changing this mid-game.

Write Faster Text Skip

This mode writes the remaining text at 3x speed while the action key is depressed. It goes back to normal speed when the player stops pressing the action button.

By Default:

Find this line:
@skip_mode = WRITE_ALL
and change it to:
@skip_mode = WRITE_FASTER

By Script

You can change the text skip mode to write all by typing the following:
$game_system.skip_mode = WRITE_FASTER

By Message Code

This option is not available through a message code, because people won't presumably be changing this mid-game.

Write Speed

This is how many frames to wait before writing each letter. By default, this is 2.

By Default

Find this line:
@write_speed = 2
and change it to:
@write_speed = i
Where i is the number of frames to delay between letters.

By Script

You can change the text skip mode to write all by typing the following:
$game_system.write_speed = i

By Message Code

Use the window code \ws to change the write speed. The change won't take effect until the code, and will stay in effect until you change it back.


Window Height, Width, and Justification

You can specify the window height, width, and justification. Height and width are ignored in fitted window mode, justification is ignored when the window is centered over an event.


Window Height

By Default:

Find this line:
    @window_height = 128
and change it to:
    @window_height = i

Where i is the desired height of the window.  Note that this is set up for a three line text box.  Four lines would be 160.  Generally, your window height should be 32 + 32 * number of lines.

By Script
You can change the window height by typing the following:
$game_system.window_height = i

By Message Code

Use the window code \height. Note that this change is permanent, you'll have to change it manually if you want to return to the original size.


Window Width

By Default:

Find this line:
@window_width = 480
and change it to:
@window_width = i
Where i is the desired width of the window.

By Script
You can change the window width by typing the following:
$game_system.window_width = i

By Message Code

Use the window code \width. Note that this change is permanent, you'll have to change it manually if you
want to return to the original size.

Window Justification

By Default:

By default, the window will be centered. To change, find this line:
    @window_justification = CENTER
and change to:
    @window_justification = LEFT
or
    @window_justification = RIGHT

By Script

You can change the window justification by typing the following:
$game_system.window_justification = CENTER
$game_system.window_justification = LEFT
$game_system.window_justification = RIGHT

By Message Code

Use the window code \jr, \jl, and \jc to justify right, left, or center, respectively.


Face Graphics

This will display an image (presumably a face graphic) on or around the window. There are several options for where the image will be displayed.


Face Graphic

This is what graphic (imported as a Picture) to display.

By Default:

Not sure why'd you want to do this, but find this line:
    @face_graphic = ""
and change it to:
    @face_graphic = "imagename"
Where imagename is the name of the image, minus the file extension.

By Script

You can change the current face graphic by typing the following:
$game_system.face_graphic = "imagename"
and stop displaying faces using:
$game_system.face_graphic = ""

By Message Code

Use the message code \face[imagename] to display a face graphic, or \face[] to stop displaying.

Face Graphic Justification

This is which side of the window (left or right) to display the face graphic on.

By Default:

Justification is left by default. If you want to change it to right, find this line:
    @face_graphic_justification = LEFT
and change it to:
    @face_graphic_justification = RIGHT

By Script

You can change the current justification by typing the following:
$game_system.face_graphic_justification = LEFT
or
$game_system.face_graphic_justification = RIGHT

By Message Code

Use the message code \fl to change to left justification and \fr to change to right.

Face Graphic Position

This is where the face graphic is displayed.

By Default:

Position is centered vertically in the message box by default. If you want to change it, find this line:
    @face_graphic_position = CENTER
and change it to:
    @face_graphic_position = ABOVE
to display the image above the message box,:
    @face_graphic_position = BOTTOM
to display the bottom of the image even with the bottom of the message, or:
    @face_graphic_position = SIDE
to display the image to the side of the message box.

By Script

You can change the current position by typing the following:
$game_system.face_graphic_position = ABOVE
$game_system.face_graphic_position = CENTER
$game_system.face_graphic_position = BOTTOM
$game_system.face_graphic_position = SIDE

By Message Code

There is no message code to change the image position, because presumably people won't be shifting it around ingame very often, if at all.

Face Graphic Mirroring (Flipping)

By Message Code

Use the message code \mf to flip the currently displayed face.  This will only last one window, any subsequent windows will not have a flipped face.

Animated Faces

You can set up faces to be animated.  There are two types - a steady animation that plays as long as the message box is open, and one that animates while the text is being written, and another that displays after it is done.

Base Animated Face

This displays a single animated face, that is arranged in a face strip of any length.  The only qualification for a face strip is that each frame must be the same width.

By Default

By default, the script does not look for animated face strips.  To change this, look for this line:
    @animated_faces = false
and change it to:
    @animated_faces = true

By Script

You can switch from static to animated faces ingame using the following in a Script event command:
$game_system.animated_faces = true
and
$game_system.animated_faces = false

By Message Code

There is at present no message code to switch from animated to static faces and back.

Animation Pause

This is how long in frames to wait between playing the main animation strip.

By Default

By default, the pause is set to 80 frames.  To change this, find this line:
    @animation_pause = 80
and change it to:
    @animation_pause = i
where i is the number of frames to wait between playing the animation.

By Script

To change the number of frames to wait between animations ingame, use the following in a Script event command:
$game_system.animation_pause = i

By Message Code

There is at present no message code to change the animation pause.

Frame Width

This is how wide, in pixels, each of the frames on the faceset is.

By Default

By default, this is set to 100 pixels.  To change this, look for this line:
    @face_frame_width = 100
and change it to:
    @face_frame_width = i
where i is the number of pixels.

By Script

To change the width of the faceset's frames ingame, use the following in a Script event command:
$game_system.face_frame_width = i

By Message Code

There is at present no message code to change the frame width.

Resting Face

You can set up a separate face to animate after the text has finished printing.

By Default

By default, there is no resting face.  To change this, look for this line:
    @resting_face = ""
and change it to:
    @resting_face = "imagenameposttext"
where imagenameposttext is the text to append to the end of the current face image name to get the resting image.  For example, if this is "_blink", and the current face image name is Gloria, then the script will look for Gloria_blink as the resting face.

By Script

To turn off resting faces ingame, use the following in a Script command:
$game_system.resting_face = ""
or to change the subtext, use:
$game_system.resting_face = "imagenameposttext"

By Message Code

There is at present no message code to turn off or change the resting face.

Resting Animation Pause

This is the same as animation pause, but it defines how long to wait between animations of the resting face.

By Default

By default, the pause is set to 80 frames.  To change this, find this line:
    @resting_animation_pause = 80
and change it to:
    @resting_animation_pause = i
where i is the number of frames to wait between playing the animation.

By Script

To change the number of frames to wait between animations ingame, use the following in a Script event command:
$game_system.resting_animation_pause = i

By Message Code

There is at present no message code to change the resting animation pause.

Choice Window

Choices are displayed in a seperate window, in order to allow for the different window sizes. You can change the positioning and alignment of the choice window similarly to the face graphic.


Choice Window Justification

This is which side of the message box (left or right) the window will appear on.

By Default:

The choice window is justified to the right by default. If you want to change it, find this line:
    @choice_justification = RIGHT
and change it to:
    @choice_justification = LEFT

By Script

You can change the current justification by typing the following:
$game_system.choice_justification = RIGHT
$game_system.choice_justification = LEFT

By Message Code

There is no message code to change the choice window justification, because presumably people won't be shifting it around ingame very often, if at all.


Choice Window Position

This is where the window will appear. Choices are below, above, and to the side. If there isn't enough room, the window will be repositioned. If the position is below, it will be displayed above. If above, it will be below. If to the side, it will check below first, and if not enough room below, it will display above.

By Default:

The choice window is positioned to the side by default. To change it, find this line:
    @choice_position = SIDE
and change it to:
    @choice_position = ABOVE
or
    @choice_position = BOTTOM

By Script

You can change the current position by typing the following:
$game_system.choice_position = SIDE
$game_system.choice_position = ABOVE
$game_system.choice_position = BOTTOM

By Message Code

There is no message code to change the choice window position, because presumably people won't be shifting it around ingame very often, if at all.

More Than 4 Choices

You can merge multiple Show Choices event commands into one.  They must appear one after the other.

First, you must enter this in an Script event command, sometime before the choices are to be shown:

$game_temp.num_choices = i

Where i is the number of show choice event commands there will be.

Then just place the show choice event commands one after the other.  The cancel option for the [b]last show choice event command will be the one that will be used.  Check out Cleric 6 in the demo for an example.  Note that due to the restrictions of the screen size, you may not be able to show more than 9 choices on the screen.

Input Number Window

Like the choice window, the input number window appears seperately.  The input number window's justifaction and position will always be the same as the choice window.


Event Centering

You can choose to center the message box above an event or the player. The message box will follow the event or player if it moves.

By Default:

By default, the message box is not positioned above any event. To change this, find this line:
    @message_event = -1
and change it to:
    @message_event = i
where i is the number of the event you want to center on by default. 0 is the player.

By Script

You can change the current event by typing the following:
$game_system.message_event = i
Where i is the event number you want to center on. 0 is the player, -1 stops centering on an event.


By Message Code

Use the code \e to change what event you'll center on.

Caterpillar Actor Centering

You can now center the message over a train actor in a caterpillar script.  This is set up to work with my caterpillar script.  For fukuyama's, please see the FAQ.

By Default:

This is set to none by default.  You'll probably want to keep it that way.

By Script:

Use the following in a call script:
$game_system.train_actor = i
Where i is the position of the train actor.  0 is the player, 1 is second in line, etc.  Turn it off by using:
$game_system.train_actor = -1

By Message Code

Use the message code \ta, where i is the position of the train actor.


Comic Style Messages

You can choose to display a little talk bubble icon on the message box. This will only work when centering over an event or the player. The script supports three different icons you can use, talk1, talk2, and thought.

Enabling Comic Messages

By Default:
By default, the comic messages are disabled. To change this, find this line:
    @comic_enabled = false
and change it to:
    @comic_enabled = true

By Script

You can change comic messages to enabled or disabled by typing the following:
$game_system.comic_enabled = true
$game_system.comic_enabled = false

By Message Code

There is no message code to toggle this on and off, since presumably you won't be doing it much. Remember, the icon won't be displayed if you're not centering on an event, so you can display normal messages without disabling this.


Changing Comic Icon

You can change which of the three icons are displayed. Talk1 is presumably your main talk icon. Talk2 is open for you to define, maybe a lightning bolt shaped shout icon. Thought is intended to be thought bubbles. Example talk1 and thought icons are included in the demo, imported as windowskins. They must be saved as talk1, talk2, and thought, case sensitive.

By Default:

By default, the talk1 icon would be displayed. To change this, find this line:
    @comic_style = TALK1
and change it to:
    @comic_style = TALK2
or:
    @comic_style = THOUGHT

By Script

You can change which one is displayed ingame by typing the following:
$game_system.comic_style = TALK1
$game_system.comic_style = TALK2
$game_system.comic_style = THOUGHT

By Message Code

You can use \t1 to change to talk1, \t2 to change to talk2, and \th to change to thought.


Name Display

Character Name

You can display a name above the message box.

By Default:

By default, no name will be displayed. To change this, although I'm not sure why you would, find this line:
    @name = ""
and change to:
    @name = "name"

By Script

You can change the name to be displayed ingame by typing the following:
$game_system.name = "name"
where name is the name to be displayed, or
$game_system.name = ""
to stop displaying names.

By Message Code

You can use \nm[name] to display name, or \nm[] to stop displaying names.


Name Window Visibility

You can choose to have the name window visible or invisible (just text).

By Default:

By default, the window is invisible.  To change this, find this line:
    @name_window = false
and change it to
    @name_window = true

By Script:

You can change the name window visibility ingame using the following, although I'm not sure why you would.
$game_system.name_window = false
$game_system.name_window = true

By Message Code:

There is no way to toggle this on or off by message code, since presumably you won't ever need to do it much, if at all.

Font Formating and Display Codes

Default Codes

All the default codes work, \v to display a variable value, \n to display an actor name, \c to change the color, and \g to display the gold window.

Color by Hex Value

You can enter a temporary color change by entering the hex value.  Just put \c[0xaabbcc] in as a message code, where aabbcc is the hex value of the color.  A, b, c, d, e, and f must be lowercase.

Shadowed Text

You can draw a shadow under the text. This is a permanent change until you toggle it off.

By Default:

By default, shadowed text is not displayed. To change this, find this line:
    @shadowed_text = false
and change it to:
    @shadowed_text = true

By Script

You can turn on and off text shadowing by Script by typing the following:
$game_system.shadowed_text = true
$game_system.shadowed_text = false

By Message Code

You can use \s to toggle shadowed text on and off.

Shadow Color

You can also change the shadow color, either by default or in a script.

By Default:

By default, the shadow color is 0, 0, 0, 100 (transparent black). To change this, find this line:
    @shadow_color = Color.new(0, 0, 0, 100)
and change it to:
    @shadow_color = Color.new(red, blue, green, alpha)

By Script

You can change the shadow color in game by typing the following in a Script:
$game_system.shadowed_color = Color.new(red, blue, green, alpha)

Italics and Bold

You can toggle on and off italics and bold. This is only available in messages using the \i and \b message codes. Note that the font you're using has to have italic and bold defined for this to work.

Font

You can change the message font.

By Default:

By default, it will use your game's default font. To change this, find this line:
    @font = ""
and change it to:
    @font = "fontname"
Where fontname is the name of the font.

By Script

You can change the message font by Script by typing the following:
$game_system.font = "fontname"
or:
$game_system.font = ""
to return to the default font.

Font Color

You can permanently change the font color of the message window and associated windows. 

By Default:

By default, it is the normal_color defined in Window_Base.  To change this, look for this line:
    @font_color = nil
and replace it with:
    @font_color = Color.new(R, G, B, A)
where R, G, B, and A are the red, green, blue, and alpha values of the color.

By Script

You can permanently change the default text color by using the following in a script:
$game_system.font_color = Color.new(R, G, B, A)
and
$game_system.font_color = nil
to return to the normal_color default.

By Message Code:

There is at present no way to permanently change the color by message code.  If this is actually a desirable feature, please speak up.


Pausing and Automatically Closing

You can cause the message box to pause i frames before writing the next letter by using \p, and you can cause the window to close automatically after i frames by using \w. Note that this will happen i frames after the code is found, not after the text finished writing, so put it at the end of the message if you don't want the message to close before it finishes writing.


Displaying Item Names and Icons

You can display the names and icons from the database of armors, weapons, items, or skills. Use the \oa, \ow, \oi, and \os message codes, respectively.

Displaying Party Member Names

In addition to the default code to show actor name by database id, you can show an actor name by party position using the \np[i] message code, where i is the position of the actor in the party, with 0 being the first postion and 3 being the fourth position.


Justifying Text

You can justify the text in a window to the left, right, or center.

By Default:

I suppose if you wanted all your text centered in the game, you could do this. Find this line:
   @text_justification = LEFT
and replace with:
   @text_justification = RIGHT
or:
   @text_justification = CENTER

By Script:

You can change the justification for a message window before you show it by using the Script event command with the following:
$game_system.text_justification = LEFT
$game_system.text_justification = RIGHT
$game_system.text_justification = CENTER

By Message Code

You can change the justification during a message by using the \tl, \tr, and \tc message codes to justify left, right, and center, respectively. They must be the first code on the line you want to start justifying at.


Ignore Code

This code tells the message window to not write anything on this line, and move to the next line without shifting that line down one. Useful for lines that are made up of nothing but message codes. Type \ignr as the very first thing on the line to ignore that line.

Text Sound Effect

You can set a sound effect to play with each letter. Do bear in mind that some people can find this annoying, so be sure to make it a pleasant sound.

By Default:

By default, there is no sound. To turn it on, find this line:
    @sound_effect = ""
and change it to:
    @sound_effect = "sename"
where sename is the name of the sound effect you want to play, minus the file extension.

By Script:

You can also turn it on and off ingame using the following in a call script:
$game_system.sound_effect = ""
and:
$game_system.sound_effect = "sename"

By Message Code

There is at present no message code to toggle this on and off. If this is actually a desirable feature, please say so.

Window Shaking

You can make a window shake onscreen, to indicate fear, anger, or some other strong emotion.

By Default:

By default, the shake is set to 0 (no shaking). I'm not really sure why you'd want to change this, but if you really do, find this line:
    @shake = 0
and change it to:
    @shake = i
where i is the number of pixels you want it to move back and forth. A higher number is a larger movement, but slower.

By Script:

You can change how much the window shakes or not by using the following in a script command:
$game_system.shake = i
with 0 being no shaking.

By Message Code

You can also specify how much to shake a given window or not using the message code \shk, where is is an integer. 0 turns off shaking.

4+ Window Lines

You can now have as many lines in a single window as you like.  By using the \inc code as the very first thing in a text event command appearing right after the first, all of the text in both text commands will be shown in one window.  Remember to change the size of the window to accomodate it!  You can also use this as a workaround for the 3 lines of text bug.


Windowskins

You can change the windowskin for the message window and attendent windows permanently.

By Default:

By default, the windowskin from the database will be used.  To change this, find this line:
    @windowskin = ""
and change it to:
    @windowskin = "windowskinname"
where windowskinname is the name of the windowskin.

By Script:

To change the message window windowskin ingame, use the following:
$game_system.windowskin = "windowskinname"
and
$game_system.windowskin = ""
to change it back to the default database windowskin.

By Message Code:

There is at present no way to change this by message code.  If this is actually a desirable feature, please speak up.

Window Opacity

You can change the window's opacity or back opacity.

Opacity

This is the opacity of the entire window, including the border (but not including text).

By Default:

The default value of the opacity is 255.  To change this, find this line:
    @opacity = 255
and change the 255 to whatever value you want (must be an integer between 0 and 255).  255 is completely opaque, 0 is completely transparent.

By Script:

To change the window opacity in game, use the following in a script command:
$game_system.opacity = i
where i is the desired new opacity (0-255).

By Message Code:

Use \opc to change the opacity for the message windows to the opacity i (0-255).


Back Opacity

This is the opacity of the window pane itself.  It does not effect the window frame.

By Default:

The default value of the opacity is 160.  To change this, find this line:
    @back_opacity = 160
and change the 160 to whatever value you want (must be an integer between 0 and 255).  255 is completely opaque, 0 is completely transparent.

By Script:

To change the window back opacity in game, use the following in a script command:
$game_system.back_opacity = i
where i is the desired new opacity (0-255).

By Message Code:

Use \bopc to change the back opacity for the message windows to the opacity i (0-255).

Image instead of windowskin

This can show an image behind the text instead of a windowskin.  For best result, set the window opacity to 0.  This image will change size with the window, so will work if you change the window size or use fitted window mode.

By Default

There is no image by default. To change this, find this line:
    @window_image = nil
and change it to
    @window_image = "filename"
where filename is the name of the image file, imported as a windowskin.

By Script

To change the window image ingame, enter the following in a script command:
$game_system.window_image = "filename"
where filename is the name of the image you want to show, or
$game_system.window_image = nil
to stop showing an image

By Message Code

There is currently no message code to change the image.

Scrolling

Scrolling will happen automatically if the window contains more text than their is room to display.  Note that scrolling works in NORMAL mode only.

Slave Windows

Slave windows are additional message windows that close when the current window closes. To set one up, use the \slv[name] code anywhere in the text for that window, where name is anything. Instead of being displayed, that message will be stored until you put \slv[name] in another message window. The window will not be displayed until this character is found, so you can display it at any point while the other window is displaying text. All showing slave windows will disapear when the current window closes, and the name of that window could then be used again, if you wanted. Note that the settings for the slave window are the same as that of the master message window, so you'll need to make any changes by message code, with one exception. When in Normal mode, if the master window is above, the slave window will be below, and vice versa. Don't use more than two windows in Normal mode, the overlap is pretty ugly.

For example:

Text: Look out behind you!\slv[1]\e[1]
Text: \slv[2]No!\e[2]
Text: \e[3]Look, let's just\slv[1] get out of here.\slv[2]

The third text is the first the player would see. The message would start, and when it got to the code \slv[1], the first message would begin to display over event 1. When it got to \slv[2], the second text would start to display over event 2. All three message boxes would close when the player pressed the action key.

Shortcuts

This is maybe the most fun part of the script. If there is a message code, or series of message codes, you're using a lot, you can define a shortcut to use instead of typing them out. To define a shortcut, use the following code in a Script:
$game_system.add_shortcut('shortcutcode', 'messagecode')
Note that [b]you must use the single quotes ('), not double quotes (").

For example, I might be having a conversationg between two characters, Bob and Rex. Both have face graphics, and I want to switch the justification when each one talks. I could do this:

text: \nm[Bob]\face[bob]\flHi, Rex.
text: \nm[Rex]\face[rex]\frHey, Bob.
text: \nm[Bob]\face[bob]\flWhat shall we do today, Rex?
text: \nm[Rex]\face[rex]\frDunno.

And so on. Or I could do this:

Script: $game_system.add_shortcut('\c1', '\nm[Bob]\face[bob]\fl')
  $game_system.add_shortcut('\c2', '\nm[Rex]\face[rex]\fr')
text: \c1Hi, Rex.
text: \c2Hey, Bob.
text: \c1What shall we do today, Rex?
text: \c2Dunno.

Much better.

Note that you cannot use any of the reserved codes as a shortcut. The reserved codes are:

'\v', '\n', '\c', '\g', '\skip', '\m', '\height', '\width',
'\jr', '\jc', '\jl', '\face', '\fl', '\fr', '\b', '\i', '\s',
'\e', '\t1', '\t2', '\th', '\nm', '\font', '\p', '\w', '\ws',
'\oa', '\oi', '\os', '\ow', '\tl', '\tr', '\tc', '\ignr',
'\shk', '\slv', '\ind', '\inc'
/code]

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
In a message, insert the code \face[filename] into the message. filename needs to be a real image in the Pictures folder of Graphics.

So, import a face graphic into Pictures, then simply type that code and the name of the filename into the message. Also, you can ignore extensions. For instance, if the face file is named Actor1.png, the code you would put in is:

\face[Actor1]

I'm not going to upload a video.

**
Rep:
Level 62
RMRK Junior
Okay tnx dude!  ;D

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Most Missed Member2014 Zero to Hero2014 Best IRC Quote2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Awesome, MA. You're the big pupular now.
it's like a metaphor or something i don't know