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.
NMS - Neo Message System Version 3.0

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 86
NMS - Neo Message System
Version 1.0
by Woratana
Release Date: 02/02/2008

GET SCRIPT VERSION 3.0 from POST #18 *

Introduction
I've used AMS in RMXP before. When I changed to RMVX, I wonder why I can't find any Message System Script. That's reason why I scripted this~ for myself to use, and share to anyone who'd like to use :)

Basically, most of the features now (Version 1.0) are from AMS.
If you have any ideas about message features, please post  :lol:


Features
Version 1.0
Code: [Select]
\map - Show Map Name

\nc[actor id from database] - Show Class of Actor
\np[1 to 4 (member order in party)] - Show Name of Actor who is in that order
\nm[monster] - Show Name of Monster
\nt[troop id] - Show Name of Troop
\ni[item id] - Show Name of Item
\price[item id] - Show Price of Item
\nw[weapon id] - Show Name of Weapon
\na[armor -id] - Show Name of Armor

\font[font name] - Change Font to "font name" (case sensitive font's name)
\size[font size] - Change Font Size to "font size" (number)
\ref = Reset font to Default Font Name
\res = Reset Font Size to Default Font Size


Script
The script is pretty long, so I put it in text file.
you can download text file of the script here:

Place script above main
NMS Version 1.0 Released on: 02/02/2008


Instruction
You can easily config the script below this line:
Code: [Select]
  #===========================
  # SETUP NMS FEATURES HERE!
  #=========================
There is comment after the line to tell you what is that line do.


Author's Notes
Free for use in your work if credit included.

Please do not redistribute this script without permission. If you want to post it on any forum, please link to this topic.


Special Thanks
- Dubealex for AMS R4 Script

If you need support, have any suggestion, or any idea about new/old features,
Please Post. I will be glad to help~^^
« Last Edit: June 08, 2008, 08:45:28 AM by worale »

**
Rep: +0/-0Level 86
All whom sprite shall be gifted in the end...
Nice script, good work.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Looking good

**
Rep:
Level 86
I finally got name box, after nearly destroy my script :)



I want a suggestion about the namebox:
- what features you want in name box
- what do you want to be editable for name box (e.g. X of name box, width of name box, color of name text, etc.)

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, x and y offset would be good features for a name box. So, by default, 0, 0 would be at the far left of the window, directly above the message box, and then the user could change the position of it off that. I would say you might as well make this variable in game using a script call as well, though that might not be all that useful.

I would say that the width of the name box should probably just be determined by the size of the text. Since some fonts may not accurately be determined by the default Bitmap method, it might be useful to add a safety constaznt that the user could set. So, if the Safety is 10 then you would just add 10 to the width of the window.

Aside from that, I think being able to change the color is a good idea. That's about all I can think of though. Good luck.

**
Rep:
Level 86
UPDATE!!

These are features in NMS that I'm working on~
Quote

- You can play animation while message is processing...
- You can use balloon while message is processing...

Right now, you can play animation/balloon only on event that you're talking to~^^


- Now can call common event immediately in message!, >_<" that should make a lot more free to do in message~
(you can use event command 'Show Message' in that common event, it will show after that message, not immediately  ;) )


- Big size font is allowed!

- Combined with Neo-Face Advance System + Name Box, so you can use face effect like Neo-Face, and use name box~*

**
Rep: +0/-0Level 86
What's with these people?!?
The link to the script doesn't work. Could you fix it soon? It sounds like a nice script, and I have a sudden urge to test every script that I see :D

**
Rep:
Level 86
Please wait until I finish NMS version 2 :)

2nd version should be a lot better than first one :)

Thanks!

**
Rep: +0/-0Level 86
What's with these people?!?
Okay, no problem!

**
Rep:
Level 86
Last Update for NMS2 :P



Here is new features I added for face >>
Quote
- You can set to use Move/Fade effect on face only when it's first message window.
- If you're using above feature, you can set it to use Move/Fade effect again when you changed face's graphic for face side. (So the effects will apply automatically when you change the speaker in conversation :) )

Demo will probably be out by tomorrow or Sunday.


Same as Neo-Face, I will release the beta-version of script first :) for feed back and bug check.

Here is the script :)
Neo Message System 2 Beta
Spoiler for:
Code: [Select]
#===============================================================
# ? [VX] ? NMS - Neo Message System 2.0 ? ?
#--------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Thaiware RPG Maker Community
# ? Special Thanks: Mako, Yatzumo
#--------------------------------------------------------------
# BETA-RELEASE [Released on: 06/03/2008]
#--------------------------------------------------------------
# Include: NEO-FACE SYSTEM ADVANCE (Version 3.0) by Woratana
#===============================================================
# Note: This script started when VX English is not coming out yet,
# so some of comments here are still be Japanese :)

=begin
=====================================
+ NMS 2.0 FEATURES LIST +
=====================================
Use these features in message box
----------------------------------
? NMS MESSAGE FEATURES
----------------------------------
--------------------------
? [SPECIAL CALL] PART
--------------------------
\ce[Common Event ID] << Run Common Event immediately

\ani[Animation ID] << Show Animation on 'This Event'
\bal[Balloon ID] << Show Ballon on 'This Event'

*Note: This Event = Event that show this message

--------------------------
? [DRAW ICON] PART
--------------------------
\dw[weapon ID] << Draw Weapon Icon + Weapon Name
\da[armor ID]  << Draw Armor Icon + Armor Name
\di[item ID]   << Draw Item Icon + Item Name
\ds[skill ID]  << Draw Skill Icon + Skill Name

