• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

Script: Simple HUD

Text are refreshing fine and lag was reduce nicely, still some few pauses but very rare.
Only problem is when you toggle off and on again the icon of pokemon won't show the second time unless you switch places the pokemon or when something happen on the said pokemon, I think it is the way the refresh is handled.
I can't reproduce. I guess that this problem is solved since May 7th update.

So not an issue of sorts? just a question if or how i can fix this in the most lag-less way possible!

So i finally figured out Inputs and key presses as well as toggle-able inputs etc. now i have one for the HUD

But after the toggle is turn back to when the HUD appears the party pokemon dont show till their position is changed in the party!

just remembered this also happens with mega's! they still have the sprites but even if they are back to normal (and shows so in the party menu) it still has the mega sprite
I edited the script and added a form check now.
 
Spoiler:

This works great, thanks.
Here's what I made of it, I plan to add badges when the player gets them on those circles ~
Sorry if it's something obvious, but how did you manage to get the Pokedex and Money counters to appear on the HUD? I tried using \PM to show the money like how it is when used in dialouge, but it didn't seem to work.

Thanks.
 
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?
 
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?
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.
-------------------------
 
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
 
  • Like
Reactions: FL
  • Like
Reactions: FL
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
 
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
 
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.
 
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?
 
Last edited:
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 !@hud ' into '@hud = HUD.new(@viewport3) if !@hud '. On PField_Field, change line 'self.z=99998' into 'self.z=98'.
 
On my script, change line '@hud = HUD.new(@viewport1) if !@hud ' into '@hud = HUD.new(@viewport3) if !@hud '. On PField_Field, change line 'self.z=99998' into 'self.z=98'.
That's working great! Thank you!
 
Last edited:
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...)
 
It gives me a syntax error-

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

Message: undefined method `egg?'

egg? should be IsEgg?
 
Last edited:
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:
Code:
 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:
Code:
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:

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

Then, this line:

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

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

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

And add this:
Code:
            @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.
 
Last edited:
Back
Top