Author Topic: [Rmxp] How to change the text position while using custom resolution and a fix?  (Read 801 times)

Offline glithch

  • Total Beginner
  • Posts: 9
  • LV: 0
    • View Profile
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.
(click to show/hide)
(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)
 
« Last Edit: November 16, 2017, 04:05:47 AM by KK20 »

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3083
  • LV: 375
  • Gender: Male
  • Choco Octo <3
    • View Profile
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
Code: [Select]
    endwhich is clearly not the issue. What's line 17 in the script?



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline glithch

  • Total Beginner
  • Posts: 9
  • LV: 0
    • View Profile
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?

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3083
  • LV: 375
  • Gender: Male
  • Choco Octo <3
    • View Profile
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:
Code: [Select]
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.
« Last Edit: November 16, 2017, 09:57:48 AM by KK20 »



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline glithch

  • Total Beginner
  • Posts: 9
  • LV: 0
    • View Profile
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'
« Last Edit: November 17, 2017, 01:16:53 AM by glithch »

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3083
  • LV: 375
  • Gender: Male
  • Choco Octo <3
    • View Profile
Send me your Scripts.rxdata



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3083
  • LV: 375
  • Gender: Male
  • Choco Octo <3
    • View Profile
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):
Code: [Select]
    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:
Code: [Select]
    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:
Code: [Select]
    @window_height = 128
    @window_width = 480
In-game, you can change them using the two script calls:
Code: [Select]
$game_system.window_height = 150
$game_system.window_width = 600
or directly in messages:
Code: [Select]
\height[150]\width[600]This is a text message in a new window size



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline glithch

  • Total Beginner
  • Posts: 9
  • LV: 0
    • View Profile
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.
« Last Edit: November 18, 2017, 03:47:22 PM by glithch »

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3083
  • LV: 375
  • Gender: Male
  • Choco Octo <3
    • View Profile
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 AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server