Remove Item Category Window

Ksi

~RTP Princess~
Restaff
Joined
Mar 13, 2012
Messages
2,083
Reaction score
1,674
First Language
English
I'm currently using Crazyninjaguy's SEE - Item Menu Ace script (this is my edited version) to make a customised item menu system for my game. So far I have this:





What I'm having trouble with is removing the category window and having it jump straight to just the item list instead.


I'm also using DoctorTodd's One Person Menu for the main menu, if that factors into anything. This is my version of it.


Any help would be very much appreciated.
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Here is a little script for you:

class Scene_Item < Scene_ItemBase

def create_category_window
# Removed!
end

def create_item_window
x = 0
y = @help_window.height
w = Graphics.width
h = Graphics.height - y
@item_window = Window_ItemList.new(x,y,w,h)
@item_window.set_handler:)ok, method:)on_item_ok))
@item_window.set_handler:)cancel, method:)on_item_cancel))
@item_window.help_window = @help_window # Marked line 1! o.o
@item_window.category = :item # Marked line 2! - Can be :key_item if needed.
@item_window.viewport = @viewport
@item_window.activate
@item_window.select_last
@description.refresh(@item_window.item) if @description
end

def on_item_cancel
return_scene
end

end

This is made for the default engine.


Place it below the item menu script you are using!


I see that you removed the default help window, so you can remove the first "Marked line" from the snippet if you want.


You can also re-position the item window wherever you want and change it's size. Note that you do not have any @category_window variable in the scene anymore, so do NOT use that as a reference in any position/size settings!


And lastly, this will only display regular items, nothing else! No key items, armors or weapons! Seeing that you have only one category in your category window, I guess, this shouldn't be a problem. In case you prefer to show key items only instead of regular items, just change the :item to :key_item at the second marked line.
 
Last edited by a moderator:

Ksi

~RTP Princess~
Restaff
Joined
Mar 13, 2012
Messages
2,083
Reaction score
1,674
First Language
English
Thank you so much! I've been trying to figure this out for myself all night (I'm determined to get the damn thing working). The help window is basically the large bottom window, so hopefully that won't be an issue, but I'll check it out and see how it goes. Thanks! :D


Edit: okay, for some reason it does not like anything to do with y. If I #out the line with y, or indication of y it chucks a fizzy, but if I don't it also throws a tantrum. >.<;
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
The lines with x=, y=, w= and h= just set the item list window's position and size. You can put direct numbers there if that's easier.


They are counted in pixels, so just experiment with it.


Also, that bottom help window is not the default help window. It is the new "description window" that item menu script you use added. So, looking at the picture you uploaded, you don't use the default help window. The script you use also disabled the update of the default help window, that's why I noted this.
 
Last edited by a moderator:

Ksi

~RTP Princess~
Restaff
Joined
Mar 13, 2012
Messages
2,083
Reaction score
1,674
First Language
English
Ah, thank you. I thought they just edited the help window.


Ah, strike that. I got it working! Thank you very much! I'll just make sure nothing else causes an issue when editing it, but it seems like it'll work now.


Edit:


Okay, I did find an issue - the description text from the Item Menu Ace script isn't showing up at all. Any ideas?


Seems to be a refresh issue, maybe? It shows up when I cycle through more than one item.
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
x = 0
y = @help_window.height
w = Graphics.width
h = Graphics.height - y


There you can set numbers instead of formulas, like:


x = 104
y = 10
w = 430
h = 152


Doing this should get rid of that error. You can, of course, change these numbers if you need.
 

Ksi

~RTP Princess~
Restaff
Joined
Mar 13, 2012
Messages
2,083
Reaction score
1,674
First Language
English
Thank you so much for your help so far!! That works!


Just a refresh issue with the items to fix now. >.<;





The description should show up straight off the bat, but only does so after scrolling through the other items.
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Add this line at the end of the create_item_window method in the little script I wrote:


@description.refresh(@item_window.item)


This should ensure that the description window is refreshed on initialization.
 

Ksi

~RTP Princess~
Restaff
Joined
Mar 13, 2012
Messages
2,083
Reaction score
1,674
First Language
English
Yay! Thank you so much for all of your help! That works 100% perfectly.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,088
Members
137,585
Latest member
Reversinator
Top