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,193
Reaction score
723
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,193
Reaction score
723
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 Profile Posts

Well. Looks like I need to redo the entire battle system in order to have the things I want in it. Also I'd like to say that console.log() is the greatest function in Javascript XD.
I have made 60 new skills! ''after test'' I have made 3 new skills!

Made a new battleback this week! How's it look?
"This is the real secret to life - To be completely engaged with what you are doing in the here and now. And instead of calling it work, realize it is play."

Forum statistics

Threads
113,815
Messages
1,077,677
Members
147,869
Latest member
asdfd
Top