• 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 Conquest 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.

Debug Item

Derxwna Kapsyla

Derxwna "The Badman" Kapsyla
  • 437
    Posts
    13
    Years
    I know this must be a bit of an awkward question to ask, but:
    Is it possible to bind the Debug Menu activator to an item? This makes it easier for mobile testing.
     
    An odd question indeed. Are you suggesting that you want to be able to access the Debug menu while not in Debug mode (i.e. testing it as an actual game)? Why not simply remove the phrase if $DEBUG from the appropriate line in the script section PokemonPauseMenu instead?

    For what you want, it is indeed possible. Just stick the following in PokemonItemEffects (the second handler is optional, and used if the item has been registered to the F5 key):

    Code:
    ItemHandlers::UseFromBag.add(:[COLOR=Red]DEBUGITEM[/COLOR],proc{|item|
       pbFadeOutIn(99999) { 
          pbDebugMenu
          @scene.pbRefresh
       }
       next 1 # Continue
    })
    
    ItemHandlers::UseInField.add(:[COLOR=Red]DEBUGITEM[/COLOR],proc{|item|
       pbFadeOutIn(99999) { 
          pbDebugMenu
          @scene.pbRefresh
       }
    })
    You will probably want to make it a Key Item, otherwise it will be consumed when used.
     
    Is there any specific location that I should add it in, such as before "x" line?
    Edit: Disregard that, I got it working. However, I ran into an error.

    Script 'PokemonItemEffects' line 12: NoMethodError occured
    undefined method 'pbRefresh' for nil:NilClass
     
    Last edited:
    Back
    Top