\ic[icon ID]   << Draw Icon

--------------------------
? [WRITE TEXT] PART
--------------------------
\map << Write Map Name

\nc[actor ID] << Write Class of Actor
\np[1 to 4 (order in party)] << Write Name of actor in that order
\nm[monster ID]   << Write Monster Name
\nt[troop ID] << Write Troop Name

\nw[weapon ID]    << Write Weapon Name
\na[armor ID] << Write Armor Name
\ns[skill ID] << Write Skill Name
\ni[item ID] << Write Item Name
\price[item ID]   << Write Item Price

--------------------------
? [TEXT EFFECT] PART
--------------------------
\fn[Font Name] << Change Font Name
\fs[Font Size] << Change Font Size
\delay[Delay]  << Change text Delay per letter (in frame, 60 frames = about 1 sec)

\ref    << Reset Font Name
\res    << Reset Font Size
\red    << Reset text Delay

\b << Turn on/off BOLD text
\i << Turn on/off ITALIC text
\lbl    << Turn on/off LETTER-BY-LETTER Mode (default is ON)

--------------------------
? [NAME BOX & FACE] PART
--------------------------
\nb[Name]  << Show Name Box in current message window
\rnb[Name] << Repeat Name Box,
Name Box with this name will show again and again in next messages
unless there is \nb[Name] in that message, or you've stop this option by type \rnb[]

\sd[side]   << Change Face Side
(0: Left Side Normal Face | -1: Right Side Normal Face)
(1: Left Side Neo Face | 2: Right Side Neo Face)

----------------------------------
? VX DEFAULT MESSAGE FEATURES
----------------------------------
\v[variable ID] << Write value from variable
\n[actor ID] << Write actor's name
\c[color ID] << Change text color (Color ID is from Down-right corner in Windowskin)
\g   << Show gold window
\.   << Wait 15 frames (about 1/4 sec)
\|   << Wait 60 frames (about 1 sec)
\!   << Wait for player to press button to continue message
\>   << Skip letter-by-letter in current line
\<   << Stop 'skip letter-by-letter' in current line
\^   << Close message box immediately
\\   << Write '\'

=end
class Window_Base
 
  #---------------------------------
  # [START] SETUP SCRIPT PART
  #-------------------------------
  #---------------------------------
  # ? MESSAGE SYSTEM
  #-------------------------------
  NMS_FONT_NAME = Font.default_name # Default Font Name
  NMS_FONT_SIZE = 20 # Default Font Size
 
  # COLOR_ID is from Windowskin image in down-right corder
  NMS_ITEM_NAME_COLOR_ID = 5
  NMS_WEAPON_NAME_COLOR_ID = 10
  NMS_ARMOR_NAME_COLOR_ID = 4
  NMS_SKILL_NAME_COLOR_ID = 2
 
  NMS_DELAY_PER_LETTER = 0 # Delay between letter when showing text letter-by-letter
  # Delay is in frame, 60 frames = 1 second
 
  TEXT_X_PLUS = 0 # Move Text Horizontally
  CHOICE_INPUT_X_PLUS = 0
  # Move Choices Text and Input Number Text Horizontally
 
  #---------------------------------
  # ? FACE SYSTEM
  #-------------------------------
  #------------------------------------------------
  # ** BOTH FACE SYSTEMS SETUP
  #----------------------------------------------
  DEFAULT_FACE_SIDE = 0 # Default Face Side when game start~
  # (0: Left Side Normal Face | -1: Right Side Normal Face)
  # (1: Left Side Neo Face | 2: Right Side Neo Face)
 
  FACE_X_PLUS = 0 # Move Face Horizontally (Left: -, Right: +)
  FACE_Y_PLUS = 0 # Move Face Vertically (Up: -, Down: +)
 
  MOVE_TEXT = true # (true/false)
  # Move text to right side of face, when showing face in left side.
 
  #-------------------------------------
  # **SHOW FACE EFFECT
  # * For both Face Systems *
  #----------------------------------
  FADE_EFFECT = true # Turn on/off fade effect (true/false)
  FADE_SPEED = 20 # Speed up face's fade effect by increase this number
  FADE_ONLY_FIRST = true # Use Fade Effect only in first message window?
 
  MOVE_EFFECT = true # Turn on/off "move in" effect (true/false)
  MOVE_SPEED = 10 # Speed up face's "move in" effect by increase this number
  MOVE_ONLY_FIRST = true # Use Move Effect only in first message window?
 
  FADE_MOVE_WHEN_USE_NEW_FACE = true
  # Use Fade and Move effect when change Face graphic
  # (In case using FADE_ONLY_FIRST and MOVE_ONLY_FIRST)
 
  #-------------------------------
  # ** NEO FACE SYSTEM
  #----------------------------
  EightFaces_File = false
  # Use 8 Faces per file (or) 1 Face per file (true/false)
 
  #------------------------------------
  # ? NAME BOX SYSTEM
  #----------------------------------
  NAMEBOX_SKIN = "Window" # Windowskin of Name Box (In folder 'Graphics/System')
  NAMEBOX_OPACITY = 255 # Name Box Opacity (Lowest 0 - 255 Highest)
  NAMEBOX_BACK_OPACITY = 180 # Name Box Background Opacity
 
  NAMEBOX_X_PLUS_NOR = 20 # Additional Name Box X [Horizontal] for Normal Face Name Box
  NAMEBOX_X_PLUS_NEO = 160 # Additional Name Box X for Neo Face Name Box
  NAMEBOX_Y_PLUS = 0 # Move Name Box & Text Vertically
 
  NAMEBOX_TEXT_LENGTH_PER_LETTER = 10 # Length of Text Per Letter (in pixel)
  NAMEBOX_TEXT_FONT = Font.default_name # Name Text Font's Name
  NAMEBOX_TEXT_SIZE = Font.default_size # Name Text Font's Size
  NAMEBOX_TEXT_HEIGHT_PLUS = 2 # Increase Name Text Height (For Big Size Text)

  NAMEBOX_TEXT_BOLD = false # Make Text in Name Box Bold
  NAMEBOX_TEXT_OUTLINE = false # Make Black Outline around Text (Good with Opacity = 0)
  NAMEBOX_TEXT_DEFAULT_COLOR = [255,255,255]#[255,255,255] # [Red,Green,Blue]: Name Text Color (RGB)
  # You can easily find color code for RGB (RedGreenBlue) color in Google :)
  # You are allow to change color in game by call script:
  # $game_message.color = [Red,Green,Blue]
 
  NAMEBOX_TEXT_AFTER_NAME = ":" # Add Text after Name, leave "" to disable.
 
  NAMEBOX_BOX_WIDTH_PLUS = 6 # Increase Name Box Width
  NAMEBOX_BOX_HEIGHT_PLUS = 7 # Increase Name Box Height
 
  MOVE_NAMEBOX = true
  # (true/false) Move Text Box to Right Side if showing Face in Right side.
 
  #---------------------------------
  # [END] SETUP SCRIPT PART
  #-------------------------------
