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

[Scripting Question] How to make GIFs visually appear overlaid atop Pokemon with stat changes, or status conditions inflicted upon them, until these effects go away?

  • 429
    Posts
    4
    Years
    I felt like letting all status effects stack upon a pokemon at once and replacing that little BRN/PSN/whatever on the Pokemon's health bar with a new visual effect atop the Pokemon. Or layered onto his upper-right corner. The upper-left corner of the pokemon would be reserved for a visual indicator of what stats are raised or lowered: A small icon in a small square box followed by a number of chevrons indicating the level of stat modification going on.

    You know how Pokemon Mystery Dungeon has that purple skull appear over poisoned Pokemon?

    That's the kind of thing I had in mind. Representing status effects visually as GIFs spawned onto afflicted pokemon, and removed when these status effects are healed. Yellow jittering zigzags on the sides of a Paralyzed pokemon, a fire animation appearing on a Burned pokemon, a purple skull appearing in the top right corner, a big transparent ice block appearing on frozen pokemon, that sort of thing.

    Meanwhile a Pokemon with +2 Atk after a Swords Dance would have a sword icon in the top-left corner of his sprite (typically over any normal-sized pokemon's head) followed by a tall purple chevron to indicate +2. +1 would be indicated by a shorter purple chevron. +3 would be indicated by 1 tall Chevron followed by a small one. +4 would be indicated by 2 tall chevrons, and the maximum +6 would be indicated by 3 tall chevrons.
    A Pokemon with -2 SpDef would have that indicated by a blue icon of a heart followed by a downwards tall chevron, also in blue.
    ATK would be a sword icon, DEF would be a shield, SpAtk would be an eye, SpDef would be a heart, and Speed would be a wing. They'd be stacked vertically in that order, appearing or disappearing as necessary. No fancy code for making five slots, then having icons for these slots move to the highest available slot if it's unused.

    I was thinking I could draw and animate each of these visual elements myself, and then program them to appear on Pokemon that have these stat buffs/debuffs/status effects. I'll just need to know the code for making these GIFs appear when needed during battle, and where that code should go.
     
  • 8
    Posts
    3
    Years
    • Seen Jan 29, 2024
    Hi,

    I can answer this part:
    I'll just need to know the code for making these GIFs appear when needed during battle, and where that code should go.

    If you are using Vanilla Essentials is in "PokeBattle_SceneElements", in "def refresh" at line 205. The next example is just below the status icons part at line 257:
    Code:
    if @battler.stages[:ATTACK]>0
          imagePos.push(["Graphics/Pictures/Stats Change Overlay/atk",@spriteBaseX-50,50])
        end

    And will result in this:
    https://ibb.co/GQkkFSb

    A few notes:
    1- I put "[:ATTACK]>0" because I was testing with opponents with growl.
    2- The image can be a GIF, but i could not make it work (the animated part). Someone with more experience than me can help in this part.
    3- It should be [:ATTACK]>1, [:ATTACK]>2, etc, for each one and their respective image.
    4- If you are using ZUD or EBDX, you need to modify their code, not the one in the example. If you are using those, let me know and I can tell you where to look.
     
  • 429
    Posts
    4
    Years
    Sorry, this code isn't doing anything. No icon appears onscreen when my Pokemon's attack stat is raised by Swords Dance or Belly Drum. I've put it where you told me to put it but I'm not using ZUD or EBDX.

    The image is a .PNG file I drew myself and named AttackUp1.png. Should the image name end in .png when mentioned by my code? Am I supposed to do something with the Materials Manager in RPG Maker?

    This is what I currently have:

    Code:
    if @battler.stages[:ATTACK]>0
          imagePos.push(["Graphics/Pictures/StatUI/AttackUp1",@spriteBaseX-50,50])
        end
     
    Last edited:
  • 429
    Posts
    4
    Years
    I have attached my images of the Attack Up and Attack Down icons.
     

    Attachments

    • How to make GIFs visually appear overlaid atop Pokemon with stat changes, or status conditions inflicted upon them, until these effects go away?
      AttackDown1mini.png
      306 bytes · Views: 31
    • How to make GIFs visually appear overlaid atop Pokemon with stat changes, or status conditions inflicted upon them, until these effects go away?
      AttackUp1mini.png
      305 bytes · Views: 31
  • 429
    Posts
    4
    Years
    The images are finally showing up and in the correct place and I've moved them so the layer problem doesn't matter, but now they aren't updating according to my Pokemon Stats. Instead only the final one listed by the code appears, no matter what each Battler's stages are. How do I fix this?

    Code:
      def refresh
        self.bitmap.clear
        return if [email protected]
        textPos = []
        imagePos = []
        # Draw background panel
        self.bitmap.blt(0,0,@databoxBitmap.bitmap,Rect.new(0,0,@databoxBitmap.width,@databoxBitmap.height))
    #STAT DISPLAY CODE 2022 MAY 30
        if @battler.stages[:ATTACK]=0
          imagePos.push(["Graphics/Pictures/StatsIconCustom/AttackUp0micro",@spriteBaseX+0,40])
        end
    if @battler.stages[:ATTACK]=1
          imagePos.push(["Graphics/Pictures/StatsIconCustom/AttackUp1micro",@spriteBaseX+0,40])
        end
        if @battler.stages[:ATTACK]=2
          imagePos.push(["Graphics/Pictures/StatsIconCustom/AttackUp2micro",@spriteBaseX+0,40])
        end
            if @battler.stages[:ATTACK]=2
          imagePos.push(["Graphics/Pictures/StatsIconCustom/AttackUp2micro",@spriteBaseX+0,40])
        end
            if @battler.stages[:ATTACK]=3
          imagePos.push(["Graphics/Pictures/StatsIconCustom/AttackUp3micro",@spriteBaseX+0,40])
        end
            if @battler.stages[:ATTACK]=4
          imagePos.push(["Graphics/Pictures/StatsIconCustom/AttackUp4micro",@spriteBaseX+0,40])
        end
            if @battler.stages[:ATTACK]=5
          imagePos.push(["Graphics/Pictures/StatsIconCustom/AttackUp5micro",@spriteBaseX+0,40])
        end
            if @battler.stages[:ATTACK]=6
          imagePos.push(["Graphics/Pictures/StatsIconCustom/AttackUp6micro",@spriteBaseX+0,40])
        end
            if @battler.stages[:ATTACK]=0
          imagePos.push(["Graphics/Pictures/StatsIconCustom/AttackUp0micro",@spriteBaseX+0,40])
        end
     
  • 8
    Posts
    3
    Years
    • Seen Jan 29, 2024
    Sorry that I respond a little late, was busy.

    At
    Code:
    if @battler.stages[:ATTACK]=0
    You are assigning the value 0, instead should be:
    Code:
    if @battler.stages[:ATTACK]==0

    And the example have multiple "IF" repeated in "=0" and "=2".

    I can reply later how I have it right now so it can guide you to work in different stages.
     
  • 429
    Posts
    4
    Years
    Am I doing something wrong here? The Pokemon stat icons still aren't changing according to their current stat levels ingame. The "stat level 0" icon appears correctly but they're supposed to swap out for different icons whenever the stats are raised or lowered, to visually display the stats.

    Code:
    if @battler.stages[:ATTACK]==0
          imagePos.push(["Graphics/Pictures/Jason/AttackUp0micro",@spriteBaseX+2,34])#X+2,36])
    @battler.stages[:ATTACK]==1
          imagePos.push(["Graphics/Pictures/Jason/AttackUp1micro",@spriteBaseX+2,34])
    @battler.stages[:ATTACK]==2
          imagePos.push(["Graphics/Pictures/Jason/AttackUp2micro",@spriteBaseX+2,34])
    @battler.stages[:ATTACK]==3
          imagePos.push(["Graphics/Pictures/Jason/AttackUp3micro",@spriteBaseX+2,34])
    @battler.stages[:ATTACK]==4
          imagePos.push(["Graphics/Pictures/Jason/AttackUp4micro",@spriteBaseX+2,34])
    @battler.stages[:ATTACK]==5
          imagePos.push(["Graphics/Pictures/Jason/AttackUp5micro",@spriteBaseX+2,34])
    @battler.stages[:ATTACK]==6
          imagePos.push(["Graphics/Pictures/Jason/AttackUp6micro",@spriteBaseX+2,34])
    end
            if @battler.stages[:DEFENSE]==0
          imagePos.push(["Graphics/Pictures/Jason/DefenseUp0micro",@spriteBaseX+20,34])
        end
                if @battler.stages[:SPECIAL_ATTACK]==0
          imagePos.push(["Graphics/Pictures/Jason/SpecAttackUp0micro",@spriteBaseX+38,34])
        end
                    if @battler.stages[:SPECIAL_DEFENSE]==0
          imagePos.push(["Graphics/Pictures/Jason/SpecDefUp0micro",@spriteBaseX+56,34])
        end
                    if @battler.stages[:SPEED]==0
          imagePos.push(["Graphics/Pictures/Jason/SpeedUp0micro",@spriteBaseX+74,34])
        end
     
    Back
    Top