• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Simple GUI Menu v2 (Customizable/Extendable)

Ego13

hollow_ego
311
Posts
6
Years
Simple GUI Menu Version 2 (Customizable/Extendable) for Essentials v17.2

This is a plug&play GUI Menu and was designed as a base, so you can add your own menu items and use your own graphics. It comes with 7 working standard options (Pokedex, Pokemon, Bag, Trainercard, Save, Settings, Exit) and a clock on demand. It also supports debug mode. The icon will be on the bottom right corner and allows for quick access to the debug menu (press down to select it and up to deselect).

Some might not the previous versions, which weren't much beginner friendly. This has changed quite a bit and it now should be really easy to use and to expand.

The following things are improved:
  • Easier to add new items using Procs (no need to search for the right place to add your code)
  • No need to set the width and height of the icons manually
  • The moving of the icons is handled completely by the computer (no need to calculate the right amount of movement)
  • Added an option to zoom in on selected icons
  • Background graphics can be changed to show something other than the watch (no need to use a different version)
  • A separate clock graphic can now always be shown, regardless of the background (in previous versions you had to choose between using the watch or generic design)
  • Overall code is more optimized and better commented
  • The icons don't wrap around anymore, so there is no seamless transition between the first and the last menu item. Instead now the menu will scroll all the way back twice as fast
  • Menu items can be arranged by setting their index (starting with 0)
  • Full documentation is included in a separate file (I recommend adding the content in a new script section)
  • Graphics were improved (quite a lot imo)
  • The code that moves the icons was put in a separate method (makes the code more readable)


The full documentation (including tutorials) can be found in documentation.txt

