• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • The site will be down for planned maintenance beginning 2PM Eastern Time. We apologize for any inconvenience this causes!
  • 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

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