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

Transition animations for initiating battles not showing

  • 115
    Posts
    9
    Years
    • Seen Nov 17, 2023
    Essentials comes with these transition animations that play when a battle starts:

    Spoiler:

    I'm having an issue where my game isn't playing these animations, for wild battles or trainer battles. Which script controls when these animations show up? And what part of the script could be preventing these animations from showing?


    UPDATE:
    So I found the section of the PField script that handles transitions, but I couldn't figure out what was preventing the transition animations from playing. I know that it has something to do with this section of code here...
    Code:
    if !handled
        if Sprite.method_defined?(:wave_amp) && rand(15)==0
          viewport.color=Color.new(0,0,0,255)
          sprite = Sprite.new
          bitmap=Graphics.snap_to_bitmap
          bm=bitmap.clone
          sprite.z=99999
          sprite.bitmap = bm
          sprite.wave_speed=500
          for i in 0..25
            sprite.opacity-=10
            sprite.wave_amp+=60
            sprite.update
            sprite.wave_speed+=30
            2.times do
              Graphics.update
            end
          end
          bitmap.dispose
          bm.dispose
          sprite.dispose
        elsif Bitmap.method_defined?(:radial_blur) && rand(15)==0
          viewport.color=Color.new(0,0,0,255)
          sprite = Sprite.new
          bitmap=Graphics.snap_to_bitmap
          bm=bitmap.clone
          sprite.z=99999
          sprite.bitmap = bm
          for i in 0..15
            bm.radial_blur(i,2)
            sprite.opacity-=15
            2.times do
              Graphics.update
            end
          end
          bitmap.dispose
          bm.dispose
          sprite.dispose
        elsif rand(10)==0 # Custom transition method
          scroll=["ScrollDown","ScrollLeft","ScrollRight","ScrollUp",
                  "ScrollDownRight","ScrollDownLeft","ScrollUpRight","ScrollUpLeft"]
          Graphics.freeze
          viewport.color=Color.new(0,0,0,255)
          Graphics.transition(50,sprintf("Graphics/Transitions/%s",scroll[rand(scroll.length)]))
        else
          transitions=[
             # Transitions with graphic files
             "021-Normal01","022-Normal02",
             "Battle","battle1","battle2","battle3","battle4",
             "computertr","computertrclose",
             "hexatr","hexatrc","hexatzr",
             "Image1","Image2","Image3","Image4",
             # Custom transition methods
             "Splash","Random_stripe_v","Random_stripe_h",
             "RotatingPieces","ShrinkingPieces",
             "BreakingGlass","Mosaic","zoomin"
          ]
          rnd=rand(transitions.length)
          #Graphics.freeze
          viewport.color=Color.new(0,0,0,255)
          Graphics.transition(40,sprintf("Graphics/Transitions/%s",transitions[rnd]))
        end
        5.times do
          Graphics.update
          Input.update
          pbUpdateSceneMap
        end
      end
      pbPushFade
      yield if block_given?
      pbPopFade
      if $game_system && $game_system.is_a?(Game_System)
        $game_system.bgm_resume(playingBGM)
        $game_system.bgs_resume(playingBGS)
      end
      $PokemonGlobal.nextBattleBGM=nil
      $PokemonGlobal.nextBattleME=nil
      $PokemonGlobal.nextBattleBack=nil
      $PokemonEncounters.clearStepCount
      for j in 0..17
        viewport.color=Color.new(0,0,0,(17-j)*15)
        Graphics.update
        Input.update
        pbUpdateSceneMap
      end
      viewport.dispose
    end
    ...specifically the Graphics.transition part. But I'm not sure what I need to do to get the animations working. Right now when I enter a battle the screen just flashes 3 times and then goes black (instead of playing the animation) until the battle scene opens up.


    Transition animations for initiating battles not showing
     
    Last edited:
  • 296
    Posts
    9
    Years
    As you can see, there is an "else" statement. Before this the game manages other condition.
    Open this link, in the wiki, that contains "Versus animation".
     
  • 115
    Posts
    9
    Years
    • Seen Nov 17, 2023
    As you can see, there is an "else" statement. Before this the game manages other condition.
    Open this link, in the wiki, that contains "Versus animation".



    This isn't for the regular wild pokemon and trainer encounters though. It isn't a versus animation problem, it's a problem with the animations like battle1, battle2, etc. in the transitions folder not playing. I put the entire block of code that I believe is causing the problem in the first post, along with a gif that shows the issue better.
     
  • 115
    Posts
    9
    Years
    • Seen Nov 17, 2023
    Can you post your transition picture?

    You mean the graphics that aren't showing? There's a bunch of them, because they're supposed to alternate randomly. Here's some of them:
    Spoiler:

    There's also some hexagon patterns and other pictures, I posted a picture of my Graphics folder in the OP that shows them all.
     
  • 296
    Posts
    9
    Years
    Are you using 16.2 version? In this case, make a backup copy of your script.rxdata file and copy-paste v15 transition script section into your game.
     
  • 115
    Posts
    9
    Years
    • Seen Nov 17, 2023
    Are you using 16.2 version? In this case, make a backup copy of your script.rxdata file and copy-paste v15 transition script section into your game.



    I believe I'm using either version 14 or 15. I tried copy pasting a previous version of the script, but it is still giving me the same problem. Is there any other script besides PField that deals with the transitions?
     
  • 115
    Posts
    9
    Years
    • Seen Nov 17, 2023
    I don't know if you did further edits.



    The only edit that I would think could affect it is when I changed the time it takes for a wild pokemon/trainer to slide across the screen after the battle initiates. Default essentials had them slide out way too fast for my liking so I slowed it down a few frames. Not sure if that would affect the transitions at all though.


    Other than that, I'm out of ideas. I know updating to the current version of essentials is usually the answer most of the time, but I really hate having to do it over and over because all it does is take away time I could be spending on making progress with the actual game instead of overhauling the entire engine for the sake of a few organizational changes in code and minor content updates. I've already updated twice and I'm really wishing there was an easier way.
     
  • 115
    Posts
    9
    Years
    • Seen Nov 17, 2023
    I must have left that in there when I was trying to figure out what was causing the issue. Uncommenting it didn't do anything, unfortunately. The screen still goes black when the animation is supposed to show.
     
  • 296
    Posts
    9
    Years
    I did a double check to compare a clean Essential script with yours: the only difference was the "#", before Graphics.freeze.
    My only alternative is that, if you did an upgrade of game version (e.g. v14 to v15) you messed up script codes.
     
  • 115
    Posts
    9
    Years
    • Seen Nov 17, 2023
    I did a double check to compare a clean Essential script with yours: the only difference was the "#", before Graphics.freeze.
    My only alternative is that, if you did an upgrade of game version (e.g. v14 to v15) you messed up script codes.



    Well, thank you for trying to help. I appreciate it.

    You should use a difference check tool to see what changes you made between a clean essentials and your project.



    Definitely helpful, but since replacing my PField script with a clean version produces the same issue, I'm thinking another script could be causing the problem. I don't know what else would cause the battle transitions to mess up though.
     
    Last edited by a moderator:

    Telemetius

    Tele*
  • 267
    Posts
    9
    Years
    Definitely helpful, but since replacing my PField script with a clean version produces the same issue, I'm thinking another script could be causing the problem. I don't know what else would cause the battle transitions to mess up though.

    Be a little more specific. Do you have any custom scripts? Have you experimented with anything that involves battles?

    If nothing works and you can't remember what you did your last resort should be checking the differences of all of your scripts.
     
  • 115
    Posts
    9
    Years
    • Seen Nov 17, 2023
    Be a little more specific. Do you have any custom scripts? Have you experimented with anything that involves battles?

    If nothing works and you can't remember what you did your last resort should be checking the differences of all of your scripts.



    I've made small adjustments here and there, yes. I haven't documented all changes though, so comparing my scripts seems to be the only option left. My point is that if an unedited copy of the PField script produces the same issue as my version of the script, it has to be another script causing the problem, because I've tested and seen the transition animation work on the fresh copy of essentials.
     
    Back
    Top