Showing different faces in the same text message

Status
Not open for further replies.

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
I was wondering if there is a way to show different face graphics conditioned by variables in the same text message without the need to create a new text message to go along with it.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
I think that can be done with one of the advanced message system scripts. There are two or three different advanced message scripts, all giving more text codes to be used in the show text and show scrolling text commands, and I think that this might be one of those options - just check which options are available in which script in the master script list.
 

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
I think that can be done with one of the advanced message system scripts. There are two or three different advanced message scripts, all giving more text codes to be used in the show text and show scrolling text commands, and I think that this might be one of those options - just check which options are available in which script in the master script list.
I tried looking through them as best I could.

And one of them did look promising and said it allowed you to draw pictures and actor faces.  But it also required it's own engine and I'm wary about trying to use those.  Outside of that one, the best I was able to find was one that allowed me to draw icons.

If you do happen to ever stumble across a script that allows me to show different faces in a single message box I'd appreciate a PM.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.

This is something I've been thinking would be really useful for a while, and I also wouldn't want the extra overhead that comes with a full message system.

Can you give me an example of what sort of control codes you might like to use to tell the message system to replace the current face with another? Are you using PURE RTP scripts, or do you have scripts that already modify how messages are handled? (one concern would be if you're using larger faces or busts and the message text gets printed over the top).

Edit:

Okay, this is a fairly simple script. You select your first face when you use the Show Text command. Then you can use \f[x] in your message to select a different face index from the same file (where x is 0-7). So if you what to display different expressions for the same actor, and those expressions are all in the same face image.

class Window_Base < Window alias shaz_more_faces_process_escape_character process_escape_character def process_escape_character(code, text, pos) shaz_more_faces_process_escape_character(code, text, pos) case code.upcase when 'F' change_face(obtain_escape_param(text)) end end def change_face(face_index) $game_message.face_index = face_index contents.clear_rect(0, 0, 96, 96) draw_face($game_message.face_name, $game_message.face_index, 0, 0) endend
This one's more complicated, and lets you display whatever face image and index you want, so they don't have to be from the same file. Use \f[name index] - name does not have quotes, and can have spaces. Use a comma with no spaces between the name and the index. Like this: \f[new face,3]:

class Window_Base < Window alias shaz_more_faces_process_escape_character process_escape_character def process_escape_character(code, text, pos) shaz_more_faces_process_escape_character(code, text, pos) case code.upcase when 'F' change_face(obtain_escape_param_text(text)) end end def obtain_escape_param_text(text) text.slice!(/^\[\w+,\d+\]/)[/\w+,\d+/] end def change_face(text) $game_message.face_name = text.slice!(/^\w+,/)[/\w+/] $game_message.face_index = text.to_i contents.clear_rect(0, 0, 96, 96) draw_face($game_message.face_name, $game_message.face_index, 0, 0) endend
Use one or the other. Don't try and use both together.
 
Last edited by a moderator:

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.

This is something I've been thinking would be really useful for a while, and I also wouldn't want the extra overhead that comes with a full message system.

Can you give me an example of what sort of control codes you might like to use to tell the message system to replace the current face with another? Are you using PURE RTP scripts, or do you have scripts that already modify how messages are handled? (one concern would be if you're using larger faces or busts and the message text gets printed over the top).

Edit:

Okay, this is a fairly simple script. You select your first face when you use the Show Text command. Then you can use \f[x] in your message to select a different face index from the same file (where x is 0-7). So if you what to display different expressions for the same actor, and those expressions are all in the same face image.

class Window_Base < Window alias shaz_more_faces_process_escape_character process_escape_character def process_escape_character(code, text, pos) shaz_more_faces_process_escape_character(code, text, pos) case code.upcase when 'F' change_face(obtain_escape_param(text)) end end def change_face(face_index) $game_message.face_index = face_index contents.clear_rect(0, 0, 96, 96) draw_face($game_message.face_name, $game_message.face_index, 0, 0) endend
This one's more complicated, and lets you display whatever face image and index you want, so they don't have to be from the same file. Use \f[name index] - name does not have quotes, and can have spaces. Use a comma with no spaces between the name and the index. Like this: \f[new face,3]:


class Window_Base < Window alias shaz_more_faces_process_escape_character process_escape_character def process_escape_character(code, text, pos) shaz_more_faces_process_escape_character(code, text, pos) case code.upcase when 'F' change_face(obtain_escape_param_text(text)) end end def obtain_escape_param_text(text) text.slice!(/^\[\w+,\d+\]/)[/\w+,\d+/] end def change_face(text) $game_message.face_name = text.slice!(/^\w+,/)[/\w+/] $game_message.face_index = text.to_i contents.clear_rect(0, 0, 96, 96) draw_face($game_message.face_name, $game_message.face_index, 0, 0) endend
Use one or the other. Don't try and use both together.

Thank you for taking the time to write the scripts.  I appreciate it.

Typing /f[\V[x]] from the first script seems to be working and was what I needed.  I'm going to copy down the second script so I'll have it ready in case 8 faces isn't enough in the future.

Thanks again :)
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
lol - being able to use variables is a happy and unplanned outcome :)


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top