I found the perfect font, but I only want to use uppercase letters for a classic feel. Is it possible to transform all the default text into uppercase letters? Crossing my fingers it's possible, or else I might have to edit the font file itself 🙁 .
Font in all uppercase
RPG Maker VXAce Supportmmm ... why don't you just type everything in upper case?
[SIZE=12.222222328186px]"transform all the default text into uppercase letters"[/SIZE]
Please define what do you mean by default text.
If you mean Start Game, Hero name and stuff like menu items in general, like Item,Save,Status,Equip... all these or most can change to UPPERCASE yes.
All the default text is either in the database or in the Vocab script.
Note - if you ever see %s used, leave it lower case. You will break things by changing that.
Note - if you ever see %s used, leave it lower case. You will break things by changing that.
This apparently work:
class Window_Base < Window def draw_text(*args) args.each_index do |idx| if args[idx].is_a? String args[idx] = args[idx].upcase end end contents.draw_text(*args) end alias capitalize_draw_text_ex draw_text_ex def draw_text_ex(x, y, text) capitalize_draw_text_ex(x, y, text.upcase) end end
@mewochelle, if you decide to use the code I posted, be sure to test those situations.
class Window_Base < Window def draw_text(*args) args.each_index do |idx| if args[idx].is_a? String args[idx] = args[idx].upcase end end contents.draw_text(*args) end alias capitalize_draw_text_ex draw_text_ex def draw_text_ex(x, y, text) capitalize_draw_text_ex(x, y, text.upcase) end end
I don't know if the above code will break this or not.
@mewochelle, if you decide to use the code I posted, be sure to test those situations.
You can add a string manipulation that when it finds a % inside a string it will not convert it, otherwise it will. 😉
I must learn Ruby fast, or I will not be of any help for long in this forum.
Everything can be solved using scripts!
True.
I'm going to sleep now, but if OP decides to go the script way, I can add that in the morning.
It should not, because the substitutions happen before the call to those methods. IE - by the time it gets to those methods, there should no longer be any %s occurrences in the string.
Some scripts might use sprite instead of window to draw text. So, imo it's better to modify the draw_text inside the bitmap class instead
Code:
class Bitmap alias upcase_draw_text draw_text def draw_text(*args) args.each_index do |idx| if args[idx].is_a? String args[idx] = args[idx].upcase end end upcase_draw_text(*args) endend
@Shaz Haha, I realized after posting this, that that was an option.
@Hudell This works.
@TheoAllen This works as well.
Thank you everyone for your help! 🙂
@Hudell This works.
@TheoAllen This works as well.
Thank you everyone for your help! 🙂
Original thread: https://forums.rpgmakerweb.com/threads/font-in-all-uppercase.35680/