Basic Options Menu

mandalorianjedi

Dark Lord of Potato
Member
Joined
Feb 3, 2014
Messages
20
Reaction score
3
First Language
Engrish
Primarily Uses
Just an optional request.
Since I know how easy it is to change the textbox colours with \C(x), but I am rather scriptly impaired. Would you be able to make a textbox colour selection included?
 

EternalShadow

Veteran
Veteran
Joined
Sep 16, 2012
Messages
5,781
Reaction score
1,041
First Language
English
Primarily Uses
First of all, LOVE the script, fantastic job.


Quick question though, how can I remove the switch section.


I don't want the player to be able to turn a switch on an off.


But I haven't a clue how to do this.
Select those areas (highlight them) and comment them out (press control+Q)


-------


Hi,


I seem to be running into a very strange issue: The script won't show up at all on the main menu.


I set it to display 5 columns, just in case. No dice. Here is a WIP screenshot: http://i.imgur.com/049N8FS.png


If anyone can help, that's be great.
 

majorcyto

Warper
Member
Joined
Feb 17, 2015
Messages
2
Reaction score
1
First Language
English
Primarily Uses
Hi, i was wondering if this could be modified just a little bit. I use a script that lets you set higher resolutions than normal.. so any normal resolutions will work. I have the game set to 1024x768 by default now, but was wondering if you could make the resolution menu options actually change the "Graphics.resize_screen(1024, 768)" on the fly instead of using window stretching? That way once i see how you do it, i could add a couple of resolution options in there for people.

I tried to edit the resolution option myself, however i failed as i take there is probably more to it than what i tried. Either way thanks for your reply. :p
 

sylvester87

Villager
Member
Joined
Jan 26, 2015
Messages
8
Reaction score
0
First Language
Dutch
Primarily Uses
Hi, I was wondering why it the music doesn't automically changes when I change the volume, but that I have to wait until the BGM fades in again. Is there a reason for and can this be fixed?
 

YamiKitsune

Villager
Member
Joined
May 26, 2015
Messages
5
Reaction score
0
First Language
English
Primarily Uses
Is there anyway we could get some compatibility with Xall menu themes? Cause nothing is happening for me.
 

dioarcangel

Villager
Member
Joined
Aug 13, 2015
Messages
16
Reaction score
0
First Language
Español
Primarily Uses
Hello i have Xail System Menu this is compatible ?
 

Awesomeguy2561

Awesome
Member
Joined
Sep 8, 2015
Messages
32
Reaction score
0
First Language
English
Primarily Uses
I am having a problem that it is not showing up on the title screen? I put the script in the right spot, I don't know why it isn't working.
 

Millerberto2

Good Sire
Veteran
Joined
Nov 10, 2014
Messages
35
Reaction score
12
First Language
Portuguese
Primarily Uses
RMVXA
Is there anyway we could get some compatibility with Xall menu themes? Cause nothing is happening for me.
Hello i have Xail System Menu this is compatible ?
I am having a problem that it is not showing up on the title screen? I put the script in the right spot, I don't know why it isn't working.


Just add this to your XaiL Menu Deluxe options. I had a hard time getting it to work.

I also placed this script above both XaiL core and menu scripts.

@Awesomeguy2561 It is not really related to your question, but you may switch from the vanilla menu and start using XaiL's improved menu script.

Thanks for the script, OP.
 
Last edited by a moderator:

LucaBicono

Villager
Member
Joined
May 14, 2015
Messages
11
Reaction score
2
First Language
English
Primarily Uses
I'm a little bit confused about how the Header option works. The way I understand it (from looking at the script), switching it to 'on' will set a switch to on when you start the game, and the switch ID is determined by the SWITCH_ID value (in my case, I set the value to 200). However, when I try to playtest the game, set it to 'on', and begin a new game, it doesn't set the switch on. Am I misunderstanding the script or am I setting the value wrong?
 

JarvisTube

Villager
Member
Joined
Jun 25, 2016
Messages
18
Reaction score
0
First Language
English
Primarily Uses
This is awesome! But the autosave and res wont pop up. -_- How 2 fix?
 

