The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => Topic started by: Aznkid367 on July 17, 2012, 05:31:32 PM

Title: How do I lower down the combat txts during battle? [VXA]
Post by: Aznkid367 on July 17, 2012, 05:31:32 PM
I prefer to have the combat txts displayed in a box as opposed to being appeared where the enemies are.
Title: Re: How do I lower down the combat txts during battle? [VXA]
Post by: pacdiggity on July 17, 2012, 08:57:27 PM
So you want it displayed like it does in VX, with the combat logs using the same window as the battle HUD?
Title: Re: How do I lower down the combat txts during battle? [VXA]
Post by: Aznkid367 on July 17, 2012, 10:36:15 PM
Yes finally someone who understands me!!!! that's I want thank you!!!
Title: Re: How do I lower down the combat txts during battle? [VXA]
Post by: pacdiggity on July 18, 2012, 09:08:52 AM
This is what I ended up with. If you want any improvements, let me know and I'll see what I can do.
Code: [Select]
class Window_BattleLog < Window_Selectable
  pac_overwrite = ["display_current_state", "display_use_item",
  "display_counter", "display_reflection", "display_substitute",
  "display_action_results", "display_auto_affected_status"]
  pac_overwrite.each {|string|
    overwrite_code = %Q(alias pac_vxcomlog_#{string} #{string}
    def #{string}(*args)
      c = SceneManager.scene.status_window
      c.close if c.open?
      self.open if close?
      pac_vxcomlog_#{string}(*args)
      self.close
      c.open if c.close?
    end)
    eval(overwrite_code)
  }
  alias pac_vxcomlog_init initialize
  def initialize(*args)
    pac_vxcomlog_init(*args)
    self.height
    self.y = Graphics.height - self.height
    self.openness = 0
    self.opacity = 255
  end
  def back_opacity
    0
  end
end

class Scene_Battle < Scene_Base
  attr_accessor :status_window
end
Title: Re: How do I lower down the combat txts during battle? [VXA]
Post by: Aznkid367 on July 18, 2012, 06:37:47 PM
This works great but can you make it a bit smaller please? cause it kinda overlaps my enemies and if you can make it border less it would be great too. Thank you really appreciate man.
Title: Re: How do I lower down the combat txts during battle? [VXA]
Post by: pacdiggity on July 19, 2012, 07:29:24 AM
You mean make the window thinner and shorter? No problem.
Code: [Select]
class Window_BattleLog < Window_Selectable
  pac_overwrite = ["display_current_state", "display_use_item",
  "display_counter", "display_reflection", "display_substitute",
  "display_action_results", "display_auto_affected_status"]
  pac_overwrite.each {|string|
    overwrite_code = %Q(alias pac_vxcomlog_#{string} #{string}
    def #{string}(*args)
      c = SceneManager.scene.status_window
      c.close if c.open?
      self.open if close?
      pac_vxcomlog_#{string}(*args)
      self.close
      c.open if c.close?
    end)
    eval(overwrite_code)
  }
  alias pac_vxcomlog_init initialize
  def initialize(*args)
    pac_vxcomlog_init(*args)
    self.arrows_visible = false
    self.x = (Graphics.width - self.width) / 2
    self.height
    self.y = Graphics.height - self.height
    self.openness = 0
    self.opacity = 255
  end
  def window_width
    Graphics.width - 128
  end
  def max_line_number
    return 4
  end
  def back_opacity
    0
  end
end

class Scene_Battle < Scene_Base
  attr_accessor :status_window
end