end
  $worale = {} if $worale == nil
  $worale["NMS"] = true

class Window_Message < Window_Selectable
  #--------------------------------------------------------------------------
  # ? ALIAS
  #--------------------------------------------------------------------------
alias wor_nms_winmsg_ini initialize
def initialize
  wor_nms_winmsg_ini
  @nms = $game_message
  self.contents.font.name = @nms.nms_fontname
  self.contents.font.size = @nms.nms_fontsize
  @face = Sprite.new
  @face.z = self.z + 5
  @nametxt = Sprite.new
  @nametxt.z = self.z + 15
  @namebox = nil
  @ori_x = 0
  @name_text = nil
  @showtime = 0 # To check if this is first time it shows message (For face)
  @face_data = Array.new(3)
  @face_data_old = Array.new(3)
end
  #--------------------------------------------------------------------------
  # ? ??
  #--------------------------------------------------------------------------
  def dispose
super
dispose_gold_window
dispose_number_input_window
dispose_back_sprite
  end
  #--------------------------------------------------------------------------
  # ? EDITED
  #--------------------------------------------------------------------------
  def update
super
update_gold_window
update_number_input_window
update_back_sprite
update_show_fast
  if self.visible == true
if @name_text != nil
  draw_name(@name_text,self.x,self.y)
end
if @face.bitmap != nil
  # UPDATE FADE IN EFFECT
  if @face.opacity < 255
@face.opacity += FADE_SPEED
  end
  # UPDATE MOVE IN EFFECT
  if MOVE_EFFECT == true and @ori_x != @face.x
if (@ori_x > @face.x and @face.x + MOVE_SPEED < @ori_x) or (@ori_x < @face.x and @face.x - MOVE_SPEED > @ori_x)
  @face.x += MOVE_SPEED if @ori_x > @face.x
  @face.x -= MOVE_SPEED if @ori_x < @face.x
else
  @face.x = @ori_x
end
  end
end
  end
unless @opening or @closing
  if @wait_count > 0
@wait_count -= 1
  elsif self.pause
input_pause
  elsif self.active
input_choice
  elsif @number_input_window.visible
input_number
  elsif @text != nil
update_message
  elsif continue?
@showtime += 1
start_message
open
$game_message.visible = true
  else
close
@showtime = 0
if @face.bitmap != nil
@face.bitmap.dispose
end
clear_namebox if @namebox != nil
$game_message.visible = @closing
  end
end
  end

  #--------------------------------------------------------------------------
  # ? ???????????
  #--------------------------------------------------------------------------
  def create_gold_window
@gold_window = Window_Gold.new(384, 0)
@gold_window.openness = 0
  end
  #--------------------------------------------------------------------------
  # ? ????????????
  #--------------------------------------------------------------------------
  def create_number_input_window
@number_input_window = Window_NumberInput.new
@number_input_window.visible = false
  end
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  def create_back_sprite
@back_sprite = Sprite.new
@back_sprite.bitmap = Cache.system("MessageBack")
@back_sprite.visible = (@background == 1)
@back_sprite.z = 190
  end
  #--------------------------------------------------------------------------
  # ? ???????????
  #--------------------------------------------------------------------------
  def dispose_gold_window
@gold_window.dispose
  end
  #--------------------------------------------------------------------------
  # ? ????????????
  #--------------------------------------------------------------------------
  def dispose_number_input_window
@number_input_window.dispose
  end
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  def dispose_back_sprite
@back_sprite.dispose
  end
  #--------------------------------------------------------------------------
  # ? ???????????
  #--------------------------------------------------------------------------
  def update_gold_window
@gold_window.update
  end
  #--------------------------------------------------------------------------
  # ? ????????????
  #--------------------------------------------------------------------------
  def update_number_input_window
