#================================================= =============================
# ** VX: Night_Runner's Actor Portraits
#------------------------------------------------------------------------------
# History:
# Date Created: 8/April/2012
# Created for: krimwand
# @>
http://www.rpgrevolution.com/forums/...howtopic=56123
#
# Description:
# Inside the 'Show Text' command have the escape code:
# \f[4]
# to set the face for that message to be the same face that Actor #4
# (Ylva) has.
#
# How to Install:
# Copy this entire script. In your game editor select Tools >> Script Editor.
# Along the left hand side scroll to the bottom, right click on 'Main' and
# select 'Insert'. Paste on the right.
#================================================= =============================
#================================================= =============================
# ** Game_Interpreter
#------------------------------------------------------------------------------
# Edited to allow setting the face to that of an actor.
#================================================= =============================
class Game_Interpreter
#--------------------------------------------------------------------------
# * Alias Methods
#--------------------------------------------------------------------------
alias nr_ActorPortraits_command_101 command_101 unless $@
#--------------------------------------------------------------------------
# * Show Text
#--------------------------------------------------------------------------
def command_101(*args)
# Unless there is already a text showing
unless $game_message.busy
# Run the original command_101
nr_ActorPortraits_command_101(*args)
# Setup the regular expression
actor_f_regexp = /\\[Ff]\[((\d)+)\]/
# Loop through each line of text
for line in $game_message.texts
# Scan through the line looking for the regular expression
line.gsub!(actor_f_regexp) { |match|
# Get the number
index = match.scan(actor_f_regexp)[0][0].to_i
# Set the face to that actor's data
$game_message.face_name = $game_actors[index].face_name
$game_message.face_index = $game_actors[index].face_index
# Set the \f[number] to blank
''
}
end
end
end
end
#================================================= =============================
# ** End of Script.
#================================================= =============================
Социальные закладки