Cancel Attack & Defense in Status Menu

Morpheus

Graphic Designer
Veteran
Joined
Mar 14, 2012
Messages
120
Reaction score
10
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
570
Reaction score
217
First Language
English
Primarily Uses
RMVXA
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
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Inside you are two wolves. They take in oxygen while getting rid of the Co2 gas in your body...
Ah wait, sorry. Lungs. Not wolves. that'd be silly. Wolves are huge. You probably couldnt even fit one wolf inside you.
Tag: hack and slash | gameplay: point and click. Me: "How tf two are related to each other?"
I picked up For The King in a Humble Bundle sale, and one mechanic that stuck out to me was a physical change to the world map when finishing a side quest. That got me thinking about special map-effect rewards for certain side quests in my game.
Stream will be live shortly with some Witcher 3! Feel free to drop by!
This forum is a great source of procrastination for me.

Forum statistics

Threads
94,401
Messages
920,674
Members
124,189
Latest member
Oirammm18
Top