I have a problem with the tittle screen command window

Juanxpeke

Warper
Member
Joined
Nov 26, 2016
Messages
3
Reaction score
1
First Language
Spanish
Primarily Uses
Hello everyone, how are you? c:  this is my first post and I'm really just learning how to use the RPG Maker VXAce, and now I had a problem and I didn't find any solution in intenet.


The problem is related with the options window that appears in the tittle screen (command window I believe), specifically with the size of the letters and the separation between options


With a small size font like 15 I don't have any problems, but when I change the size this happens:Changed Script.pngChanged Menu 1.pngGood Changed Menu 1.png


As I said before, I don't have any idea of the things or variables that are involved in this "problem" I'm new :c, but i believe that I have 3 problems (which are possibly related): the first is the size of the font space (in green), the second the size of the selection space (in blue) and finally the space o separation between options (in yellow).


This is another example


:Changed Script 2.pngChanged Menu 2.pngGood Changed Menu 2.png


As you can see the problem is the same, and next to the first window with the problem I drew a window that I want with problems solved


If you did not understand well how to explain me here is another idea of how I think it is my problem D:


Explication.png


If someone knows how to solve this problem with a new script or modifying the game's default scripts I would appreciate it if you took some time to explain how the change works so that I can manage to modify the window as I want and I could learn more about this program :)


Sorry for my english, I'm Chilean :C and thanks for took your time reading this noob post XD
 
Last edited by a moderator:

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,403
Reaction score
587
First Language
Italian
Primarily Uses
RMVXA
This should do the trick:


class Window_TitleCommand < Window_Command

def line_height
return Font.default_size
end

def update_placement
self.x = (Graphics.width - width) / 2
self.y = Graphics.height - height - 30
end

end




However if I were you I wouldn't change my font size there. That changes it for the whole game. If you want to change it change it only where you actually need it. If you don't have an idea of what I mean then open your game, show a message and it will be clear.



If you want something better than that and you don't want to change your font size there you can use this:

Code:
module HTW
  
  # Change this to be the font size you want to use in your game
  FONT_SIZE_DEFAULT = 24
  
  # Change this to be the font size you want to use in your title screen
  FONT_SIZE_TITLE = 48
  
end

class Window_TitleCommand < Window_Command
  
  alias htw_initialize_old  initialize
  def initialize
    Font.default_size = HTW::FONT_SIZE_TITLE
    htw_initialize_old
  end
  
  def line_height
    return Font.default_size
  end
  
  def update_placement
    self.x = (Graphics.width - width) / 2
    self.y = Graphics.height - height - 30
  end
  
end

class Scene_Title < Scene_Base
  
  alias htw_command_new_game_old  command_new_game
  alias htw_command_continue_old  command_continue
  
  def command_new_game
    Font.default_size = HTW::FONT_SIZE_DEFAULT
    htw_command_new_game_old
  end
  
  def command_continue
    Font.default_size = HTW::FONT_SIZE_DEFAULT
    htw_command_continue_old
  end
  
end
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,136
Reaction score
811
First Language
Hungarian
Primarily Uses
RMVXA
If you want to change the font size for one window only, you don't change the default font size, that is unnecessary.


You need to change the font properties for the window itself in these cases.


I think, all of your issues can be fixed with this snippet:

class Window_TitleCommand < Window_Command

def window_height
visible_line_number * 40 + standard_padding * 2
end

def item_height
return 40
end

def draw_all_items
contents.font.size = 40
super
end

end



Replace all number 40 with the font size you want.


This will automatically resize the window's and the cursor's height, so you should be fine with this.


In case your font uses a weird size scaling, and the window/cursor would get too big compared to the text (or vice verse), you can separately edit the 40s in the snippet and find which one suits your font type.


Btw, what does that "Window Resizer" do on your script list? 
 

Juanxpeke

Warper
Member
Joined
Nov 26, 2016
Messages
3
Reaction score
1
First Language
Spanish
Primarily Uses
This should do the trick:



class Window_TitleCommand < Window_Command

def line_height
return Font.default_size
end

def update_placement
self.x = (Graphics.width - width) / 2
self.y = Graphics.height - height - 30
end

end




However if I were you I wouldn't change my font size there. That changes it for the whole game. If you want to change it change it only where you actually need it. If you don't have an idea of what I mean then open your game, show a message and it will be clear.



If you want something better than that and you don't want to change your font size there you can use this:

module HTW

# Change this to be the font size you want to use in your game
FONT_SIZE_DEFAULT = 24

# Change this to be the font size you want to use in your title screen
FONT_SIZE_TITLE = 48

end

class Window_TitleCommand < Window_Command

alias htw_initialize_old initialize
def initialize
Font.default_size = HTW::FONT_SIZE_TITLE
htw_initialize_old
end

def line_height
return Font.default_size
end

def update_placement
self.x = (Graphics.width - width) / 2
self.y = Graphics.height - height - 30
end

end

class Scene_Title < Scene_Base

alias htw_command_new_game_old command_new_game
alias htw_command_continue_old command_continue

def command_new_game
Font.default_size = HTW::FONT_SIZE_DEFAULT
htw_command_new_game_old
end

def command_continue
Font.default_size = HTW::FONT_SIZE_DEFAULT
htw_command_continue_old
end

end
Thanks for replying c: I'll see it soon and I'll let you know if it works for me: D
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,887
Reaction score
8,242
First Language
English
Primarily Uses
RMMV
I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,136
Reaction score
811
First Language
Hungarian
Primarily Uses
RMVXA
It was at the right place, the question is VX Ace script related. :D


Move it back quickly, I will pretend I didn't see. :p
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,635
Reaction score
13,231
First Language
English
Primarily Uses
RMMV
It was in RGSS3 Scripts (releases), not Script Support. ;)
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,136
Reaction score
811
First Language
Hungarian
Primarily Uses
RMVXA
It was either in RGSS3 Script Requests or RGSSx Script Support, that's why I was a bit surprised that it got moved to the Javascript section. o_O


I replied it from there a few hours ago. :D


Haven't replied to anything in the RGSS3 Scripts (releases) section today, so it wasn't there.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,635
Reaction score
13,231
First Language
English
Primarily Uses
RMMV
Yeah, it was there, and I reported it to be moved. ;)   The mod who moved it would have also checked to confirm that it was in the wrong place.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,887
Reaction score
8,242
First Language
English
Primarily Uses
RMMV
Yeah, it was there, and I reported it to be moved. ;)   The mod who moved it would have also checked to confirm that it was in the wrong place.


And then move it to the wrong section anyway. :p


So yeah, I'll fix that. :D
 

Juanxpeke

Warper
Member
Joined
Nov 26, 2016
Messages
3
Reaction score
1
First Language
Spanish
Primarily Uses
OMG it works, thanks everyone for reading my post and helping me :D!!! I really thought that no one would ever respond to me XD
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Anyone who uses Yanfly's Gab Window plugin: are there any features it lacks that you wish it had?
Working on Zelda-like tileset. Should be greatly refined. And tonight extra pave tiles, outward corners, abyss and water...
Is it possible to move posts from the in-progress project forum to completed games? I think I need to message a mod but a bit worried about bothering them
Bleeding Moons has its release date: September 3rd!

Forum statistics

Threads
100,545
Messages
977,070
Members
132,081
Latest member
Kaezyelnatz
Top