@number_input_window.update
  end
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  def update_back_sprite
@back_sprite.visible = (@background == 1)
@back_sprite.y = y - 16
@back_sprite.opacity = openness
@back_sprite.update
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def update_show_fast
if self.pause or self.openness < 255
  @show_fast = false
elsif Input.trigger?(Input::C) and @wait_count < 2
  @show_fast = true
elsif not Input.press?(Input::C)
  @show_fast = false
end
if @show_fast and @wait_count > 0
  @wait_count -= 1
end
  end
  #--------------------------------------------------------------------------
  # ? ????????????????????
  #--------------------------------------------------------------------------
  def continue?
return true if $game_message.num_input_variable_id > 0
return false if $game_message.texts.empty?
if self.openness > 0 and not $game_temp.in_battle
  return false if @background != $game_message.background
  return false if @position != $game_message.position
end
return true
  end
  #--------------------------------------------------------------------------
  # ? EDITED
  #--------------------------------------------------------------------------
  def start_message
@text = ""
for i in 0...$game_message.texts.size
  # Change " " to "" (Spacing for choice
  @text += "" if i >= $game_message.choice_start
  @text += $game_message.texts[i].clone + "\x00"
end

@item_max = $game_message.choice_max
convert_special_characters
reset_window
new_page
  end
  #--------------------------------------------------------------------------
  # ? EDITED
  #--------------------------------------------------------------------------
  def new_page
contents.clear
if @face.bitmap != nil
@face.bitmap.dispose
end
if $game_message.face_name.empty?
@contents_x = TEXT_X_PLUS
else
  name = $game_message.face_name
  index = $game_message.face_index
  # CALL DRAW FACE METHOD
  draw_face2(name, self.x, self.y, index)
  # CHECK FOR MOVE EFFECT
  @ori_x = @face.x
  if MOVE_EFFECT == true and ((MOVE_ONLY_FIRST and @showtime <= 1) or (MOVE_ONLY_FIRST == false))
if $game_message.side == 0 or $game_message.side == 1
  @face.x = 0 - @face.width
else
  @face.x = 416 + @face.width
end
  end
  @contents_x = get_x_face
end
@contents_y = 0
@line_count = 0
@show_fast = false
@line_show_fast = false
@pause_skip = false
contents.font.color = text_color(0)
@contents_x += CHOICE_INPUT_X_PLUS if $game_message.choice_max > 00
  end
  #--------------------------------------------------------------------------
  # ? EDITED
  #--------------------------------------------------------------------------
  def new_line
if $game_message.face_name.empty? or MOVE_TEXT == false
  @contents_x = TEXT_X_PLUS
else
  @contents_x = get_x_face
end
@contents_x += CHOICE_INPUT_X_PLUS if $game_message.choice_max > 0
# Find Text Height
nms_line_width = WLH
nms_line_width = $game_message.nms_fontsize if $game_message.nms_fontsize > WLH
@contents_y += nms_line_width
@line_count += 1
@line_show_fast = false
  end
  #--------------------------------------------------------------------------
  # ? EDITED
  #--------------------------------------------------------------------------
  def convert_special_characters
clear_namebox if @namebox != nil

#--------------------------
# DEFAULT FEATURES
#-----------------------
@text.gsub!(/\\V\[([0-9]+)\]/i) { $game_variables[$1.to_i] }
@text.gsub!(/\\N\[([0-9]+)\]/i) { $game_actors[$1.to_i].name }
@text.gsub!(/\\C\[([0-9]+)\]/i) { "\x01[#{$1}]" }
@text.gsub!(/\\G/)   { "\x02" }
@text.gsub!(/\\\./) { "\x03" }
@text.gsub!(/\\\|/) { "\x04" }
@text.gsub!(/\\!/)   { "\x05" }
@text.gsub!(/\\>/)   { "\x06" }
@text.gsub!(/\\</)   { "\x07" }
@text.gsub!(/\\\^/) { "\x08" }
@text.gsub!(/\\\\/) { "\\" }

#--------------------------
# * NMS FEATURES!!
#-----------------------
# Woratana's :: Draw Weapon Name + Icon
@text.gsub!(/\\DW\[([0-9]+)\]/i) { "\x83[#{$data_weapons[$1.to_i].icon_index}]\\nw[#{$1.to_i}]"}
# Woratana's :: Draw Item Name + Icon
@text.gsub!(/\\DI\[([0-9]+)\]/i) { "\x83[#{$data_items[$1.to_i].icon_index}]\\ni[#{$1.to_i}]" }
# Woratana's :: Draw Armor Name + Icon
@text.gsub!(/\\DA\[([0-9]+)\]/i) { "\x83[#{$data_armors[$1.to_i].icon_index}]\\na[#{$1.to_i}]"}
# Woratana's :: Draw Skill Name + Icon
@text.gsub!(/\\DS\[([0-9]+)\]/i) { "\x83[#{$data_skills[$1.to_i].icon_index}]\\ns[#{$1.to_i}]"}

# Woratana's :: Call Animation
@text.gsub!(/\\ANI\[([0-9]+)\]/i) { "\x80[#{$1}]" }
# Woratana's :: Call Balloon
@text.gsub!(/\\BAL\[([0-9]+)\]/i) { "\x81[#{$1}]" }
# Woratana's :: Call Common Event
@text.gsub!(/\\CE\[([0-9]+)\]/i) { "\x82[#{$1}]" }
# Woratana's :: Draw Icon
@text.gsub!(/\\IC\[([0-9]+)\]/i) { "\x83[#{$1}]" }

