Ksi

~RTP Princess~
Restaff
Joined
Mar 13, 2012
Messages
2,089
Reaction score
1,683
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:


jAimLFR.png



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,201
Reaction score
853
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,089
Reaction score
1,683
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,201
Reaction score
853
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,089
Reaction score
1,683
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,201
Reaction score
853
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,089
Reaction score
1,683
First Language
English
Thank you so much for your help so far!! That works!


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


SniAx8g.png



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,201
Reaction score
853
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,089
Reaction score
1,683
First Language
English
Yay! Thank you so much for all of your help! That works 100% perfectly.
 

Latest Threads

Latest Posts

Latest Profile Posts

TIL, TP means Tactical Points.
I think those extra pixels did it. ^_^ Now to work on the front and back views.
PlusTest-02.gif
What props/tiles are missing from this scene?

My team recruitment thread is finally online. Please, if you guys are interested in language learning, take a look. Even if you don't join, a word of encouragement is always welcome.
Rats! These Rats are pretty cute!

Forum statistics

Threads
116,470
Messages
1,098,914
Members
152,055
Latest member
KeinHexer
Top