Scripting for facesets IN the text

Hello, angels. I was thinking that I didn't exactly like the character portraits not being in the text and I was wondering if there was a script similar to Ccoas UMS (if you have heard of it), that is a little less complicated. By less complicated, I mean that all I want is the basic picture-in-text type thing. Nothing fancy. If anyone could help, I would be greatful!
Not sure what you mean. I'm familiar with CCOA's UMS - Ace does quite a bit of that by default (I went to add some of her UMS that I use the most into Ace, and discovered almost everything I needed was already catered for).


Are you JUST wanting something so you can type a code in your text and it will display the appropriate face, rather than having to choose the faceset and the index each time?


Oh - oops! You're talking about XP 😀 So why don't you just use CCOA's UMS then?
Well, I think it's just a bit much. If there is no other option, than of course I will use it. But I just wanted to see if there was any other options that anyone else used. If you want to close this, you can. It's not that important.
Bump. 🙂
Are you using any custom scripts or script mods for the message system at the moment, or do you JUST have the default RMXP scripts?
For the message system? No.
Try this in a new slot above Main:

Spoiler
#==============================================================================# ** Window_Message#------------------------------------------------------------------------------# This message window is used to display text.#==============================================================================class Window_Message < Window_Selectable FACES = {'\dal' => '\C[6]Aluxes\C[0]\face[AluxesDown] ', '\lal' => '\C[6]Aluxes\C[0]\face[AluxesLeft] ', '\ral' => '\C[6]Aluxes\C[0]\face[AluxesRight] ', '\dba' => '\C[6]Basil\C[0]\face[BasilDown] ', '\lba' => '\C[6]Basil\C[0]\face[BasilLeft] ', '\rba' => '\C[6]Basil\C[0]\face[BasilRight] ', '\dcy' => '\C[6]Cyrus\C[0]\face[CyrusDown] ', '\lcy' => '\C[6]Cyrus\C[0]\face[CyrusLeft] ', '\rcy' => '\C[6]Cyrus\C[0]\face[CyrusRight] ', '\ddo' => '\C[6]Dorothy\C[0]\face[DorothyDown] ', '\ldo' => '\C[6]Dorothy\C[0]\face[DorothyLeft] ', '\rdo' => '\C[6]Dorothy\C[0]\face[DorothyRight] ', } #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = normal_color x = y = 0 @cursor_width = 0 # Indent if choice if $game_temp.choice_start == 0 x = 8 end # If waiting for a message to be displayed if $game_temp.message_text != nil text = $game_temp.message_text # Insert name/face shortcuts FACES.each do |shortcut, code| text.gsub!(shortcut, code) end @face = nil text.gsub!(/\\face\[(.*?)\]/i) do @face = $1.to_s self.contents.blt(0, 0, RPG::Cache.picture(@face), RPG::Cache.picture(@face).rect) x += 100 '' end # Control text processing begin last_text = text.clone text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] } end until text == last_text text.gsub!(/\\[Nn]\[([0-9]+)\]/) do $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : "" end # Change "\\\\" to "\000" for convenience text.gsub!(/\\\\/) { "\000" } # Change "\\C" to "\001" and "\\G" to "\002" text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" } text.gsub!(/\\[Gg]/) { "\002" } # Get 1 text character in c (loop until unable to get text) while ((c = text.slice!(/./m)) != nil) # If \\ if c == "\000" # Return to original text c = "\\" end # If \C[n] if c == "\001" # Change text color text.sub!(/\[([0-9]+)\]/, "") color = $1.to_i if color >= 0 and color <= 7 self.contents.font.color = text_color(color) end # go to next text next end # If \G if c == "\002" # Make gold window if @gold_window == nil @gold_window = Window_Gold.new @gold_window.x = 560 - @gold_window.width if $game_temp.in_battle @gold_window.y = 192 else @gold_window.y = self.y >= 128 ? 32 : 384 end @gold_window.opacity = self.opacity @gold_window.back_opacity = self.back_opacity end # go to next text next end # If new line text if c == "\n" # Update cursor width if choice if y >= $game_temp.choice_start @cursor_width = [@cursor_width, x].max end # Add 1 to y y += 1 x = 0 # Indent if choice if y >= $game_temp.choice_start x = 8 end x += 100 if @face # go to next text next end # Draw text self.contents.draw_text(4 + x, 32 * y, 40, 32, c) # Add x to drawn text width x += self.contents.text_size(c).width end end # If choice if $game_temp.choice_max > 0 @item_max = $game_temp.choice_max self.active = true self.index = 0 end # If number input if $game_temp.num_input_variable_id > 0 digits_max = $game_temp.num_input_digits_max number = $game_variables[$game_temp.num_input_variable_id] @input_number_window = Window_InputNumber.new(digits_max) @input_number_window.number = number @input_number_window.x = self.x + (@face ? 108 : 8) @input_number_window.y = self.y + $game_temp.num_input_start * 32 end end #-------------------------------------------------------------------------- # * Cursor Rectangle Update #-------------------------------------------------------------------------- def update_cursor_rect if @index >= 0 n = $game_temp.choice_start + @index self.cursor_rect.set(@face ? 108 : 8, n * 32, @cursor_width, 32) else self.cursor_rect.empty end endend
This is the bit you have to change:

FACES = {'\dal' => '\C[6]Aluxes\C[0]\face[AluxesDown] ', '\lal' => '\C[6]Aluxes\C[0]\face[AluxesLeft] ', '\ral' => '\C[6]Aluxes\C[0]\face[AluxesRight] ', '\dba' => '\C[6]Basil\C[0]\face[BasilDown] ', }The key, on the left, is what you will put at the start of your text. I suggest you make them at least 3 characters long, but you could make them longer. They must all be unique, and one must not be contained within another one (so you can't use \Aluxes and \AluxesSad because \Aluxes is a part of \AluxesSad and they could get mixed up) - I find it's better to put the expression first and then the name.The value on the right is whatever you want to substitute. It should have \face[filename] where filename is the name of the file for that character/expression, without the file extension. You may or may not want to include the \C[6]Name\C[0] part to show the character's name. If you do, make sure there's a space in there somewhere so it won't butt the actual text right next to the name (I put it at the end of the strings above, but you could put it after the name, or after the \c[0]. You could also do something like \C[6]\N[1]\C[0] if you want it to get the name from the database (in the case where you allow your player to name the character, for instance).

The images should be saved in the Pictures folder, individually (keeping with the way RMXP handles its images, rather than the way Ace combines them into groups of 8), and should ideally be 96x96 pixels.
Oh my god! I can't believe I didn't see your post earlier! You are a hero, Shaz! Thank you so much for helping me, and I think that this is a problem solved!
lol - I didn't think it'd been quite that long since I did that. Glad it's working for you. 😉


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.

Original thread: https://forums.rpgmakerweb.com/threads/scripting-for-facesets-in-the-text.18224/