• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.

Add a button to the main menu.

Rayd12smitty

Shadow Maker
  • 645
    Posts
    13
    Years
    • Seen Feb 21, 2016
    Hi. I was wondering how to add a button to the game's main menu. The continue/new game one. There are the new game, continue, and options buttons already, and I want to add another. How do I do it. I just want the button to start pbmysterygift. I am using Ho-Oh 112's script. Thanks
     
    Search def pbStartLoadScreen around line 276 an onwards, if you look a few lines down you will see New Game, Options and Continue... This is where you would add the Mystery Gift option, but the way it works is how you code it in
     
    In PokemonLoad around line 348 change this:
    Code:
    commands[cmdContinue=commands.length]=_INTL("Continue") if showContinue
          commands[cmdNewGame=commands.length]=_INTL("New Game")
          commands[cmdOption=commands.length]=_INTL("Options")
    else
          commands[cmdNewGame=commands.length]=_INTL("New Game")
          commands[cmdOption=commands.length]=_INTL("Options")
    To this:
    Code:
     commands[cmdContinue=commands.length]=_INTL("Continue") if showContinue
          commands[cmdNewGame=commands.length]=_INTL("New Game")
          commands[cmdOption=commands.length]=_INTL("Options")
          commands[cmdGif=commands.length]=_INTL("Mystery Gift")
        else
          commands[cmdNewGame=commands.length]=_INTL("New Game")
          commands[cmdOption=commands.length]=_INTL("Options")
          commands[cmdGif=commands.length]=_INTL("Mystery Gift")

    Then around line 483 change this:
    Code:
    elsif cmdOption>=0 && command==cmdOption
            scene=PokemonOptionScene.new
            screen=PokemonOption.new(scene)
            pbFadeOutIn(99999) { screen.pbStartScreen }
            return
     end
        end
        @scene.pbEndScene
        return
      end
    end
    To this:
    Code:
    elsif cmdOption>=0 && command==cmdOption
            scene=PokemonOptionScene.new
            screen=PokemonOption.new(scene)
            pbFadeOutIn(99999) { screen.pbStartScreen }
               elsif cmdGif>=0 && command==cmdGif
            pbMysteryGift
            
          end
        end
        @scene.pbEndScene
        return
      end
    end

    Hope it works for you ^^
     
    Last edited:
    In PokemonLoad around line 348 change this:
    Code:
    commands[cmdContinue=commands.length]=_INTL("Continue") if showContinue
          commands[cmdNewGame=commands.length]=_INTL("New Game")
          commands[cmdOption=commands.length]=_INTL("Options")
    else
          commands[cmdNewGame=commands.length]=_INTL("New Game")
          commands[cmdOption=commands.length]=_INTL("Options")
    To this:
    Code:
     commands[cmdContinue=commands.length]=_INTL("Continue") if showContinue
          commands[cmdNewGame=commands.length]=_INTL("New Game")
          commands[cmdOption=commands.length]=_INTL("Options")
          commands[cmdGif=commands.length]=_INTL("Mystery Gift")
        else
          commands[cmdNewGame=commands.length]=_INTL("New Game")
          commands[cmdOption=commands.length]=_INTL("Options")
          commands[cmdGif=commands.length]=_INTL("Mystery Gift")

    Then around line 483 change this:
    Code:
    elsif cmdOption>=0 && command==cmdOption
            scene=PokemonOptionScene.new
            screen=PokemonOption.new(scene)
            pbFadeOutIn(99999) { screen.pbStartScreen }
            return
     end
        end
        @scene.pbEndScene
        return
      end
    end
    To this:
    Code:
    elsif cmdOption>=0 && command==cmdOption
            scene=PokemonOptionScene.new
            screen=PokemonOption.new(scene)
            pbFadeOutIn(99999) { screen.pbStartScreen }
               elsif cmdGif>=0 && command==cmdGif
            pbMysteryGift
            
          end
        end
        @scene.pbEndScene
        return
      end
    end

    Hope it works for you ^^

    Thanks so much. I will try this when I get the chance. Thanks a lot. This should help. What you wrote makes sense even to me, and I know zero on scripting.

    EDIT***

    Just tried what you said and it works perfect thanks so much
     
    Last edited:
    Back
    Top