Burgerland

Veteran
Veteran
Joined
Sep 26, 2015
Messages
331
Reaction score
90
First Language
English
Primarily Uses
N/A
Thank you for this script and your autosave script, also for your help using this script. :)


Can I change the autosave and message SE options into configure gamepad controls option and configure keyboard controls option?


Is it possible to configure the keyboard and gamepad controls without pressing F1?
 

jumadelux

Villager
Member
Joined
Nov 2, 2016
Messages
23
Reaction score
1
First Language
English
Primarily Uses
Hey vlue, i'm new here and didn't have knowledge about coding.


Is there any way to remove the "Large" in resolution options?


I want to use only the "Normal" and "Fullscreen" ones, thankyou before :)
 
Last edited by a moderator:

serp

Villager
Member
Joined
Nov 17, 2015
Messages
13
Reaction score
2
First Language
English
Primarily Uses
Found and fixed a couple bugs. For one, if you change the volume and then hit cancel instead of OK, the volume will not instantly revert to the original value, You will have to reopen the options dialog and tick the volume one more time to get the volume to adjust appropriately.

Also, if you turn the volume all the way down and keep pressing, you will get one extra black bar that goes past the intended range (there's also a weird double-adding blue bar issue at the top of the range).

The first bug can be fixed by scrolling to line 290 where this function is defined:
def command_ok
case @window_command.index
when 0
$game_options.save_options
$game_options.clear_memorize
return_scene
when 1
$game_options.copy_memorize
$game_options.clear_memorize
return_scene
end
end

And adding one line like so:

def command_ok
case @window_command.index
when 0
$game_options.save_options
$game_options.clear_memorize
return_scene
when 1
$game_options.copy_memorize
$game_options.clear_memorize
$game_map.autoplay if $game_map && $game_map.map_id > 0
return_scene
end
end


The other issue can be fixed by going to line 420 where we see:

def refresh(temp_value)
contents.clear
temp_value *= 100
temp_value.to_i.times do |i|
rect = Rect.new(4+i*4,6,2,8)
contents.fill_rect(rect, Color.new(75,100,255))
end
(100-temp_value).to_i.times do |i|
rect = Rect.new(396-i*4,6,2,8)
contents.fill_rect(rect, Color.new(0,0,0))
end
draw_text(0,0,contents.width,24,temp_value.to_i.to_s + "%",2)
end

Simply change the 396 to 400 and both instances of ".to_i" with ".round" like so:

def refresh(temp_value)
contents.clear
temp_value *= 100
temp_value.round.times do |i|
rect = Rect.new(4+i*4,6,2,8)
contents.fill_rect(rect, Color.new(75,100,255))
end
(100-temp_value).round.times do |i|
rect = Rect.new(400-i*4,6,2,8)
contents.fill_rect(rect, Color.new(0,0,0))
end
draw_text(0,0,contents.width,24,temp_value.to_i.to_s + "%",2)
end

I was quite surprised myself to find that the .to_round was necessary, but due to some nuances of floating point arithmetic (which you can read about here: http://floating-point-gui.de/), we get new weird errors if we only change 396 to 400. .round turns 1.999999 into 2 where .to_i turns it into 1.

Anyway, thanks so much for making this script! I've had a couple playtesters request volume controls, so i was thrilled to see this up for free and allowed in commercial games. Thanks!
 

Mparagames

Amateur developer trying to be awesome
Member
Joined
Jan 8, 2018
Messages
16
Reaction score
4
First Language
Portuguese(BRA)
Primarily Uses
RMMV
Vlue,
1 - How could I add support to your mouse script so I could operate the options menu using the mouse cursor?
2 - How could add an extra option into the menu? In my case, I would like to put an option to change the game window's color, and give the player five different possibilities: Blue (default), Pink (custom option 1), Green (custon option 2), Yellow (custom option 3), AND White (custom option 4).

Thanks.
 
Last edited:

Zion

Veteran
Veteran
Joined
Mar 12, 2018
Messages
61
Reaction score
19
First Language
German
Primarily Uses
RMMV
Anyone here who supports this script? Its really cool and I'd like to use it, but I found a bug.
I managed it to implement this script in the title screen, but it does not work there. You can change the volume, but nothing changes. And if you load a savegame and change volume there and go back to the title screen and change volume again, you hear the music from the last map where you have been xD
Could anyone fix this?
This script is much cooler than yanflys^^
 

Fragarachu

Veteran
Veteran
Joined
Apr 19, 2018
Messages
59
Reaction score
2
First Language
Indonesia
Primarily Uses
RMVXA
What's the script call?
 

Zion

Veteran
Veteran
Joined
Mar 12, 2018
Messages
61
Reaction score
19
First Language
German
Primarily Uses
RMMV
Oh, I totally forgot, sorry.
I found another person who kindly helped me out.
This is the script if you want to combine full screen and options in the title menu:
Code:
#==============================================================================
# Vollbild als Option im Startmenü
#==============================================================================

class Window_TitleCommand < Window_Command
  alias alt_make_command_list_vollbild_zion:make_command_list
  def make_command_list
    add_command(Vocab::new_game, :new_game)
    add_command(Vocab::continue, :continue, continue_enabled)
    add_command("Vollbild", :vollbild)
    add_command("Optionen", :optionen) #optionen
    add_command(Vocab::shutdown, :shutdown)
  end
end
class Scene_Title < Scene_Base
  alias alt_create_command_window_vollbild_zion:create_command_window
  def create_command_window
    alt_create_command_window_vollbild_zion
    @command_window.set_handler:)vollbild, method:)command_vollbild))
    @command_window.set_handler:)optionen, method:)command_options))   #optionen
  end
  def command_vollbild
    $keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
    $keybd.call 0xA4, 0, 0, 0
    $keybd.call 13, 0, 0, 0
    $keybd.call 13, 0, 2, 0
    $keybd.call 0xA4, 0, 2, 0
    @command_window.activate
  end
