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

How to change battle music based on Player Character

  • 38
    Posts
    18
    Years
    • Seen Apr 18, 2025
    Hey.

    I know this should be possible, and hopefully easy, but is it possible to have multiple defined Wild Battle BGMs and Trainer Battle BGMs, and have the appropriate one play depending on your character?

    For example, if you are the male character, the battle music is one song, but if you are the female character, it is another song?

    Failing that, even a way to change it right away in battle would work - I could just have the default song be empty.

    Thanks a lot!
     
    In the MetaData for maps you can change the Wild BGM theme.
    And when editing trainer Classes you can set certain music. So two different rival themes for two rivals.
     
    Last edited:
    Untested. Change the 'def pbGetWildBattleBGM(species)' to
    Code:
    def pbGetWildBattleBGM(species)
      if $PokemonGlobal.nextBattleBGM
        return $PokemonGlobal.nextBattleBGM.clone
      end
      playertrainer=pbGetPlayerTrainerType
      music = case playertrainer
        when 0 then "RBY_-_Wild" # First male trainer
        when 1 then "RSE_-_Wild" # First female trainer
        when 2 then "DPP_-_Wild"
      end
      ret=nil
      ret=pbStringToAudioFile(music) if music && music!=""
      ret=pbStringToAudioFile("002-Battle02") if !ret
      return ret
    end
     
    Thanks a lot. The script works fine.

    I managed to edit it to work for trainer battles as well, but it plays for Gym Leaders and other trainers with special music, overriding their songs.

    SO

    - I figured, I would turn a switch on. And if that switch is on, then the script would not run.

    ...I messed around for a while, but couldn't figure out how to do that. It shouldn't be too hard, I think?

    I've spent a lot of time on RPG Maker 2000 so I understand RPG maker, but not the scripting.

    Thanks a lot again
     
    Back
    Top