Get Items

Adding new items to the inventory.

  • get command adds new items from an unspecified source (makes the item from thin air).
  • pick-up can only be used to get items previously dropped on the ground.
  • buy is similar to get, but has additionally functionality to simulate buying from an NPC in the same dialog as selling.

Syntax

get FINITE_ITEM_LIST
buy FINITE_ITEM_LIST
pick-up CONSTRAINED_ITEM_LIST

Annotations:

Examples

get diamond             # 1 Diamond
get 2 apple 2 banana    # 1 Diamond, 2 Apples, 2 Bananas
drop all apples         # 1 Diamond, 2 Bananas. 2 Apples on the ground
pick-up all materials   # 1 Diamond, 2 Bananas, 2 Apples
buy 5 eggs

Picking up previously dropped Items

The only difference between get and pick-up is that pick-up is used to target items previously dropped on the ground.

You cannot pick-up items that aren’t on the ground. Use get instead.

Buying from NPC

Normally, you buy items in this game by “talking” to the item directly in the overworld. Certain NPCs are exceptions, such as Beedle, Travelling Merchants, and Kilton. For these NPCs, you need to talk to them, and buy from a separate dialog.

By default, buy will ALWAYS assume you are buying from overworld, unless you tell it to not do so.

To talk to an NPC and buy, use the talk-to command.

talk-to beedle    # Opens Shop Buying screen
buy 5 arrows
shoot             # Automatically close the screen and shoot arrow
                  # To manually close the screen, use `untalk` or `close-dialog`

To sell, then buy within the same dialog sequence, use the :same-dialog annotation

sell ruby                 # Opens Shop Selling screen
:same-dialog buy 5 arrows # Without exiting dialog, opens Shop Buying screen
close-dialog

Also see Selling.

Pause on Item Text Boxes

During get, pick-up, or buy, you may encounter a “New Item” text box that allows you to open the inventory.

The :pause-during annotation can be used to simulate this action.

Warning

The simulator does NOT check if you are allowed to open the pause menu when you get an item, nor does it check if normal pause menu operations can be performed.

For example, usually you can eat something immediately in the text box that you got it, but you cannot hold another item. Currently, this situation is too complex to simulate correctly.

One use case is to force hold items during an item text box by performing Item Smuggle for Arrowless Offset, then get an item text box (similar to performing Arrowless Offset).

get 2 shrooms
:smug hold 2 shrooms
# Open a chest, for example
:pause-during get lynel-shield 
# Here, you are in pause screen while holding 2 shrooms
unpause
# Now the 2 shrooms will drop to the ground because of how the smuggle works

You can also use this feature to explicitly annotate optimizations for speedruns.

:pause-during get zora-armor; equip zora-armor

Performance

The preferred way to simulate getting multiple stackable items, is by invoking the function for adding the item to inventory repeatedly. However, when the number of items to get is large, this is a very expensive operation and can slow down script execution significantly.

Therefore, when the amount specified is greater than some internally determined amount, the implementation switches to a single call of the function with a value. Functionally, it turns:

get 999 apple

into:

get apple[value=999]

Most of the time (if not all), this will not cause inaccuracies. However, if it matters, you can use the :accurately-simulate annotation to force the more accurate implementation.

# This may take 30 seconds or more to execute, depending on your hardware
:accurately-simulate get 999 apples

Detail

  • get, pick-up and buy all require Overworld screen.
  • You cannot get new items while holding items in the overworld
    • with :smug, the held items will be dropped after getting the item