# Woratana's :: Map Name
@text.gsub!(/\\MAP/i) { nms_get_map_name }
# Woratana's :: Actor Class Name
@text.gsub!(/\\NC\[([0-9]+)\]/i) { $data_classes[$data_actors[$1.to_i].class_id].name }
# Woratana's :: Party Actor Name
@text.gsub!(/\\NP\[([0-9]+)\]/i) { $game_party.members[($1.to_i - 1)].name }
# Woratana's :: Monster Name
@text.gsub!(/\\NM\[([0-9]+)\]/i) { $data_enemies[$1.to_i].name }
# Woratana's :: Troop Name
@text.gsub!(/\\NT\[([0-9]+)\]/i) { $data_troops[$1.to_i].name }
# Woratana's :: Item Name
@text.gsub!(/\\NI\[([0-9]+)\]/i) { "\x01[#{NMS_ITEM_NAME_COLOR_ID}]" + $data_items[$1.to_i].name + "\x01[#{@nms.last_color}]"}
# Woratana's :: Weapon Name
@text.gsub!(/\\NW\[([0-9]+)\]/i) { "\x01[#{NMS_WEAPON_NAME_COLOR_ID}]" + $data_weapons[$1.to_i].name + "\x01[#{@nms.last_color}]" }
# Woratana's :: Armor Name
@text.gsub!(/\\NA\[([0-9]+)\]/i) { "\x01[#{NMS_ARMOR_NAME_COLOR_ID}]" + $data_armors[$1.to_i].name + "\x01[#{@nms.last_color}]" }
# Woratana's :: Skill Name
@text.gsub!(/\\NS\[([0-9]+)\]/i) { "\x01[#{NMS_SKILL_NAME_COLOR_ID}]" + $data_armors[$1.to_i].name + "\x01[#{@nms.last_color}]" }
# Woratana's :: Item Price
@text.gsub!(/\\PRICE\[([0-9]+)\]/i) { $data_items[$1.to_i].price }
 
# Woratana's :: Font Name Change
@text.gsub!(/\\FN\[(.*?)\]/i) { "\x84[#{$1}]" }
# Woratana's :: Font Size Change
@text.gsub!(/\\FS\[(.*?)\]/i) { "\x85[#{$1}]" }
# Woratana's :: Reset Font Name
@text.gsub!(/\\REF/i) { "\x86" }
# Woratana's :: Reset Font Size
@text.gsub!(/\\RES/i) { "\x87" }
# Woratana's :: BOLD Text
@text.gsub!(/\\B/i) { "\x88" }
# Woratana's :: ITALIC Text
@text.gsub!(/\\I/i) { "\x89" }
# Woratana's :: Text DELAY
@text.gsub!(/\\DELAY\[([0-9]+)\]/i) { "\x90[#{$1}]"}
# Woratana's :: Reset Text Delay
@text.gsub!(/\\RED/i) { "\x91" }
# Woratana's :: Turn On/Off Letter by Letter
@text.gsub!(/\\LBL/i) { "\x92" }

# Woratana's :: Name Box
@text.scan(/\\NB\[(.*?)\]/i)
if $1.to_s != ""
   @name_text = $1.to_s
   @text.sub!(/\\NB\[(.*?)\]/i) {}
end
   
# Woratana's :: Repeat Name Box
@text.gsub!(/\\RNB\[(.*?)\]/i) do
   $game_message._name = $1.to_s
   a = ""
end
   
# Woratana's NeoFace System
@text.scan(/\\SD\[([-,0-9]+)\]/i)
if $1.to_s != ""
   $game_message.side = $1.to_i
   @text.sub!(/\\SD\[([-,0-9]+)\]/i) {}
end

@name_text = $game_message._name if @name_text == nil and $game_message._name != ""
   end
  #--------------------------------------------------------------------------
  # ? ??????????????
  #--------------------------------------------------------------------------
  def reset_window
@background = $game_message.background
@position = $game_message.position
if @background == 0
  self.opacity = 255
else
  self.opacity = 0
end
case @position
when 0  # ?
  self.y = 0
  @gold_window.y = 360
when 1  # ?
  self.y = 144
  @gold_window.y = 0
when 2  # ?
  self.y = 288
  @gold_window.y = 0
end
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  def terminate_message
self.active = false
self.pause = false
self.index = -1
@gold_window.close
@number_input_window.active = false
@number_input_window.visible = false
$game_message.main_proc.call if $game_message.main_proc != nil
$game_message.clear
  end
  #--------------------------------------------------------------------------
  # ? EDITED
  #--------------------------------------------------------------------------
  def update_message
loop do
  c = @text.slice!(/./m)
  case c
  when nil
finish_message
break
  when "\x00"
new_line
if @line_count >= MAX_LINE
  unless @text.empty?
self.pause = true
break
  end
end
  when "\x80"
@text.sub!(/\[([0-9]+)\]/, "")
$game_map.events[$game_message.event_id].animation_id = $1.to_i
  when "\x81"
@text.sub!(/\[([0-9]+)\]/, "")
$game_map.events[$game_message.event_id].balloon_id = $1.to_i
  when "\x82"
@text.sub!(/\[([0-9]+)\]/, "")
a = $game_map.interpreter.params[0]
$game_map.interpreter.params[0] = $1.to_i
$game_map.interpreter.command_117
$game_map.interpreter.params[0] = a
  when "\x83"
