FANDOM


ItemBall

An item ball.

This article describes how to create item balls, objects on a map that the player can pick up. This article covers visible item balls, hidden items, and balls containing Pokémon.

Item balls

ItemBallEvent

Page 1 of an item ball event.

To create an item that can be picked up, create a new event with the name "Item:XXX", where "XXX" is the internal name of the item (e.g. "Item:POTION"). When the game is compiled, this event will be edited automatically to turn it into a proper item ball, complete with graphic.

The item's name is only important for turning the item into a proper item ball when compiling the game. Once this has been done, the item's name is not important. However, it should not be renamed "Item:XXX" then, because when the game is next compiled, the event will be edited again, potentially overwriting any changes you may have made to the item ball.

Item ball event

Item ball events have two event pages. The first page has an "Action Button" trigger and looks like this:

@>Conditional Branch: Script: Kernel.pbItemBall(PBItems::POTION)
  @>Control Self Switch: A =ON
  @>
 : Else
  @>
 : Branch End
@>

The second event page is blank, and depends on the event's Self Switch A being ON.

The def Kernel.pbItemBall displays two messages: the first is that the player has found the item, and the second is that the player has put it in a particular pocket of their Bag (or that their Bag is full, in which case the item is not picked up).

Hidden items

HiddenItemEvent

Page 1 of a hidden item event.

Hidden items are identical to regular item balls, with three exceptions: they are invisible, the player can walk over them, and they can be detected by an Itemfinder.

To create a hidden item, create a new event with the name "HiddenItem:XXX", where "XXX" is the internal name of the item (e.g. "HiddenItem:NUGGET"). When the game is compiled, this event will be edited automatically to turn it into a proper hidden item.

Unlike regular item balls, hidden items must have the exact name "HiddenItem". This is because the Itemfinder looks for nearby events with that name, and reacts if here are any. The name above is automatically changed to this when the game is compiled.

Hidden item event

The structure of hidden item events is just the same as for regular item ball events, with two exceptions: the first page has no graphic (to make it invisible), and it has the "Through" option checked (to allow the player to walk over it).

Pokémon balls

PokémonBallEvent

Page 1 of a Pokémon ball event.

These are item balls that, rather than giving an item, give a Pokémon instead. Creating a Pokémon ball is slightly more difficult than creating an item ball - you will need to edit the event's structure (see the image on the right).

Rather than having to make a Pokémon ball from scratch (although it is easy to do), you can instead create an item ball (it doesn't matter what item it is), compile the game, and then modify the event as described below.

Pokémon ball event

The structure of Pokémon ball events are identical to item ball events, except the Conditional Branch script in the first page is different, e.g.

@>Conditional Branch: Script: Kernel.pbAddPokemon(:MEW,20)
  @>Control Self Switch: A =ON
  @>
 : Else
  @>
 : Branch End
@>

This will give the player a Level 20 Mew, but only if the player has an empty spot in their party. See the article Manipulating Pokémon for how the def pbAddPokemon works.

Remember that Pokémon ball events still need a second, blank page, just like the other item ball events.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.