• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Dawn, Serena, Hilda, Wes - 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.

Special Battle Transitions

In my game, certain event battles (Legendaries) will have special intro animations. I've managed to devise a rather... backwards method to doing it, but I'm not overly pleased with how I did it.
[PokeCommunity.com] Special Battle Transitions


I'm still not very good at scripting and I've tried poking around the scripts for some sort of idea what to do, but can't seem to get a footing. My idea was to make it play like a battle transition, but I'm not sure how to do that because I'm unsure of how the transitions are stored and handled. I know where they are, but I can't figure out exactly how they work in the scripts.

What I'm trying to do is sorta make the event be handled similarly to how battle backgrounds are I guess (it's the only example I can think of). When a special battle is up, you call for script "EventTransition(Articuno)", and it checks a folder (Preferably a nested folder in transitions\) for files named Transition_Articuno1, Transition_Articuno2, and Transition_Articuno3.

This is hard to verbalize because I'm really unfamiliar with how scripts work, and I'm sure I could attempt to cobble together what I need if I could only figure out how exactly to get started and where to look. Hopefully someone can point me in the right direction!
 
I don't understand what you mean, but I think the event works well... What does it matter how it looks in the event?

Maybe you want something different than you got there, I don't know.
 
Primarily, I want optimization. But the really annoying thing is the music issue when the battle ends; Because of how I made the event, I had to start playing the music before the battle actually started processing. When the battle ended, it would play the bgm I told it to play before the battle until I forcefully told it to stop. I told it to stop right after the battle ended, but it lingers for a few frames before it actually cuts out, visible in the video around 1:17.
That's primarily my largest issue. I don't think I can do this without making a custom transition animation for the battle, and I'm not sure how to go about doing that. Granted, I can live without it, it just feels... sloppy, otherwise.
 
In the older official games, the music did the exact same thing... So I think it's fine, otherwise, you'll probably want the screen to stay darker for a few more frames, as if to say "game processing outcome"... But I personally think it looks fine, otherwise I'd look where BGM starts and stops in the battle scripts and use an if $game_switches[142], to play your music file for the new battle instead of the current one for standard battles and you can also do the same thing for any other battles, then just remove the BGM from the event all together.
 
The issue isn't the music during battle, it's that I have to load the track before the battle starts processing (Specifically, when I start doing the cutscene, which is all handled event-side). Perhaps I'm just making too big a deal out of this; it is fine as it is so I'm not really sure why I'm so fixated on getting it flawless when it's beyond my capability.
 
Sorry my mistake, I probably should've pointed you in a direction... I wasn't referring to PokeBattle_Battle... I was referring to where the battle gets the BGM for the battle...
(I'm using v14 here so things may be somewhat different, I don't know!)
Code:
def pbGetWildBattleBGM(species)
  if $PokemonGlobal.nextBattleBGM
    return $PokemonGlobal.nextBattleBGM.clone
  end
  ret=nil
  if !ret && $game_map
    # Check map-specific metadata
    music=pbGetMetadata($game_map.map_id,MetadataMapWildBattleBGM)
    if music && music!=""
      ret=pbStringToAudioFile(music)
    end
  end
  if !ret
    # Check global metadata
    music=pbGetMetadata(0,MetadataWildBattleBGM)
    if music && music!=""
      ret=pbStringToAudioFile(music)
    end
  end
  ret=pbStringToAudioFile("002-Battle02") if !ret
  return ret
end
This is where I would edit to make it work how I want... This would start the BGM at the "correct" time and finish at the "correct" time, with no going onto the main world map.
Is that what you mean?
 
Back
Top