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

Giving an icon to certain species of Pokémon

Can you please explain better what you want?

- Do you want an image, depending on the pokemon's species, to appear in-battle where the status effect image appears?
- Or do you want it to appear in the Summary screen?

- Do you want it to appear only for a certain species?
- Do you want it to appear for every species but be different for each one?

- What is the purpose of this image?

Considering that this is scripting that involves visual/HUD elements, I can help you fairly easily, I just need specifics.
 
*facedesk*

The only question you actually answered was where this icon would appear (just in-battle).

The fact that you're using Insurgence screenshots of Delta Pokemon leads me to believe that you're making an icon for Delta-ism or something similar, which IMO is more akin to Shininess and Mega-ness than a status effect.

So, I'm going to ask just to confirm:
You want this to appear for species with National Dex numbers above 721?
 
Yes, I would like this to appear for a range of numbers (ex. 1000-1007) where the Pokemon with the numbers would have the icon. Also I don't want the icon to be removed in any way. My apologies for sounding confusing. I just thought that giving a permanent status effect with no effect would be similar to having an icon. And a big thank you for helping me with this.
 
Last edited:
Okay, two more questions and then I can output some code.

1.) Can the Pokemon for which this icon appears be Shiny? Or is it safe to place the icon in the same place the Shiny Star appears? (I ask because in Insurgence they have Shiny Deltas, which is still mindblowing to me).
2.) Are you using Luka's Elite Battle System
 
Okay. *cracks knuckles*. Let's do this. *Doctor Who theme plays*

In your script section for the EBS's UI, which if you followed Luka's instructions should be named EliteBattle_UI, press ctrl+f and type "mega_sym". It should take you to a line that looks somewhat like this:
Code:
      self.bitmap.blt(22,34,pbBitmap("Graphics/Pictures/mega_sym"),Rect.new(0,0,30,30)) if @battler.isMega?
      if INCLUDEGEN6 && @battler.isPrimal?
        path=nil
        path="Graphics/Pictures/alpha_sym.png" if @battler.species==PBSpecies::KYOGRE
        path="Graphics/Pictures/omega_sym.png" if @battler.species==PBSpecies::GROUDON
        #define any custom Primal graphics here
        self.bitmap.blt(22,34,pbBitmap(path),Rect.new(0,0,30,30))
      end

Replace that with this:
Code:
      megaPos=22
      deltaDex=getBattler(@battler).species>=[COLOR="Red"]first dex number for which you want the symbol to appear[/COLOR]
      deltaDex=deltaDex && getBattler(@battler).species<=[COLOR="Red"]last dex number for which you want the symbol to appear[/COLOR]
      if getBattler(@battler).isShiny? || deltaDex
        megaPos=34
      end
      self.bitmap.blt(megaPos,34,pbBitmap("Graphics/Pictures/mega_sym"),Rect.new(0,0,30,30)) if @battler.isMega?
      if INCLUDEGEN6 && @battler.isPrimal?
        path=nil
        path="Graphics/Pictures/alpha_sym.png" if @battler.species==PBSpecies::KYOGRE
        path="Graphics/Pictures/omega_sym.png" if @battler.species==PBSpecies::GROUDON
        #define any custom Primal graphics here
        self.bitmap.blt(megaPos,34,pbBitmap(path),Rect.new(0,0,30,30))
      end
      shinyPos=22
      shinyPos=2 if @battler.isMega? || @battler.isPrimal?
      self.bitmap.blt(shinyPos,34,pbBitmap("Graphics/Pictures/shiny_sym"),Rect.new(0,0,30,30)) if getBattler(@battler).isShiny?
      self.bitmap.blt(shinyPos,34,pbBitmap("Graphics/Pictures/delta_sym"),Rect.new(0,0,30,30)) if deltaDex
      self.bitmap.blt(shinyPos,34,pbBitmap("Graphics/Pictures/shiny_delta_sym"),Rect.new(0,0,30,30)) if deltaDex && getBattler(@battler).isShiny?

You'll note that the three bottom lines refer to pictures that don't exist in the EBS. For this reason I have dropped attachments. I also can't remember if the base EBS had "alpha_sym" and "omega_sym" and I just edited them, or if that was a bit of redirection to separate images on my part, so I included those as well to be safe.

This will make the symbol appear for battlers on your side of the field. Next up is for those not on your side of the field.

Search "mega_sym" again, and make sure the result is not in the chunk of code I had you paste. The line should read something like:
Code:
      self.bitmap.blt(212,30,pbBitmap("Graphics/Pictures/mega_sym"),Rect.new(0,0,30,30)) if @battler.isMega?
      if INCLUDEGEN6 && @battler.isPrimal?
        path=nil
        path="Graphics/Pictures/alpha_sym.png" if @battler.species==PBSpecies::KYOGRE
        path="Graphics/Pictures/omega_sym.png" if @battler.species==PBSpecies::GROUDON
        #define any custom Primal graphics here
        self.bitmap.blt(212,30,pbBitmap(path),Rect.new(0,0,30,30))
      end

