Fake Item

From PMDOWiki

A fake item is an item that appears to be a regular item, but is actually a Pokémon in disguise.

Appearance

A player encountering a fake apple.

The item appears normal when encountered on the map. However, when the player's team attempts to pick it up, the game notifies the player that "The [item] was actually a [Pokémon]!". Then, the Pokémon leaps out of the player's bag and is revealed. No real equivalent of the fake is left behind in the player's bag.

Fake items can be picked up randomly with the Pickup ability, in which case the Pokémon will leap out of the bag as soon as the item is found.

While fakes can be defined to be any Pokémon, in most cases they are designed to be ones that make intuitive sense. They will only appear in certain dungeons.

Known fakes used in PMDO include:

Technical Details

Spawn tables and other spawn methods are able to give items a hidden value which allows them to be identified as fakes. These items can then be spawned like any other. MapEffectStep handles spawning of the pokemon itself when the fake is interacted with by the player.

In the MapEffectStep, the effect FakeItemBattleEffect is added to the "before actions", "on equips", and "on pickups" field, with respective priorities -5, -1, and -1. This contains the data of the Pokémon that is masquerading as the fake itself. It is also responsible for triggering the event where the fake is revealed if the corresponding item is picked up.

To cause a fake to spawn, it is added to any spawn table for the floor or segment. The item that the fake is pretending to be is selected, and it is then given a "Hidden Value" that is the name of the Pokémon. For example, a fake apple is spawned by giving an apple the hidden value of "applin".