@text.sub!(/\[([0-9]+)\]/, "")
bitmap = Cache.system("Iconset")
icon_index = $1.to_i
draw_icon(icon_index, @contents_x, @contents_y,true)
@contents_x += 24
  when "\x84"
@text.sub!(/\[(.*?)\]/, "")
@nms.nms_fontname = $1.to_s
  when "\x85"
@text.sub!(/\[([0-9]+)\]/, "")
@nms.nms_fontsize = $1.to_i
  when "\x86"
@nms.nms_fontname = NMS_FONT_NAME
  when "\x87"
@nms.nms_fontsize = NMS_FONT_SIZE
  when "\x88"
contents.font.bold = contents.font.bold == true ? false : true
  when "\x89"
contents.font.italic = contents.font.italic == true ? false : true
  when "\x90"
@text.sub!(/\[([0-9]+)\]/, "")
@nms.text_delay = $1.to_i
  when "\x91"
@nms.text_delay = NMS_DELAY_PER_LETTER
  when "\x92"
@nms.lbl = @nms.lbl == true ? false : true
  when "\x01"
@text.sub!(/\[([0-9]+)\]/, "")
@nms.last_color = $1.to_i
contents.font.color = text_color($1.to_i)
next
  when "\x02"
@gold_window.refresh
@gold_window.open
  when "\x03"
@wait_count = 15
break
  when "\x04"
@wait_count = 60
break
  when "\x05"
self.pause = true
break
  when "\x06"
@line_show_fast = true
  when "\x07"
@line_show_fast = false
  when "\x08"
@pause_skip = true
  else
self.contents.font.name = @nms.nms_fontname
self.contents.font.size = @nms.nms_fontsize
# Find Text Height
nms_line_width = WLH
nms_line_width = $game_message.nms_fontsize if $game_message.nms_fontsize > WLH
contents.draw_text(@contents_x, @contents_y, 40, nms_line_width, c)
c_width = contents.text_size(c).width
@contents_x += c_width
@show_fast = true if @nms.lbl == false
if @nms.text_delay > 0
  for i in 0..@nms.text_delay - 1
Graphics.update
  end
end
  end
  break unless @show_fast or @line_show_fast
end
  end
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  def finish_message
if $game_message.choice_max > 0
  start_choice
elsif $game_message.num_input_variable_id > 0
  start_number_input
elsif @pause_skip
  terminate_message
else
  self.pause = true
end
@wait_count = 10
@text = nil
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def start_choice
self.active = true
self.index = 0
  end
  #--------------------------------------------------------------------------
  # ? EDITED
  #--------------------------------------------------------------------------
  def start_number_input
digits_max = $game_message.num_input_digits_max
number = $game_variables[$game_message.num_input_variable_id]
@number_input_window.digits_max = digits_max
@number_input_window.number = number
if $game_message.face_name.empty? or MOVE_TEXT == false
  @number_input_window.x = x - 23
else
  case $game_message.side
  when 0
@number_input_window.x = (x + 112) - 23
  when 1
@number_input_window.x = (x + text_x) - 23
  when 2
@number_input_window.x = x - 23
  when -1
@number_input_window.x = x - 23
  end
end
@number_input_window.x += CHOICE_INPUT_X_PLUS
@number_input_window.y = y + @contents_y
@number_input_window.active = true
@number_input_window.visible = true
@number_input_window.update
  end
  #--------------------------------------------------------------------------
  # ? EDITED
  #--------------------------------------------------------------------------
  def update_cursor
if @index >= 0
  if $game_message.face_name.empty?
  x = TEXT_X_PLUS
  else
  x = get_x_face
  end
  y = ($game_message.choice_start + @index) * WLH
  # CHANGE WIDTH OF CURSOR FOR CHOICE SELECT
  if $game_message.face_name.empty? or MOVE_TEXT == false
facesize = x
  else
facesize = get_x_face
facesize += @face.width if $game_message.side == 2
facesize += @face.width + 16 if $game_message.side == -1
  end
  self.cursor_rect.set(x, y, contents.width - facesize, WLH)
else
  self.cursor_rect.empty
end
  end

  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def input_pause
if Input.trigger?(Input::B) or Input.trigger?(Input::C)
  self.pause = false
  if @text != nil and not @text.empty?
new_page if @line_count >= MAX_LINE
  else
terminate_message
  end
end
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  def input_choice
if Input.trigger?(Input::B)
  if $game_message.choice_cancel_type > 0
Sound.play_cancel
$game_message.choice_proc.call($game_message.choice_cancel_type - 1)
terminate_message
  end
elsif Input.trigger?(Input::C)
  Sound.play_decision
  $game_message.choice_proc.call(self.index)
  terminate_message
end
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def input_number
if Input.trigger?(Input::C)
  Sound.play_decision
  $game_variables[$game_message.num_input_variable_id] =
@number_input_window.number
  $game_map.need_refresh = true
  terminate_message
end
  end
end

#==============================================================================
# NMS +[ADD ON]+ WINDOW_MESSAGE_CLASS
#------------------------------------------------------------------------------
#==============================================================================

class Window_Message < Window_Selectable
 
# Return X for Text
def get_x_face
  if MOVE_TEXT == true
case $game_message.side
when 0
  return 112 + TEXT_X_PLUS
when 1
  return text_x
when 2
  return TEXT_X_PLUS
else
  return TEXT_X_PLUS
end
  else
return TEXT_X_PLUS
  end
end

  def text_x
return @face.width + TEXT_X_PLUS
  end
 
  # Clear Name Box & Name Text
  def clear_namebox
