Ronyun_Deren

Veteran
Veteran
Joined
Nov 21, 2019
Messages
127
Reaction score
38
First Language
English
Primarily Uses
N/A
Hello RM Members!

Could you help me please? i wanna make window select enemies smaller. Anyone can help me please? Thank you!

I use Visible Number Battle Status and Actor Command [3]

I use fullscreen game (640x480)

Untitled-1.png
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,381
Reaction score
1,211
First Language
English
Primarily Uses
RMVXA
This will shorten based on how many, but only the height not width.
Ruby:
class Window_BattleEnemy < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     info_viewport : Viewport for displaying information
  #--------------------------------------------------------------------------
  def initialize(info_viewport)
    super(0, info_viewport.rect.y, window_width, window_height)
    refresh
    self.visible = false
    @info_viewport = info_viewport
  end
  #--------------------------------------------------------------------------
  # * Get Window Height
  #--------------------------------------------------------------------------
  def window_height
    if item_max % 2 == 0
      i = item_max / 2
    elsif item_max == 1
      i = 1
    elsif item_max >= 8
      i = 4
    else
      i = (item_max / 2.0).ceil
    end
    i * 24 + 24
  end
end
 
Last edited:

Ronyun_Deren

Veteran
Veteran
Joined
Nov 21, 2019
Messages
127
Reaction score
38
First Language
English
Primarily Uses
N/A
1623813865068.png

Thank you so much! but, i only make 1 enemy for every battle. Can you make just for 1 enemy?:hhappy:
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,381
Reaction score
1,211
First Language
English
Primarily Uses
RMVXA
If you only ever have one enemy, then you have a choice. Show the enemy window or not.

Show window
Ruby:
class Window_BattleEnemy < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     info_viewport : Viewport for displaying information
  #--------------------------------------------------------------------------
  def initialize(info_viewport)
    super(0, info_viewport.rect.y, window_width, window_height)
    refresh
    self.visible = false
    @info_viewport = info_viewport
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    (Graphics.width - 128) / 2
  end
  #--------------------------------------------------------------------------
  # * Get Digit Count
  #--------------------------------------------------------------------------
  def col_max
    return 1
  end
  #--------------------------------------------------------------------------
  # * Get Window Height
  #--------------------------------------------------------------------------
  def window_height
    if item_max % 2 == 0
      i = item_max / 2
    elsif item_max == 1
      i = 1
    elsif item_max >= 8
      i = 4
    else
      i = (item_max / 2.0).ceil
    end
    i * 24 + 24
  end
end


Don't show window
Ruby:
class Scene_Battle < Scene_Base
  def select_enemy_selection
    on_enemy_ok
#~     @enemy_window.refresh
#~     @enemy_window.show.activate
  end
  def on_enemy_ok
    BattleManager.actor.input.target_index = 0#@enemy_window.enemy.index
    @enemy_window.hide
    @skill_window.hide
    @item_window.hide
    next_command
  end
end
 

Ronyun_Deren

Veteran
Veteran
Joined
Nov 21, 2019
Messages
127
Reaction score
38
First Language
English
Primarily Uses
N/A
If you only ever have one enemy, then you have a choice. Show the enemy window or not. Show window
Ruby:
class Window_BattleEnemy < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization # info_viewport : Viewport for displaying information #-------------------------------------------------------------------------- def initialize(info_viewport) super(0, info_viewport.rect.y, window_width, window_height) refresh self.visible = false @info_viewport = info_viewport end #-------------------------------------------------------------------------- # * Get Window Width #-------------------------------------------------------------------------- def window_width (Graphics.width - 128) / 2 end #-------------------------------------------------------------------------- # * Get Digit Count #-------------------------------------------------------------------------- def col_max return 1 end #-------------------------------------------------------------------------- # * Get Window Height #-------------------------------------------------------------------------- def window_height if item_max % 2 == 0 i = item_max / 2 elsif item_max == 1 i = 1 elsif item_max >= 8 i = 4 else i = (item_max / 2.0).ceil end i * 24 + 24 end end
Don't show window
Ruby:
class Scene_Battle < Scene_Base def select_enemy_selection on_enemy_ok #~ @enemy_window.refresh #~ @enemy_window.show.activate end def on_enemy_ok BattleManager.actor.input.target_index = 0#@enemy_window.enemy.index @enemy_window.hide @skill_window.hide @item_window.hide next_command end end

My god, thank you so much! my hero.
 

Latest Threads

Latest Posts

Latest Profile Posts

I actually did work on my game today. This is momentous enough to warrant a status post.
Working on a character poses plugin!
Aerosys wrote on OcRam's profile.
Just saw your video about Map Generation. What a pity it's gone! It looked really well-made and like an excellent competitor to mine.
The Florida city I was born and raised in, Fort Myers, has been in the national news lately. We took a major hit from the hurricane. I'm fine, but others weren't so lucky.

Forum statistics

Threads
125,659
Messages
1,172,605
Members
164,787
Latest member
mio_fa
Top