-
Notifications
You must be signed in to change notification settings - Fork 267
A New Normal Item
Ebernacher90 edited this page Dec 27, 2019
·
11 revisions
How To Add A New Item
This tutorial will go over how to add a new normal item. As an example, we'll be adding the pearl.
Edit constants/item_constants.asm:
const_value = 1
const MASTER_BALL ; $01
const ULTRA_BALL ; $02
const GREAT_BALL ; $03
...
const FLOOR_B4F ; $61
+ const PEARL ; $62
Edit text/item_names.asm:
ItemNames:
db "MASTER BALL@"
db "ULTRA BALL@"
...
db "B4F@"
...
+ db "PEARL@"
Edit data/item_prices.asm:
ItemPrices:
money 0 ; MASTER_BALL
money 1200 ; ULTRA_BALL
...
money 0 ; FLOOR_B4F
+ money 1400 ; PEARL
Edit engine/item/items.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 UnusableItem ; FLOOR_B2F
+ dw UnusableItem ; FLOOR_B1F
+ dw UnusableItem ; FLOOR_1F
+ dw UnusableItem ; FLOOR_2F
+ dw UnusableItem ; FLOOR_3F
+ dw UnusableItem ; FLOOR_4F
+ dw UnusableItem ; FLOOR_5F
+ dw UnusableItem ; FLOOR_6F
+ dw UnusableItem ; FLOOR_7F
+ dw UnusableItem ; FLOOR_8F
+ dw UnusableItem ; FLOOR_9F
+ dw UnusableItem ; FLOOR_10F
+ dw UnusableItem ; FLOOR_11F
+ dw UnusableItem ; FLOOR_B4F
+ dw UnusableItem ; PEARL
And that's it! You've added a new normal ITEM into the game.