• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
5
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.
     
    1,682
    Posts
    8
    Years
    • Seen today
    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