Jump to content
Sign in to follow this  
louisdgreat

Help? Adding custom menu command

Recommended Posts

Good day! I'm making a RPG for our thesis and during our consultation with our adviser she was looking for an option inside the menu where the player can see/check the controls of the game (We can't show the F1 option since we already modified it using Falcao Pearl ABS Liquid v3).

 

I would like to have a "Controls" command added in the menu and when the player click the "Controls" an image I created with photoshop will show  up.

 

If showing an image is not possible is there another way to show the controls inside the Menu?

 

I added a screenshot with the command i want to be added in the menu and the scripts I'm using.

 

This is my first post, if I'm posting in the wrong thread kindly move my post :)

 

Have a good one :)

post-57957-0-11276600-1448158498_thumb.png

Share this post


Link to post
Share on other sites

 

 

This is my first post, if I'm posting in the wrong thread kindly move my post  :)

I have moved this thread from 'VXAce Editor Support and Discussion' to 'Ace Script Requests', since script will be required. (=

Was that gentle enough? =3

 

 

 

I would like to have a "Controls" command added in the menu and when the player click the "Controls" an image I created with photoshop will show  up.

A command in menu, that simply shows an image is totally doable and I could write a script for you but later, since it's 3:30AM for me and I'm going to sleep. ^^

 

I can make it like this:

You click 'Controls' command and image shows up on the entire screen (the one you'll put) and when you'll press 'back' ('X' / 'Esc), then it'll go back to menu ~ Is that what you're looking for?

Share this post


Link to post
Share on other sites

Okay it's finished.

All you need is to make a picture with the game resolution (640x480) and it will be shown.

Put that picture to Graphics/Pictures/yourimagename.png ~ simple configuration in script.

 

How it looks:

 

 

eB7IArb.png

tS4lUwE.png

 

 

 

Here's the script:

 

 

#===============================================================================
# RK5's Show Picture Scene
# Written by: Rikifive
# - Adds a scene, where an image is displayed
# - Script Call: SceneManager.call(Scene_ShowPicture)
# - Easy Configuration; Plug'n'Play.
# * + I have added that command above 'Game End' for you.
#===============================================================================

module RK5_567361
  
  #-----------------------------------------------------------------------------
  # CONFIGURATION
  #-----------------------------------------------------------------------------
  
  # Set the filename. File Directory: (Graphics/Pitures/FILE_NAME.png)
  FILE_NAME = "Controls"
  
  # Set the command name:
  COMMAND_VOCAB = "Controls"

  # Okay that's enough of that! (°͜ʖ°)
  #-----------------------------------------------------------------------------
  # END OF CONFIGURATION
  #-----------------------------------------------------------------------------
  
end

class Scene_ShowPicture < Scene_MenuBase
 
  def start
    super
    create_image_window
  end
 
  def create_image_window
    @image_window = Window_ShowPicture.new
    @image_window.viewport = @viewport
    @image_window.set_handler(:cancel, method(:return_scene))
    @image_window.activate
  end
 
end
 
class Window_ShowPicture < Window_Selectable
 
  def initialize
    super(-12, -12, 664, 504)
    self.opacity = 0
    refresh
  end
 
  def refresh
    contents.clear
    
    back = Cache.picture(RK5_567361::FILE_NAME)
    rect = Rect.new(0,0,back.width,back.height)
    contents.blt(0,0,back,rect,255)
      
  end
end

### ADD A COMMAND OF THAT SCENE TO MENU (before Game End)
class Window_MenuCommand < Window_Command
  alias :add_game_end_command_up :add_game_end_command
  def add_game_end_command
    add_command(RK5_567361::COMMAND_VOCAB, :controls)
    add_game_end_command_up
  end
end

class Scene_Menu < Scene_MenuBase
  alias :create_command_window_up :create_command_window
  def create_command_window
    create_command_window_up
    @command_window.set_handler(:controls,  method(:command_controls))
  end
  
  def command_controls
    SceneManager.call(Scene_ShowPicture)
  end
end
#===============================================================================
# END OF SCRIPT
#===============================================================================

 

 

 

Hope everything works and good luck! (=

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×