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

How to change battle music based on Player Character

  • 39
    Posts
    17
    Years
    • Seen Feb 28, 2024
    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!
     

    Lord Varion

    Guess who's back?
  • 2,642
    Posts
    15
    Years
    • Age 29
    • Seen Jan 6, 2015
    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:

    FL

    Pokémon Island Creator
  • 2,454
    Posts
    13
    Years
    • Seen May 25, 2024
    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
     
  • 39
    Posts
    17
    Years
    • Seen Feb 28, 2024
    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
     

    FL

    Pokémon Island Creator
  • 2,454
    Posts
    13
    Years
    • Seen May 25, 2024
    Undo your changes in trainers battles musics and try changing the both:
    Code:
    # Check global metadata
    music=pbGetMetadata(0,MetadataTrainerBattleBGM)
    if music && music!=""
      ret=pbStringToAudioFile(music)
    end
    in PokemonUtilities to 'ret=pbGetWildBattleBGM(0)'
     
    Back
    Top