The PokéCommunity Forums Fan Games Game Development Scripts, Tutorials & Tools
Essentials Script Simple HUD Optimized

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
  #26    
Old June 24th, 2017 (12:31 PM).
FL's Avatar
FL FL is offline
Pokémon Island Creator
     
    Join Date: Sep 2010
    Gender: Male
    Posts: 1,769
    Quote:
    Originally Posted by GT-Baka View Post
    This is great and I love using this with the party rotation key, however when I use the transparent HUDBar it becomes solid as I walk on a map with map connections. Is there a fix for this?
    Quote:
    Originally Posted by FL View Post
    Quote:
    Originally Posted by Jazerules View Post
    Also you are correct using transparent background showed unwanted interface, if we can only find the script for map interface and restrict the HUD to refresh when near?
    I aren't sure if I understand your question. The way that Spriteset_Map draw things isn't that simple. Essentials connections load maps when you are near, so the HUDs (since there is one per Spriteset_Map instance) are already drawed only when you're near.

    The solution is to change the way that the HUD (or pictures) are loaded, stopping using the Spriteset_Map, so always only one HUD (and background) is loaded. I guess that I can use z as 99999 instead of a viewport, but this also requires to bind the create/disponse methods in the correct entrypoints.
    -------------------------
    __________________
    Reply With Quote
      #27    
    Old June 25th, 2017 (1:30 PM).
    superx18 superx18 is offline
    Welcome!
       
      Join Date: May 2017
      Posts: 2
      So cool! ^^ thanks!
      __________________
      Mua trang trí nội thất hoàn thiện nhất chỉ tại chogoviet.net
      Reply With Quote
        #28    
      Old August 3rd, 2017 (6:02 PM).
      PoCitMonster's Avatar
      PoCitMonster PoCitMonster is offline
      DotDotDot
         
        Join Date: Apr 2013
        Location: Earth
        Gender: Male
        Nature: Lonely
        Posts: 38
        How can I temporarily turn it off for cut senses
        __________________
        ...
        Reply With Quote
          #29    
        Old August 4th, 2017 (1:27 AM).
        Marin's Avatar
        Marin Marin is offline
        Not Bored
         
        Join Date: Nov 2016
        Age: 16
        Gender: Other
        Posts: 792
        If you look at the top of the script, you'll see:
        Code:
            # When above 0, only displays HUD when this switch is on.
            SWITCHNUMBER = 0
        Reply With Quote
          #30    
        Old August 4th, 2017 (7:43 AM).
        mej71's Avatar
        mej71 mej71 is offline
           
          Join Date: Mar 2014
          Location: Omnipresence
          Gender: Male
          Posts: 1,219
          Quote:
          Originally Posted by M3rein View Post
          If you look at the top of the script, you'll see:
          Code:
              # When above 0, only displays HUD when this switch is on.
              SWITCHNUMBER = 0
          That's a constant, and while it will still allow you to change it, I'm pretty sure even in Essentials it throws up a warning.
          Try this: https://stackoverflow.com/questions/3375360/how-to-redefine-a-ruby-constant-without-warning
          Reply With Quote
            #31    
          Old August 4th, 2017 (7:49 AM).
          Marin's Avatar
          Marin Marin is offline
          Not Bored
           
          Join Date: Nov 2016
          Age: 16
          Gender: Other
          Posts: 792
          Quote:
          Originally Posted by mej71 View Post
          That's a constant, and while it will still allow you to change it, I'm pretty sure even in Essentials it throws up a warning.
          Try this: https://stackoverflow.com/questions/3375360/how-to-redefine-a-ruby-constant-without-warning
          My understanding is that by setting this to, say, 10, if switch 10 is disabled, the HUD won't display. I don't think you need to redefine it during run-time if you just set it to something before. I could very well be wrong, though.
          Reply With Quote
            #32    
          Old August 4th, 2017 (3:42 PM).
          mej71's Avatar
          mej71 mej71 is offline
             
            Join Date: Mar 2014
            Location: Omnipresence
            Gender: Male
            Posts: 1,219
            Quote:
            Originally Posted by M3rein View Post
            My understanding is that by setting this to, say, 10, if switch 10 is disabled, the HUD won't display. I don't think you need to redefine it during run-time if you just set it to something before. I could very well be wrong, though.
            Oh, you're right. Totally didn't read that all the way
            Reply With Quote
              #33    
            Old August 7th, 2017 (7:53 AM).
            PoCitMonster's Avatar
            PoCitMonster PoCitMonster is offline
            DotDotDot
               
              Join Date: Apr 2013
              Location: Earth
              Gender: Male
              Nature: Lonely
              Posts: 38
              Quote:
              Originally Posted by M3rein View Post
              If you look at the top of the script, you'll see:
              Code:
                  # When above 0, only displays HUD when this switch is on.
                  SWITCHNUMBER = 0
              But how do i change it in essentials and turn it back on later? Is there a script I need to put or a switch i need to name
              __________________
              ...
              Reply With Quote
                #34    
              Old August 12th, 2017 (3:50 PM).
              FL's Avatar
              FL FL is offline
              Pokémon Island Creator
                 
                Join Date: Sep 2010
                Gender: Male
                Posts: 1,769
                Quote:
                Originally Posted by PoCitMonster View Post
                But how do i change it in essentials and turn it back on later? Is there a script I need to put or a switch i need to name
                Change 'SWITCHNUMBER = 0' to 'SWITCHNUMBER = 99' and turn on and off the game switch 99. The HUD will be turned on and off, like the switch.
                __________________
                Reply With Quote
                  #35    
                Old September 20th, 2017 (5:05 AM). Edited September 20th, 2017 by HarmonyConcept.
                HarmonyConcept HarmonyConcept is offline
                   
                  Join Date: Sep 2015
                  Gender: Female
                  Posts: 207
                  Hi,
                  Thank you for the script, it is working great!
                  I have a single issue: when I am on a map which has the Metadata tag "Dark Map", the darkness covers the HUD. Is there a way to display the HUD on a DarkMap map, over the darkness?
                  Reply With Quote
                    #36    
                  Old September 28th, 2017 (3:59 AM).
                  FL's Avatar
                  FL FL is offline
                  Pokémon Island Creator
                     
                    Join Date: Sep 2010
                    Gender: Male
                    Posts: 1,769
                    Quote:
                    Originally Posted by HarmonyConcept View Post
                    Hi,
                    Thank you for the script, it is working great!
                    I have a single issue: when I am on a map which has the Metadata tag "Dark Map", the darkness covers the HUD. Is there a way to display the HUD on a DarkMap map, over the darkness?
                    Yes! On my script, change line '@hud = HUD.new(@viewport1) if [email protected] ' into '@hud = HUD.new(@viewport3) if [email protected] '. On PField_Field, change line 'self.z=99998' into 'self.z=98'.
                    __________________
                    Reply With Quote
                      #37    
                    Old September 28th, 2017 (7:51 AM). Edited September 28th, 2017 by HarmonyConcept.
                    HarmonyConcept HarmonyConcept is offline
                       
                      Join Date: Sep 2015
                      Gender: Female
                      Posts: 207
                      Quote:
                      On my script, change line '@hud = HUD.new(@viewport1) if [email protected] ' into '@hud = HUD.new(@viewport3) if [email protected] '. On PField_Field, change line 'self.z=99998' into 'self.z=98'.
                      That's working great! Thank you!
                      Reply With Quote
                        #38    
                      Old October 20th, 2017 (7:09 AM).
                      Soccersam's Avatar
                      Soccersam Soccersam is offline
                      #Hilbert is Badass
                         
                        Join Date: Oct 2016
                        Gender: Male
                        Nature: Hasty
                        Posts: 98
                        It gives me a syntax error-

                        ---------------------------
                        Pokemon Essentials
                        ---------------------------
                        Exception: NoMethodError

                        Message: undefined method `egg?' for #<PokeBattle_Pokemon:0xd548fc0>

                        HUD Script:169:in `refreshPartyIcons'

                        HUD Script:161:in `each'

                        HUD Script:161:in `refreshPartyIcons'

                        HUD Script:86:in `create'

                        HUD Script:236:in `update'

                        HUD Script:278:in `follower_update'

                        Follow Pokemon:1775:in `klein_shadow_update'

                        OW Shadow:125:in `old_update'

                        Footprints:96:in `update'

                        Spriteset_Map:181:in `_animationSprite_initialize'

                        This exception was logged in

                        C:\Users\wickedsoham\Saved Games/Pokemon Essentials/errorlog.txt.

                        Press Ctrl+C to copy this message to the clipboard.
                        ---------------------------
                        OK
                        ---------------------------
                        I copied the script in Printable Version, so I don't think there should be any errors
                        Do we need to install the picture for the HPbars and stuff ourselves (Maybe that's what is causing the problem, or maybe it is kleinstudio's overworld kit or something...)
                        __________________
                        Whatever you do in this life, it's not legendary unless your friends are there to see it. -Barney Stinson
                        Reply With Quote
                          #39    
                        Old October 20th, 2017 (1:34 PM). Edited October 20th, 2017 by Zeak6464.
                        Zeak6464's Avatar
                        Zeak6464 Zeak6464 is offline
                        Zeak #3205 - Discord
                           
                          Join Date: Mar 2013
                          Location: USA
                          Age: 25
                          Gender: Male
                          Nature: Calm
                          Posts: 557
                          Quote:
                          Originally Posted by Soccersam View Post
                          It gives me a syntax error-

                          ---------------------------
                          Pokemon Essentials
                          ---------------------------
                          Exception: NoMethodError

                          Message: undefined method `egg?'
                          egg? should be IsEgg?
                          __________________
                          Green Remix is Done !
                          Thank you for the many years !
                          Reply With Quote
                            #40    
                          Old June 5th, 2018 (7:47 AM). Edited June 8th, 2018 by bo4p5687.
                          bo4p5687 bo4p5687 is offline
                             
                            Join Date: May 2018
                            Location: Việt Nam (Vietnam)
                            Gender: Male
                            Nature: Relaxed
                            Posts: 75
                            Hi FL

                            I think your script that is very nice, but I think in your script in which the ions are the animated icons, it's better and you can change something to do that.

                            My idea is:

                            Change this:
                            Spoiler:
                            for i in 0...6
                            x = 16+64*i
                            y = @yposition-8
                            y-=8 if SHOWHPBARS
                            @sprites["pokeicon#{i}"]=IconSprite.new(x,y,@viewport1)
                            end


                            into:
                            Spoiler:
                            for i in 0...6
                            x = 16+64*i
                            y = @yposition-8
                            y-=8 if SHOWHPBARS
                            @sprites["pokeicon#{i}"]=IconSprite.new(x,y,@viewport1)
                            @sprites["pokeicon#{i}"].visible = false
                            end


                            Then delete this:

                            Spoiler:
                            for sprite in @sprites.values
                            sprite.z+=600
                            end


                            Then, this line:

                            Spoiler:
                            refresh = (
                            @partySpecies[i]!=partySpecie ||
                            @partyForm[i]!=partyForm ||
                            @partyIsEgg[i]!=partyIsEgg
                            )


                            Add after that, this code:
                            Spoiler:
                            @sprites["pokeicon#{i}"].visible = false if @partySpecies[i]!=partySpecie || @partyForm[i]!=partyForm || @partyIsEgg[i]!=partyIsEgg


                            Then, delete this code:
                            Spoiler:
                            pokemonIconFile = pbPokemonIconFile($Trainer.party[i])
                            @sprites["pokeicon#{i}"].setBitmap(pokemonIconFile)
                            @sprites["pokeicon#{i}"].src_rect=Rect.new(0,0,64,64)


                            And add this:
                            Spoiler:
                            @sprites["pokeicon#{i}"] = PokemonIconSprite.new($Trainer.party[i],@viewport1)
                            @sprites["pokeicon#{i}"].x = 16+64*i
                            @sprites["pokeicon#{i}"].y = @yposition - 8


                            That's all. Have fun and thanks your reading.
                            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 1:26 AM.