@nametxt.bitmap.dispose
@namebox.dispose
@namebox = nil
@name_text = nil
  end
 
  def nms_get_map_name
mapdata = load_data("Data/MapInfos.rvdata")
map_id = $game_map.map_id
return mapdata[map_id].name
  end
 
  #--------------------------------------
  # DRAW FACE [Both Systems] METHOD
  #------------------------------------
  def draw_face2(face_name, x, y, index = 0)
  if $game_message.side == 0 or $game_message.side == -1 or EightFaces_File == true
# USE 8 FACES PER FILE
bitmap = Cache.face(face_name)
rect = Rect.new(0,0,0,0)
rect.width = (bitmap.width / 4)
rect.height = (bitmap.height / 2)
rect.x = index % 4 * rect.width
rect.y = index / 4 * rect.height
@face.bitmap = Bitmap.new(rect.width,rect.height)
@face.bitmap.blt(0,0,bitmap,rect)
bitmap.dispose
  else
# USE 1 FACES PER FILE
@face.bitmap = Cache.face(face_name)
  end
  # SET X/Y OF FACE DEPENDS ON FACE SIDE
  if $game_message.side == 1
@face.mirror = false
@face.x = x + 6
@face.y = y - (@face.height - 123)
  elsif $game_message.side == 2
@face.mirror = true
@face.x = x + (538 - @face.width)
@face.y = y - (@face.height - 123)
  elsif $game_message.side == 0
@face.mirror = false
@face.x = x + 16
@face.y = y + 16
  elsif $game_message.side == -1
@face.mirror = true
@face.x = self.contents.width - @face.width + 16
@face.y = y + 16
  end
@face.x += FACE_X_PLUS
@face.y += FACE_Y_PLUS

@face_data = [face_name, index, $game_message.side]
if @face_data != @face_data_old and FADE_MOVE_WHEN_USE_NEW_FACE; @showtime = 1; @face_data_old = @face_data; end
@face.opacity = 0 if FADE_EFFECT == true and ((FADE_ONLY_FIRST and @showtime <= 1) or (FADE_ONLY_FIRST == false))
  end
 
  #--------------------------------------
  # DRAW NAME BOX METHOD
  #-----------------------------------
  def draw_name(name,x,y)
name = name + NAMEBOX_TEXT_AFTER_NAME
namesize = calculate_name_size(name)
@nametxt.bitmap = Bitmap.new(16 + (namesize * NAMEBOX_TEXT_LENGTH_PER_LETTER), 24 + NAMEBOX_TEXT_HEIGHT_PLUS)
@nametxt.x = x + 8
if $game_message.side == 1 or $game_message.side == 2
  @nametxt.x += NAMEBOX_X_PLUS_NF
else
  @nametxt.x += NAMEBOX_X_PLUS_NOR
