v19.1Displaying Splash Dialog based on Pokemon

This thread pertains to v19.1 of Pokémon Essentials.

FeelsMoyoMan

Rookie
Member
Hello!

I want to implement a splash dialog that gets shown when a specific Pokemon enters the battle (Wild and Trainer battle). Similar to how the on switch in ability trigger work (Intimidate). I would guess, that you have to write your own handler and then call it. But maybe there is an easier way? I basically just want to do something like this:
Pseudo:
if Pokemon.ID > 649 then
ShowSplash('text');
But I can't find the right place to call something like that. I am not new to programming, but Ruby is very different from what I am used to, so I am a bit lost. I would appreciate it if someone could help me out.
It also would be nice, if it works with EBDX, but it doesn't have to.

TechSkylander1518

Wiki Dweeb
Member
Assuming you're using v19, ID numbers have generally been replaced with symbols for species, items, etc., so your check would actually be if pokemon.species == :SPECIES.

As far as I know, the only splashes that exist in Essentials are for abilities, so you'd need to check and see how they work to get the splash animation. PokeBattle_Battle has some various messages and displays defined in it, so that would be a good place to start. If you just want the animation to play at the start of battle, I think pbStartBattleCore in Battle_StartAndEnd is what triggers all the messages at the start of battle.

FeelsMoyoMan

Rookie
Member
Thanks.
I looked through pbStartBattleCore and found pbOnActiveOne which is defined in Battle_Action_Switching and that is exactly what I was searching for.

if battler.opposes? && battler.species == :BULBASAUR
Triggers it for one specific Pokemon. I want to trigger it on multiple. They all have an ID bigger than 649. So I used:
if battler.opposes? && GameData::Species.get(battler.species).id_number > 649
But since ID got replaced everywhere else, is there a different way to solve this?

Btw. splash dialog wasn't really what I meant. pbDisplay does, what I wanted. Sorry for not being clear enough.

Edit: This also works with EBDX

Last edited:

TechSkylander1518

Wiki Dweeb
Member
Oh, actually, what you have for that will work, too! I forgot that id_number can still be referred to, it's just generally replaced with symbols instead! (I think Maruno said ID numbers might be phased out in future versions? But that probably won't be for a while)

FeelsMoyoMan

Rookie
Member
Oh, actually, what you have for that will work, too! I forgot that id_number can still be referred to, it's just generally replaced with symbols instead! (I think Maruno said ID numbers might be phased out in future versions? But that probably won't be for a while)
Yeah took me a while to find out, how I address the ID, as I said I am not fluent in Ruby. It works like a charm and I am going to leave it like that. If the ID gets removed in a future version I will have to find a different way, but this is a problem for future me and it's not like I have to update to a newer version.