- 1,018
- Posts
- 5
- Years
- Pakistan
- Seen today
<snip>
Hey, moved your post here since it's a small change and fits here. :)
<snip>
VAR_TEMP_1
in search of a bag pocket and opens said bag pocket directly by using the GoToBagMenu
function.VAR_ITEM_ID
for you to do as you please.call_if_eq
instead of goto_if_eq
here was my bad. Don't do this at home. It's not correct even though it works.git remote
and pull the branch chooseItem
which is where I'm hosting the code:git remote add lunos https://github.com/LOuroboros/pokeemerald
git pull lunos chooseItem
git remote add cfp https://github.com/CtrlFootPrint/pokeemerald
git pull cfp MidBattleEvo
Easily ported to FR as well, so thank you for this!Mid-battle Evolutions (Emerald)Hi everyone, this is my first contribution to this thread, I've had a lot of fun doing this and I hope to add some more!
Features:
- allows your Pokémon to evolve (if it can) in the middle of a battle when it has levelled up in battle and is currently out. If they learn any moves, they will be ready to be used in battle as well.
- works with single battles, both left and right Pokémon in double battles and in multi battles (i.e. your partner's Pokémon). Your partner's Pokémon should not evolve in normal gameplay since the player can't normally get Steven's (the only trainer with whom you can gain experience) Pokémon (Metang is the only one who could theoretically evolve) to evolve anyway in the Multi Battle against Team Magma.
- If you don't want either of your left or right Pokémon to evolve, the game will stop trying to evolve them in-battle if they gain any more levels.
Preview:
Spoiler:![]()
Source
To pull the branch:
Alternatively, here are the changes made: https://github.com/pret/pokeemerald/compare/master...CtrlFootPrint:MidBattleEvoCode:git remote add cfp https://github.com/CtrlFootPrint/pokeemerald git pull cfp MidBattleEvo
I have tested these changes in a variety of different scenarios and with different teams and it seems to be working fine. If you do spot any flaws or bugs or have any questions or queries, please let me know! Any other feedback or comment is much appreciated!
[Pokeemerald] Updated debug menu!
![]()
Now with:
-SOUND!!!
-easy way to run custom scripts
-poison all party mons
-max money & max coins
-trigger daycare egg (no more running like crazy to test daycare changes)
-completly fill pc with pokemon
Also lots of small fixes!
Credits for the additions:
Sierraffinity
Jaizu
Spoiler:
[Pokeemerald] TM Case ported from FR and custom one!
Base version (fr_tm_case_port):
I ported the TM Case from Firered over to Emerald:
![]()
This branch is meant as a starting point and basically "only" adds the functionality to the case. The original TM/HM pocket still exits.
Improved version (tx_ui_TmCase):
I also created an improved version:
![]()
This version adds the party Pokemon icons and grays them out, when the Pokemon cannot learn the currently selected move.
Additionally it gets rid of the TM/HM pocket and makes sure the player has 1 TM Case, if they find or receive a TM.
How to add:
ORCode:git remote add xaman https://github.com/TheXaman/pokeemerald/ git pull xaman fr_tm_case_port
Code:git remote add xaman https://github.com/TheXaman/pokeemerald/ git pull xaman tx_ui_TmCase
I hope you like it and if you find any bugs please let me know!
Special thanks to:
Jaizu for all the feedback
Credits:
TheXaman
ITEM_EFFECT
s by default, but also, I was bored enough to just go and do it.itemFieldUseFunc
set to ItemUseOutOfBattle_ReduceIV
and its secondaryId
to STAT_HP
on a Pokémon to reduce 10 HP IV.itemFieldUseFunc
set to ItemUseOutOfBattle_IncreaseIV
and its secondaryId
to STAT_HP
on a Pokémon to add 10 HP IV.AdjustFriendship
function, giving a purpose to the unused FRIENDSHIP_EVENT_VITAMIN
and adding one for berry stand-ins.git remote
and pull the branch ivChangingItems
which is where I'm hosting the code:git remote add lunos https://github.com/LOuroboros/pokeemerald
git pull lunos ivChangingItems
FLAG_PARTY_MOVES
extern const u8 gText_Moves_Menu[];
const u8 gText_Moves_Menu[] = _("Change Moves");
void CB2_ReturnToPartyMenuFromSummaryScreen(void);
MENU_MOVES,
[MENU_MOVES] = {gText_Moves_Menu, CursorCb_Moves},
static void CursorCb_Moves(u8);
static void CursorCb_Moves(u8 taskId)
{
PlaySE(SE_SELECT);
FlagSet(FLAG_PARTY_MOVES);
gSpecialVar_0x8004 = gPartyMenu.slotId;
gSpecialVar_0x8005 = GetNumberOfRelearnableMoves(&gPlayerParty[gSpecialVar_0x8004]);
DisplayPartyPokemonDataForRelearner(gSpecialVar_0x8004);
TeachMoveRelearnerMove();
sPartyMenuInternal->exitCallback = TeachMoveRelearnerMove;
Task_ClosePartyMenu(taskId);
}
if (GetNumberOfRelearnableMoves(&mons[slotId]) != 0) {
AppendToList(sPartyMenuInternal->actions, &sPartyMenuInternal->numActions, MENU_MOVES);
}
if (GetMonData(&mons[1], MON_DATA_SPECIES) != SPECIES_NONE)
AppendToList(sPartyMenuInternal->actions, &sPartyMenuInternal->numActions, MENU_SWITCH);
if (GetNumberOfRelearnableMoves(&mons[slotId]) != 0) {
AppendToList(sPartyMenuInternal->actions, &sPartyMenuInternal->numActions, MENU_MOVES);
}
if (FlagGet(FLAG_PARTY_MOVES))
{
CB2_ReturnToPartyMenuFromSummaryScreen();
FlagClear(FLAG_PARTY_MOVES);
}
else
{
SetMainCallback2(CB2_ReturnToField);
}
EDIT4: An alternative way to deal with that is to do what the Gen. 5 Games did with the reusable TMs.
Those pick the smallest PP value out of the old and the new move, and make the new move use that.
Thankfully, this is shown in the "Infinite TM usage" tutorial at the Pokeemerald wiki.
Here's the commit from my branch, for anyone interested.
Just so you know, that label is not present in that file, it's inThen, we go to src/data/party_menu.h and we add:
Under "MENU_BAG,", in the enum section.Code:MENU_MOVES,
src/pokemon_storage_system.c
.MENU_MOVES,
in this enum.MENU_FIELD_MOVES,
they'll be fine.#include
the move_relearner.h
header file to the list in src/party_menu.c
.BoxPokemon
struct) track the amount of PP for each move a Pokémon can learn by levelling up.case MENU_STATE_TRY_OVERWRITE_MOVE
like this instead: https://pastebin.com/dcbTzGqUThanks for the comments!Other than that, I tested it, and it works nicely. Thanks!
Yeah, you're right that i forgot to add that in the tutorial, i will now! Should keep more track on additions and deletions next time i post hereEDIT: Also, you forgot to mention the user needs to#include
themove_relearner.h
header file to the list insrc/party_menu.c
.
Adding it to the tutorial right now!EDIT4: An alternative way to deal with that is to do what the Gen. 5 Games did with the reusable TMs.
Those pick the smallest PP value out of the old and the new move, and make the new move use that.
Thankfully, this is shown in the "Infinite TM usage" tutorial at the Pokeemerald wiki.
Here's the commit from my branch, for anyone interested.
Hello! This code worked with no errors, however I get a loud screeching sound when exiting the pc that is continuous until i join a battle screen. Any idea how i might resolve this?
static void FieldTask_ReturnToPcMenu(void)
{
u8 taskId;
MainCallback vblankCb = gMain.vblankCallback;
if (FlagGet(FLAG_POKEMONPCMENU)==TRUE)
{
SetVBlankCallback(NULL);
taskId = CreateTask(Task_PCMainMenu, 80);
gTasks[taskId].tState = 0;
gTasks[taskId].tSelectedOption = sPreviousBoxOption;
Task_PCMainMenu(taskId);
SetVBlankCallback(vblankCb);
FadeInFromBlack();
}
else {
ScriptContext2_Disable();
EnableBothScriptContexts();
SetVBlankCallback(CB2_ReturnToField);
FadeInFromBlack();
}
}
Hi there! I was able to successfully merge this, and everything is working well, except for one thing: it seems that when I "make", the debug menu is available regardless of whether I've used "make DDEBUGGING=1" or a normal "make". Strangely, the syntax "make debugging" doesn't work either.
Once you've built in the debug menu, is there any way to prevent it from being accessible?
Hi! I was experimenting with this last night, and while it's not technically a bug, I've noticed two things:
1) If you've made TMs reusable using the wiki's tutorials that give them the same importance as an HM, it will cause the [HM] icon to overlap the name in the list and details window.
2) If you've added in the fairy type, and made any fairy type TMs, the type icon won't appear.
EDIT:
Looks like the Fairy Type not appearing for TMs has more to do with the original tutorial for inserting fairy type categories, we've been able to add it for a normal TM/HM Bag, so I can add that info into the tutorial. Will be testing out how that impacts your TM case, too!
static void TMCase_ItemPrintFunc(u8 windowId, u32 itemId, u8 y)
Hi, I changed the method of enabling/disabling the debug menu a while back and forgot to update the "update post", sorry.
The new way is:
Access ingame:
From now on if you want the menu to show up you have to define TX_DEBUGGING in debug.h and delete/uncomment the line if you don't want it to show up.
To access ingame press R + Start.
[pokeemerald] Day/Night encounters
I'm happy I can finally contribute to this page. Major thanks to AmbientDinosaur who helped me on my way, link to that post is at the end.
Thanks again to AmbientDinosaur! Here is the OP https://www.pokecommunity.com/showpost.php?p=10315616&postcount=236
[Pokeemerald] Ingame trade with yourself (Trade evolutions)
Set up an ingame trade with yourself to get trade evolutions without a second player.
There are two versions:
Version 1 is the quicker option and directly trades your pokemon back to yourself:
![]()
Version 2 trades a predefined pokemon to the player and then trades it back for the players original one:
![]()
How to:
Preparations: First we implement the "Dynamic Trading Names" fix.
Open src/trade.c and find void CreateInGameTradePokemon(void). Change it to:
Then open the script file for the map you want to change, e.g. data/maps/OldaleTown/scripts.inc and add:Spoiler:Code:void CreateInGameTradePokemon(void) { if(gSpecialVar_0x8004 == 6) // Version 1 (a value greater than return value range of 0-5 and not 255) gEnemyParty[0] = gPlayerParty[gSpecialVar_0x8005]; else if(gSpecialVar_0x8004 == 7) // Version 2 Step 1 (trade your pokemon for the defined pokemon below and saves your pokemon data to the trader) { struct Pokemon *pokemon = &gEnemyParty[0]; CreateMon(pokemon, SPECIES_MEW, 99, 32, FALSE, 0, OT_ID_PRESET, 0); // (After the trade this pokemon is set as "Seen and caught" in the players pokedex!) gEnemyParty[1] = gPlayerParty[gSpecialVar_0x8005]; } else if(gSpecialVar_0x8004 == 8) // Version 2 Step 2 (trades your saved pokemon from the trader back to you) gEnemyParty[0] = gEnemyParty[1]; else _CreateInGameTradePokemon(gSpecialVar_0x8005, gSpecialVar_0x8004); }
Spoiler:Code:SCRIPT_SelfTrade_V1:: lock faceplayer msgbox SCRIPT_SelfTrade_Text_IllTradeIfYouWant, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq SCRIPT_SelfTrade_DeclineTrade special ChoosePartyMon waitstate compare VAR_0x8004, 255 goto_if_eq SCRIPT_SelfTrade_DeclineTrade copyvar VAR_0x8005, VAR_0x8004 setvar VAR_0x8004, 6 special CreateInGameTradePokemon special DoInGameTradeScene waitstate msgbox SCRIPT_SelfTrade_Text_ComeBack, MSGBOX_DEFAULT release end SCRIPT_SelfTrade_V2:: lock faceplayer msgbox SCRIPT_SelfTrade_Text_IllTradeIfYouWant, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq SCRIPT_SelfTrade_DeclineTrade special ChoosePartyMon waitstate compare VAR_0x8004, 255 goto_if_eq SCRIPT_SelfTrade_DeclineTrade copyvar VAR_0x8005, VAR_0x8004 setvar VAR_0x8004, 7 special CreateInGameTradePokemon special DoInGameTradeScene waitstate setvar VAR_0x8004, 8 special CreateInGameTradePokemon special DoInGameTradeScene waitstate msgbox SCRIPT_SelfTrade_Text_ComeBack, MSGBOX_DEFAULT release end SCRIPT_SelfTrade_DeclineTrade:: msgbox SCRIPT_SelfTrade_Text_YouDontWantToThatsOkay, MSGBOX_DEFAULT release end SCRIPT_SelfTrade_Text_IllTradeIfYouWant: .string "I will help you to\n" .string "trade a pokemon\p" .string "with yourself!$" SCRIPT_SelfTrade_Text_ComeBack: .string "Come back anytime.$" SCRIPT_SelfTrade_Text_YouDontWantToThatsOkay: .string "You dont want to?\n" .string "Okay come back anytime$"
Now just add a goto SCRIPT_SelfTrade_V1 or goto SCRIPT_SelfTrade_V2 where you want the script to start. Have fun!
CREDIT:
TheXaman
I know this thread isn't for asking for help, but wanted to flag that I can only get this to work in a completely vanilla build. Once any changes are made (such as merging your Debug System, or other simple mod changes) this completely breaks. V1 will fill your party with bad eggs and cause other strange errors, and V2 crashes the game completely.
Not sure what's going on, but would love to help you look into it since it's a cool concept for a mod.
static void Task_ViewClock_HandleInput(u8 taskId)
{
InitClockWithRtc(taskId);
if (JOY_NEW(A_BUTTON | B_BUTTON))
gTasks[taskId].func = Task_ViewClock_FadeOut;
if (JOY_NEW(R_BUTTON)){
PlaySE(SE_SELECT);
LZ77UnCompVram(gWallClockStart_Tilemap, (u16 *)BG_SCREEN_ADDR(7));
AddTextPrinterParameterized(1, FONT_NORMAL, gText_Confirm3, 0, 1, 0, NULL);
PutWindowTilemap(1);
ScheduleBgCopyTilemapToVram(2);
gTasks[taskId].func = Task_SetClock_HandleInput;
}
}