Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Modified Item menu only

Hey peoples, how are your collective day(s) going?

What I'm looking for is a script for VX that will do the following:
List items as pictures that measure 160x30, in rows of three as in the following mock up:
http://sixty.rhinocap.net/itemmockup.png[/img]
Although I think I made a mistake in the mock up.  The width between the items (which would replace the black bars in this mock up) should be 10 inches thick (both from the ones below/above them, and to either side).

There are exactly 25 items, so no need for more (unless you really wanted to or it was that much easier)

The 2nd part of this request is I want to remove all other menus.  That is to say, I do not want it so that if you hit esc or x or any other button you will go to the main menu.  Hitting esc/x (the menu button) should go directly to this, and hitting it again should go directly back to the game.  This is more imperative then the earlier mentioned item set up actually :x
(because I've seen scripts that tried something like this - but all had that problem).

However the save menu should still be able to work, but only from being called via events.

Lastly if possible the blue part should be clear, I don't think that would be difficult but if it is then leaving it as the window skin is perfectly fine.

God I hate making two script requests so close to each other, usually I'd actually wait a week or two - but then again maybe that's why I don't get things done lol.
 
Why didn't I see this request before? :eek: Working on this now.
Some Quick questions
-when there's no item, do you want the spot to be blank or have an "empty" filler?
-can you have multiple of one item and if so, do they group or do they display separately?
-are items selectable or is it just an open and you see the images?
-do you want the clear part to be slightly blurred? (like VX does by default?)

[edit] Meh, I just went with it XD Let me know if you want anything changed
Code:
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs the map screen processing.
#==============================================================================

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # * Switch to Menu Screen
  #--------------------------------------------------------------------------
  def call_menu
    if $game_temp.menu_beep
      Sound.play_decision
      $game_temp.menu_beep = false
    end
    $game_temp.next_scene = nil
    $scene = Scene_ImgItem.new
  end
end

#==============================================================================
# ** Window_ImgItem
#------------------------------------------------------------------------------
#  This window displays a list of inventory items for the item screen, etc.
#==============================================================================

class Window_ImgItem < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(-16, -16, 544+32, 416+32)
    self.opacity = 0
    refresh
  end
  #--------------------------------------------------------------------------
  # * Get Item
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    @data = []
    for item in $game_party.items
      @data.push(item)
      if item.is_a?(RPG::Item) and item.id == $game_party.last_item_id
        self.index = @data.size - 1
      end
    end
    @item_max = @data.size
    create_contents
    for i in 0...@item_max
      draw_item(i)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
    rect = Rect.new((index % 3) * 170 + 22, (index / 3) * 40 + 33, 160, 30)
    if index == 24
      rect.x = 192
    end
    self.contents.clear_rect(rect)
    item = @data[index]
    if item != nil
      bitmap = Cache.system("Items/" + item.id.to_s)
      src_rect = Rect.new(0, 0, rect.width, rect.height)
      self.contents.blt(rect.x, rect.y, bitmap, src_rect)
    end
  end
end

#==============================================================================
# ** Scene_ImgItem
#------------------------------------------------------------------------------
#  This class performs the item screen processing.
#==============================================================================

class Scene_ImgItem < Scene_Base
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    @item_window = Window_ImgItem.new
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @item_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Return to Original Screen
  #--------------------------------------------------------------------------
  def return_scene
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # * Update Frame
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @item_window.update
    if Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    end
  end
end
Item images goes in System/Items with the id being the file name (so the first item would be "1")
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top