This article describes how items work in the game, as well as how they are stored in the Bag.
Items
An item in a Pokémon game is nothing more than a number; an item cannot be customised in any way. There is no difference between any two of the same item.
Mail can display custom messages. A mail's message (and related information) is saved as a property of the Pokémon holding the mail. The mail item and its message can be stored in the PC's Mailbox instead of the Bag. The message cannot exist otherwise.
Important items
An important item is one which the player can only have one of throughout the game, and which they will not be able to get rid of (e.g. by tossing or selling it, or using it up). The quantity of such an item will not be shown in the Bag. Key Items and HMs are classed as important items, in both cases by defining them as such.
TMs can also be behave as important items, by setting the variable INFINITETMS
in the script section Settings to TRUE. This makes TMs work as they do in the Gen 5 games, where one TM can be used repeatedly. If the variable is FALSE, TMs are one-use-only items like in older games.
As important items cannot be sold, their price is (usually) irrelevant. If the price is non-zero, however, it can be sold by a Poké Mart. The reason the player cannot sell an important item is because it is classified as an important item, notbecause its price is 0 (although items with a price of 0 cannot be sold either).