• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

[Pokeemerald] [TUTORIAL] Adding New Weather

17
Posts
3
Years
  • Age 24
  • Seen Feb 19, 2024
[BATTLE MECHANICS A]

Ever grown tired of the same few weather effects? Wish some from Mystery Dungeon were implemented?
Feeling devilish to bring back Gen 4 fog?

Fortunately I've managed to figure how to add more weathers for battle effects. Special thanks to Ghoulslash for helping me with the Various ptrs

So we'll begin with a relatively simple weather effect: Cloudy
here's the gist of the effect;
All moves that aren't Normal or Dark type will be weakened

And visual
se.gif


*Note for people using Battle Expansion: the AI has been rehauled massively. I'll make a new post for it later
*Also this doesn't cover adding Castform forms. Believe me, I tried
Now for code...

For defining it:
Spoiler:


We can now move on to actually implementing the weather, animation for it, the AI in response to it, and text strings

For anim scripts:
Spoiler:


We can move on to how the AI reacts to the changed weather

AI (note, current Battle Expansion is all in a C file, so see next post for AI mechanics)
Spoiler:


Now for text edits
Spoiler:


We finally get to the meat of weather mechanics
Spoiler:


And there you have it. If you want to make it into a move like Rain Dance, or weather ability, you can simply copy what Vanilla/Battle Expansion does for the original weather types (we already established EFFECT_CLOUDY, so go nuts in src/data/battle_moves.h)

Otherwise, you can view the effect in battle like so:
so.gif

Where despite the major level difference, Mud Slap doesn't cut a third of health due to being weakened
 
Last edited:
Back
Top