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

[Other] Randomised Features Assistance Requested (Emerald)

54
Posts
1
Years
    • Seen Apr 14, 2024
    I was hoping for some assistance with making some features work in the Emerald Decomp.

    1) What would I change to make it so Wild Encounters would spawn with Random moves available to their level or lower, instead of the specific set of 4 for their level? I have tried looking and am unable to find what determines moves on a Wild Spawn.
    1b) Also have the options pick from Egg Moves would be great.

    2) Is it possible to have weather randomly change intermittently (or as you walk into a new area)? Either having it by map or as a global thing would be good.

    3) Is there a way to make Wild Pokemon spawn with EVs?

    4) How are the in game randomisers setup?

    5) Is there a way to reset trainer encounters after a certain event? A clear all trainer flags option or something.

    Thanks in advance for any assistance.
     
    Last edited:

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 1) What would I change to make it so Wild Encounters would spawn with Random moves available to their level or lower, instead of the specific set of 4 for their level? I have tried looking and am unable to find what determines moves on a Wild Spawn.
    One of the functions that is executed as a part of the chain of functions in charge of setting up the data of the wild Pokémon you're going to encounter.
    Start by looking at CreateWildMon and then move from there, to either CreateMonWithGenderNatureLetter or CreateMonWithNature which are functions that it calls.
    This rabbit hole ultimately ends in CreateBoxMon for whatever it's worth, so you could probably handle the logistics there.
    1b) Also have the options pick from Egg Moves would be great.
    You'd do the same sort of work, but reading from the gEggMoves array instead, either directly or based on conditions.
    2) Is it possible to have weather randomly change intermittently (or as you walk into a new area)? Either having it by map or as a global thing would be good.
    Yes. You could grab this, remove the RTC related checks and call it a day.
    3) Is there a way to make Wild Pokemon spawn with EVs?
    Yes, see my answer to your first question.
    4) How are the in game randomisers setup?
    The only one I'm personally aware of is TheXaman's.
    You can check the changes that it makes to the codebase using GitHub's Compare feature.
    https://github.com/pret/pokeemerald...ald:tx_randomizer_and_challenges#files_bucket
    5) Is there a way to reset trainer encounters after a certain event? A clear all trainer flags option or something.
    Yeah.
    For example, you can write a function to call inside an overworld script of your choice either directly by using callnative or as a special by using the special command, that performs a for loop to clear the flags of each trainer in the game, starting from the first one to the last.

    Basically, something like this:
    Code:
    void ClearTrainerFlags(void)
    {
        u32 i;
    
        for (i = TRAINER_NONE; i < TRAINERS_COUNT; i++)
            FlagClear(TRAINER_FLAGS_START + i);
    }
     
    Back
    Top