01-30-2018, 01:14 AM
Hi! I feel bad answering to you this late after the last time but it's still doesnt work. So I decide to take some screenshot and show you what I'm trying to do since the items still wont show in the new menu.
Those are my items. I only want 001, 002, 033 and 034 to appear in the new menu.
This is my event that call the menu when I press Esc. as you can see, I put your code as $scene = Scene_Item.new(true)
In game. Sad news. The 4 items wont show :(
So here is my code. Maybe I did something bad somewere:
I hope you can help me with this... it's kinda turning me off from continuing my game...
Those are my items. I only want 001, 002, 033 and 034 to appear in the new menu.
This is my event that call the menu when I press Esc. as you can see, I put your code as $scene = Scene_Item.new(true)
In game. Sad news. The 4 items wont show :(
So here is my code. Maybe I did something bad somewere:
Code:
#==============================================================================
# ** Simple Second Item Menu
#------------------------------------------------------------------------------
# This lets you add a feature to show a different selection of items.
#
#------------------------------------------------------------------------------
#
# The normal Item Menu is typically called like this:
# $scene = Scene_Item.new
#
# To call the 'special' Item Menu, call it with this:
# $scene = Scene_Item.new(true)
#
#------------------------------------------------------------------------------
#
# Adding it into the default main menu would wish a bit of an edit/addition
# into the @command_window (line 26 of Scene_Menu), and working a bit of an
# edit into 'update_command' where the item command is in question (either
# adding or editing).
#
#
#==============================================================================
module Special_Items
ITEMS = [001,002,033,034] # List of Item IDs from the database
WEAPONS = [] # List of Weapon IDs from the database
ARMORS = [] # List of Armor IDs from the database
end
#==============================================================================
# ** Window_Item
#------------------------------------------------------------------------------
# This window displays items in possession on the item and battle screens.
#==============================================================================
class Window_Item < Window_Selectable
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Add Special Item flag from Scene
special = $scene.special
# Clear the screen
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add item
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
if Special_Items::ITEMS.include?(i) == special
@data.push($data_items[i])
end
end
end
# Also add weapons and items if outside of battle
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
if Special_Items::WEAPONS.include?(i) == special
@data.push($data_weapons[i])
end
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
if Special_Items::ARMORS.include?(i) == special
@data.push($data_armors[i])
end
end
end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
end
#==============================================================================
# ** Scene_Item
#------------------------------------------------------------------------------
# This class performs item screen processing.
#==============================================================================
class Scene_Item
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :special # Special Item Menu flag
#--------------------------------------------------------------------------
# * Object Initialization
# special : command special item feature
#--------------------------------------------------------------------------
def initialize(special=false)
@special = special
end
end
I hope you can help me with this... it's kinda turning me off from continuing my game...