- AyumiaouMembre
- Nombre de messages : 19
Age : 30
Localisation : Va savoir :3
Distinction : aucune
Date d'inscription : 26/01/2013
Comment mettre une image devant le texte
Dim 17 Mar 2013 - 14:58
- J'aimerais savoir comment on pourrait avoir ce résultat. (soit devant les écrit, sois derrière cela me va très bien aussi ^^)
Type de script: RGSS3
Explication complete: Je cherche à mettre un grand "faceset" devant ou derrière les paroles du personnage.
Spécificités: Aucune.
Schéma très clair: http://rpgmaker.net/media/content/games/3827/screenshots/OhCitrus.png
Ressources supplémentaires: Aucune
Exemples dans un jeu video: Aucun
Scripts déjà possédés: Aucun
Merci pour votre aide :3
- OlowyndMembre
- Nombre de messages : 60
Age : 28
Localisation : Nord-Pas-de-Calais
Distinction : aucune
Date d'inscription : 12/03/2013
Re: Comment mettre une image devant le texte
Dim 17 Mar 2013 - 15:23
Il me semble avoir déjà vu un script pour ça, sinon tu peut toujours jouer avec la commande "afficher image" et "effacer image" avant et après chaque dialogue. Ah, en fait je crois avoir trouvé le script, c'est peut-être celui-ci:
Neo Save System:
Neo Save System:
- Code:
===============================================================
# + [VX] [ NMS - Neo Message System 3.0 Beta ] +
#--------------------------------------------------------------
# >> by Woratana [woratana@hotmail.com]
# >> Thaiware RPG Maker Community
# >> Special Thanks: Mako, Yatzumo, Straycat, Erzengel, RPG,
# Dubalex, Modern Algebra, Equilibrium Keeper
#--------------------------------------------------------------
# Released on: 07/06/2008 (D-M-Y)
#--------------------------------------------------------------
# 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 :)
# - This script is included newest version of Neo-Face System,
# so you have to remove old Neo-Face System if you have it.
=begin
=============================================
+ NMS 3 Beta + [07/06/2008]
- 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
=============================================
=============================================
+ NMS 2.3 + [11/03/2008 - 06/04/2008]
- 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.
=============================================
=============================================
+ NMS 2.1 + [11/03/2008]: Fixed Name Box Bug
=============================================
=====================================
+ 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
--------------------------
>> [MESSAGE WINDOW] PART
--------------------------
* temporary properties will be using only one time
\wx[x] << Set temporary X to x
\wy[y] << Set temporary Y to y
\ww[width] << Set temporary Width to width
\wh[height] << Set temporary Height to height
----------------------------------------
>> +[ POP TEXT ]+
----------------------------------------
Pop text is the message box that will show over character
and has size equal to message size
You can call pop text by put this in message
\p[character]
* character: Character you want to show message box over~
0 for Player
-1 for This Event
1 or more for that event ID
----------------------------------------
>> +[ QUICK TEXT ]+ a.k.a. Shortcut
----------------------------------------
Add & Call your very long text (or) text that you use many times by shortcut.
You can put special syntax in it, e.g. 'Welcome to \c[10]Syria Village\c[0]
$nms.qt[Quick Text ID] = 'Text you want' << Add Quick Text
\qt[Quick Text ID] << Call Quick Text from message box
--------------------------
>> [DRAW IMAGE] 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
\dp[image_name] << Draw Image from folder 'System'
--------------------------
>> [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] (or) << 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
\sh << Turn on/off SHADOW 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] (or) $nms._name = '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] (or) $nms.side = side << Change Face Side:
(0: Left Side Normal Face | -1: Right Side Normal Face)
(1: Left Side Neo Face | 2: Right Side Neo Face)
$nms.color = [Red,Green,Blue] << Change Name Text Color:
Put RGB Color in, e.g. [255,100,200]
\fa[face_file_name, face_index] (or) \fa[face_file_name, face_index, new_side]
<< Draw new face while message is running~
face_file_name: Face image's name
face_index: Index of the face in image (0 - 7)
new_side: Face side you want to change to
--------------------------
>> [SOUND] PART
--------------------------
\se[filename] << Play SE
\me[filename] << Play ME
\bgm[filename] << Play BGM
\typ << Turn on/off typing sound
--------------------------
>> [Misc.] PART
--------------------------
\cb << Turn on/off cancel skip text feature (Player can/can't press [Enter] to skip text)
\nl << Start new line
\sc[x] << Create blank space x pixel
\w[x] << Wait x frames
\c[#XXXXXX] << Use Hex Color for text
----------------------------------
>> 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
# $nms.text_delay = (number)
TEXT_X_PLUS = 0 # Move Text Horizontally
CHOICE_INPUT_X_PLUS = 0
# Move Choices Text and Input Number Text Horizontally
# [NEW SETTING] #
NMS_MSGWIN_X = 0 # Default Message Window X
# $nms.msg_x = (number)
NMS_MSGWIN_WIDTH = 544 # Default Message Window Width
# $nms.msg_w = (number)
NMS_MSGWIN_MIN_HEIGHT = 128 # Default & Minimum Message Window Height
# $nms.msg_h_user = (number)
NMS_MAX_LINE = 4 # Max Message Lines to display per page
# $nms.max_line = (number)
NMS_GET_NEXT_LINE = false # Get messages from next message command, if box is not full
# $nms.next_msg = true/false
NMS_MSG_BACK = "MessageBack" # Message Back Image File Name (For 'Dim Background' Message)
# (Must be in folder 'System')
# $nms.mback = 'Image Name'
NMS_MSG_BACK_OPACITY = 255 # message Back's Opacity
# $nms.mback_opac = (0 - 255)
NMS_TEXT_SCROLL = false # Use Vertical Text Scroll?
# $nms.txt_scrl = true/false
NMS_TEXT_AUTO_CUT = false # Text will automatically start new line if that line is full
# (Some bug, it may cut in the middle of word..)
# $nms.txt_cut = true/false
NMS_TEXT_AUTO_SCROLL_HORIZONTAL = false # Text will automatically scroll to the left if line is full
# This will not work if NMS_TEXT_AUTO_CUT is true
# $nms.txt_scrl_hori = true/false
NMS_TEXT_AUTO_SCROLL_HORIZONTAL_DELAY = 1 # Scroll Delay (in frame)
# $nms.txt_scrl_hori_delay = (number)
NMS_USER_NEW_LINE = false # Text will goes in new line ONLY when type \nl
# (Good for Text Auto Cut)
# $nms.txt_unl = true/false
NMS_REMOVE_LIST = [] # List of text that you want to remove from message
# for example, NMS_REMOVE_LIST = ['test', '[MS]']
# will remove text 'test' and '[MS]' before show message
# Note that this is NOT case sensitive
#---------------------------------
# ? FACE SYSTEM
#-------------------------------
#------------------------------------------------
# ** BOTH FACE SYSTEMS SETUP
#----------------------------------------------
DEFAULT_FACE_SIDE = 1 # 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)
# $nms.side = (side no.)
FACE_X_PLUS = 0 # Move Face Horizontally (Left: -, Right: +)
FACE_Y_PLUS = -122 # 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)
# $nms.face_fade = 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)
# $nms.face_move = 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)
#-------------------------------
# ** ANIMATED FACE SYSTEM
#----------------------------
ANIMATE_FACE_DELAY = 6 # Face animate every _ frame
# $nms.animf_delay = (number)
ANIMATE_FACE_CONTINUE = false # Face continue to animate after text stop writing?
# $nms.animf_cont = (true/false)
#------------------------------------
# ? NAME BOX SYSTEM
#----------------------------------
NAMEBOX_SKIN = 'Window' # Windowskin of Name Box (In folder 'Graphics/System')
NAMEBOX_OPACITY = 255 # Name Box Opacity when using 'Normal Background' message
# (Lowest 0 - 255 Highest)
NAMEBOX_OPACITY_DIM_BG = 0 # Name Box Opacity when using 'Dim Background'
NAMEBOX_OPACITY_NO_BG = 0 # Name Box Opacity when using 'Transparent' Background
NAMEBOX_BACK_OPACITY = 180 # Name Box Background Opacity
NAMEBOX_X_PLUS_NOR = 100 # 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_Y_PLUS_TOP = 140
# Move Name Box & Text Vertically if message box is on Top
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 (Red Green Blue) color in Google :)
# You are allow to change color in game by call script:
# $nms.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.
#---------------------------------
# ? TEXT TYPING SOUND SYSTEM
#-------------------------------
TYPING_SOUND = true # Use Typing Sound?
# $nms.typ_se = true/false
TYPING_SOUND_FILE = 'Open1'
# Sound File Name for Typing Sound (Must be in Folder 'Audio/SE')
# $nms.typ_file = 'filename'
TYPING_SOUND_VOLUME = 0 # Typing Sound's Volume
# $nms.typ_vol = 0 - 100
TYPING_SOUND_SKIP = 4
# How many frames you want to skip before play typing sound again?
# $nms.typ_skip = (no. of frames)
#---------------------------------
# [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
contents.font.name = $nms.nms_fontname
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)
#NMS 2++
self.width = $nms.msg_w
self.height = $nms.msg_h
update_window_size(true)
self.x = $nms.msg_x
@typse_count = 0
@delay_text = 0
@no_press_input = false
@biggest_text_height = 0
@all_text_width = 0
@animf_dl = 0 # Animation Face Delay
@animf = false # Using Animation Face?
@animf_ind = 0 # Animation Face Index
@pop = nil # Pop ID
end
#--------------------------------------------------------------------------
# ? ??
#--------------------------------------------------------------------------
def dispose
super
dispose_gold_window
dispose_number_input_window
dispose_back_sprite
end
#--------------------------------------------------------------------------
# ? EDITED
#--------------------------------------------------------------------------
def update
super
if self.visible == true
update_back_sprite
update_gold_window
update_number_input_window
update_show_fast
update_window_size
update_animate_face if @animf
@typse_count -= 1 if @typse_count > 0
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 $nms.face_move 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
if @delay_text > 0
@delay_text -= 1
else
update_message
end
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
#--------------------------------------------------------------------------
# ? NEW
#--------------------------------------------------------------------------
def update_window_size(direct = false, create_bitmap = true)
if (self.width != $nms.msg_w or self.height != $nms.msg_h) or direct
self.width = $nms.msg_w if $nms.msg_w > 32
self.height = $nms.msg_h if $nms.msg_h > 32
create_contents if create_bitmap
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 = @old_mback = Cache.system($game_message.mback)
@back_sprite.opacity = @old_mback_opac = $game_message.mback_opac
@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 = $nms.mback_opac > openness ? openness : $nms.mback_opac
@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 and !@no_press_input
@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: NMS 2.2+
#--------------------------------------------------------------------------
def start_message
@all_text_width = 0
@pop = nil
@text = ""
@text_line = $game_message.texts.size < $game_message.max_line ? $game_message.texts.size + 1 : MAX_LINE + 1
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
update_window_size
new_page
end
#--------------------------------------------------------------------------
# ? EDITED
#--------------------------------------------------------------------------
def new_page
@animf = false
contents.clear
if @face.bitmap != nil
@face.bitmap.dispose
end
if $game_message.face_name.empty?
@contents_x = TEXT_X_PLUS
else
nms_draw_new_face
# CHECK FOR MOVE EFFECT
@ori_x = @face.x
if $nms.face_move 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 = Graphics.width
end
end
@contents_x = get_x_face
end
@main_contents_x = @contents_x
@contents_y = 0
@line_count = 0
@typse_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
if @old_mback != Cache.system($nms.mback) or @old_mback_opac != $nms.mback_opac
dispose_back_sprite; create_back_sprite
end
@no_press_input = false
self.oy = 0
end
Re: Comment mettre une image devant le texte
Dim 17 Mar 2013 - 16:28
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum
|
|