• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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
    8
    Years
    • Seen Nov 5, 2024
    [PokeCommunity.com] 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
     
    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
     
    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:
    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