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

[Custom Feature Question] Showing stat changes in Battle (like pokemon showdown)

  • 15
    Posts
    4
    Years
    • Seen Nov 1, 2020
    Hi, I am new to making pokemon fan games and am wondering on how to show statistic changes in battle when facing pokemon like in pokemon showdown? (image down below - the exeggutor) I have very little coding knowledge and am a noob at making games in general. Help will be much appreciated!
     

    Attachments

    • Showing stat changes in Battle (like pokemon showdown)
      2en2jb2ugop21.jpg
      585.8 KB · Views: 122
  • 15
    Posts
    4
    Years
    • Seen Nov 1, 2020
    Sorry that I accidentally posted this post twice. Thought it didn't post the first time
     
  • 465
    Posts
    7
    Years
    • Seen today
    its very much possible but not in the showdown way as thats a completely different software.

    i've done it myself, while not the best coding, its possible.

    Showing stat changes in Battle (like pokemon showdown)


    All of this is my own UI. but the biigest issue is if you want it above or below the hp bar.

    if above you have to completely redo the size of the sprites and the positioning as by default they just wont appear even though they should (as it uses the actual size of the graphic (the hp bar) to show it and cant show out of its allowed space. below might be easier as you can just extend the y size of the base graphic. the rest is rather simple.

    note: while mine is in ebs it SHOULD work in base maybe even simplier but im not 100% sure.
     
  • 465
    Posts
    7
    Years
    • Seen today
    hmm well, its mostly, having stuff display like when its burnt but checking for what the stat is at.

    basically along the lines of:
    Code:
          if @battler.stages[PBStats::SPATK]==1
            @sprites["text"].bitmap.blt(36-24+66,0-12+40-28,pbBitmap(@path+"SpAtkUp1.png"),Rect.new(0,0,66,14))
          elsif @battler.stages[PBStats::SPATK]==2
            @sprites["text"].bitmap.blt(36-24+66,0-12+40-28,pbBitmap(@path+"SpAtkUp2.png"),Rect.new(0,0,66,14))
          elsif @battler.stages[PBStats::SPATK]==3
            @sprites["text"].bitmap.blt(36-24+66,0-12+40-28,pbBitmap(@path+"SpAtkUp3.png"),Rect.new(0,0,66,14))
          elsif @battler.stages[PBStats::SPATK]==4
            @sprites["text"].bitmap.blt(36-24+66,0-12+40-28,pbBitmap(@path+"SpAtkUp4.png"),Rect.new(0,0,66,14))
          elsif @battler.stages[PBStats::SPATK]==5
            @sprites["text"].bitmap.blt(36-24+66,0-12+40-28,pbBitmap(@path+"SpAtkUp5.png"),Rect.new(0,0,66,14))
          elsif @battler.stages[PBStats::SPATK]==6
            @sprites["text"].bitmap.blt(36-24+66,0-12+40-28,pbBitmap(@path+"SpAtkUp6.png"),Rect.new(0,0,66,14))
    ofc not the most compact or sleek code, but moreso a segment of what i did.
    again using the text sprite kinda limits it to the hp bar size.

    however it might be easier in base essentials, if you look at the bit for "battleboxowned.png" in PokeBattle_Scene, and replicate the above but matching it (so over @sprites["text"] use imagepos.push)

    will also need to define the path (most likely to pictures or pictures/its own folder)
    and have one for each (could find your own way to have a sprite for each stat, but just doing it simplistic here)
     
  • 1
    Posts
    4
    Years
    • Seen Aug 13, 2020
    hmm well, its mostly, having stuff display like when its burnt but checking for what the stat is at.

    basically along the lines of:
    Code:
          if @battler.stages[PBStats::SPATK]==1
            @sprites["text"].bitmap.blt(36-24+66,0-12+40-28,pbBitmap(@path+"SpAtkUp1.png"),Rect.new(0,0,66,14))
          elsif @battler.stages[PBStats::SPATK]==2
            @sprites["text"].bitmap.blt(36-24+66,0-12+40-28,pbBitmap(@path+"SpAtkUp2.png"),Rect.new(0,0,66,14))
          elsif @battler.stages[PBStats::SPATK]==3
            @sprites["text"].bitmap.blt(36-24+66,0-12+40-28,pbBitmap(@path+"SpAtkUp3.png"),Rect.new(0,0,66,14))
          elsif @battler.stages[PBStats::SPATK]==4
            @sprites["text"].bitmap.blt(36-24+66,0-12+40-28,pbBitmap(@path+"SpAtkUp4.png"),Rect.new(0,0,66,14))
          elsif @battler.stages[PBStats::SPATK]==5
            @sprites["text"].bitmap.blt(36-24+66,0-12+40-28,pbBitmap(@path+"SpAtkUp5.png"),Rect.new(0,0,66,14))
          elsif @battler.stages[PBStats::SPATK]==6
            @sprites["text"].bitmap.blt(36-24+66,0-12+40-28,pbBitmap(@path+"SpAtkUp6.png"),Rect.new(0,0,66,14))
    ofc not the most compact or sleek code, but moreso a segment of what i did.
    again using the text sprite kinda limits it to the hp bar size.

    however it might be easier in base essentials, if you look at the bit for "battleboxowned.png" in PokeBattle_Scene, and replicate the above but matching it (so over @sprites["text"] use imagepos.push)

    will also need to define the path (most likely to pictures or pictures/its own folder)
    and have one for each (could find your own way to have a sprite for each stat, but just doing it simplistic here)

    Where would exactly even put this, like in which part in the PokeBattle_Scene?
    And also would you replace the text with the "SpAtkUp1.png"?
    Asking this because when trying the code and putting it in the PokeBattle_Scene, it comes up with a syntax error when trying to playtest.
    I am also new in making pokemon games with little coding knowledge.
     
    Back
    Top