KnightDruid

Working on #RelmiaWarrior
Veteran
Joined
Nov 21, 2019
Messages
100
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,192
Reaction score
722
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
100
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,192
Reaction score
722
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
100
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

starting working on the sprites for one of my games major antagonists finally. here's the first frame of his chanting motion in battle.
Have spent too much time hammering out with a friend just how to make a reoccurring enemy that permanently learns skills you use against her.
I know what I want in a loose sense. Maybe I should just make a post asking for opinions and suggestions.
Shoot Enemy Off-Screen, Run RPG Maker Game as a Web Server, & Thai Keyboard | RPG Maker News #109

Some people have too strong of an opinion about what maker is the best, I've seen discussions like:
- I prefer VXAce because I like the style of the RTP better than the older releases
- You're worse than Hitler

Forum statistics

Threads
113,734
Messages
1,077,034
Members
147,761
Latest member
Krunkathos
Top