end
@nametxt.y = y - 20 + NAMEBOX_Y_PLUS
@nametxt.x = 544 - @nametxt.x - @nametxt.width if MOVE_NAMEBOX == true and ($game_message.side == 2 or $game_message.side == -1)
@namebox = Window.new
@namebox.windowskin = Cache.system(NAMEBOX_SKIN)
@namebox.z = self.z + 10
@namebox.opacity = NAMEBOX_OPACITY
@namebox.back_opacity = NAMEBOX_BACK_OPACITY
@namebox.openness = 255
@namebox.x = @nametxt.x - NAMEBOX_BOX_WIDTH_PLUS
@namebox.y = @nametxt.y - NAMEBOX_BOX_HEIGHT_PLUS
@namebox.width = @nametxt.bitmap.width + (NAMEBOX_BOX_WIDTH_PLUS * 2)
@namebox.height = @nametxt.bitmap.height + (NAMEBOX_BOX_HEIGHT_PLUS * 2)
@nametxt.bitmap.font.name = NAMEBOX_TEXT_FONT
@nametxt.bitmap.font.size = NAMEBOX_TEXT_SIZE
@nametxt.bitmap.font.bold = NAMEBOX_TEXT_BOLD
if NAMEBOX_TEXT_OUTLINE == true
  # MAKE TEXT OUTLINE
  @nametxt.bitmap.font.color = Color.new(0,0,0)
  @nametxt.bitmap.draw_text(0,2,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
  @nametxt.bitmap.draw_text(0,0,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
  @nametxt.bitmap.draw_text(2,0,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
  @nametxt.bitmap.draw_text(2,2,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
end
@nametxt.bitmap.font.color = Color.new($game_message.color[0],$game_message.color[1],$game_message.color[2])
@nametxt.bitmap.draw_text(1,1,@nametxt.bitmap.width,@nametxt.bitmap.height,name,1)
@name_text = nil
  end
 
  # CALCULATE REAL TEXT LENGTH (for Other Languages, e.g. Japanese)
  def calculate_name_size(name = "")
name = name.scan(/./)
return name.size
  end
 
end # CLASS END

#==============================================================================
# NMS +[ADD ON]+ OTHER CLASS
#------------------------------------------------------------------------------
#==============================================================================

# STORE variables here~*
class Game_Message
  attr_accessor :nms_fontname, :nms_fontsize, :event_id, :side, :color, :_name
  attr_accessor :last_color, :text_delay, :lbl
 
  alias wor_nms_old_ini initialize
  def initialize
# NFS
@side = Window_Base::DEFAULT_FACE_SIDE
@_name = ""
@color = Window_Base::NAMEBOX_TEXT_DEFAULT_COLOR
# NMS
@last_color = 0
@nms_fontname = Window_Base::NMS_FONT_NAME
@nms_fontsize = Window_Base::NMS_FONT_SIZE
@event_id = 0
@text_delay = Window_Base::NMS_DELAY_PER_LETTER
@lbl = true
wor_nms_old_ini
  end
end

class Game_Map
  attr_accessor :interpreter
end

class Game_Interpreter
  attr_accessor :params
end

class Game_Interpreter
  def command_101
unless $game_message.busy
  $game_message.event_id = @event_id
  $game_message.face_name = @params[0]
  $game_message.face_index = @params[1]
  $game_message.background = @params[2]
  $game_message.position = @params[3]
  @index += 1
  while @list[@index].code == 401
$game_message.texts.push(@list[@index].parameters[0]) if @list[@index].parameters[0] != ""
@index += 1
  end
  if @list[@index].code == 102
setup_choices(@list[@index].parameters)
  elsif @list[@index].code == 103
setup_num_input(@list[@index].parameters)
  end
  set_message_waiting
end
return false
  end
end

**
Rep:
Level 86
UPDATED to version 2.1!!

- Fixed Name Box Bug

You can get demo from same URL :)

**
Rep:
Level 86
Here is new WIP demo :)



Features Added:
- Turn ON/OFF typing sound
- Draw Image on message (as shown in screenshot above)
- Play SE, ME during text
- Auto Cut text if it goes out of the message window

Enjoy! :)

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Adding an image is a very nice feature. Nice thinking worale.

**
Rep:
Level 86

**
Rep:
Level 86
New WIP Demo - Neo Message System 2.53



Pop Message! (may not perfect yet, but worked in demo :P)

Quote
Rough Draft of New Features List
- Remove Color for [WRITE TEXT] features
- 'Quick Text' feature
- Animated Face
- Play SE/ME
- Typing Sound
- Scroll Text Vertically and Horizontally
- Auto-cut text (Not work perfectly)
- Hex Color (Special Thanks: RPG & Erzengel)
- Pop Message (Work in Progress)
- Add the script code in comment of some settings,
so user can change it in game by call script.

and more...

Download Demo:
http://www.rpgrevolution.com/users/woratan...2_52%20Demo.rar

Thanks RRR for hosting this.
« Last Edit: May 21, 2008, 08:49:02 PM by modern algebra »

*
Shooting for the "MEMBER MODERATOR OF THE YEAR 2007" Award
Rep:
Level 89
Hi, there.
The Link for your new version isnt working.  :(
Sig by MacGravel

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
I fixed it - just a difference in hotlink format for SMF. It should work now.

**
Rep:
Level 86
Thanks :) MA

I always get this problem when I paste the post from other forum.

**
Rep:
Level 86
Neo Message System 3.0 Beta



New Features
I fixed many bugs in this demo :p
I also added some new features, like temporary X,Y,width,height or draw face in message~

Here is update list:
Code: [Select]
- Add 'Text Remove List'
- Change window size & position temporarily
- You can now call script:
$game_message.create_nms_data
to reset NMS data or create NMS data for old save file
- Fixed bug for write actor's class name
- Fixed bug for out-of-screen name box
- Add NAMEBOX_Y_PLUS_TOP to fix out-of-screen name box when show message on Top
- Set name box's opacity for different types of message background
- Auto fix if message window is out of screen
- You can draw new face while message is running, and also set new face size


Download Script & Demo

MediaFire Demo: http://www.mediafire.com/download.php?tmjmtxzdriw

Go to my script stocks:
http://www.rpgrevolution.com/users/woratana/script/Wora_Script/

Download file NMS3Beta.txt for script.

Download file NMS3 Demo.rar for demo.

:D
« Last Edit: September 12, 2009, 03:37:36 PM by modern algebra »

**
Rep: +0/-0Level 85
Uhhh I was just wondering since Im a noob at this-
I imported my own Icon set into my game so what would my icon ID be?
If you can help thanks!

Edit:
Thanks that's a lot of help!
« Last Edit: July 06, 2008, 04:04:55 PM by NorthNinja »
So you got RMVX, started a random game, have no clue what you are going to do, made a few screens and then made a topic of some random project with no direction whatsoever?

Your gonna become one fine game developer one day!


**
Rep:
Level 82
Epic script, this makes a lot of things easier. ^_^
One question, would it be possible to add a display for a variable's constant?
In other words, if variable 24 has a value of 35, then it would display the number 35 in the text.
For an example:
"You currently have 46 bronze tokens, come back when you have 50."

****
Rep:
Level 83
That is built into the system itself. Just use "\v[24]" in the text box, (no matter what text script you are using) and the value in variable 24 will be shown

**
Rep:
Level 82
That is built into the system itself. Just use "\v[24]" in the text box, (no matter what text script you are using) and the value in variable 24 will be shown

Ah, ok, thanks for letting me know that. ^_^
I must have overlooked that somewhere.

**
Rep:
Level 86
*Jams out to some serious tunes*
I'm having trouble with this. Help?

-Setting one of the variables in the script to 2 to put a big face on the right doesn't work.
-Messages don't scroll horizontally, even when I've set that to on.
-Setting the offset for the big face doesn't change where the text starts.
-Setting the offset for the text offsets EVERY message, even ones that shouldn't have an offset.


Help! I can't get it to work right. I just wanted a nice little system for my big faces and name boxes, but now it's an entire problem with how the text ends up!
« Last Edit: August 28, 2010, 02:04:07 AM by Inunah »