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

Simple Modifications Directory

239
Posts
8
Years
    • Seen Apr 15, 2024
    [Pokeemerald] Custom Battle Transition Mugshots

    This feature lets you add mugshot transitions for any trainer battle. It also lets you define custom battle transitions per trainer.

    T47I2js.gif


    In order to keep the system as simple/flexible as possible, I've made the mugshot load based on a variable. Here is the repo to pull from.

    How to add:
    Setup:
    • add your mughot Id to include/constants/battle_transition.h. I've added MUGSHOT_MAY there as an example
      [*]I've added two elements to the trainer data structure (in red below). In your trainer structure, set .hasCustomTransition to TRUE, and then set .transition to B_TRANSITION_MUGSHOT (Note, you can set the transition to anything you like and it will override the regular battle transition. Eg. give Wally a B_TRANSITION_REGISTEEL transition).
      Code:
      struct Trainer
      {
          /*0x00*/ u8 partyFlags;
          /*0x01*/ u8 trainerClass;
          /*0x02*/ u8 encounterMusic_gender; // last bit is gender
          /*0x03*/ u8 trainerPic;
          /*0x04*/ u8 trainerName[12];
          /*0x10*/ u16 items[4];
          /*0x18*/ bool8 doubleBattle;
          /*0x1C*/ u32 aiFlags;
          /*0x20*/ u8 partySize;
      [COLOR="Red"]    /*0x24*/ u8 transition:7;
                   u8 hasCustomTransition:1;[/COLOR]
          /*0x28*/ union TrainerMonPtr party;
      };
      [*]Open src/battle_transition.c. Add a mugshot entry to each of the following:
      • sMugshotsTrainerPicIDsTable
      • sMugshotsOpponentRotationScales ({0x200, 0x200} should be fine, but dealer's choice)
      • sMugshotsOpponentCoords ({0, 0} should be fine, but again its case-dependent)
      • sOpponentMugshotsPals
        • NOTE: you can use an existing palette from the elite four, or simply make your own palette using the existing mugshot tiles/palettes
      [*]before your trainerbattle, set VAR_MUGSHOT_ID to your new mugshot id. So, yes, this only works for scripted trainer battles. But regular trainers don't necessarily deserve mugshots, imo.
      Code:
      EventScript_BattleMay::
          lockall
          faceplayer
          msgbox sText_SomeIntro, MSGBOX_DEFAULT
          setvar VAR_MUGSHOT_ID, MUGSHOT_MAY
          trainerbattle_no_intro TRAINER_MAY_ROUTE_103_TORCHIC, sText_MayLose


    Notes:
    • I had a palette loading issue when using sMugshotPal_Brendan and sMugshotPal_May together.

    Hopefully this wasn't too complex. I tried to keep it as user-friendly as possible without adding too many variables/setup steps. Please report any bugs.
     
    239
    Posts
    8
    Years
    • Seen Apr 15, 2024
    [Pokeemerald] Chain Fishing

    This adds the chain fishing feature into pokeemerald, where a pokemon encountered while fishing has an increased number of chances to be shiny up to 41 times. Sorry, no gif this time :(

    Options:
     
    49
    Posts
    5
    Years
    • Seen Dec 27, 2023
    [Pokeemerald] Omnidirectional Jumping using a flag
    This allows jumping up all small ledges after a flag is set, for example a boots upgrade is acquired and works nicely alongside ghoulslash's metatile approach:
    RNhKHlB.gif


    How to:
    open include/constants/flags.h and replace any unused flag:
    Spoiler:
    Then open src/event_object_movement.c and look for GetLedgeJumpDirection around line 7700 and find:
    Spoiler:

    Now set the flag somewhere e.g. in a script with "setflag FLAG_OMNIJUMP_UPGRADE" and you are done!


    CREDIT:
    ghoulslash
     
    Last edited:
    49
    Posts
    5
    Years
    • Seen Dec 27, 2023
    [Pokeemerald] Fast! nurse joy in PokeCenter
    This essentially cuts down on the time it takes to heal your pokemon in a PokeCenter. You don't have to say yes to beeing healed and the player automaticly faces downwards once the process is done.
    First sequence is just the script changes and the second the fasted time now possible
    iAILKX5.gif


    How to:
    Open data/scripts/pkmn_center_nurse.inc and find Common_EventScript_PkmnCenterNurse.
    Change it to:
    Spoiler:
    now find EventScript_PkmnCenterNurse_ReturnPkmn and change it to:
    Spoiler:
    now in EventScript_PkmnCenterNurse_ReturnPkmn2 add the following line just before the return:
    Spoiler:
    Add the end of the file add the following scripts, which make the player turn after completion:
    Spoiler:

    That's it, you are done, you now unlocked fast Joy.


    CREDIT:
    None needed, but appreciated
     
    Last edited:

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years

  • Just a heads up, you don't need to add an entirely new applymovement to make the Player face down.
    There's already an applymovement in the repository that you can make use of; applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceDown.

    Also, I'm not sure if this is intended or not, but I quickly tested this with a new savefile and the Nurse Joy seems to let you off the hook right after saying that she'll take your Pokémon for a few seconds, without printing the "We hope to see you again!" message.
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • I'm bringing 3 different ways to check for a specific species in the Player's party because yes.

    Check for a specific Pokémon species (scripting) [Em]
    Spoiler:


    Check for a specific Pokémon species (using a custom special) [Em]
    Spoiler:


    Check for a specific Pokémon species (by adding an entirely new scripting command) [Em] (Created by Vexio)
    Spoiler:


    EDIT (29/08/2022): Updated the scripting syntax and fixed a small mistake on my part reported by psf#2936.

    And that's pretty much it.​
     
    Last edited:
    1,591
    Posts
    10
    Years
    • Seen Mar 20, 2024
    Rotom Form Change - Overworld (Emerald)​
    oAzCsx7.gif
    This is a script, a few new specials and a multi-choice box that allows the player to change Rotom's forms. It's based on Dizzy Egg's Pokemon Expansion and Battle Engine V2, so if you're not using those you might need to modify the "IsSelectedMonRotom" and "CountRotomInParty" functions added to field_specials.c to recognize your Rotom forms.

    Code changes can be viewed as a single commit here. Note that you can ignore the changes above line 5386 in field_specials.c, as those are unrelated and shouldn't have been in this commit (oops!).

    If you want to change the moves Rotom learns in each form, they're in field_specials.c in the function "RotomFormToMove". Note that I've changed Frost and Fan's moves to Freeze-Dry and Hurricane, so you may want to tweak those!
     
    49
    Posts
    5
    Years
    • Seen Dec 27, 2023
    [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:
    2KidbQP.gif


    Version 2 trades a predefined pokemon to the player and then trades it back for the players original one:
    EB34g0J.gif


    How to:
    Preparations: First we implement the "Dynamic Trading Names" fix.

    Open src/trade.c and find void CreateInGameTradePokemon(void). Change it to:
    Spoiler:
    Then open the script file for the map you want to change, e.g. data/maps/OldaleTown/scripts.inc and add:
    Spoiler:

    Now just add a goto SCRIPT_SelfTrade_V1 or goto SCRIPT_SelfTrade_V2 where you want the script to start. Have fun!


    CREDIT:
    TheXaman
     
    Last edited:
    239
    Posts
    8
    Years
    • Seen Apr 15, 2024
    I've found a couple of special cases that cause issues with displaying the item icons:

    1. When buying Lava Cookies on Mt. Chimney. The yellow "MONEY" header image seems to be causing some sort of conflict.
    2. Picking up any item while in a dark area that requires Flash doesn't show the item icon at all.

    I can't post links yet, but here's the end of an imgur album url: a/H5FAIvM

    Just wanted to give an update that these issues have been fixed (thanks to sierra) for the item description headers
     
    Last edited:
    119
    Posts
    14
    Years
  • Change order of genders in New Game [pokeemerald]

    Before (left) and after (right):
    GkXl99P.gif
    hxqYEsT.gif

    All Pokémon games (that I know of), when selecting the player's gender, put the male option first and the female option second. Because there is no reason this should be this way, I tweaked the code to have the female option first and the male option second.

    Spoiler:
     
    Last edited:

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • DPPt Bike (a 2-in-1 Bike) [Em] (Alterntive Take)
    This feature branch was brought up in Pret's Discord server quite recently.
    In there, a talk spawned where a certain user who knows more about programming than I do offered his opinion and his own alternative take on it.
    I gave that a go, and it works, and since I already did post alternative takes on different features throughout this thread, I thought why not come and share it here.
    https://github.com/LOuroboros/pokeemerald/commit/ab27f6ff1663a07ea8a8d96c877bbb9279f72f53

    Showcase:

    Note: I actually made a small change to the sound effect that is casted when swapping bike modes, but since the core effect doesn't really change, I decided not to re-record the video.
    Again, just as I said in the original post, the key that needs to be pressed or the sound effect casted when swapping bike modes are things that y'all can adjust to suit your needs.


    Functionally, there doesn't seem to be a difference with the original take that was Blurose's, at least as far as I can tell.
    This new take simply makes a better use of Game Freak's own functions and what is already there in the source code of the game.
    For example, it makes more sense to put a piece of code that does an effect by pressing a key in a function that does effects of the same type, than it does to put it on a function that moves the Player from one tile to another if they're riding a bike.

    Bugs:
    -If while using the Acro Bike you swap to the Mach Bike in the same moment you try to use the wheelie mode, the player will be frozen on the spot.
    Fixed, thanks to RichterSnipes.

    And that's pretty much it.​
     
    Last edited:
    49
    Posts
    5
    Years
    • Seen Dec 27, 2023
    [Pokeemerald] DS-Style party screen (2 versions)
    Changes the party screen to one similar to the DS versions. 2 different layouts available!
    V1:
    5dlIj9X.gif

    V2:
    MUeq5yM.gif


    How to:
    V1: Have a look at the following commit for the main implementation LINK.
    V2: Implement the first version and the have a look at the commit LINK

    Or clone it into your repo:
    Code:
    git remote add xaman https://github.com/TheXaman/pokeemerald/
    For version 1:
    Code:
    git pull xaman tx_ui_party_screen_ds_style_1
    For version 2:
    Code:
    git pull xaman tx_ui_party_screen_ds_style_2

    Thats it! If you find any bugs, let me know.
    If you want to change the look of the windows you need to alter graphics/interface/party_menu_bg.png

    Eggs:
    ZE44bV7.gif
    Double battles:
    5kKaHHJ.gif



    Known bugs ONLY V1: Healing via potion "breaks" the slash between hp and maxHp


    Credits:
    TheXaman
    visually inpsired by Lunos binary version, but no code or assets used.
     
    Last edited:

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • Gracidea [Em]
    EDIT:
    The Pokeemerald-expansion now handles the Gracidea form changing on its own.
    As such, there's really no point in following this post which was originally a complement for its feature branches.

    Original post (for archival reasons):
    Spoiler:
     
    Last edited:
    49
    Posts
    5
    Years
    • Seen Dec 27, 2023
    [Pokeemerald] Fully functional debug menu with Flags, Vars, Items, custom scripts, Pokemon and more!
    This is my implementation of a debug menu based on Ketsuban's tutorial and some code from Pyredrid, AsparagusEduardo and Ghoulslash.
    Tc9Ydjz.gif


    Features:
    Spoiler:


    How to:
    Add and clone it into your repo:
    Code:
    git remote add xaman https://github.com/TheXaman/pokeemerald/
    git pull xaman tx_debug_system
    make clean
    make


    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.



    That it, now enjoy and if you find any bugs or if you write some cool additions you think others could profit from, please let me know in this threat, via pm or over on github!


    Credits: If you use this, you have to give credit to all following people!
    TheXaman
    Ketsuban
    Pyredrid
    AsparagusEduardo
    Ghoulslash
    ExboSeed
    Sierraffinity
    Jaizu
     
    Last edited:
    239
    Posts
    8
    Years
    • Seen Apr 15, 2024
    [pokeemerald] Overworld Expansion

    This has been around for a while now, but slawter's repo is pretty out of date and lost in other posts so I thought i would post here for posterity.

    This simply expands the graphicsId from u8 to u16 (up to 65535). Link to my maintained branch

    How to use:
    • Pull from the repo
    • Add new object graphics Ids to include/constants/event_objects.h
    • Make sure you update NUM_OBJ_EVENT_GFX!!!
    • Add new overworld objects as normal (see this wiki post)
     
    239
    Posts
    8
    Years
    • Seen Apr 15, 2024
    [Pokeemerald] Fog Blending

    While its possible to have fog appear over objects by playing around with the gba bg system, this is non-intuitive for most hackers. Instead, we can blend the object palettes with a white-alpha color to make it appear as if the fog is overlaying map objects:

    BP1Jsg3.gif


    Usage:
    • Pull from the repo
    • Set DYNAMIC_OW_PALS to TRUE in include/constants/global.h if you are using dynamic overworld palettes. This changes how the fog knows which sprite palettes to fade.

    Notes:
    • Currently only works fully for horizontal fog
    • Tiles with "Normal" layer type still appear over the fog. This is a consequence of not messing with the bgs.
    • I have not tested this with triple layers.

    Credit for the idea: Skeli/CFRU
     
    11
    Posts
    5
    Years
  • [pokéemerald] Checking how much ash you collected with the Soot Sack

    If you're looking to get all the items the glass workshop on route 113 can make, you'll have to walk through a lot of volcanic ash – the pretty desk requires 8000 steps! I remember back when I repeatedly walked back and forth collecting ash, I wish I had an easy way to check how much I've collected without going back to the workshop and talking to the glass maker. Well, thanks to disassembly, we can make that happen. It's real simple too, as the code is based on what is used for the coin case and powder jar.

    In scr/item_use.c, add the following functions (I added mine after ItemUseOutOfBattle_PowderJar). The first function displays the message when the soot sack is used and the second function gets the ash count for the first function to use.
    Code:
    void ItemUseOutOfBattle_SootSack(u8 taskId)
    {
    	ConvertIntToDecimalStringN(gStringVar1, GetAshCount(), STR_CONV_MODE_LEFT_ALIGN, 4);
    	StringExpandPlaceholders(gStringVar4, gText_AshQty);
    	if (!gTasks[taskId].tUsingRegisteredKeyItem)
    	{
    		DisplayItemMessage(taskId, 1, gStringVar4, BagMenu_InitListsMenu);
    	}
    	else
    	{
    		DisplayItemMessageOnField(taskId, gStringVar4, Task_CloseCantUseKeyItemMessage);
    	}
    }		
    
    u16 GetAshCount(void)
    {
    	u16 *ashGatherCount;
    	ashGatherCount = GetVarPointer(VAR_ASH_GATHER_COUNT);
    	return *ashGatherCount;
    }
    Then in include/item_use.h, declare the functions we just added:
    Code:
    void ItemUseOutOfBattle_SootSack(u8);
    u16 GetAshCount(void);

    Now in src/strings.c, add the following string. This is the message the 1st function will display.
    Code:
    const u8 gText_AshQty[] = _("ASH QTY:\n{STR_VAR_1}{PAUSE_UNTIL_PRESS}");

    Next, add the declaration for the new string in include/strings.h:
    Code:
    extern const u8 gText_AshQty[];

    Finally, in src/data/items.h change .fieldUseFunc for the Soot Sack to use the first new function we created. It should look like this when you're done:
    Code:
    [ITEM_SOOT_SACK] =
        {
            .name = _("SOOT SACK"),
            .itemId = ITEM_SOOT_SACK,
            .price = 0,
            .description = sSootSackDesc,
            .importance = 1,
            .pocket = POCKET_KEY_ITEMS,
            .type = 4,
            .fieldUseFunc = ItemUseOutOfBattle_SootSack,
            .secondaryId = 0,
        },

    And you're done! Pressing on use with the soot sack will show you the quantity of ash you have. It's simple but I'm proud of it cause I'm new to disassembly stuff and since I haven't seen it listed here yet so I thought, Wynaut add it?

    Video example:
    turns out I can't post links yet, but put this in your address bar on youtube, after the dot com /watch?v=E0rngXrOUb4
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • Hey, thanks for this amazing thread! I have 1 question since I didn't find a method of doing this between these tutorials. I would like to make trade evolution items, items that you can use just like thunderstone etc. I've set the evolution types to EVO_ITEM with the corresponding item in src\data\pokemon\evolution.h. Also, I've put .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone for all the items like metal coat in src\data\items.h. After that I went to src\data\pokemon\item_effects.h and added the items to gItemEffectTable like this: [ITEM_METAL_COAT - ITEM_POTION] = gItemEffect_EvoStone since this is the same as what they do with the normal evolution stones. However, when i try to evolve my onix with a metal coat now it just gives me a black screen as soon as i try to use it. I hope someone can help me with this, but im pretty new to this so please explain it as if you are talking to a 5 year old :)
    This thread is not for making requests or asking for help. It's about posting simple features or changes for others to use.
    You should open a new thread in the Decomp & Disassembly Help Section for this kind of matters.

    That being said, I think you're supposed to add an entry for every existing item in src/data/pokemon/item_effects.h. Or at least every single one until the Metal Coat in this case.
    Are you sure that you did that?
    Adding a single entry for the Metal Coat after the last one and calling it a day won't do, as the list clearly covers every single item up to the Enigma Berry by default.
     
    Back
    Top