Low Level Operations

These supercommands allow directly editing memory for prototyping or testing, or to workaround limitations of the simulator.

Danger

Because these commands edit memory directly, instead of mimicking what the game does, they could be very inconsistent with the behavior of the game sometimes!

Make sure you read the doc carefully before using them!

Syntax

Examples are available at each section below.

Generate Broken Slots

!break X slots

Adding item slots directly

!init FINITE_ITEM_LIST
!add-slot FINITE_ITEM_LIST

Forcefully remove item

!remove CONSTRAINED_ITEM_LIST

Change item data

!write [META] to ITEM
!swap ITEM1 and ITEM2

Generate Broken Slots

Tip

The simulator supports breaking slots using actions you would do in-game. See Break Slots.

The !break command edits mCount of list1 and list2 directly to effectively break slots “by magic”.

Example

!break 20 slots

Add Item Slots

The !init and !add-slot command will directly push a new item from list2 to list1, and set the memory according to the item you specified. This will bypass ALL checks for adding item to inventory.

Note that it will still prevent adding items when list2.mCount is 0.

Furthermore, !init will reset list1 and list2 to the initial state (where list2 has 420 items and list1 has 0). This means all broken slots will be cleared as well.

Example:

# setting items without sorting
!init 1 slate 1 glider 5 apples
# adding items not addable (doesn't have CanGetPouch flag)
!add-slot <DgnObj_EntanceElevator_A_01>
# when adding stackable items with [value=...], the "amount" becomes
# how many slots to add. e.g. the command below will add 5 slots of 300x arrows
!add-slot 5 arrow[value=300]

Note

The inventory state and GameData will be synced. This will also set the corresponding IsGet flag for the item, and the IsOpenItemCategory for the corresponding category.

Danger

If !init or !add-slot is used while the inventory screen is open, the new items may not be accessible until the inventory screen is closed and opened again!

While we could implement a force resync, doing that would change some internals of the pouch state that you may not want - for example, which item nodes correspond to the equipments in the overworld.

Forcefully Remove Items

The !remove supercommand lets you forcefully delete items from the inventory:

  • For Arrows, Materials, Foods, and Key Items, the value of the slot will decrease by the amount.
  • For the rest, the amount in the command corresponds to how many slots of this item you want to remove.

Inventory and GameData state are fixed and synced afterward.

Example:

!remove all cores

Warning

This command can target items that are normally inaccessible in the pouch screen. For example, when mCount is 0, or when the item slot is over the maximum available slots for Weapon/Bow/Arrow/Shield.

Change Item Data

The !write supercommand lets you edit the data for an item using the Item Meta Syntax. Inventory is fixed afterward, but GameData is NOT synced (for historical reason).

Currently, changing the ingredients is not supported.

Examples:

# Change the value of the Master Sword to 0
# NOTE THAT THIS DOES NOT BREAK IT 
# to break Master Sword properly (allowing MSWMC), you have to use the `use` command
!write [value=0] to master-sword

# Change the price of wild greens with price 102 to 101
!write [price=101] to wild-greens[price=102]

# When targeting the item by position, you can also change the item name
# Change the item in material tab 1, row 1, column 2, to royal-claymore
# with durability 20 (no matter what the item at that position is)
!write [dura=20] to royal-claymore[category=material, row=1, col=1]

Warning

This command can target items that are normally inaccessible in the pouch screen. For example, when mCount is 0, or when the item slot is over the maximum available slots for Weapon/Bow/Arrow/Shield.

The !swap supercommands targets 2 items, and swap their nodes in the list. Inventory is fixed afterward, but GameData is NOT synced (for historical reason).

Examples:

# Swap the first apple stack and the first banana stack
!swap apple and banana

# Swap the equipped royal claymore and the equipped bow (whatever the bow is)
!swap royal-claymore[equipped] and bow[equipped]

Danger

If !write or !swap is used while the inventory screen is open, some inventory state may not reflect immediately until the inventory is closed and opened again! (For example, when writing [equip=false].

While we could implement a force resync, doing that would change some internals of the pouch state that you may not want - for example, which item nodes correspond to the equipments in the overworld.