diff options
-rw-r--r-- | Add-different-kinds-of-new-items.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Add-different-kinds-of-new-items.md b/Add-different-kinds-of-new-items.md index 30f4dcf..96e9a9b 100644 --- a/Add-different-kinds-of-new-items.md +++ b/Add-different-kinds-of-new-items.md @@ -52,7 +52,7 @@ Every kind of item has these pieces of data. `ItemNames`, `ItemDescriptions`, `I **Attributes** are defined in [data/items/attributes.asm](../blob/master/data/items/attributes.asm). They use an `item_attribute` macro that defines many pieces of data at once: - **price:** The price in Marts. Prices range from ¥0 to ¥65535 ($FFFF, the maximum value of a two-byte quantity). Items can be resold for half the price. -- **held effect:** The effect when held by a Pokémon. A `HELD_*` constant, or 0 if the item does nothing when held. The `HELD_*` constants are defined in [constants/item_data_constants.asm](../blob/master/constants/item_data_constants.asm). Creating a new held item effect is beyond the scope of this tutorial, but you can look at which effect constants are used by existing items to see what they do. +- **held effect:** The effect when held by a Pokémon. Usually `HELD_NONE`, except for items like Leftovers. The `HELD_*` constants are defined in [constants/item_data_constants.asm](../blob/master/constants/item_data_constants.asm). Creating a new held item effect is beyond the scope of this tutorial, but you can look at which effect constants are used by existing items to see what they do. - **parameter:** A piece of extra data associated with the item. Usually 0, but some item effects use this parameter. For instance, BrightPowder's parameter of 20 is interpreted by `BattleCommand_CheckHit` as an extra 20/256 (~7.8%) chance to miss a move. - **property:** Controls whether you can select and/or toss the item. 0, `CANT_SELECT`, `CANT_TOSS`, or `CANT_SELECT | CANT_TOSS`. Most items have `CANT_SELECT`, except for the usefully selectable ones like Bicycle or ItemFinder. `CANT_TOSS` is for key items and HMs. - **pocket:** Which pocket it goes in. `ITEM`, `KEY_ITEM`, `BALL`, or `TM_HM`. @@ -111,9 +111,9 @@ Edit [data/items/attributes.asm](../blob/master/data/items/attributes.asm): ```diff -; ITEM_19 -- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +- item_attribute $9999, HELD_NONE, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BIG_NUGGET -+ item_attribute 20000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE ++ item_attribute 20000, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE ``` Edit [data/items/item_effects.asm](../blob/master/data/items/item_effects.asm): |