Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
237
Reaction score
86
First Language
english
Primarily Uses
N/A
So looking at the status window, I want to disable "Attack" & "Defense" from being selectable.
This snippet from "Window_Status" controls that, I assume. Changing the "6.times" to "4.times" disables the bottom two, Agility & Luck is there a way to disable the top two, Attack & Defense using a command like this? Thank you.

#--------------------------------------------------------------------------
# * Draw Parameters
#--------------------------------------------------------------------------
def draw_parameters(x, y)
6.times {|i| draw_actor_param(@actor, x, y + line_height * i, i + 2) }
end
 

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
592
Reaction score
226
First Language
English
Primarily Uses
RMMZ
You're halfway there.

It's written that way for efficiency's sake. That +2 means that it starts at parameter ID 2 (Attack) and continues to write out the parameters until ID 7 which is Luck. When you changed the 6.times to 4.times, you stopped the count early and the last two values: AGI and LUK weren't drawn. Since ID 2 and 3 are Attack and Defense respectively, you should have also increased the count to +4, skipping over those two parameters.

Like this:
Code:
#==============================================================================
# ** Window_Status
#------------------------------------------------------------------------------
#  This window displays full status specs on the status screen.
#==============================================================================

class Window_Status < Window_Selectable
  #--------------------------------------------------------------------------
  # * Draw Parameters
  #--------------------------------------------------------------------------
  def draw_parameters(x, y)
    4.times {|i| draw_actor_param(@actor, x, y + line_height * i, i + 4) }
  end
end

This one's easier to understand, just remove the lines you don't need.
Code:
#==============================================================================
# ** Window_Status
#------------------------------------------------------------------------------
#  This window displays full status specs on the status screen.
#==============================================================================

class Window_Status < Window_Selectable
  #--------------------------------------------------------------------------
  # * Draw Parameters
  #--------------------------------------------------------------------------
  def draw_parameters(x, y)
    draw_actor_param(@actor, x, y + line_height * 0, 0) # MHP
    draw_actor_param(@actor, x, y + line_height * 1, 1) # MMP
    draw_actor_param(@actor, x, y + line_height * 2, 2) # ATK
    draw_actor_param(@actor, x, y + line_height * 3, 3) # DEF
    draw_actor_param(@actor, x, y + line_height * 4, 4) # MAT
    draw_actor_param(@actor, x, y + line_height * 5, 5) # MDF
    draw_actor_param(@actor, x, y + line_height * 6, 6) # AGI
    draw_actor_param(@actor, x, y + line_height * 7, 7) # LUK
  end
end

Add either of these to your script list, below materials and above main.
The game's code should never be altered directly.
 

Demrottens

don't call me that
Veteran
Joined
Jul 5, 2017
Messages
31
Reaction score
5
First Language
Romanian
Primarily Uses
RMVXA
jesus wtf I thought you where me when I saw your pic
There can only be one negga on this side of the hood
 

Latest Threads

Latest Posts

Latest Profile Posts

DamageEvil_7.png added!
index.php

Trying to pixel a stone and feeling like I forgot how to do pixel art in itself.
Meu objetivo é criar novas amizades com desenvolvedores de games específicos do RPG Maker MV.
New sprites & animations for Mint and Beri are coming along!
Guh-Colorbound.gif

Forum statistics

Threads
125,811
Messages
1,173,788
Members
164,983
Latest member
DizzyIzzy
Top