The PokéCommunity Forums Fan Games Game Development Scripts, Tutorials & Tools
Essentials Script Modify Screen Save

Scripts, Tutorials & Tools This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Reply
 
Thread Tools
  #1    
Old June 24th, 2018 (4:53 AM). Edited July 2nd, 2018 by bo4p5687.
bo4p5687 bo4p5687 is offline
     
    Join Date: May 2018
    Location: Việt Nam (Vietnam)
    Gender: Male
    Nature: Relaxed
    Posts: 75
    One day, you want change save screen like the images, the contents, etc but you don't know how to do.
    This scipt can help you to do this.

    Graphic:

    The images, which I used, are 366x247. ( Name is "Save" )
    You should put image in folder: Graphics\Pictures\SaveScreen
    This is my graphic, you can use this:
    Save


    Code:

    Code:
    #===============================================================================
    #
    # To this script works, put it above main.
    #
    #===============================================================================
    
    class PokemonSave_Scene 
    
      def pbStartScreen
        @viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
        @viewport.z=99999
        @sprites={}
            
        setSprite("savescreen","Save",0,0,255)
    
        if $Trainer.party.size > 0
          for i in 0...6
            @sprites["party#{i}"] = PokemonIconSprite.new($Trainer.party[i],@viewport)
            @sprites["party#{i}"].x = 151*2+33*2*(i&1) - 91
            @sprites["party#{i}"].y = 36*2+25*2*(i/2) + 8
            @sprites["party#{i}"].z = 99999
          end
        end
                
        meta=pbGetMetadata(0,MetadataPlayerA+$PokemonGlobal.playerID)
        if meta
          @sprites["shadow"]=IconSprite.new(0,0,@viewport)
          @sprites["shadow"].setBitmap("Graphics/Pictures/Naming/icon_shadow")
          @sprites["shadow"].x=262
          @sprites["shadow"].y=36
          filename=pbGetPlayerCharset(meta,1)
          @sprites["character"]=TrainerWalkingCharSprite.new(filename,@viewport)
          [email protected]["character"].bitmap.width
          [email protected]["character"].bitmap.height
          @sprites["character"].x = 268
          @sprites["character"].y = 0
        end
        
        totalsec = Graphics.frame_count / Graphics.frame_rate
        hour = totalsec / 60 / 60
        min = totalsec / 60 % 60
        hourreal = pbGetTimeNow.hour
        minreal = pbGetTimeNow.min
        mapname = $game_map.name
        
    #    Example: when name of map is too long -> change sprite
    #    if mapname.length <= 20
    #      @sprites ["savescreen"].opacity = 255
    #       add sprites ...
    #    else
    #      @sprites ["savescreen"].opacity = 0
    #    end
    
        @sprites["savescreen2"] = Sprite.new(@viewport)
        @sprites["savescreen2"].bitmap = Bitmap.new(Graphics.width, Graphics.height)
        @sprites["savescreen2"].bitmap.clear
        
        pbSetSystemFont(@sprites["savescreen2"].bitmap)
       
        textposition = []
        # * Real Time #
        textposition.push([_INTL("{1} - {2} - {3}",Time.now.day.to_i,Time.now.month.to_i,Time.now.year.to_i),5,7,0,Color.new(198,228,61),Color.new(158,180,57)])
        if hourreal >= 10
          if minreal >= 10
            textposition.push([_INTL("{1}:{2}",Time.now.hour.to_i,Time.now.min.to_i),167,7,2,Color.new(246,211,105),Color.new(212,183,96)])
          else 
            textposition.push([_INTL("{1}:0{2}",Time.now.hour.to_i,Time.now.min.to_i),167,7,2,Color.new(246,211,105),Color.new(212,183,96)])
          end
        else
          if minreal >= 10
            textposition.push([_INTL("0{1}:{2}",Time.now.hour.to_i,Time.now.min.to_i),167,7,2,Color.new(246,211,105),Color.new(212,183,96)])
          else
            textposition.push([_INTL("0{1}:0{2}",Time.now.hour.to_i,Time.now.min.to_i),167,7,2,Color.new(246,211,105),Color.new(212,183,96)])
          end
        end
        # * Seasons #
        if pbIsSpring
          textposition.push([_INTL("Spring"),68,40,0,Color.new(222,247,107),Color.new(189,210,92)])
        elsif pbIsSummer
          textposition.push([_INTL("Summer"),68,40,0,Color.new(100,225,240),Color.new(97,195,207)])      
        elsif pbIsAutumn
          textposition.push([_INTL("Autumn"),68,40,0,Color.new(237,119,119),Color.new(188,65,65)])            
        elsif pbIsWinter
          textposition.push([_INTL("Winter"),68,40,0,Color.new(232,222,232),Color.new(246,228,247)])            
        end
        # * Badge Number #
        textposition.push([_INTL("Badges: {1}",$Trainer.numbadges.to_s),15,110,0,Color.new(232,232,232),Color.new(136,136,136)])
        # * Money #
        textposition.push([_INTL("Money: ${1}",$Trainer.money.to_s),15,142,0,Color.new(232,232,232),Color.new(136,136,136)])
        # * Pokedex #
        if $Trainer.pokedex
          textposition.push([_INTL("Pokédex: {1}/{2}",$Trainer.pokedexOwned.to_s,$Trainer.pokedexSeen.to_s),15,209,0,Color.new(232,232,232),Color.new(136,136,136)])
        end
        # * Time play #
        if hour>0 
          if min>0
            textposition.push([_INTL("Time: {1}h {2}m",hour,min),15,175,0,Color.new(232,232,232),Color.new(136,136,136)])
          else 
            textposition.push([_INTL("Time: {1}h 0{2}m",hour,min),15,175,0,Color.new(232,232,232),Color.new(136,136,136)])
          end
        else
          textposition.push([_INTL("Time: 0h {1}m",min),15,175,0,Color.new(232,232,232),Color.new(136,136,136)])
        end
        if $Trainer.isMale?
          textposition.push([$Trainer.name,283,54,2,Color.new(56,160,248),Color.new(56,104,168)]) # trainer' name
          textposition.push([mapname,98,76,2,Color.new(56,160,248),Color.new(56,104,168)]) # map' name
        else
          textposition.push([$Trainer.name,283,54,2,Color.new(240,72,88),Color.new(160,64,64)]) # trainer' name
          textposition.push([mapname,98,76,2,Color.new(240,72,88),Color.new(160,64,64)]) # map' name
        end
      
        pbDrawTextPositions(@sprites["savescreen2"].bitmap,textposition)
      end
      
      def setSprite(name,bitmap,x,y,opacity=255)  
        @sprites["#{name}"]=Sprite.new(@viewport)
        @sprites["#{name}"].bitmap=BitmapCache.load_bitmap("Graphics/Pictures/SaveScreen/#{bitmap}")
        @sprites["#{name}"].x=x
        @sprites["#{name}"].y=y
        @sprites["#{name}"].opacity = opacity
      end
        
      def pbEndScreen
        pbDisposeSpriteHash(@sprites)
        @viewport.dispose
      end
      
    end
    Reply With Quote
      #2    
    Old September 26th, 2018 (7:19 PM).
    WolfPP's Avatar
    WolfPP WolfPP is offline
       
      Join Date: Aug 2018
      Location: Brazil
      Gender: Male
      Nature: Jolly
      Posts: 147
      So beautifull! Ty ty for share.

      And did you make a Load Screen too? I want to learn how create lol or have a base, like your save screen i will make to me.
      I want to make a load screen showin your party with overworld front sprite, like Phoenix Rising. Such amazing!
      Reply With Quote
        #3    
      Old September 28th, 2018 (5:27 AM).
      bo4p5687 bo4p5687 is offline
         
        Join Date: May 2018
        Location: Việt Nam (Vietnam)
        Gender: Male
        Nature: Relaxed
        Posts: 75
        Quote:
        Originally Posted by WolfPP View Post
        So beautifull! Ty ty for share.

        And did you make a Load Screen too? I want to learn how create lol or have a base, like your save screen i will make to me.
        I want to make a load screen showin your party with overworld front sprite, like Phoenix Rising. Such amazing!
        You can make this in PScreen_Load.
        Reply With Quote
        Reply

        Quick Reply

        Join the conversation!

        Create an account to post a reply in this thread, participate in other discussions, and more!

        Create a PokéCommunity Account
        Thread Tools

        Posting Rules
        You may not post new threads
        You may not post replies
        You may not post attachments
        You may not edit your posts

        BB code is On
        Smilies are On
        [IMG] code is On
        HTML code is Off

        Forum Jump


        All times are GMT -8. The time now is 2:39 PM.