Making an empty equipment slot read "None"

Status
Not open for further replies.

dubiousdeeds

Villager
Member
Joined
Aug 7, 2015
Messages
19
Reaction score
1
First Language
English
Primarily Uses
RMVXA
When equipping characters there is always the empty option at the very bottom of your equipments that allows you to equip "nothing" to that slot. Instead of this selection being just an invisible blank box does anyone know of a way to make it read "None"? I would love this since I use the script that changes the character appearance based on their equipment, and having nothing equipped is an option and necessary at times in my game. I feel it would be more intuitive for the player to find "None" in their inventory vs just moving the cursor to a space that doesn't visually exist.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,714
First Language
English
Primarily Uses
RMMV
Try this in a new slot:

Code:
class Window_EquipItem < Window_ItemList
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    rect = item_rect(index)
    rect.width -= 4
    if item
      draw_item_name(item, rect.x, rect.y, enable?(item))
      draw_item_number(rect, item)
    else
      change_color(normal_color, enabled)
      draw_text(rect.x + 24, rect.y, 172, line_height, 'None')
    end
  end
end
I haven't tested this.
 

dubiousdeeds

Villager
Member
Joined
Aug 7, 2015
Messages
19
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Try this in a new slot:

Code:
class Window_EquipItem < Window_ItemList
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    rect = item_rect(index)
    rect.width -= 4
    if item
      draw_item_name(item, rect.x, rect.y, enable?(item))
      draw_item_number(rect, item)
    else
      change_color(normal_color, enabled)
      draw_text(rect.x + 24, rect.y, 172, line_height, 'None')
    end
  end
end
I haven't tested this.
That didn't quite work out, I received the following error

Script None line 13: NameError occurred.
undefined local variable or method 'enabled' for
#<Window_EquipItem:0x21362e34>

I changed line 13 to
change_color(normal_color)
and then it worked perfectly!

Thanks for the script, this can be closed now.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
@dubiousdeeds When you want a thread closed, please Report your opening post and ask for it to be closed. Mods may not see an individual post but will see a Report.
Thanks.
[closed]IgnoreMe[/closed]
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top