#--------------------------------------------------------------------------
# * [Options] Command   #optionen
#--------------------------------------------------------------------------
def command_options
  SceneManager.call(Scene_Options)
end

end

Most of the script is from Nefertari.

Vlue's script needs to be changed as follows:

Code:
line 62, 2 new lines:
class Scene_Options < Scene_MenuBase
attr_reader :last_scene # neue Variable
def start
super
@last_scene = SceneManager.instance_variable_get:)@stack).pop.class # neu: merkt sich die aufrufende Scene
$game_options.memorize_options
...
line 252, 1 line out, 2 new lines in:
def change_volume(index, value)
return unless audio_index(index)
$game_options.set_volume:)master, value) if @window_index[index] == :master
$game_options.set_volume:)bgm, value) if @window_index[index] == :bgm
$game_options.set_volume:)se, value) if @window_index[index] == :se
@window_masterbar.refresh($game_options.master_volume)
@window_bgmbar.refresh($game_options.bgm_volume)
@window_sebar.refresh($game_options.se_volume)
Sound.play_cursor
# $game_map.autoplay if $game_map && $game_map.map_id > 0
$data_system.title_bgm.play if last_scene == Scene_Title # neu: spielt Titelmusik, wenn vorherige Scene der Title war
$game_map.autoplay if last_scene == Scene_Menu # neu: spielt Mapmusik, wenn vorherige Scene eine Map war
end
line 301, 2 lines out, 2 new lines in:
def command_ok
case @window_command.index
when 0
$game_options.save_options
$game_options.clear_memorize
# return_scene
SceneManager.call(last_scene) # neu: ruft vorherige Scene auf
when 1
$game_options.copy_memorize
$game_options.clear_memorize
# return_scene
SceneManager.call(last_scene) # neu: ruft vorherige Scene auf
end
end
 
Last edited:

Fragarachu

Veteran
Veteran
Joined
Apr 19, 2018
Messages
59
Reaction score
2
First Language
Indonesia
Primarily Uses
RMVXA
Oh, I totally forgot, sorry.
I found another person who kindly helped me out.
This is the script if you want to combine full screen and options in the title menu:

