Special Items Separate Menu
#11
So BASICALLY, there is no difference between the Normal Item menu and the Special Item menu other than one generates a list of items 'except' special items and the other 'only' special items. The two work the same otherwise.

And you may not know this, but you can already call the default Item menu with a script call:
Code:
$scene = Scene_Item.new

Script calls can be made by selecting the very very very very very VERY last option in the list of map events. Winking



So I guess... um...

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   = [1]   # 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

That alters the Item system itself so ONE Item menu can do the work of both! Just adding a second Item menu option as described is all you need.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Messages In This Thread
Special Items Separate Menu - by Diorm - 07-11-2017, 02:16 PM
RE: Special Items Separate Menu - by DerVVulfman - 07-11-2017, 10:06 PM
RE: Special Items Separate Menu - by kyonides - 07-12-2017, 04:01 AM
RE: Special Items Separate Menu - by Diorm - 07-17-2017, 01:11 AM
RE: Special Items Separate Menu - by DerVVulfman - 07-17-2017, 03:14 AM
RE: Special Items Separate Menu - by Diorm - 07-17-2017, 08:23 PM
RE: Special Items Separate Menu - by kyonides - 07-17-2017, 09:21 PM
RE: Special Items Separate Menu - by Diorm - 07-18-2017, 03:09 AM
RE: Special Items Separate Menu - by DerVVulfman - 07-18-2017, 03:11 AM
RE: Special Items Separate Menu - by Diorm - 07-18-2017, 02:38 PM
RE: Special Items Separate Menu - by DerVVulfman - 07-19-2017, 03:38 AM
RE: Special Items Separate Menu - by kyonides - 07-21-2017, 04:27 AM
RE: Special Items Separate Menu - by Diorm - 07-21-2017, 10:35 PM
RE: Special Items Separate Menu - by DerVVulfman - 07-21-2017, 10:59 PM
RE: Special Items Separate Menu - by Diorm - 08-06-2017, 03:30 PM
RE: Special Items Separate Menu - by DerVVulfman - 08-07-2017, 03:40 AM
RE: Special Items Separate Menu - by kyonides - 08-08-2017, 07:11 AM
RE: Special Items Separate Menu - by DerVVulfman - 08-09-2017, 03:35 AM
RE: Special Items Separate Menu - by Diorm - 08-10-2017, 07:26 PM
RE: Special Items Separate Menu - by DerVVulfman - 08-11-2017, 05:01 AM
RE: Special Items Separate Menu - by Diorm - 08-11-2017, 01:54 PM
RE: Special Items Separate Menu - by DerVVulfman - 08-11-2017, 08:01 PM
RE: Special Items Separate Menu - by Diorm - 08-15-2017, 01:58 PM
RE: Special Items Separate Menu - by DerVVulfman - 08-16-2017, 03:34 AM
RE: Special Items Separate Menu - by Diorm - 01-30-2018, 01:14 AM
RE: Special Items Separate Menu - by DerVVulfman - 01-30-2018, 04:31 AM
RE: Special Items Separate Menu - by Diorm - 01-30-2018, 04:16 PM
RE: Special Items Separate Menu - by DerVVulfman - 01-31-2018, 04:37 AM
RE: Special Items Separate Menu - by Diorm - 02-03-2018, 12:59 AM
RE: Special Items Separate Menu - by DerVVulfman - 02-03-2018, 04:19 AM
RE: Special Items Separate Menu - by kyonides - 02-03-2018, 09:20 PM
RE: Special Items Separate Menu - by Diorm - 02-04-2018, 09:40 PM
RE: Special Items Separate Menu - by Diorm - 02-04-2018, 09:52 PM
RE: Special Items Separate Menu - by Diorm - 02-06-2018, 03:10 PM
RE: Special Items Separate Menu - by kyonides - 02-06-2018, 07:35 PM
RE: Special Items Separate Menu - by DerVVulfman - 02-07-2018, 04:15 AM
RE: Special Items Separate Menu - by Diorm - 02-07-2018, 04:24 AM
RE: Special Items Separate Menu - by DerVVulfman - 02-07-2018, 04:49 AM
RE: Special Items Separate Menu - by Diorm - 02-07-2018, 03:08 PM
RE: Special Items Separate Menu - by DerVVulfman - 02-09-2018, 03:41 AM
RE: Special Items Separate Menu - by Diorm - 02-10-2018, 04:17 PM
RE: Special Items Separate Menu - by Diorm - 02-10-2018, 06:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Plugin or Script help with Item menu, SKill menu, and Equip menu JayRay 2 59 Yesterday, 03:09 AM
Last Post: JayRay
   Need help with my menu - Current issue is item grid layout LilyFrog 41 39,231 09-24-2018, 02:03 AM
Last Post: LilyFrog
   Sorting Items in Shop Window Mel 13 17,643 01-18-2018, 05:49 AM
Last Post: DerVVulfman
Question  Mog Menu script: help me stop the crazy picture movement during transitions Zachariad 4 9,843 05-31-2017, 05:10 AM
Last Post: Zachariad
   XAIL MENU from RPG VX ACE to RPG XP RASHIDA12 46 52,071 05-02-2016, 08:08 PM
Last Post: RASHIDA12
Tongue  Healing Spell doesn't work right in Menu? Bounty Hunter Lani 8 12,477 01-15-2015, 07:45 PM
Last Post: Bounty Hunter Lani
   My Options Menu needs help firestalker 0 3,287 08-11-2014, 02:31 PM
Last Post: firestalker
   Vx Ace Custom Menu help? Skitzen 1 5,402 10-07-2013, 03:10 PM
Last Post: JayRay
   Dargor's Large Party script and shop menu Simon Greedwell 2 6,581 08-28-2013, 10:12 PM
Last Post: Simon Greedwell
   Help with Shop Menu [RPG Maker XP] JackMonty 6 12,968 05-23-2013, 10:14 AM
Last Post: JackMonty



Users browsing this thread: 2 Guest(s)