Main Menu
  • Welcome to The RPG Maker Resource Kit.

RPG Maker VX ACE : Using uncommon fonts

Started by KDashFate, October 12, 2012, 10:33:42 PM

0 Members and 1 Guest are viewing this topic.

KDashFate

I'm trying to use this font I downloaded and it works for the most part, but in the menu the font looks like this:


The words circled in red is what I'm talking about.
I can see what the program is doing, if a word is too long then it shrinks it to fit within the parameters.
My question is: Is it possible to override this?
I couldn't find it in the main script and I'm fine with the words bleeding into each other slightly, in fact I might want them to.

If anyone can help it would be totally cool

modern algebra

Not in a useful way, no. If it didn't happen, words would overlap and so you would want to actually adjust the spacing. There is no way that you could fit a long phrase like "ENERGY DEFENCE" in the space you have. You could try making the font smaller though.

KDashFate

Thank you for the response.

Is there a way to make the words overlap? And adjust the spacing?

If the above is impossible, then is it possible to dictate how small it shrinks the word to?

modern algebra

#3
Yes, it is possible in the scripts.

A general solution would be something like pasting the following code into its own slot, below Materials but above Main. Naturally, it would only work for text intended to be left-aligned.


class Window_Base
  #--------------------------------------------------------------------------
  # * Draw Text
  #     args : Same as Bitmap#draw_text.
  #--------------------------------------------------------------------------
  alias kdash_nospacelimdrwtx_2gb6 draw_text
  def draw_text(*args)
    if args[0].is_a?(Rect) && !args[2] || args[2] == 0
      args[0] = args[0].dup
      args[0].width = 1000
    elsif args[4] && !args[5] || args[5] == 0
      args[2] = 1000
    end
    kdash_nospacelimdrwtx_2gb6(*args)
  end
end


It would probably be simpler to just set those values to something arbitrarily large, like 1000, but whatever.

If you don't want to employ a general solution, you would have to modify the actual areas where you are experiencing problems themselves. For instance, you would need to go to the #draw_actor_level method in Window_Base:



  #--------------------------------------------------------------------------
  # * Draw Level
  #--------------------------------------------------------------------------
  def draw_actor_level(actor, x, y)
    change_color(system_color)
    draw_text(x, y, 32, line_height, Vocab::level_a)
    change_color(normal_color)
    draw_text(x + 32, y, 24, line_height, actor.level, 2)
  end


and you would need to change the 32 in those lines to reflect the actual width of "LEVEL". You would have to do the same everywhere you have the problem.

Again, just to be clear, I think overlapping text will make your game look terrible. There is nothing wrong with abbreviating your stat names.

KDashFate

Thank you VERY much!!!
I also agree that it will look terrible, but thank you again this is very helpful.

KDashFate

I really appreciate the tips, and I fixed everything else but I'm still having problems with the numbers on the HP/MP and the numbers on the status screen.
They still look like they do in the above picture.
I tried the script and I went into Window_Base but I can't figure it out, it seems to be different then the rest when it comes to those numbers.
Its the only thing keeping my menu from being perfect.

modern algebra

#6
Hmm, I'll look into it.

modern algebra

Alright, well try replacing that earlier code with:


class Window_Base
  #--------------------------------------------------------------------------
  # * Draw Text
  #     args : Same as Bitmap#draw_text.
  #--------------------------------------------------------------------------
  alias kdash_nospacelimdrwtx_2gb6 draw_text
  def draw_text(*args)
    if args[0].is_a?(Rect)
      align = args[2] ? args[2] : 0
      args[0] = args[0].dup
      args[0].width += 1000
      args[0].x -= (500*align)
    elsif args[4].is_a?(String)
      align = args[5] ? args[5] : 0
      args[2] += 1000
      args[0] -= (500*align)
    end
    kdash_nospacelimdrwtx_2gb6(*args)
  end
end

KDashFate

Thanks for your response, and your time, I really appreciate it.

I tried using this new script, but it didn't fix the hp/mp or the status numbers.

modern algebra

Alright, I guess I didn't realize you could pass integers as the string. Replace it with:


class Window_Base
  #--------------------------------------------------------------------------
  # * Draw Text
  #     args : Same as Bitmap#draw_text.
  #--------------------------------------------------------------------------
  alias kdash_nospacelimdrwtx_2gb6 draw_text
  def draw_text(*args)
    if args[0].is_a?(Rect)
      align = args[2] ? args[2] : 0
      args[0] = args[0].dup
      args[0].width += 1000
      args[0].x -= (500*align)
    elsif args[4]
      align = args[5] ? args[5] : 0
      args[2] += 1000
      args[0] -= (500*align)
    end
    kdash_nospacelimdrwtx_2gb6(*args)
  end
end


Also, by the problem with the status numbers, what do you mean? Do you mean the squares? If so, try looking at this topic: http://forums.rpgmakerweb.com/index.php?/topic/1131-rgss3-unofficial-bugfix-snippets/


Also, for the numbers, you would probably be better off editing the methods directly.

KDashFate

You are a gift from God, everything works perfectly now, thank you!!!