• 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

247
Posts
6
Years
    • Age 25
    • Seen yesterday
    Added sprites for all Gen 3 Pokémon, except for Deoxys' non-Normal forms. I also added a whole other branch for just Gen 1-3 sprites, since a lot of hacks only use those Gens, and it would be a waste of space for those hacks to need to have sprites for all of the other generations once I go about adding them. That branch also allows for all of the Unown forms to show up in the overworld! The Gen 1-3 only branch also uses less palettes, which saves a little bit more space. I think I didn't ruin any of the sprites by reducing the palette count, but if I did, just let me know in this thread.
     
    19
    Posts
    4
    Years
  • when I tried to build after fetching the FollowingPokemon_Gen1-3 branch to a new local branch of an existing repo, I got "bad instruction" errors in a huge amount of map scripts. I won't post a log, as it's an absurd amount of text for that. but I do have a screenshot:
    p.jpeg


    at a glance all the errors link to "bg_sign_event".
     
    247
    Posts
    6
    Years
    • Age 25
    • Seen yesterday
    when I tried to build after fetching the FollowingPokemon_Gen1-3 branch to a new local branch of an existing repo, I got "bad instruction" errors in a huge amount of map scripts. I won't post a log, as it's an absurd amount of text for that. but I do have a screenshot:
    p.jpeg


    at a glance all the errors link to "bg_sign_event".

    Well, I don't know what to tell you. I just built that branch by itself, and there were no errors. I also did a full scan through the repository for "bg_sign_event", and there is no such series of characters in the repository. It seems like this error is coming from something you've added to your repository that I have no knowledge of. Sorry I can't be of more help.
     
    19
    Posts
    4
    Years
  • looks like it was just a me problem. I had forgotten to run "make clean" after swapping branches. it builds fine for me now.
     
    247
    Posts
    6
    Years
    • Age 25
    • Seen yesterday
    Just added shrinking into/growing out of Pokéball animations, along with some more overworld Pokéball sprites (thanks to malice936 on Devianart)! The Pokéball will be the same as whatever ball the Pokémon is in, unless it's a Pokéball introduced in item_expansion. I updated some of the gifs in the main post to show the additions. I would also like to shout out pokemerrp's following Pokemon project, which has interaction scripts and some other neat stuff. Give her project a lookover if you're interested. Also, if anyone knows how to fix the weird flash-of-pink bug relating to the sparkle animation, I'd love to hear it, since I have little to no idea why it's happening. I figure it has something to do with the sparkle's palette, since I know it has pink in there, but that's all I've got.
     

    Dvsein

    Dark Tyranitar
    5
    Posts
    3
    Years
  • hello, I had a problem when I added the system.

    When the main character runs, the Pokémon that follows him does well. But when walking he changes position. Also when walking, when I move the main character down, it goes up.

    Another error I had is that the pokémon that is loaded is not the one that should be, if not two before (Ex: If my initial pokémon is Pikachu, Ekans will appear as a follower).

    Any idea what it could be? Any file that you recommend me to look at? It is worth mentioning that I have the Auto-Run, will there be a conflict with it for the error of the movement of the protagonist when walking?

    Sorry for the English, I used a translator.

    ** I leave you a video of what happens to me

    EDIT: Thanks for this implementation

     
    Last edited:
    247
    Posts
    6
    Years
    • Age 25
    • Seen yesterday
    Another error I had is that the pokémon that is loaded is not the one that should be, if not two before (Ex: If my initial pokémon is Pikachu, Ekans will appear as a follower).

    For the wrong Pokemon error, my guess is that you have two object events that you added after OBJ_EVENT_GFX_HOOH in include/constants/event_objects.h, but before all of the follower object events. This would cause all of the offsets to be off by two. If this is the cause of the issue, you can fix this by going into src/overworld.c, and then look at the function UpdateFollowerPokemonGraphic. Then make this change to the first line:
    Code:
    u16 leadMonGraphicId = GetMonData(&gPlayerParty[GetLeadMonNotFaintedIndex()], MON_DATA_SPECIES, NULL) + 238;
                                                                                                           ↓   ↓   ↓   ↓
    u16 leadMonGraphicId = GetMonData(&gPlayerParty[GetLeadMonNotFaintedIndex()], MON_DATA_SPECIES, NULL) + OBJ_EVENT_GFX_BULBASAUR - 1;
    This will allow you to have as many object event constants as you want before the start of the followers without causing this offset to occur. I'm going to add this in the next time I update the repository, along with a similar fix to IsFlyingPokemonGraphic in gflib/sprite.c. Thanks for bringing this to my attention!

    When the main character runs, the Pokémon that follows him does well. But when walking he changes position. Also when walking, when I move the main character down, it goes up.

    Now this error is much harder to solve. I only have a couple ideas, and I'm not really confident in either of them.

    The first thing you can try is go into include/global.h, and go down to the definition of struct SaveBlock2. Make sure that bool8 autoRun; is below struct Follower follower;. Sometimes the order of the elements of a struct are important, so that might be messing it up. Still, I'm not confident that this is the solution.

    The other idea that I have is based on what I saw in the video. From what I could tell, it looked like the follower acted as if it was south of the protagonist, even though it was actually north. It's possible that, when you switch off the auto-run feature, it causes the follower to reset to being south of the player, regardless of where it actually is. It's a stretch, but something like that may be happening. You could try resetting the follower's coordinates to their proper location whenever you switch off the auto-run feature. Again, I'm not very confident with this fix either, but it's worth a shot.

    Let me know if these fixes work for you or not!
     
    Last edited:

    Dvsein

    Dark Tyranitar
    5
    Posts
    3
    Years
  • For the wrong Pokemon error, my guess is that you have two object events that you added after OBJ_EVENT_GFX_HOOH in include/constants/event_objects.h, but before all of the follower object events. This would cause all of the offsets to be off by two. If this is the cause of the issue, you can fix this by going into src/overworld.c, and then look at the function UpdateFollowerPokemonGraphic. Then make this change to the first line:
    Code:
    u16 leadMonGraphicId = GetMonData(&gPlayerParty[GetLeadMonNotFaintedIndex()], MON_DATA_SPECIES, NULL) + 238;
                                                                                                           ↓   ↓   ↓   ↓
    u16 leadMonGraphicId = GetMonData(&gPlayerParty[GetLeadMonNotFaintedIndex()], MON_DATA_SPECIES, NULL) + OBJ_EVENT_GFX_BULBASAUR - 1;
    This will allow you to have as many object event constants as you want before the start of the followers without causing this offset to occur. I'm going to add this in the next time I update the repository, along with a similar fix to IsFlyingPokemonGraphic in gflib/sprice.c. Thanks for bringing this to my attention!



    Now this error is much harder to solve. I only have a couple ideas, and I'm not really confident in either of them.

    The first thing you can try is go into include/global.h, and go down to the definition of struct SaveBlock2. Make sure that bool8 autoRun; is below struct Follower follower;. Sometimes the order of the elements of a struct are important, so that might be messing it up. Still, I'm not confident that this is the solution.

    The other idea that I have is based on what I saw in the video. From what I could tell, it looked like the follower acted as if it was south of the protagonist, even though it was actually north. It's possible that, when you switch off the auto-run feature, it causes the follower to reset to being south of the player, regardless of where it actually is. It's a stretch, but something like that may be happening. You could try resetting the follower's coordinates to their proper location whenever you switch off the auto-run feature. Again, I'm not very confident with this fix either, but it's worth a shot.

    Let me know if these fixes work for you or not!


    Thank you very much for your response and sorry for my delay in responding. For the first problem (wrong pokémon) I was looking for something similar to what you indicated. Thank you very much, I was able to solve that.

    The other problem I definitely couldn't solve. I tried what you told me but I think it's something deeper. The worst thing is that the normal movement of the main character (not running) when pressing the direction down, it goes up. I spent hours looking at the code and seeing where the problem could come from, but still I couldn't. If I manage to solve it, I will leave the answer in this same post.

    EDIT (22/03/22):

    Fixed. Many many thanks to WiserVisor who gave me his help in solving my problem.

     
    Last edited:
    3
    Posts
    9
    Years
    • Age 30
    • Seen Jan 28, 2024
    I tried to implement this in my local repo after adding the item, battle, and pokemon expansions. The game builds fine, but I'm getting some weird graphic issues. Once I'm in the lab and I get the starter, the animation for it to emerge never finishes. I have a pokeball following my character around, which is different depending on which starter I picked, and the NPCs around me will sometimes break for a moment before going back to normal. I'm pretty new to this, so I have no idea if this is a bug or something I did myself while merging the code.
     
    247
    Posts
    6
    Years
    • Age 25
    • Seen yesterday
    I tried to implement this in my local repo after adding the item, battle, and pokemon expansions. The game builds fine, but I'm getting some weird graphic issues. Once I'm in the lab and I get the starter, the animation for it to emerge never finishes. I have a pokeball following my character around, which is different depending on which starter I picked, and the NPCs around me will sometimes break for a moment before going back to normal. I'm pretty new to this, so I have no idea if this is a bug or something I did myself while merging the code.

    This is an issue that is caused by the pokemon_expansion. In the species constants in pret's repository, there's a gap between SPECIES_CELEBI and SPECIES_TREECKO, where the OLD_UNOWN constants are. These OLD_UNOWN constants aren't present in the pokemon_expansion. This causes the first 12 Pokémon from Gen 3 to have their sprites be a Pokeball or a sparkle, and then the rest of Gen 3 have offset sprites. I will push a fix to this either later today or tomorrow, since that is pretty significant. Thanks for pointing this out to me!
     
    247
    Posts
    6
    Years
    • Age 25
    • Seen yesterday
    Just pushed the fix for both the wrong Pokémon issue that Dvsein had, as well as the pokemon_expansion issues that trippytoasters had. Hopefully it works for you, now!
     
    247
    Posts
    6
    Years
    • Age 25
    • Seen yesterday
    Just added sprites for the item_expansion Pokéballs in the overworld, other than the Beast Ball, since I haven't found a sprite for that one. If anyone would be willing to draw a Beast Ball in the style of the other overworld Pokéball sprites, I'd be very grateful!
     
    3
    Posts
    9
    Years
    • Age 30
    • Seen Jan 28, 2024
    I'm having another weird issue now :/ After a certain point in the Pokedex, the followers start showing up as the wrong pokemon. After managing to set up the debug menu, I tested out giving myself pokemon and seeing which ones worked and which didn't. It looks like Taillow is the first one to show up incorrectly (appears as a Nincada). All the pokemon before it seem fine, and all the ones after are wrong. Again, I'm not familiar enough with the code yet to know for sure if this was something I caused or not. I updated to the latest commits and manually checked my code compared to the repo, didn't see anything out of place, but again I'm still not very familiar with this yet.
     
    247
    Posts
    6
    Years
    • Age 25
    • Seen yesterday
    I'm having another weird issue now :/ After a certain point in the Pokedex, the followers start showing up as the wrong pokemon.

    This was another bug caused by the pokemon_expansion. They reordered the SPECIES constants, which directly affects which follower graphic gets picked. I just pushed a fix for this. Thanks for finding another bug!
     
    34
    Posts
    2
    Years
    • Age 24
    • Seen Aug 13, 2023
    I seem to be having trouble adding new followers into this. I had no trouble adding followers beyond the original 386 in Merrp's system, so curious how this is handling them differently.

    I've tried declaring my new OBJ_EVENT_GFX for the new species I'm adding, but it seems that anything after Deoxys is not appearing properly. How exactly should we be entering new objects for followers and how strict is it about ordering?
     
    247
    Posts
    6
    Years
    • Age 25
    • Seen yesterday
    How exactly should we be entering new objects for followers and how strict is it about ordering?

    The system is based entirely on the SPECIES constants that are returned by the function GetMonData. All of the follower OBJ_EVENT_GFX constants need to be in the species order, or else things get out of whack. Everything else should be the same in terms of adding in new object event stuff. If you're doing that and there are still problems, I would have to know what exactly is going wrong when your new follower appears, and see the entire process you went through to add the object event data.
     
    34
    Posts
    2
    Years
    • Age 24
    • Seen Aug 13, 2023
    The system is based entirely on the SPECIES constants that are returned by the function GetMonData. All of the follower OBJ_EVENT_GFX constants need to be in the species order, or else things get out of whack. Everything else should be the same in terms of adding in new object event stuff. If you're doing that and there are still problems, I would have to know what exactly is going wrong when your new follower appears, and see the entire process you went through to add the object event data.

    Thanks for the confirmation! I'll give that a shot.
     

    kfm

    2
    Posts
    1
    Years
    • Age 28
    • Seen Jul 7, 2023
    Hi,

    When testing your repo I noticed the palettes for reflection sprites behave weirdly.

    ca0d85ffc8018119b5c77b8400bf8b63.png
    546ad87d10a36b1848c7ec2cfce5af49.png
    d8612956b5fe4803d75710d45f2765b3.png


    I tried this on the "FollowingPokemon" and "FollowingPokemon_Gen1-3" branches from your repo.
    Reloading an area will sometimes change the palette for NPC and follower reflections, but never for the player.

    Any idea what's causing this?
     
    Back
    Top