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
228
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

One of these days, I will have no more errors.
The tutorial streak is going on, learn something about cave edits today!
(And possibly in a few days even more, stay tuned ;) )
Something is working in my game, and I have no idea how or why. It wasn't working yesterday. But it is now.
So we're just gonna...move on, and never, EVER, touch that passive again, lest it break.
did anyone see my topic today?
Getting sidetracked on the idea of a matching game. Some experimental designs:

matching game experiments.png

Forum statistics

Threads
129,911
Messages
1,206,186
Members
171,102
Latest member
Zeomak
Top