Window scripts

ZeroVirusXIII

ZeroVirusXIII
Member
Joined
Jul 23, 2014
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Hey all, I'm new to these forums as well as scripting. I was just wondering if I could get a hand with a few problems I'm having. I'm mainly changing window sizes to begin with but I have some other ideas in mind, if they're at all possible.


1.png

First up on the actor status select, I am wanting to change the size of the selection box, I resized that window as best I could and then the above, in attachment one, happened.
Also I'm wondering is it possible to have the actors status permanently on screen without hindering game play? Without the menu of course.
Ideally having it take up that whole top row and when the menu is present to just shift over where it is in the first attachment or even to just take up the space seen.


2.png

Secondly I'm wanting to change the window size of both the items and key items list. I just can't seem to find the right code to edit.

Any help would be greatly appreciated.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Please post the script (wrap it in code tags, and wrap the whole lot in spoiler tags) so people can see what you've done. We can't do much more than make a guess based on screenshots.


Actor status permanently on screen is called a game hud. There are scripts and evented solutions, so do a bit of a search and see if you come up with something useful.
 

ZeroVirusXIII

ZeroVirusXIII
Member
Joined
Jul 23, 2014
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Sorry about that. Wasn't quite sure where to post.

Here's the script for the menu status window. I altered with window height to 120 to make it the same size as the menu command window, which in doing so change the selection size when hovering over an actor on the status menu.

Code:
#==============================================================================# ** Window_MenuStatus#------------------------------------------------------------------------------#  This window displays party member status on the menu screen.#==============================================================================class Window_MenuStatus < Window_Selectable  #--------------------------------------------------------------------------  # * Public Instance Variables  #--------------------------------------------------------------------------  attr_reader   :pending_index            # Pending position (for formation)  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize(x, y)    super(x, y, window_width, window_height)    @pending_index = -1    refresh  end  #--------------------------------------------------------------------------  # * Get Window Width  #--------------------------------------------------------------------------  def window_width    Graphics.width - 160  end  #--------------------------------------------------------------------------  # * Get Window Height  #--------------------------------------------------------------------------  def window_height    120  end  #--------------------------------------------------------------------------  # * Get Number of Items  #--------------------------------------------------------------------------  def item_max    $game_party.members.size  end  #--------------------------------------------------------------------------  # * Get Item Height  #--------------------------------------------------------------------------  def item_height    (height - standard_padding * 2) / 4  end  #--------------------------------------------------------------------------  # * Draw Item  #--------------------------------------------------------------------------  def draw_item(index)    actor = $game_party.members[index]    enabled = $game_party.battle_members.include?(actor)    rect = item_rect(index)    draw_item_background(index)    draw_actor_face(actor, rect.x + 1, rect.y + 1, enabled)    draw_actor_simple_status(actor, rect.x + 108, rect.y + line_height / 2)  end  #--------------------------------------------------------------------------  # * Draw Background for Item  #--------------------------------------------------------------------------  def draw_item_background(index)    if index == @pending_index      contents.fill_rect(item_rect(index), pending_color)    end  end  #--------------------------------------------------------------------------  # * Processing When OK Button Is Pressed  #--------------------------------------------------------------------------  def process_ok    super    $game_party.menu_actor = $game_party.members[index]  end  #--------------------------------------------------------------------------  # * Restore Previous Selection Position  #--------------------------------------------------------------------------  def select_last    select($game_party.menu_actor.index || 0)  end  #--------------------------------------------------------------------------  # * Set Pending Position (for Formation)  #--------------------------------------------------------------------------  def pending_index=(index)    last_pending_index = @pending_index    @pending_index = index    redraw_item(@pending_index)    redraw_item(last_pending_index)  endend
As for the game hud, is it possible to just use the RPG Maker VX Ace menu as a hud? Just without the command window.
 

Evgenij

Veteran
Veteran
Joined
Aug 28, 2013
Messages
349
Reaction score
100
First Language
German
Primarily Uses
N/A
Since your Window now Is only 1/4 of the normal size you need to adjust the item_height:

#--------------------------------------------------------------------------# * Get Item Height#--------------------------------------------------------------------------def item_height(height - standard_padding * 2) / 4endto:

Code:
#--------------------------------------------------------------------------# * Get Item Height#--------------------------------------------------------------------------def item_height(height - standard_padding * 2)end
 
Last edited by a moderator:

SoulPour777

Crownless King
Veteran
Joined
Aug 15, 2012
Messages
1,093
Reaction score
104
First Language
English
Primarily Uses
N/A
That is because your cursor in your Window_MenuStatus isn't right. Hook this up on your Window_MenuStatus:

Code:
  #--------------------------------------------------------------------------  # * Get Rectangle for Drawing Items  #--------------------------------------------------------------------------  def item_rect(index)    rect = Rect.new    rect.width = item_width    rect.height = item_height # + 40 or more here.    rect.x = index % col_max * (item_width + spacing)    rect.y = index / col_max * item_height    rect  end
 

ZeroVirusXIII

ZeroVirusXIII
Member
Joined
Jul 23, 2014
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Since your Window now Is only 1/4 of the normal size you need to adjust the item_height:

#--------------------------------------------------------------------------# * Get Item Height#--------------------------------------------------------------------------def item_height(height - standard_padding * 2) / 4endto:

#--------------------------------------------------------------------------# * Get Item Height#--------------------------------------------------------------------------def item_height(height - standard_padding * 2)end
Thanks, that did the trick.

Anyone know about changing the windows in the items list?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top