• 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] Battle Engine Upgrade

794
Posts
10
Years
Thank you for this engine, it works really nicely! I only have one question about the wild double battles. On default configuration, all wild battles seem to be double battles. How would I go on about creating specific patches for double battles (like in BW) while retaining single battles in other areas?

Well, you'd need to code that. :P Preferably set up some table with ids for metatiles(like dark grass) that allow double battles and if the tile the player is currently walking on matches, the battle will be double.
Check out src/wild_encounters.c, line 597.
 
5
Posts
15
Years
  • Age 27
  • Seen Jul 4, 2020
This engine does not provision for the SpDef boost Rock types gain during Sandstorm, nor does it flag Blizzard as 100% accurate during Hail.
 

SidDays

Professional Lurker
142
Posts
15
Years
* Mid-battle Trainer messages

How do I configure these?

Also, @DizzyEgg, what's the best way to get in touch with you to contribute? I feel like working on some move animations, wondering if I would just make a pull request when I'm done
 
18
Posts
10
Years
  • Age 31
  • Seen May 14, 2023
You should do it by using git and merging, I will write a tutorial on that soon. Doing it otherwise...well that'd be like gluing without glue.

Does this mean you will do a merge guide at some point for your branches?
 
19
Posts
4
Years
I noticed that there is a debug menu included with the engine. how would I go about using it? I assume I can open it as USE_BATTLE_DEBUG is forced true in battle_debug.h, I'm just confused as to how.
 
22
Posts
9
Years
  • Age 27
  • Seen Oct 18, 2021
I noticed that there is a debug menu included with the engine. how would I go about using it? I assume I can open it as USE_BATTLE_DEBUG is forced true in battle_debug.h, I'm just confused as to how.

Press select at battle menu selection screen.
 
794
Posts
10
Years

You edit the table here. https://github.com/DizzyEggg/pokeemerald/blob/battle_engine_v2/src/battle_message.c#L3546

The fields go: trainer id(use constants from constants/opponents.h), and 3 pointers to strings, they're displayed when last mon is brought out, when last mon is at low hp and when first pokemon is down respectively. If you want a trainer to have only 1 or two messages, instead of a pointer just put 0 or NULL there.

I noticed that there is a debug menu included with the engine. how would I go about using it? I assume I can open it as USE_BATTLE_DEBUG is forced true in battle_debug.h, I'm just confused as to how.

Press SELECT or START when choosing battle action(run/fight/pokemon/bag). When there, use L/R buttons to change between battlers.
 
Last edited:

nemesish

Azure Trainer
473
Posts
16
Years
2 questions:
1- where are the items stored? I found a file but it doesn't have the new items, only the old ones.
2- can I edit the mart items with this?
 
794
Posts
10
Years
2 questions:
1- where are the items stored? I found a file but it doesn't have the new items, only the old ones.
2- can I edit the mart items with this?
1. The item effects are defined in constants/hold_effects.h. The actual items are not present in the battle engine, you need to either add the new items yourself or use my item expansion repo that has all of them.
2. No, this is a project strictly for battles. My item expansion repo has all the items tho, and you can edit mart items with that.

This engine does not provision for the SpDef boost Rock types gain during Sandstorm, nor does it flag Blizzard as 100% accurate during Hail.
Fixed both.
 
1
Posts
5
Years
  • Age 35
  • Seen Oct 29, 2020
Hi, a couple of questions.
Still new to decomp so apologies if the answers are obvious.

1: Are primal reversions or wish mega evolution currently included in the engine?
2: How feasable would it be to have different weather setting abilities set either temp or permanent weather. As an example; Allow Groudon to make permanent droughts but Ninetales/Torcoal only produce the 5-8 turn Drought like in Gen6 and beyond.
 
794
Posts
10
Years
Hi, a couple of questions.
Still new to decomp so apologies if the answers are obvious.

1: Are primal reversions or wish mega evolution currently included in the engine?
2: How feasable would it be to have different weather setting abilities set either temp or permanent weather. As an example; Allow Groudon to make permanent droughts but Ninetales/Torcoal only produce the 5-8 turn Drought like in Gen6 and beyond.

1. No, so far ony mega evo is coded.
2. Pretty easy, each weather has two flags WEATHER_X and WEATHER_X_PERMAMENT, so it's a matter of checking a pokemon species and if it's groudon set it to be permament, otherwise use regular 5-8 turns weather.
 

Jeesh

I just wanna hack Emerald.
44
Posts
7
Years
  • Age 24
  • Seen Aug 23, 2020
Is there like a Discord for disassembly, Pokeemerald and related stuff or...

I have a few questions and I also just want to see who else does this stuff on the daily rn
 
Back
Top