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

Adding items for pokeemerald-expansion

  • 124
    Posts
    8
    Years
    • Seen Apr 5, 2024
    I was watching team aqua hideout video on adding the pokevial, but it seems outdated, nothing worked, is there a new method to adding new items if im keeping the icons and palettes?
     

    Lunos

    Random Uruguayan User
  • 3,116
    Posts
    15
    Years
    I was watching team aqua hideout video on adding the pokevial, but it seems outdated, nothing worked, is there a new method to adding new items if im keeping the icons and palettes?
    I don't know what does that video show, but the process of adding items is exactly the same as it is in Pret's repository.
    - You define a constant label for your item before ITEMS_COUNT in include/constants/items.h.
    - You add the basic data for your item in src/data/items.h according to your needs.
    - You add a description for it in src/data/text/item_descriptions.h (though that file will eventually be phased out)

    And then the rest kinda depends on what exactly you want to do.
    If you want to add an effect that can be triggered by using the item, you're going to have to assign a fieldUseFunc to your item.
    You can use any of the existing ones as a reference point, but the short version is that you define an OutOfBattle function in include/item_use.h, declare it in src/item_use.c and then you write a function to perform whatever you want, either on that same file or in a different one such as src/party_menu.c, again, according to your needs and wants.

    If you want to add a held item effect for battles, you'll have to define a constant label in include/contants/hold_effects.h that you obviously need to assign to your item in src/data/items.h, and then you'll have to make use of said label in whatever battle system related function you deem it convenient to your goals.
    Could be ItemBattleEffects in src/battle_util.c, could be Cmd_critcalc in src/battle_script_commands.c, etc.
     
    Back
    Top