Advertiser Content

[HELP NEEDED!] Custom Pause Menu

Started by UltimateDillon February 14th, 2013 1:27 PM
  • 8012 views
  • 12 replies

UltimateDillon

Veteran Gamer (Sort Of)

Male
Scotland
Seen May 15th, 2016
Posted February 10th, 2014
87 posts
7 Years
I am in need of help with changing the default pause menu into something like the image below with the buttons extending and changing when highlighted.



The internet will not provide my answer, and I have seen it in many times in games showcased here therefore thought I may ask.

I do not need someone to do it for me but would like to be pointed in the right direction so I can find out how to do it. If this post is in the wrong place, please could a moderator or admin move it to somewhere appropriate. Thanks in advance.

Maruno

Lead Dev of Pokémon Essentials

England
Seen 2 Days Ago
Posted 2 Days Ago
5,181 posts
11.6 Years
The script section PokemonPauseMenu is what you want to look at. At the moment, the only things shown are a Window_CommandPokemon (the menu), a Window_UnformattedTextPokemon (Safari/Bug Contest info) and an unused Window_UnformattedTextPokemon. Figure out how they're defined and how they're made visible/invisible, and you're halfway there.

You'll want to show some graphics there as well. The Pokégear does that too, you know, so have a look at it for inspiration.
Go to the Essentials Docs Wiki

Essentials Docs Wiki

Follow me on Twitter: @maruno42


UltimateDillon

Veteran Gamer (Sort Of)

Male
Scotland
Seen May 15th, 2016
Posted February 10th, 2014
87 posts
7 Years
The script section PokemonPauseMenu is what you want to look at. At the moment, the only things shown are a Window_CommandPokemon (the menu), a Window_UnformattedTextPokemon (Safari/Bug Contest info) and an unused Window_UnformattedTextPokemon. Figure out how they're defined and how they're made visible/invisible, and you're halfway there.

You'll want to show some graphics there as well. The Pokégear does that too, you know, so have a look at it for inspiration.
Thanks, I'll check there tomorrow. I was already looking at PokemonPauseMenu but had no idea what to look for as my RGSS skills are pretty basic so far. Thanks for showing me where I should be looking.

Harvey_Create

Pokemon Apex Team Member

Male
Iowa
Seen July 11th, 2015
Posted October 11th, 2014
187 posts
6.8 Years

Okay, lets get one thing straight. I have never touched RGSS Programming. So i dont know what i am doing. A friend and I are trying to change the default pause menu to a more slick looking one.
Here it is. this is a photoshopped version of what the basic idea is.


I know that the script PokemonPauseMenu is what we need to edit, but my question is, what would i edit? and how would i set up the buttons and stuff?

I am sorry for the bugging you guys.
See, i am just the mapper, but if i get this done for him, he would be happy.
This signature has been disabled.
Exceeds signature width limit (strictly 600 pixels or less).
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.

UltimateDillon

Veteran Gamer (Sort Of)

Male
Scotland
Seen May 15th, 2016
Posted February 10th, 2014
87 posts
7 Years
So far, I can't make sense of it. The only significant things I have figured out in PokemonPauseMenu are 'cmdwindow' and 'infowindow'. I do have knowledge of programming and can learn very easily but I can't make sense of this myself. If anyone can help me understand it better, that would be great help.

Maruno

Lead Dev of Pokémon Essentials

England
Seen 2 Days Ago
Posted 2 Days Ago
5,181 posts
11.6 Years
@sprites["cmdwindow"]=Window_CommandPokemon.new([])
This line creates the list of options for you to choose from. When it's first created, its command list is set to [], i.e. no commands. That's okay, because it's very quickly given commands further down - it's obvious to see where the available commands are decided.

Your pause menu is going to consist of two main features. The first is the background, which is in a set position and doesn't change. The second feature is a set of buttons, one per command, which can vary in content/function and will change graphics and/or locations depending on which command is currently selected.

The background is easy. Many places display the background image with code like the following, and this would be no different.

@sprites["background"] = IconSprite.new(0,0)
@sprites["background"].setBitmap("Graphics/Pictures/pokegearbg")
Pop that in the same place as the first line of code I quoted above, and see what happens. You should change the filename, obviously.

The buttons are a bit more difficult. You need some amount of them (one per command), which means you need to know what commands you've got first. There are a few ways to deal with this, but the simplest way is to copy something that already does what you want. What works like this? The Pokégear. Conveniently, it's also one of the simplest scripts in Essentials.

For starters, just try copying how the Pokégear works. You may even want to start with an exact copy of the Pokégear scripts (renamed, of course) and make changes to so that it works like a pause menu.

This is as much help as I can provide without simply doing it for you, and I'm not going to do that. You know about programming, you're bound to figure out what's going on. At least, start by figuring out how the Pokégear works, and seeing what you can change about it.
Go to the Essentials Docs Wiki

Essentials Docs Wiki

Follow me on Twitter: @maruno42


UltimateDillon

Veteran Gamer (Sort Of)

Male
Scotland
Seen May 15th, 2016
Posted February 10th, 2014
87 posts
7 Years
I'm in need of some help. I am scripting a custom pause menu and i got pretty far in terms of cosmetics but ran into a few major problems. Here it is so far:




At this screen, I can't change selection, and instead when I use the arrow keys, it moves my player but the effect doesn't show until I press 'X' again, where the player teleports to where you moved him to with the arrows. Also, as you can see, the buttons are placed incorrectly and changing the 'y' coordinate only increases/decreases the spacing between the buttons.

This screen only works when the Pokégear script is identical to the pause menu script. When the Pokégear script is default, it looks like this, but has the same problem.




I scripted it by editing the Pokégear script directly and it works to an extent that way, replacing the Pokégear with the pause menu. However, selecting any of the options naturally crashes the game. If anyone can help, or at least clean up the script so I can understand it easier, that would be amazing...

I will attach both the Pause Menu script, and the Pokégear script (Modified and Original of each), and the modified Scene_Map script. Thanks a lot in advance!

UltimateDillon

Veteran Gamer (Sort Of)

Male
Scotland
Seen May 15th, 2016
Posted February 10th, 2014
87 posts
7 Years
By the looks of the screenshot alone, you can clearly see that you have copied to much of the pokégear script; so much so that the two options have morphed slightly.
If you recall, Maruno himself told me it was a good idea to copy the Pokégear script and work on it from there.

UltimateDillon

Veteran Gamer (Sort Of)

Male
Scotland
Seen May 15th, 2016
Posted February 10th, 2014
87 posts
7 Years
It's still true, although the Pokégear script is slightly more complicated now. It remains the simplest graphics-based menu in Essentials.
I didn't question your advice, I understand that it's the natural thing to start with. But I still haven't sorted out the problems above and could use a little help...
Advertiser Content