RE: Special Items Separate Menu - Diorm - 02-10-2018
Ok First I changed windows_Object to Windows_Item everywere.
Then I deleted every script after yours.
Then I removed self.contents.font.name = $fontname because it was making an error.
Now the second menu work. Sort of. Only item 001 and 002 are showing. I dont know why but 033 and 034 are not showing.
Code: 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
Now in the meantime, I'll try to copy past every script that came after yours and try the menu avery time until I find the one that is overlaping.
RE: Special Items Separate Menu - Diorm - 02-10-2018
I went the easy way with cut and past the "Main" script starting from your Second Menu script.
This one is making a problem. My game is supposed to have Two kind of Item Menu because there is two kind of game. The RPG one and the Action One. This is the item menu for the Action Game:
Code: #==============================================================================
# * Window_Item
#------------------------------------------------------------------------------
# In the item picture and the battle picture, it is the window which indicates the summary
# of the possession item.
#==============================================================================
class Window_Item < Window_Selectable
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize
super(404, 128, 236, 352)
# When it is in the midst of fighting, it moves the window to the picture center, makes translucent
if $game_party.actors[0].bag_have == 8
self.height = 296
end
@column_max = 2 #This is a column that has a few
@cursorHeight=58
@itemWidth=86 # What is the size of the card?
@itemHeight=56 # How high is the card?
self.z = 200
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# - Acquisition of item
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
bag_have = $game_party.actors[0].bag_have
# Adding the item
# In [0,0,0,0] Is [type,id,?,?]
for i in 0... bag_have
if $game_party.actors[0].data_bag[i][0] == 1
id = $game_party.actors[0].data_bag[i][1]
if id != 0
@data.push($data_items[id])
end
elsif $game_party.actors[0].data_bag[i][0] == 2
id = $game_party.actors[0].data_bag[i][1]
if id != 0
@data.push($data_weapons[id])
end
elsif $game_party.actors[0].data_bag[i][0] == 3
id = $game_party.actors[0].data_bag[i][1]
if id != 0
@data.push($data_armors[id])
end
else
@data.push(nil)
end
end
# If the number of items is not 0, it draws up bit map, drawing all item
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, height - 32)
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# - Drawing of item
# index : Item number
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
number = $game_party.actors[0].check_data_bag(index)
self.contents.font.color = normal_color
x = 4 + index % 2 * (86 + 32)
y = index / 2 * 58
if item!=nil
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon("menu/"+item.icon_name)
self.contents.stretch_blt(Rect.new(x-4,y,84,54), bitmap, Rect.new(0, 0, 84,54), opacity)
case item
when RPG::Item
if item.id != $game_party.spray(true)
text = ""
else
text = "x" + number.to_s
end
when RPG::Weapon
for i in 0...$game_party.wea_data.size
if $game_party.wea_data[i].weapon_id == item.id
no_bu = ($game_party.wea_data[i].max_ammo == 0)
break
end
end
if no_bu
text = ""
elsif item.id == 7
self.contents.font.color = knockout_color
text = "x" + number.to_s
elsif item.id == 8
self.contents.font.color = crisis_color
text = "x" + number.to_s
elsif item.id == 9
self.contents.font.color = system_color
text = "x" + number.to_s
else
text = "x" + number.to_s
end
if $game_party.actors[0].wea_inf(index) == 1
text = "∞"
end
when RPG::Armor
text = "x" + number.to_s
end
self.contents.draw_text(x , y + 26, 96, 32, text, 0)
else
self.contents.draw_text(x + 28, y, 212, 32, "", 0)
end
end
#--------------------------------------------------------------------------
# - Help text renewal
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.name)
end
end
You see, I dont want to see this menu in my RPG Game. Only in the Action One. So I though that with a special secondary Menu, I could bypass the problem.
|