• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Scripting Question] Adding sound effects for potion use and leveling up

  • 37
    Posts
    8
    Years
    • Seen Jan 21, 2021
    I'm surprised these basic sounds aren't already implemented; where and how would I add the pbSEPlay("____") in the script to add the sound for these situations? I found the list of healing items in Pitem_itemEffects but was wondering if there's a way to affect them all at once, and I added a SE for leveling up via Rare Candy but I'm unsure where to add it for lvl ups in general. Any help is much appreciated.

    Also, anyone know where to find the classic potion use SE? (gen 3 or later)
     
    Last edited:
    All healing items seem to call "pbHPItem", which in turn calls "pbItemRestoreHP", so you could try adding it to the top of the function "def pbItemRestoreHP(pkmn,restoreHP)" in script section PItem_Items. As for in-battle level ups, you have to find "def pbGainExpOne(idxParty,defeatedBattler,numPartic,expShare,expAll,showMessages=true)" in script section Battle_ExpAndMoveLearning and add your code just above this line:
    Code:
    pbDisplayPaused(_INTL("{1} grew to Lv. {2}!",pkmn.name,curLevel))
     
    It's not surprising. You need to add them to the Animations that you use for those situations.
     
    All healing items seem to call "pbHPItem", which in turn calls "pbItemRestoreHP", so you could try adding it to the top of the function "def pbItemRestoreHP(pkmn,restoreHP)" in script section PItem_Items. As for in-battle level ups, you have to find "def pbGainExpOne(idxParty,defeatedBattler,numPartic,expShare,expAll,showMessages=true)" in script section Battle_ExpAndMoveLearning and add your code just above this line:
    Code:
    pbDisplayPaused(_INTL("{1} grew to Lv. {2}!",pkmn.name,curLevel))

    Great, this worked.

    Do you know the cause of the scratchy reverb sound after so many sound effects (e.g. saving) in v18 and how to fix it? I don't recall this being in v16.
     
    Great, this worked.

    Do you know the cause of the scratchy reverb sound after so many sound effects (e.g. saving) in v18 and how to fix it? I don't recall this being in v16.

    It's not a bug. It's the sfx-es themselves. You can replace then with your own.
     
    It's not a bug. It's the sfx-es themselves. You can replace then with your own.

    Yeah I figured that was probably the case, but the sfx doesn't have the reverb when I listen to it outside the game, and neither lowering the audio file's volume and then saving it again nor replacing it with similar ones I've found online seems to help. Interestingly, it only happens in some map BGMs, typically new ones I've added, but lowering the volume on those doesn't fix things either.
     
    Back
    Top