#==============================================================================
# Vollbild als Option im Startmenü
#==============================================================================

class Window_TitleCommand < Window_Command
alias alt_make_command_list_vollbild_zion:make_command_list
def make_command_list
add_command(Vocab::new_game, :new_game)
add_command(Vocab::continue, :continue, continue_enabled)
add_command("Vollbild", :vollbild)
add_command("Optionen", :optionen) #optionen
add_command(Vocab::shutdown, :shutdown)
end
end
class Scene_Title < Scene_Base
alias alt_create_command_window_vollbild_zion:create_command_window
def create_command_window
alt_create_command_window_vollbild_zion
@command_window.set_handler:)vollbild, method:)command_vollbild))
@command_window.set_handler:)optionen, method:)command_options)) #optionen
end
def command_vollbild
$keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
$keybd.call 0xA4, 0, 0, 0
$keybd.call 13, 0, 0, 0
$keybd.call 13, 0, 2, 0
$keybd.call 0xA4, 0, 2, 0
@command_window.activate
end
#--------------------------------------------------------------------------
# * [Options] Command #optionen
#--------------------------------------------------------------------------
def command_options
SceneManager.call(Scene_Options)
end

end

Most of the script is from Nefertari.

Vlue's script needs to be changed as follows:

  1. line 62, 2 new lines:
  2. class Scene_Options < Scene_MenuBase
  3. attr_reader :last_scene # neue Variable
  4. def start
  5. super
  6. @last_scene = SceneManager.instance_variable_get:)@stack).pop.class # neu: merkt sich die aufrufende Scene
  7. $game_options.memorize_options
  8. ...
  9. line 252, 1 line out, 2 new lines in:
  10. def change_volume(index, value)
  11. return unless audio_index(index)
  12. $game_options.set_volume:)master, value) if @window_index[index] == :master
  13. $game_options.set_volume:)bgm, value) if @window_index[index] == :bgm
  14. $game_options.set_volume:)se, value) if @window_index[index] == :se
  15. @window_masterbar.refresh($game_options.master_volume)
  16. @window_bgmbar.refresh($game_options.bgm_volume)
  17. @window_sebar.refresh($game_options.se_volume)
  18. Sound.play_cursor
  19. # $game_map.autoplay if $game_map && $game_map.map_id > 0
  20. $data_system.title_bgm.play if last_scene == Scene_Title # neu: spielt Titelmusik, wenn vorherige Scene der Title war
  21. $game_map.autoplay if last_scene == Scene_Menu # neu: spielt Mapmusik, wenn vorherige Scene eine Map war
  22. end
  23. line 301, 2 lines out, 2 new lines in:
  24. def command_ok
  25. case @window_command.index
  26. when 0
  27. $game_options.save_options
  28. $game_options.clear_memorize
  29. # return_scene
  30. SceneManager.call(last_scene) # neu: ruft vorherige Scene auf
  31. when 1
  32. $game_options.copy_memorize
  33. $game_options.clear_memorize
  34. # return_scene
  35. SceneManager.call(last_scene) # neu: ruft vorherige Scene auf
  36. end
  37. end
I meant what's the script call for opening the options menu?
I've scripted my game so the title screen is skipped and i've made a custom menu.
 

Zion

Veteran
Veteran
Joined
Mar 12, 2018
Messages
61
Reaction score
19
First Language
German
Primarily Uses
RMMV
It's in the first script I posted:

SceneManager.call(Scene_Options)
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,660
Reaction score
563
First Language
English
Primarily Uses
RMVXA
can you fix the code entry. it has smiley's all over it. Use a proper code block
Code:
def create_resolution_window
    if Module.const_defined?(:Window_Resize)
      @window_resolution = Window_OR.new(48+24 * @current_index)
      @window_resolution.set_handler(:ok, method(:resolution_ok))
      @back_window.add_text(24 * (@current_index - 1),OPT_STR::RESOLUTION)
      @current_index += 2
      @size += 1
      @window_index.push(:resolution)
    end
  end
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,047
Members
137,569
Latest member
Shtelsky
Top