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

[Custom Feature Question] How can I deactivate the original item ME sound for item balls?

AwesomeJr44

Lechonker
  • 15
    Posts
    6
    Years
    • Seen Aug 15, 2023
    I have different ME sounds for standard items, key items, and TMs, but whenever I pick up an item ball, it still plays the original item ball ME sound.
    I want to deactivate the original ME sound, and replace it with one of the new sounds depending on what type of item is picked up.
    If the original ME was silenced, I could just use the 'play ME' event command to play the new ME, but I don't know how to do that.
     
    You'll want to edit def Kernel.pbItemBall and def Kernel.pbReceiveItem. Those two methods are in the bottom of PField_Field.
    Don't get overwhelmed by the code, as it's not too bad. We just need to add a couple more elsifs like how TMs/HMs are done.
    Key items are checked with pbIsKeyItem?(item), so a simple code block like
    Code:
      elsif pbIsMachine?(item)   # TM or HM
        Kernel.pbMessage(_INTL("\\me[TM get]You obtained \\c[1]{1} {2}\\c[0]!\\wtnp[30]",itemname,PBMoves.getName(pbGetMachine(item))))
      elsif pbIsKeyItem?(item)   # Key Item
        Kernel.pbMessage(_INTL("\\me[Key Item get]You obtained the \\c[1]{1}\\c[0]!\\wtnp[30]",itemname))
    Similar idea for the rest.
    The \\me[Item get] works the same way as the regular message stuff, so you just stick the filename in the brackets, and it'll play your ME, no problem!

    I'll leave you with this, for you to experiment with, and feel free to ask for clarification if need be.
     
    Back
    Top