How to add a new command line to title screen?

● ARCHIVED · READ-ONLY
Started by Andar 11 posts View original ↗
  1. I want to know how to add a new command line to the title screen (in addition to "new game", "continue" and "shutdown").


    It should execute a scenemanager.call and then return to the title screen.


    More specifically it should call the language select from the SES External Text add-on:


    http://pastebin.com/732n2WRf


    And no, Yanfly's system options are NOT a solution as they replace one of the commands, they don't add to the same level.
  2. You first need to add the command to the Window_TitleCommand class and after that add a handler method to the Scene_Title class:

    #--------------------------------------------------------------------------# Add the visible language command to the title command window#--------------------------------------------------------------------------class Window_TitleCommand < Window_Command  #--------------------------------------------------------------------------  # * Create Command List  #--------------------------------------------------------------------------  def make_command_list    add_command(Vocab::new_game, :new_game)    add_command(Vocab::continue, :continue, continue_enabled)     # Replace "Vocab" with your vocabular for the scene    add_command("Vocab", :language)        add_command(Vocab::shutdown, :shutdown)  endend#--------------------------------------------------------------------------# Create Handler-Method for the new command#--------------------------------------------------------------------------class Scene_Title  #--------------------------------------------------------------------------  # * Create Command Window  #--------------------------------------------------------------------------  alias :old_create_command_window          :create_command_window  def create_command_window    old_create_command_window    @command_window.set_handler:)language, method:)command_language))  end   def command_language close_command_window    SceneManager.call(Scene_LanguageSelect)  endend*edit*

    added the close_command_window call, thx to solistra.
  3. I'm surprised anyone is still using that script, honestly -- I should probably encourage Enelvon to update it sometime. Anyway, that suggestion is good, I just wanted to point out that there's actually no need to create a command_language method, as you can just use a lambda to provide all of the functionality you need.

    You'll still need that Window_TitleCommand portion that eugene222 posted, by the way.

    Code:
    class Scene_Title  alias :ses_multilang_st_ccw :create_command_window  def create_command_window(*args, &block)    ses_multilang_st_ccw(*args, &block)    @command_window.set_handler :language, -> do      close_command_window      SceneManager.call(Scene_LanguageSelect)    end  endend
    That also closes the command window before calling the scene like every other command in the title window -- that seems to be the common convention.
  4. Thanks to both

    Solistra said:
    I'm surprised anyone is still using that script, honestly -- I should probably encourage Enelvon to update it sometime.
    There aren't many alternatives if you want to make a multi-language game...
  5. That's true enough. I was just surprised to see someone using it due to its relative age and Enelvon's general absence from the RMW community (she's still around, though, so I'll see if I can convince her to update External Text or, alternatively, if she would mind if I start maintaining it myself).
  6. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
  7. OK, I have an additional problem with the title line.

    As said above, the line is for the multilanguage add-on, and that means I couldn't use the simple vocag of the original snippet above.

    I changed it to use the get_text-function of the external text to get a language-specific vocab:

    class Window_TitleCommand < Window_Command #-------------------------------------------------------------------------- # * Create Command List #-------------------------------------------------------------------------- def make_command_list add_command(Vocab::new_game, :new_game) add_command(Vocab::continue, :continue, continue_enabled) add_command(SES::ExternalText.get_text("Language"), :language) add_command(Vocab::shutdown, :shutdown) endendUnfortunately, this results in a junk symbol at the end of that vocab - the regular vocabs are correctly replaced with the language settings without problems, only the variant with the get_text has the problem.I assume that it might be a problem in the SES-Script in that function, but I'm not sure if changes there are still possible without causing other problems.

    An alternative might be to add new vocabs to the original vocab module to allow for the same structure I'm using there, but again I'm not familiar enough with that section to know if that is a good idea or not...

    multilanguagejunk.png
  8. That's slightly different from what you want to achieve, but for my game I skipped that requirement (change language in the title screen) by making the script call ( SceneManager.call(Scene_LanguageSelect) ) right after you select Start new game, in an "intro" map.
  9. Unfortunately, I'll need the get_text at other places as well, not only for the lanuage selection screen.


    I can't use workarounds everywhere, so I prefer to get the original bug identified and solved.
  10. Enelvon updated the External Text script to solve the junk symbol problem.
  11. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.