Window scripts

● ARCHIVED · READ-ONLY
Started by ZeroVirusXIII 6 posts View original ↗
  1. 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.
  2. 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.
  3. 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.

    Spoiler
    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.
  4. 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
  5. 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
  6. Evgenij said:
    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?