[Rmxp] How to change the text position while using custom resolution and a fix?

Started by glithch, November 15, 2017, 05:08:47 am

Previous topic - Next topic

glithch

I have this right now and i wanted to have this. Could anyone direct me to a place in a script where i can play around with those? I was able to figure it out at first but once i used the script i have no idea how to do it.
Spoiler: ShowHide




(yea i also want to make the text box a little lower)

EDIT: i tried using ccoas ums along with the fix for it but i got this message (script " " is the fix, i forgot to name it)

KK20

If you're talking about the fix listed in this topic: http://forum.chaos-project.com/index.php/topic,7947.0.html
Then line 17 is just
    end

which is clearly not the issue. What's line 17 in the script?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

glithch

its exactly that line in the script! idk why would it have issues tbh. im confised
and also how can i change those things in the script thag i talked about?

KK20

What version of Ccoa UMS are you using? Because I think the compatibility fix was created for an older one.

If it's 1.8, replace it with this instead. I've went and modified the numbers to use the resolution so no need for a fix.
https://pastebin.com/d3siLe5X

Regarding moving the text, I think Ccoa already handles that automatically if the reason you want to move it is because you want to add a face graphic.
If you suddenly want to switch back to default message system, add this script:

MESSAGE_MARGIN = 48 # Shifts text right by 48 pixels

class Window_Message
  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
    x += MESSAGE_MARGIN
    # If waiting for a message to be displayed
    if $game_temp.message_text != nil
      text = $game_temp.message_text
      # 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 += MESSAGE_MARGIN
          # 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 + 8
      @input_number_window.y = self.y + $game_temp.num_input_start * 32
    end
  end
end


Namely the thing you want to look for is where I put x += MESSAGE_MARGIN, if you ever need to figure out how to edit another message system script.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

glithch

https://youtu.be/dpn24Td60-0 this is the issue im having now. i swear those scripts just hate me
The first text is something that happens automatically when entering this map so it looks weird since i just dropped the character there but its ok. What i dont know is why those textboxes are jumping around like that. i did everything like in the demo, i also tried editing the demo and it worked there
also somehow the textbox got smaller? like it cant fit all the letters into it as you can see with the 'a few mo ago'

KK20


Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

KK20

Regarding moving textbox position, that was because you have Blizz-ABS installed. It technically thinks you are in battle since the script is designed for on-map battles. Refer to this line in Ccoa UMS (around line 1326):

    if $game_temp.in_battle
      self.y = 16
    else

It was setting the message window close to the top of the screen because of this. If we change it to this:

    if $BlizzABS.nil? && $game_temp.in_battle
      self.y = 16
    else

you should be good.

Regarding message window dimensions, you can change this yourself in the script or through script calls in-game. In the script, you can find these instance variables and change their values accordingly:

    @window_height = 128
    @window_width = 480

In-game, you can change them using the two script calls:

$game_system.window_height = 150
$game_system.window_width = 600

or directly in messages:

\height[150]\width[600]This is a text message in a new window size

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

glithch

im so sorry for making so many issues but somehow the script just messes up so many things in my game.... some pictures dont show up and i cant access another location. it should transfer the player when you click on the edge of the screen but it doesnt. and the little 'tutorial' pictures are supposed to erase themself and they dont/
https://drive.google.com/drive/folders/1wjfwZf8-BAQFK70oGuXdxQuxciAqdoPP?usp=sharing here are two versions of the game, one of them with one of them without the script. after deleting the script everythign goes back to normal

i reall dont want to make so many problems so if im being a trouble i thought about just deleting the script, hiding the text box, and then just showing both the text box and the dialogue head as 'show image'. but for that i would have to know how to do the text aligment to push it further. and of that im not sure when it comes to all the scripts i got.

KK20

Script order conflict.
You need to put Ccoa UMS above Blizz-ABS but below Custom Resolution.

Reason was due to Ccoa UMS rewriting Interpreter#execute_command rather than aliasing it.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!