These are things you can modify
  • Menu Items: add more things you want to have in your menu (Tutorial
  • Icon Placement: space between 2 icons
  • Animation Style: choose between 3 styles: 1=up/down animation; 2=color change; 3=animation and color change
  • Additionally: make the icon zoom in when it's selected
  • Speed of the animation
  • Audio Settings: play sounds when opening the menu and/or when selecting
  • Clock: postion, font, font color, using a seperate graphic for the clock graphic or use background

Screenshots
Spoiler:


You can download the files here.
Please give credit.

Change Log
- Completely new version (see description for details)

Updates
- 17/08/2019: fixed bug in "Methods for menu items" that would crash the game; download the new version and replace the mentioned script section


For questions and bug reports visit our Discord server https://discord.gg/7msDPaN or post them here.
 
Last edited:

Tw_raZ

The Man at the Summit
4
Posts
5
Years
  • Age 27
  • Seen Feb 18, 2022
I can't get this to work. I made the appropriate changes in Scene_Map, and put the PScreen_Menu above main. I made sure that, before pasting the script into PScreen_Menu, I added a '#' on each line where you described what to change in Scene_map.

The error I get is this:

[Pokémon Essentials version 17.2]
Exception: NameError
Message: undefined local variable or method `startMenu' for #<Scene_Map:0xc93b880>
Scene_Map:192:in `update'
Scene_Map:235:in `main'
Scene_Map:232:in `loop'
Scene_Map:237:in `main'
Main:49:in `mainFunctionDebug'
Main:27:in `mainFunction'
Main:27:in `pbCriticalCode'
Main:27:in `mainFunction'
Main:59
Main:58:in `loop'

This exception was logged in
C:\Users\user\Saved Games\Pokemon Essentials\errorlog.txt.
 
295
Posts
5
Years
  • Age 28
  • Seen Aug 15, 2022
I can't get this to work. I made the appropriate changes in Scene_Map, and put the PScreen_Menu above main. I made sure that, before pasting the script into PScreen_Menu, I added a '#' on each line where you described what to change in Scene_map.

The error I get is this:

[Pokémon Essentials version 17.2]
Exception: NameError
Message: undefined local variable or method `startMenu' for #<Scene_Map:0xc93b880>
Scene_Map:192:in `update'
Scene_Map:235:in `main'
Scene_Map:232:in `loop'
Scene_Map:237:in `main'
Main:49:in `mainFunctionDebug'
Main:27:in `mainFunction'
Main:27:in `pbCriticalCode'
Main:27:in `mainFunction'
Main:59
Main:58:in `loop'

This exception was logged in
C:\Users\user\Saved Games\Pokemon Essentials\errorlog.txt.
First,
Do you change like this ?

Code:
if Input.trigger?(Input::B)
      unless pbMapInterpreterRunning? or $game_system.menu_disabled or $game_player.moving?
        startMenu
        #$game_temp.menu_calling = true
        #$game_temp.menu_beep = true
      end
    end

Second, if you change like that and you use script v1_1, change this:
Code:
def startMenu1_1
into
Code:
def startMenu
 
Last edited:

Ego13

hollow_ego
311
Posts
6
Years
I can't get this to work. I made the appropriate changes in Scene_Map, and put the PScreen_Menu above main. I made sure that, before pasting the script into PScreen_Menu, I added a '#' on each line where you described what to change in Scene_map.

The error I get is this:

[Pokémon Essentials version 17.2]
Exception: NameError
Message: undefined local variable or method `startMenu' for #<Scene_Map:0xc93b880>
Scene_Map:192:in `update'
Scene_Map:235:in `main'
Scene_Map:232:in `loop'
Scene_Map:237:in `main'
Main:49:in `mainFunctionDebug'
Main:27:in `mainFunction'
Main:27:in `pbCriticalCode'
Main:27:in `mainFunction'
Main:59
Main:58:in `loop'

This exception was logged in
C:\Users\user\Saved Games\Pokemon Essentials\errorlog.txt.

Basically it doesnt find the function to start the menu. I suggest checking what @bo4p5687 said
 

Tw_raZ

The Man at the Summit
4
Posts
5
Years
  • Age 27
  • Seen Feb 18, 2022
First,
Do you change like this ?

Code:
if Input.trigger?(Input::B)
      unless pbMapInterpreterRunning? or $game_system.menu_disabled or $game_player.moving?
        startMenu
        #$game_temp.menu_calling = true
        #$game_temp.menu_beep = true
      end
    end

Second, if you change like that and you use script v1_1, change this:
Code:
def startMenu1_1
into
Code:
def startMenu

That was the error, thanks :D
 
6
Posts
7
Years
  • Age 28
  • Seen Jul 5, 2020
I have a question, could you tell me how i'd go about making it so that some of the menu entries don't appear when a certain situation hasn't been met? (e.g. having the Pokemon entry disappear if the player doesn't have a Pokemon yet or the pokedex if the play hasn't received the dex).
 

Ego13

hollow_ego
311
Posts
6
Years
Right, so to add condtional menu items go to this part of the code

Code:
for i in 0..($initOptions.length-1)
  @menuIcons[$initOptions[i]]=Sprite.new(@viewport8)
  @menuIcons[$initOptions[i]].bitmap=Bitmap.new("Graphics/Pictures/Menu/"+$initOptions[i])
  @menuIcons[$initOptions[i]].x=$beginLeft+($moveby*$l)
  @menuIcons[$initOptions[i]].x=$x              if i==3 && $extraSpace
  @menuIcons[$initOptions[i]].x+=$extraAmount*2 if i>=4 && $extraSpace
  @menuIcons[$initOptions[i]].y=0
  $options.push(@menuIcons[$initOptions[i]])
  #Kernel.pbMessage(_INTL("X = #{@menuIcons[$initOptions[i]].x} ")) # Debug Line
  $l+=1
end

and right after
Code:
for i in 0..($initOptions.length-1)
you can your condtions in the following format: next if globalVariableOfTheMenuItem == i && yourCondtion
for example
Code:
next if $pokemon==i && $player.party.length<=0

I might do a revision of this menu to make it more easy to use
 
Last edited:
6
Posts
7
Years
  • Age 28
  • Seen Jul 5, 2020
Right, so to add condtional menu items go to this part of the code

Code:
for i in 0..($initOptions.length-1)
  @menuIcons[$initOptions[i]]=Sprite.new(@viewport8)
  @menuIcons[$initOptions[i]].bitmap=Bitmap.new("Graphics/Pictures/Menu/"+$initOptions[i])
  @menuIcons[$initOptions[i]].x=$beginLeft+($moveby*$l)
  @menuIcons[$initOptions[i]].x=$x              if i==3 && $extraSpace
  @menuIcons[$initOptions[i]].x+=$extraAmount*2 if i>=4 && $extraSpace
  @menuIcons[$initOptions[i]].y=0
  $options.push(@menuIcons[$initOptions[i]])
  #Kernel.pbMessage(_INTL("X = #{@menuIcons[$initOptions[i]].x} ")) # Debug Line
  $l+=1
end

and right after
Code:
for i in 0..($initOptions.length-1)
you can your condtions in the following format: next if globalVariableOfTheMenuItem == i && yourCondtion
for example
Code:
next if $pokemon==i && $player.party.length<=0

I might do a revision of this menu to make it more easy to use

Hm, nothing changed, the entry still appears.
 

Ego13

hollow_ego
311
Posts
6
Years
Sorry my bad. I did this right after I came back home so I might not have had the clearest mind.
Anyway I tested it this time and the correct line has to be
Code:
next if $pokemon==$initOptions[i] && $Trainer.party.length<=0
 
6
Posts
7
Years
  • Age 28
  • Seen Jul 5, 2020
Sorry my bad. I did this right after I came back home so I might not have had the clearest mind.
Anyway I tested it this time and the correct line has to be
Code:
next if $pokemon==$initOptions[i] && $Trainer.party.length<=0

yup, that worked, thanks for the help, I appreciate it!
 
6
Posts
7
Years
  • Age 28
  • Seen Jul 5, 2020
actually, now that the entry is gone, it now does this thing where it shows a blank space and when I move from said blank space, it pushes one of the other icons over another icon if that makes sense.
 

Ego13

hollow_ego
311
Posts
6
Years
Can you tell me what version you are using?
I think I'll rework the script in the next few days. Until then I recommend using the default menu
 

Ego13

hollow_ego
311
Posts
6
Years
i'm using v1.2 on v17.2 essentials

Alright, I redid the whole script and made it a lot easier to use.
Now by default the Pokedex is excluded if the player doesn't have one and Pokemon are excluded if the player doesn't have any.


Starting from here all questions should be related to Version 2!
 
8
Posts
4
Years
  • Age 23
  • Seen Jul 4, 2022
This error shows up

[Pokémon Essentials version 17.2]
Exception: Hangup
Message: The script is taking too long. The game will restart.
SGM_V2:242:in `initialize'
SGM_V2:526:in `new'
SGM_V2:526:in `startMenu'
Scene_Map:125:in `call_menu'
Scene_Map:212:in `update'
Scene_Map:233:in `main'
Scene_Map:230:in `loop'
Scene_Map:235:in `main'
Main:49:in `mainFunctionDebug'
Main:27:in `mainFunction'

My RGSS Player says the script is taking too long to work

Any way to fix this?
Thanks in advance!
 
Last edited:

Ego13

hollow_ego
311
Posts
6
Years
I don't see a reason why it would hang itself. On the line mentioned in the error message it only creates a new viewport, which happens all the time in essentials.
Sometimes the game crashes without any specific reason, other than the computer not beeing able to everything at once.
Do you get this error every time you open the menu?
 
34
Posts
4
Years
  • Age 29
  • Seen Apr 21, 2024
Hey there, as a complete coding scrub with no experience, is there any way for me to access this script? It absolutely looks amazing, but I would have no idea how to set up the Documentation file ready for use. Thanks for your hard work regardless!
 

Ego13

hollow_ego
311
Posts
6
Years
Hey there, as a complete coding scrub with no experience, is there any way for me to access this script? It absolutely looks amazing, but I would have no idea how to set up the Documentation file ready for use. Thanks for your hard work regardless!

Hi,

you only need to copy the contents of it into a new script section. It is not neccassariy for the script to work, but really helpful if you want to look something up.
 
Back
Top