KnightDruid

Working on #RelmiaWarrior
Veteran
Joined
Nov 21, 2019
Messages
99
Reaction score
17
First Language
Indonesia
Primarily Uses
RMMZ
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
3,191
Reaction score
721
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:

KnightDruid

Working on #RelmiaWarrior
Veteran
Joined
Nov 21, 2019
Messages
99
Reaction score
17
First Language
Indonesia
Primarily Uses
RMMZ
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
3,191
Reaction score
721
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
 

KnightDruid

Working on #RelmiaWarrior
Veteran
Joined
Nov 21, 2019
Messages
99
Reaction score
17
First Language
Indonesia
Primarily Uses
RMMZ
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

my birthday was yesterday...
i feel closer 2 being able 2 get a discount on the kids menu than i do being able to buy booze1627428008986.png
Getting to play your RM game on Steam Deck? How cool is that?
The best among us don't set out to be heroes. They don't want that job. They just set out to do the things nobody else wants to do. Because... someone has to do it.
Azihayya wrote on ATT_Turan's profile.
Magus avatar homey!
Getting back into the thick of work on Untold Story and it feels great to be back. I'm gonna take what I learned from the Game Jam and try and get some serious work done for the rest of 2021.

Forum statistics

Threads
113,702
Messages
1,076,760
Members
147,722
Latest member
Clairenova
Top