mirror of
https://github.com/pret/pokeyellow.git
synced 2026-03-27 23:36:27 +00:00
Page:
A New Normal Item
Pages
A New Evolution Item
A New Normal Item
A New Pokemon
Change Pikachu's cries
Enable Surfing Pikachu Minigame (without Pokemon Stadium)
Free some space in BANK 1E
Free some space in the Home BANK
Home
How To Add A New Type
How To Change Wild Pokemon Encounters
Non binary gender selection
Trade Evolutions To Level Evolutions
Tutorials
No results
11
A New Normal Item
Daniel Harding edited this page 2022-06-28 21:43:39 -05:00
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.
Contents
1. Define a ITEM Constant
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
2. Give the ITEM a Name
Edit data/items/names.asm:
ItemNames::
li "MASTER BALL@"
li "ULTRA BALL@"
...
li "B4F@"
...
+ li "PEARL@"
3. Give the ITEM a Price
Edit data/items/prices.asm:
ItemPrices::
bcd3 0 ; MASTER_BALL
bcd3 1200 ; ULTRA_BALL
...
bcd3 0 ; FLOOR_B4F
+ bcd3 1400 ; PEARL
4. Give the ITEM a effect
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 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.