Directly entering items, without going through submenus

So, I'm having a very simple UI in my game, there is only one Item menu, and only one subcategory, which is key items. What I'd like to achieve is when I enter the items menu, I don't want to click on the Key Items submenu to reach the items. I want to go from the items command to directly selecting the items themselves. Is there a way to do that?


Clipboard01.jpg
Hello! Yes, that is doable, I'll see if I can make something happen for you.


By the way- I'm curious- what script do you currently have for your menu? So that if I make something that skips the key items command window, it won't overwrite whatever script you currently have.
Hello! Yes, that is doable, I'll see if I can make something happen for you.


By the way- I'm curious- what script do you currently have for your menu? So that if I make something that skips the key items command window, it won't overwrite whatever script you currently have.

Thanks.


I'm using a non-combat UI, where I disabled everything besided the Item menu and the Key Items submenu.


http://pastebin.com/raw/wvbrcAS9
Oh xD that's mine, I thought the item screen looked familiar!


Well, I should have it done for you in around half an hour.
Here you go: http://pastebin.com/raw/HcTmMZWe


edit: hang on, don't use that. I found that it broke some key item selection stuff xD fixing...
Okay, it's been fixed. http://pastebin.com/HcTmMZWe

Looks good, but I noticed is that it caused massive lag in the menus (either in the item menu, or in the shop menu), when more items are displayed. The framerate dropped from 60 fps to 5-6 fps.
It's probably because of the fact that I called update help after every refresh. I'll see if I can change that for you, but no guarantees.


Edit: Okay, I moved things around a bit, and the fps should increase. Please check to see if that is so.
It's probably because of the fact that I called update help after every refresh. I'll see if I can change that for you, but no guarantees.


Edit: Okay, I moved things around a bit, and the fps should increase. Please check to see if that is so.

Hm, is it in the same link above?


It didn't help unfortunately.
It's the same link as above, but if you clicked "raw", Pastebin won't show the updated script until you clear your cache. (So clear your cache first then try again, or copy-paste from the link directly)


If FPS is an issue in your game, try removing the line "update_help if self.y != 0 ". You will notice an alternative glitch that occurs, but there really is not too much you can do about it.
Nvm, I think I found a fix. This way, update_help is run only once and so there shouldn't be any lag or performance issues.


http://pastebin.com/HcTmMZWe
Nvm, I think I found a fix. This way, update_help is run only once and so there shouldn't be any lag or performance issues.


http://pastebin.com/HcTmMZWe

Well, you are certainly getting there, but it isn't fixed yet. 😀


Now, when I enter the shop screen for the first time (without me having any items), everything is alright. But when I buy 1 item, the fps is halved. When I buy another item, it is halved again. After the third purchase, the fps drops to 7 again. And the lag remains when I enter my items menu.
I found something interesting. I deleted these lines:


refresh


    self.oy = 0


 


This solved the performance issues in the shop menu. I can buy whatever I want and the fps doesn't drops. Unfortunately deleting the line also meant that these items don't appear in my inventory. XD


 


And when I loaded a save where I had a bunch of items under the key items tab in the items, nothing showed up.
I'm not experiencing that issue with the shop screen. Also I advise you to not delete things randomly off of things xD


The two lines aren't what was changed by me, so I'm not sure where the issue is.
I'm not experiencing that issue with the shop screen. Also I advise you to not delete things randomly off of things xD


The two lines aren't what was changed by me, so I'm not sure where the issue is.

I tried the scripts with a frest new project, and it worked fine, so there must be a conflicting script in my game which causes this. There is not much you can do now I'm afraid. If I figure out which are the conflicting scripts, I let you know. 🙂


Thanks for the help mjshi. 🙂
If the FPS drop happens in the Shop scene, than mjshi's script is not the one causing it for sure.


Are you using any shop scripts? Like Blackmorning's Basic Shop or similar ones. I remember Blackmorning used to have an FPS issue in his shop menu, but that was fixed when I reported it to him.

Original thread: https://forums.rpgmakerweb.com/threads/directly-entering-items-without-going-through-submenus.56426/