• 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] Following Pokémon

Just added a new macro called setfollowerwarppos to be used when doing a scripted warp. I detailed the use of it on the main post under "Recommended Use". Karl's going crazy with the bug finds, so thanks to him again for leading me to make this fix.
 
I found a pretty weird bug. When you jump over a ledge and land in tall grass, you will get an encounter 100% of the time as soon as you take a step. I tested it on the unmodified FollowerGen1-3 branch.

You are right, that bug is definitely there. I've tried looking into the code relating to the odds of a wild encounter, as well as code relating to jumping off of ledges, but I didn't see something that would be causing this issue. Very strange. If anyone has any ideas for fixing that bug, I'd be happy to hear it.

I experienced this bug too and decided to have a look...

It seems the game checks for random encounters on the first frame a player is standing still after having moved or turned. When the player takes a step after having jumped a ledge, the time it takes for the player to walk to the next tile and stop is shorter than the time it takes for the follower Pokémon to land after jumping the ledge. Looking at the code, it seems the player's tileTransitionState becomes T_TILE_CENTER once they finish walking to the next tile, but it stays as T_TILE_CENTER until the follower Pokémon has finished jumping the ledge (where normally it would stay as T_TILE_CENTER for only one frame). This causes the game to check for an encounter every frame until the follower has landed from the jump.

[PokeCommunity.com] Following Pokémon
This can be fixed by adding an additional check on line 121 in src/field_control_avatar.c to see if the player is allowed to move (which as far as I can tell doesn't break anything else...).
Code:
    if (forcedMove == FALSE)
    {
        if (tileTransitionState == T_TILE_CENTER && runningState == MOVING)
            input->tookStep = TRUE;
        if (forcedMove == FALSE && tileTransitionState == T_TILE_CENTER [COLOR=GREEN]&& gPlayerAvatar.preventStep == FALSE)[/COLOR]
            input->checkStandardWildEncounter = TRUE;
    }
[PokeCommunity.com] Following Pokémon
I hope this helps. :)
 
There may very well be a way of going about adding it to pokefirered, but I am not well-versed in how that decompilation is laid out. Based on the issue you're having, I would assume there's some issue with adding too many object events into the game, but that's just a wild guess. If you wanted to PM me with a link to your repository, I could take a look so as to better understand the situation, but I can't provide more help than that.

Did you guys ever figure that out, i tried to modify the firered code with all the changes from your 151 commit but i'm terrible at coding and i got a bunch of errors building that I don't know how to fix. I really wanted to play firered with my charmander following me around XD
 
I experienced this bug too and decided to have a look...

Thanks for the bug fix! I just pushed it to my repo with credit.

Did you guys ever figure that out, i tried to modify the firered code with all the changes from your 151 commit but i'm terrible at coding and i got a bunch of errors building that I don't know how to fix. I really wanted to play firered with my charmander following me around XD

I haven't looked into how to go about porting this system to pokefirered. If you want to PM me some of those errors that you got, I could see if I can help you out.
 
This is awesome! Any way this could be applied to a Firered Decomp?

It could definitely be applied to pokefirered, but there would be some significant adjustments that need to be made. I currently don't have any plans on going through that process, but it can definitely be done. I know SSQuiLava333 was interested in the same thing. You could ask her to see what she did, although I don't think she got it working fully.
 
After exiting Fiery Path onto the Route 112 on a bike, it becomes impossible to move and the camera becomes bugged. After opening and closing the bag you can move, but the camera is still bugged.
 

Attachments

  • [PokeCommunity.com] Following Pokémon
    578vrPC.png
    39.7 KB · Views: 10
In the Lavaridge Gym a similar bug happens. When you drop from a hole - you can't move until you used the bag. Though no camera bugs happen. If you climb up the hole - everything is normal, the bug happens only when you drop.
[PokeCommunity.com] Following Pokémon
 
Last edited:
Also, the pokemon don't follow you during forced movement dialogue scenes

That is intended to happen, as that's how the original Follow Me code operates. If you want the follower to move during scripted scenes, you can go into src/follow_me.c and remove these lines from the function FollowMe:
Code:
    else if (ArePlayerFieldControlsLocked() && !ignoreScriptActive)
        return; //Don't follow during a script
Removing those lines will cause the follower to still follower the player during scripted events.

I'll be checking the other bugs you mentioned, and I'll see what I can do to fix them. Thanks for pointing them out!
 
I might be dumb.. But umm, how do I download this? xD

Acquisition:
Spoiler:
 
After exiting Fiery Path onto the Route 112 on a bike, it becomes impossible to move and the camera becomes bugged. After opening and closing the bag you can move, but the camera is still bugged.

I've spent a while working on this bug, and I've got nothing to show for it. I initially tried figuring out why this bug happens at all, since it doesn't happen for any cave exit other than that one, but didn't find anything. It might have something to do with the berry trees on this part of the route, since removing those object events fix the bug, but I couldn't figure out what about the trees causes the bug. I tried changing the process of hiding the follower in their pokeball to instead completely remove the follower object event, then recreate it once the player dismounts from the bike. That fixed this bug, but started creating other bugs that I couldn't fix. Really annoying.
 
Last edited:
I've spent a while working on this bug, and I've got nothing to show for it. I initially tried figuring out why this bug happens at all, since it doesn't happen for any cave exit other than that one, but didn't find anything. It might have something to do with the berry trees on this part of the route, since removing those object events fix the bug, but I couldn't figure out what about the trees causes the bug. I tried changing the process of hiding the follower in their pokeball to instead completely remove the follower object event, then recreate it once the player dismounts from the bike. That fixed this bug, but started creating other bugs that I couldn't fix. Really annoying.

hello man, today I found this bug. When you're on the match bike going through the tiles and you end up falling to the floor below, you're stuck. Probably with some code between the follower reappearing and the game not registering that you are no longer on the bike.
 
hello man, today I found this bug. When you're on the match bike going through the tiles and you end up falling to the floor below, you're stuck. Probably with some code between the follower reappearing and the game not registering that you are no longer on the bike.

Could you provide more details? Are you referring to when you fall to a lower floor when you're going up Sky Pillar, or something else?
 
Completed a playthrough with this mod. The most frequent and annoying bug is when you fall down onto a lower floor and your character gets stuck. Happens absolutely everywhere - Gyms, Sky Pillar, Mt. Pyre, etc.
 
hello man, today I found this bug. When you're on the match bike going through the tiles and you end up falling to the floor below, you're stuck. Probably with some code between the follower reappearing and the game not registering that you are no longer on the bike.

Completed a playthrough with this mod. The most frequent and annoying bug is when you fall down onto a lower floor and your character gets stuck. Happens absolutely everywhere - Gyms, Sky Pillar, Mt. Pyre, etc.

I just pushed a fix for this bug. Ended up being way simpler than I was making it out to be. Thanks for pointing this one out!
 
Back
Top