Special Items Separate Menu
#21
But i know how to do all that since I read the script (I even said that the call in event worked so It ment that I knew how to use $scene = Scene_Item.new(true)). The only part that I dont know is how to make special items show in this menu... Do I need to do something special? Because no items show in this menu since I tried. Even normal items.
Maybe its the way I asked since english is not my primary language (obviously).
Maybe you though I said I dont know how to make the "item menu" appear. But I was only saying "I don't know how to make the "special items" appear IN the "special item menu".
Tongue sticking out
Reply }
#22
Ahhhh!!!! You mean, you don't know how to define what items are special, so they are hidden from the normal Item menu and are the only ones to show in the second Item menu!!!!

You might not have noticed that POTION is a special item by default too. Winking

There is a section in the script where you define them by their ID. Right now, the script has the following configuration:
Code:
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

Hm... Canada. Might make more sense like so???
Code:
module Special_Items
  
  ITEMS   = [1]   # Liste des IDs (identifiants) d'article de la base de données
  WEAPONS = []    # Liste des IDs (identifiants) d'armes à partir de la base de données
  ARMORS  = []    # Liste des IDs (identifiants) d'armure de la base de données
  
end

This shows only one item (ID#1: Potion) is a special item. If I had it read ITEMS=[1,2,3,4,5], then the High and Full potions and a couple perfumes would be classified as special too. This is of course based on the IDs in your Item database.

The WEAPON and ARMORS array function the same, taking the IDs of the weapons and armors. If I had defined WEAPONS=[1,2,3,4], that would cover the whole gamut of swords (bronze through to mythril) in the default weapon database.
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 }
#23
Oooh so thats how it works! So if I want items to appear in the menu, it should read something like [1,23,56,76] (if I ever get to 76 items) so items number 1, 23, 56 and 76 will show. Is that it? 
Reply }
#24
Bingo!

Happy Items within the arrays will be hidden in the normal Item menu, and be the only ones visible in your special Item menu. Winking
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 }
#25
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.

[Image: 2rxjvjk.png]
Those are my items. I only want 001, 002, 033 and 034 to appear in the new menu.

[Image: ao2knb.jpg]
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)

[Image: 2d7y52u.png]
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...
Reply }
#26
*Sigh*   Using your code, I do see the text in the second menu.  That leads me to this inquiry.


This is going to sound a bit nutty for some unfamiliar... but are you using a 'variation' of RPGMaker XP that requires the use of global variables called $fontname and $fontface?  Very old translations that were not sanctioned by Enterbrain used these variables, and had their default 'Window' classes include statements such as self.contents.font.name = $fontname in the beginning of the 'refresh' method after the contents were cleared and rebuilt.  

The original Japanese versions of RPGMaker XP had Japanese fonts predefined and defaulted in their .dll files.  So Western Fonts would not show up when used.  This is how I recognize the problem.

That being said, it may be that adding self.contents.font.name = $fontname directly before the @data = [] statement on line 53 would solve your issue.  But if this is the case, and I'm afraid that it very likely is, I recommend acquiring a new copy of RPGMaker XP from Enterbrain.

[Image: attachment.php?aid=1008]



.png   WARNING.png (Size: 3.07 KB / Downloads: 43)
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 }
#27
Oh... I've been using this french version of RMXP for way over 10 years now... I didnt know that I had to pay to use a legal version that is in english since there was no other ways to get it back then. So I need to pay that much to continue my game now? Well thats... odd.
But since my game was built in this version... does that mean that all my script wont work anymore in another version?
Reply }
#28
Actually, no. You should have absolutely no issues with converting EVERYTHING over.

The principle section that was illegally translated was the Editor itself. If you bring up the 'Show Text' event command where the NPCs can speak, you will find the ONLY smart thing they did... they enabled four lines of text to be entered in the editor instead of three. Why enterbrain never fixed this with updates from 1.02 to 1.05, I'll never know.

The so-dubbed 'Postality Knights' edition of RMXP floated around since 2003, and some evil people even sold copies of it on eBay. But it has been available legally since 2004 from enterbrain, initially using a company called Protexis (where I first got it), and then to Degica.

You can likely find it on sale big-time on Steam. But I prefer having a paper trail, so I stick with Degica. They kept all records of Protexis purchases, so they gave me a free download of RMXP as they see I legally purchased it already. Security there, bro! I've been using RMXP for well over a decade. And even a HDD crash isn't stopping me.
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 }
#29
Heeeyyy.... looks like it wasnt even that because I changed this part of the code like you said:

Code:
#--------------------------------------------------------------------------
  # * 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
    self.contents.font.name = $fontname
    @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
And I'm still not seeing my items. So yeah... Something else is stopping them from showing there faces?
I know, I know... I'm tiresome....
Reply }
#30
Nothing should be causing your 'no text' issue whatsoever. Have you tested this script within a blank/new demo for a test? Is there a demo to send that I can see the issue?
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 }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Plugin or Script help with Item menu, SKill menu, and Equip menu JayRay 3 121 11-22-2024, 07:02 PM
Last Post: JayRay
   Need help with my menu - Current issue is item grid layout LilyFrog 41 39,477 09-24-2018, 02:03 AM
Last Post: LilyFrog
   Sorting Items in Shop Window Mel 13 17,738 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,872 05-31-2017, 05:10 AM
Last Post: Zachariad
   XAIL MENU from RPG VX ACE to RPG XP RASHIDA12 46 52,341 05-02-2016, 08:08 PM
Last Post: RASHIDA12
Tongue  Healing Spell doesn't work right in Menu? Bounty Hunter Lani 8 12,510 01-15-2015, 07:45 PM
Last Post: Bounty Hunter Lani
   My Options Menu needs help firestalker 0 3,292 08-11-2014, 02:31 PM
Last Post: firestalker
   Vx Ace Custom Menu help? Skitzen 1 5,417 10-07-2013, 03:10 PM
Last Post: JayRay
   Dargor's Large Party script and shop menu Simon Greedwell 2 6,593 08-28-2013, 10:12 PM
Last Post: Simon Greedwell
   Help with Shop Menu [RPG Maker XP] JackMonty 6 12,992 05-23-2013, 10:14 AM
Last Post: JackMonty



Users browsing this thread: 1 Guest(s)