Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> NEW! A Choose one of the actors, and load their face into a message., Persists even if you change faces.
Would you ever use this script?
You cannot see the results of the poll until you have voted. Please login and cast your vote to see the results of this poll.
Total Votes: 113
Guests cannot vote 
ubergeek
post Aug 24 2008, 12:30 PM
Post #1


Level 2
Group Icon

Group: Member
Posts: 26
Type: Scripter
RM Skill: Skilled




When I fisrt started creating my game, I noticed an obvious hurdle: When you create a message, you have to select a specific face to apply to the message. My plan was for the main character to use a different sprite depending on the player's gender, but sadly, this isn't possible. So I set to work on creating an easy-to-use script that would solve my problem.


This is an improvment of the basic "Lead Member" script I posted a couple of days ago, and believe me, this one works a lot better.

How this works is, when you select a face for a message, eleven new options appear. One reads "Face_Lead" and the others read "Face1" Through "Face10." (If you have more than 10 actors, it can still work but requires some adjustment. Keep reading.)

If you select "Face_Lead," the message wil appear as if it was being spoken by the person in the front of your party. (Although this wil not show up in the preview, it will show up in the Playtest.)

If you select "Face x" for any number x, the face of actor id #x will appear instead.

To install, do the following:

1. Download CharacterFaceHandler.zip, an attachment, to the graphics folder of your game.

2. Extract the files from the zip folder.

2.5 If you have more than 10 actors, add additional files to the Graphics folder title titled "Face11", "Face12", etc.

3. Add the script above main. The script will be written out here and availible as an attachment.

#SCRIPT BEGIN
#==============================================================================
# ** Character Face Handler
#------------------------------------------------------------------------------
# This script allows you to select actors from a list while creating messages.
# It references $game interpreter.
#==============================================================================

class Game_Interpreter

#--------------------------------------------------------------------------
# * Show Text
#--------------------------------------------------------------------------
def command_101
unless $game_message.busy
$game_message.face_name = @params[0]
$game_message.face_index = @params[1]
$game_message.background = @params[2]
$game_message.position = @params[3]
if $game_message.face_name == "Face_Lead"
$game_message.face_name = $game_party.members[0].face_name
$game_message.face_index = $game_party.members[0].face_index
else
for i in 1..$data_actors.size-1
if $game_message.face_name == "Face" + i.to_s
$game_message.face_name = $data_actors[i].face_name
$game_message.face_index = $data_actors[i].face_index
end
end


end
@index += 1
while @list[@index].code == 401 # Text data
$game_message.texts.push(@list[@index].parameters[0])
@index += 1
end
if @list[@index].code == 102 # Show choices
setup_choices(@list[@index].parameters)
elsif @list[@index].code == 103 # Number input processing
setup_num_input(@list[@index].parameters)
end
set_message_waiting # Set to message wait state
end
return false
end

#SCRIPT END

I didn't use the CODEBOX tags because then the code doesn't copy and paste well (for me, at least.)

This post has been edited by ubergeek: Aug 24 2008, 12:32 PM
Attached File(s)
Attached File  CharacterFaceHandler.zip ( 1.04K ) Number of downloads: 197
Attached File  Character_Face_Handler.txt ( 1.79K ) Number of downloads: 138
 


__________________________
A list of my completed Scripts: (All VX)

Call an actor, add their face, even if changed: Character Face Handler

Select a party member and store it as a variable: Actor Selection Tool

Enable a "Quicksave" Feature: Quicksave

============================================

My current project:
Titan's Army
Story: 60%
Maps: 5%
Classes: 40%
Items: 5%
Scripts: 30%
Go to the top of the page
 
+Quote Post
   



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 17th June 2013 - 09:25 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker