-
Notifications
You must be signed in to change notification settings - Fork 273
A New Evolution Item
RainbowMetalPigeon edited this page Mar 17, 2023
·
14 revisions
How To Add A New Evolution Item
This tutorial will go over how to add a new normal item. As an example, we'll be adding the metal_coat.
- Define a ITEM Constant
- Give the ITEM a Name
- Give the ITEM a Price
- Give the ITEM a effect
- Lets give the ITEM the effect to use in Menu
- Define if the ITEM is a KEY ITEM
Edit constants/item_constants.asm:
const_def
const MASTER_BALL ; $01
const ULTRA_BALL ; $02
const GREAT_BALL ; $03
...
const MAX_ELIXER ; $53
+ const METAL_COAT ; $62
DEF NUM_ITEMS EQU const_value - 1
Edit data/items/names.asm:
ItemNames:
list_start ItemNames
li "MASTER BALL"
li "ULTRA BALL"
...
li "MAX ELIXER"
+ li "METAL COAT"
assert_list_length NUM_ITEMS
Edit data/items/prices.asm:
ItemPrices:
bcd3 0 ; MASTER_BALL
bcd3 1200 ; ULTRA_BALL
...
bcd3 0 ; MAX_ELIXER
+ bcd3 2100 ; METAL_COAT
assert_table_length NUM_ITEMS
Edit engine/items/item_effects.asm:
UseItem_:
ld a, 1
ld [wActionResultOrTookBattleTurn], a ; initialise to success value
...
ItemUsePtrTable:
dw ItemUseBall ; MASTER_BALL
dw ItemUseBall ; ULTRA_BALL
...
dw ItemUsePPRestore ; MAX_ELIXER
+ dw ItemUseEvoStone ; METAL_COAT
ItemUseBall:
Edit data/items/use_party.asm:
; items which bring up the party menu when used
UsableItems_PartyMenu:
db MOON_STONE
db ANTIDOTE
...
db MAX_ELIXER
+ db METAL_COAT
db -1 ; end
Edit data/items/key_items.asm:
KeyItemFlags:
bit_array KeyItemFlags
dbit FALSE ; MASTER_BALL
dbit FALSE ; ULTRA_BALL
...
dbit TRUE ; SILPH_SCOPE
...
dbit FALSE ; MAX_ELIXER
+ dbit FALSE ; METAL_COAT
end_bit_array NUM_ITEMS
And that's it! You've added a new evolution ITEM into the game.