Posts: 22
Threads: 1
Joined: Apr 2017
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".
Posts: 11,229
Threads: 648
Joined: May 2009
08-11-2017, 08:01 PM
(This post was last modified: 08-11-2017, 08:06 PM by DerVVulfman.)
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.
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...)
Above are clickable links
Posts: 22
Threads: 1
Joined: Apr 2017
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?
Posts: 11,229
Threads: 648
Joined: May 2009
Bingo!
Items within the arrays will be hidden in the normal Item menu, and be the only ones visible in your special Item menu.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 22
Threads: 1
Joined: Apr 2017
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:
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...
Posts: 11,229
Threads: 648
Joined: May 2009
01-30-2018, 04:31 AM
(This post was last modified: 01-30-2018, 04:39 AM by DerVVulfman.)
*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.
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...)
Above are clickable links
Posts: 22
Threads: 1
Joined: Apr 2017
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?
Posts: 11,229
Threads: 648
Joined: May 2009
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...)
Above are clickable links
Posts: 22
Threads: 1
Joined: Apr 2017
02-03-2018, 12:59 AM
(This post was last modified: 02-03-2018, 01:00 AM by Diorm.)
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....
Posts: 11,229
Threads: 648
Joined: May 2009
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...)
Above are clickable links
|