• 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] Wild Pokémon Drop Held Items

4
Posts
7
Years
    • Seen Mar 28, 2024
    Wild Pokémon Drop Held Items


    Since many RPGs feature item drops after battle, I decided to make a branch that makes it so Wild Pokémon drop their held items after being defeated in battle (and they get sent to your bag). I doubt I'm the only one who has ever wanted this, so I figured I should share! If you're pulling from my GitHub, keep in mind that this was built on top of pokeemerald-expansion, so it might not work if you don't have it. I will link the code below so you can see what changes to make if you'd like to work around that (granted implementing a new script command might be slightly different). Credit is appreciated! If there are any issues, please let me know.

    See Code Here:
    https://github.com/AgustinGDLV/pokeemerald-rom-hack/compare/item_drops?expand=1

    How to Add:
    git remote add agustin https://github.com/AgustinGDLV/pokeemerald-rom-hack
    git pull agustin item_drops
     
    55
    Posts
    1
    Years
    • Seen May 11, 2024
    Is there a way this can be tweaked for Trainers to drop items or would that need it's own framework? Also, does this only work on wild pokemon?
     
    1
    Posts
    5
    Years
    • Seen Jan 6, 2024
    Code:
     src/battle_script_commands.c: In function `Cmd_various':
    src/battle_script_commands.c:8930: too few arguments to function `IsDoubleBattle'
    src/battle_script_commands.c:8932: structure has no member named `heldItems'
    src/battle_script_commands.c:8933: structure has no member named `heldItems'
    src/battle_script_commands.c:8940: too few arguments to function `IsDoubleBattle'
    Makefile:261: recipe for target 'build/emerald/src/battle_script_commands.o' failed

    that's what i get when trying to compile, at first glance it looks like some functins got updated or got a different name
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • Code:
     src/battle_script_commands.c: In function `Cmd_various':
    src/battle_script_commands.c:8930: too few arguments to function `IsDoubleBattle'
    src/battle_script_commands.c:8932: structure has no member named `heldItems'
    src/battle_script_commands.c:8933: structure has no member named `heldItems'
    src/battle_script_commands.c:8940: too few arguments to function `IsDoubleBattle'
    Makefile:261: recipe for target 'build/emerald/src/battle_script_commands.o' failed

    that's what i get when trying to compile, at first glance it looks like some functins got updated or got a different name
    Nope, that's not the case.
    For starters I'd like to clarify that in those errors there's a mention to one single function, and then a mention to a struct member/variable.
    Now, both of them are still working exactly the same in the battle_engine, as they were when Agustin implemented this. You can quickly check this on the Pokeemerald-expansion's repository on GitHub.

    After looking at the commit history of this item_drops branch, I tried to pull it in an up-to-date copy of the Pokeemerald-expansion's Master branch just now and things seem to be working correctly, in the sense that a ROM does get built normally and without any errors.

    If you want to implement this feature branch without conflicts, you need to pull it in a project that uses the Pokeemerald-expansion's Master branch, so your commits and most of the ones in the item_drops branch will match.
    Alternatively, you can implement its changes manually in any project that has the battle_engine implemented, since it doesn't use anything from the item_expansion or the pokemon_expansion.
    https://github.com/AgustinGDLV/pokeemerald-rom-hack/compare/master...item_drops
     
    Last edited:
    55
    Posts
    1
    Years
    • Seen May 11, 2024
    Nope, that's not the case.
    For starters I'd like to clarify that in those errors there's a mention to one single function, and then a mention to a struct member/variable.
    Now, both of them are still working exactly the same in the battle_engine, as they were when Agustin implemented this. You can quickly check this on the Pokeemerald-expansion's repository on GitHub.

    After looking at the commit history of this item_drops branch, I tried to pull it in an up-to-date copy of the Pokeemerald-expansion's Master branch just now and things seem to be working correctly, in the sense that a ROM does get built normally and without any errors.

    If you want to implement this feature branch without conflicts, you need to pull it in a project that uses the Pokeemerald-expansion's Master branch, so your commits and most of the ones in the item_drops branch will match.
    Alternatively, you can implement its changes manually in any project that has the battle_engine implemented, since it doesn't use anything from the item_expansion or the pokemon_expansion.
    https://github.com/AgustinGDLV/pokeemerald-rom-hack/compare/master...item_drops

    I was also getting the "helditems" error, so the likely cause is that the master has been updated beyond what Anercomp and I have.

    I haven't updated because I am worried about changes I have made becoming incompatible (I am new to Git based work)
     
    Back
    Top