Jump to content
hgmatt

Actor Command Window Cut Off

Recommended Posts

So, I am modifying the windows for my scene battle and got it down for the most part, but I cannot seem to get my actor command window to go any further than the battle status window.

This is what I get:

ActorCommandWindow_zps5oc2rdya.png

Here is my script:

Spoiler

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base

  #--------------------------------------------------------------------------
  # * Update Information Display Viewport
  #--------------------------------------------------------------------------
  def update_info_viewport
    move_info_viewport(0)   if @party_command_window.active
    move_info_viewport(0) if @actor_command_window.active
    move_info_viewport(0)  if BattleManager.in_turn?
  end
  #--------------------------------------------------------------------------
  # * Move Information Display Viewport
  #--------------------------------------------------------------------------
  def move_info_viewport(ox)
    current_ox = @info_viewport.ox
    @info_viewport.ox = [ox, current_ox + 16].min if current_ox < ox
    @info_viewport.ox = [ox, current_ox - 16].max if current_ox > ox
  end
  #--------------------------------------------------------------------------
  # * Create Status Window
  #--------------------------------------------------------------------------
  def create_status_window
    @status_window = Window_BattleStatus.new
    @status_window.x = 128
    @status_window.y = 0
  end
  #--------------------------------------------------------------------------
  # * Create Information Display Viewport
  #--------------------------------------------------------------------------
  def create_info_viewport
    @info_viewport = Viewport.new
    @info_viewport.rect.y = 348
    @info_viewport.rect.height = @status_window.height
    @info_viewport.z = 100
    @info_viewport.ox = 64
    @status_window.viewport = @info_viewport
  end
  #--------------------------------------------------------------------------
  # * Create Party Commands Window
  #--------------------------------------------------------------------------
 def create_party_command_window
    @party_command_window = Window_PartyCommand.new
    @party_command_window.viewport = @info_viewport
    @party_command_window.set_handler(:fight,  method(:command_fight))
    @party_command_window.set_handler(:escape, method(:command_escape))
    @party_command_window.unselect
    @party_command_window.x = 0
    @party_command_window.y = 30
  end
  #--------------------------------------------------------------------------
  # * Create Actor Commands Window
  #--------------------------------------------------------------------------
   def create_actor_command_window
    @actor_command_window = Window_ActorCommand.new
    @actor_command_window.viewport = @info_viewport
    @actor_command_window.set_handler(:attack, method(:command_attack))
    @actor_command_window.set_handler(:skill,  method(:command_skill))
    @actor_command_window.set_handler(:guard,  method(:command_guard))
    @actor_command_window.set_handler(:item,   method(:command_item))
    @actor_command_window.set_handler(:cancel, method(:prior_command))
    @actor_command_window.x = 0
    @actor_command_window.y = -16
  end
end

Don't worry, I copied the Battle Scene and put it in my Materials section and am making it my own.

 

If someone could help with this, that would be great because I know it's a simple code I'm over looking, but I've spent the last 3 hours just today trying to figure it out.

Share this post


Link to post
Share on other sites

First thing that pops out is that you have the actor command window y set to -16.

This is not height, it's position. So this script is not the only thing that is causing your problem. Somewhere else you have the window adjusted.

Share this post


Link to post
Share on other sites

That's because 0 automatically sets it to be even with the Status Window.

Like this:

ActorCommandWindow0_zpsml3eipub.png

And the only other script messing with the sizes of this are this:

Spoiler

class Window_ActorCommand < Window_Command
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0)
    self.openness = 0
    deactivate
    @actor = nil
  end
  
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    return 128
  end
  #--------------------------------------------------------------------------
  # * Get Number of Lines to Show
  #--------------------------------------------------------------------------
  def visible_line_number
    return 4
  end
  #--------------------------------------------------------------------------
  # * Create Command List
  #--------------------------------------------------------------------------
  def make_command_list
    return unless @actor
    add_attack_command
    add_skill_commands
    #add_guard_command
    add_item_command
  end

end

Which is the default setting except for the visible line number which I want to be 4.

 

Thanks for the reply too!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×