Replace it with this:
Code:
      megaPos=212
      deltaDex=getBattler(@battler).species>=[COLOR="Red"]first dex number for which you want the symbol to appear[/COLOR]
      deltaDex=deltaDex && getBattler(@battler).species<=[COLOR="Red"]last dex number for which you want the symbol to appear[/COLOR]
      if getBattler(@battler).isShiny? || deltaDex
        megaPos=232
      end
      self.bitmap.blt(megaPos,30,pbBitmap("Graphics/Pictures/mega_sym"),Rect.new(0,0,30,30)) if @battler.isMega?
      if INCLUDEGEN6 && @battler.isPrimal?
        path=nil
        path="Graphics/Pictures/alpha_sym.png" if @battler.species==PBSpecies::KYOGRE
        path="Graphics/Pictures/omega_sym.png" if @battler.species==PBSpecies::GROUDON
        #define any custom Primal graphics here
        self.bitmap.blt(megaPos,30,pbBitmap(path),Rect.new(0,0,30,30))
      end
      shinyPos=212
      shinyPos=200 if @battler.isMega? || @battler.isPrimal?
      self.bitmap.blt(shinyPos,30,pbBitmap("Graphics/Pictures/shiny_sym"),Rect.new(0,0,30,30)) if getBattler(@battler).isShiny?
      self.bitmap.blt(shinyPos,30,pbBitmap("Graphics/Pictures/delta_sym"),Rect.new(0,0,30,30)) if deltaDex
      self.bitmap.blt(shinyPos,30,pbBitmap("Graphics/Pictures/shiny_delta_sym"),Rect.new(0,0,30,30)) if deltaDex && getBattler(@battler).isShiny?

It's the same code I had you post above, but the X positions of the icons are different.

I've made it so Shiny Pokemon have an icon in the same place as the Mega Evolution symbol. If a Shiny Mega Evolves, the Shiny icon will move slightly to the left to make room for the Mega Evolution icon.

Assuming that you're doing this for Delta Pokemon, the Delta icon behaves as the Shiny icon does. For this reason, I included an icon that is to be used if a Pokemon is both Delta and Shiny.

Preferably you would change the icons I gave you. They're the ones I used for my game, and using exactly the ones I'm using may give people the wrong idea.
 
Hmm. It seems I've gotten an error.

Here is a picture of the screen when the error paused the game.

Here is the error code:
Code:
---------------------------
Pokémon Paragon
---------------------------
Exception: RuntimeError

Message: Script error within event 21, map 23 (Team Paragon Base):

Exception: NoMethodError

Message: Section174:209:in `refresh'undefined method `isShiny?' for #<PokeBattle_Battler:0x829d2e0>

***Full script:

pbTrainerBattle(PBTrainers::PARAGONBOSS,"Desmond",_I("This fight didn't matter."),false,1,false,0)

Interpreter:243:in `pbExecuteScript'

EliteBattle_UI:69:in `initialize'

EliteBattle_Scene:101:in `new'

EliteBattle_Scene:101:in `pbLoadUIElements'

EliteBattle_Scene:257:in `pbStartBattle'

EliteBattle_Battle:137:in `pbStartBattleCore'

PokeBattle_Battle:2148:in `pbStartBattle'

PTrainer_NPCTrainers:345:in `pbTrainerBattle'

PTrainer_NPCTrainers:344:in `pbSceneStandby'

PTrainer_NPCTrainers:346:in `pbTrainerBattle'



Interpreter:276:in `pbExecuteScript'

Interpreter:794:in `command_111'

Interpreter:320:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:103:in `update'

Scene_Map:101:in `loop'

Scene_Map:114:in `update'

Scene_Map:68:in `main'



This exception was logged in 

C:\Users\Tyler\Saved Games/Pokémon Paragon/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK   
---------------------------
 
Oh, I forgot I added that function to battlers. Try changing all instances of ".isShiny?" to ".pokemon.isShiny?"

...edit: no, that wouldn't work, because it would screw up Illusion. Ugh. Let me go look.

Okay, in PokeBattle_Battler, somewhere around line 60ish, add the following code:
Code:
  def isShiny?
    return (@pokemon) ? @pokemon.isShiny? : false
  end

you'll also want to add this to PokeBattl_SafariZone around line 24 just so I don't end up breaking the Safari Zone.
Code:
  def isShiny?; return @pokemon.isShiny?; end
 
Last edited:
Thank you so much I got it to work! There was one error I had after your fix, and it was with there not being the method isPrimal. I simply just removed all the "isPrimal"s in EliteBattle_UI because there is not going to be primal Pokémon in this game. Thank you for all your help!

QUICK QUESTION: Can I make a variable of sorts at the top of the script to easily add/remove Pokémon with the icon?
 
Back
Top