Skybook
物品转存模拟器
中文版 | English Version
新手指南
遇到问题
问题请加讨论群或提交到GitHub。
QQ群
Pistonite学习交流群: 670991147
IST模拟器发展历史
发现
物品转存(IST)于2022年6月由zxrobbin发现( 视频 1, 视频 2 )。最初,玩家以为这只是旷野之息中一个能够简单复制道具的Bug。他们不知道的是,IST即将成为野炊中最复杂的Bug,没有之一。
2022年6月17日左右,新Bug的消息传开。研究者们迅速发现了有关IST的一些规律。
初代 - 百分百速通复制模拟器
在Bug被研究的同时,百分百速通玩家开始将IST复制物品规划进路线。然而,就算是最基础的IST步骤,也需要列出游戏中每一步的背包状态(比如在捡起或丢弃物品时背包的变化)。每一步也都需要计算IST的效果。手写所有步骤需要大量精力,非常繁琐。于是,2022年6月18日,一代IST模拟器诞生。通过将类似 get 1 core
的指令输入模拟器后,模拟器就能自动计算每一步IST效果。玩家可以在模拟器界面中快速查看和修改不同步骤,然后模拟器会自动计算更新后的结果。这大幅提升了开发IST步骤的效率。这种操作模式依然存在于现在的模拟器中。
V2 - 物品转存模拟器
随着更多IST的应用被开发出来,物品转存开始在百分百以外的速通项目应用,如全神庙、全神兽等。数值讹转(DIC)就是IST的应用之一。然而,初代模拟器仅用一天开发,并不支持除了一开始发现的最基本的转存之外的情况。
因为IST已经不再是百分百独有,此项目更名为“IST模拟器”。二代添加了内部数据`和更多物品来更准确地模拟游戏的情况,同时支持数值讹转。
V3 - 武器附魔
好景不长 - IST又有新发现。然而模拟器依然只是模拟器,无法在Bug发现前就支持。每次有大的发现时,几乎必然导致模拟器核心需要大改。2022年11月,通过参考旷野之息反编译项目,第三代模拟器内核完全重写并支持武器附魔。模拟器界面同时也有更新,比如增加指令的语法颜色,和显示附魔数值。
V4 - Skybook
V3更新后的两年内都没有大更新。尽管V3已经能精确模拟IST在速通运用中大部分情况,它在各种边界情况下依然不完美,比如:
- 英杰技能和传送标注器的特殊情况
- 物品页面未被发现的情况
- 当某操作在游戏中无法实现的情况。比如,在计数为
0
时,玩家无法对背包内物品进行交互。 - 。。。
有一点可以明确的是,我们无法枚举所有边界情况。模拟器需要再一次完全重写。2022年至2023年间,我提出利用模拟游戏代码自身一部分来模拟IST的想法。2024年至2025年,我带领了一个学生团队将此想法作为他们的毕业设计做验证机。而我则负责除了核心之外的部分,如界面设计、新的语法解析器设计和其他模拟器系统,如主世界和界面系统。2025年7月,Skybook正式上线。
物品转存发现后3年来的首次,模拟器的精确程度超出Bug研究者的认知。有时的结果看起来像Bug,但其实和游戏里结果一样,只是没有人在游戏里测试过那种情况而已。
常见问题
什么是IST?什么是模拟器?
IST是物品转存(Inventory Slot Transfer)的缩写。这是旷野之息的一个Bug。它利用了背包物品计数不同步于实际物品计数产生的计数差转移物品到不同存档。模拟器是为了研究这个Bug更方便。详见模拟器发展历史和物品转存简介。
我不太会IST,如何使用模拟器?
模拟器并非需要完全理解IST才能使用。你可以用模拟器打开别人制作的IST步骤,查看每一步的操作和背包状态。如果你想用模拟器研究IST,请参考模拟器的使用。物品转存简介概括了IST的一些理论,可能对使用模拟器有帮助。
不理解IST,能在速通里用吗?
不用担心,IST非常复杂,就连世界纪录保持者都不一定完全理解。这也是为什么需要模拟器。
如果你的目标是将IST运用到速通中,大多数人的方法是把步骤完全背下来,或者一边看模拟器的步骤一边执行。
我不速通,只是想玩IST
如果在自己的逛街存档用IST,需要特别注意。如果不小心可能会损坏存档。如果是跟着教程做,需要步骤完全一样,最好不要手动存档。
模拟器是怎么做出来的?
一代至三代模拟器都是通过研究IST的效果和模式,并且参考旷野之息反编译项目开发,属于白盒模式。四代模拟器采用黑盒模式,在沙盒中运行游戏的一部分,由模拟器管理进程状态。所以,第四代模拟器甚至可以模拟还未发现的Bug。
可以contribute吗?
当然!如果你发现了什么Bug,想要自己尝试修,可以在GH上提交PR。如果想要添加新功能,请先与我联系。
项目大多数内容都基于开源和公开的游戏数据。但是,有些部分需要你的游戏Dump才能编译。
请参考开发者文档。
物品转存简介
本篇对应B站上物品转存教程第一期:基础理论。
什么是IST
IST是Inventory Slot Transfer的全称。它是旷野之息中利用了物品计数和物品实际数量不同步的Bug。
开发者确保了在一般游戏操作中,这两个变量始终保持同步。但是有些操作会导致一个物品格子被重复删除,导致物品计数比物品实际数量少1,然后重复操作,即可使物品计数越来越少。物品计数与实际物品数的差称为“物品计数差”,或者“转存格”。“转存格”不是实际存在的格子,所以用“物品计数差”更准确。但是“转存格”的叫法使用更广泛,所以在本手册中,我们将用“转存格”一词。生成计数差的操作称为“制作转存格”。
背包结构
游戏中,打开背包界面能看到的物品我们称之为“可视背包”。可视背包由一个双链表组成。背包中所有页面的物品都连在同一个表中。比如,在正常背包顺序下,表中有所有的武器,然后所有的弓,然后所有的箭,以此类推,最后是所有的重要道具。在背包界面的一页物品中,最左上的物品是表里排最靠前的,最右下的物品是最靠后的。然后先连一行的物品,再到下一行。
The items are also stored at the same time in GameData
, which is the game’s flag system.
The relevant flags are stored with an array type. For example, PorchItem
is a flag that
stored an array of 420 strings, each string correspond to one item’s name.
Other properties of the items are stored each in a different flag, for example
PorchItem_EquipFlag
is an array of 420 bool
s (whether the item is equipped),
and PorchItem_Value1
is an array of 420 s32
s (the value/durability of the item).
Whenever the Visible Inventory
changes, the change is synchronized to GameData
.
We call this process Sync GameData
or simply Sync
. The GameData
is also
what is stored in the save files.
When mCount
is 0, you won’t be able to see the items in the inventory when you open it.
This is because the game thinks
the inventory is empty since the number of items is 0.
However, the items are still there. You can throw a weapon or pick up any item -
as long as mCount is no longer 0, you will be able to access the inventory again.
Why is it called IST - The main mechanism
The huge number of glitches that are derived from IST all rely on the core mechanism - transferring slots, which is how the glitch got its name.
This all happens when the inventory is Reload
-ed, either when loading a save,
or restoring the inventory from a quest that takes away your items (i.e.
Trial of the Sword, Stranded on Eventide, or any of the Blight Refights).
When restoring the inventory, the game needs to do 3 things:
- Delete all of your current items in
Visible Inventory
. - Load the data of the inventory to restore into
GameData
.- In case of reloading a save, it is loaded from the save file.
- In case of quests, it is already stored in
GameData
.
- Add the items in
GameData
one-by-one into theVisible Inventory
.
The magic happens in step 1. Since mCount
is less than the actual number
of items, the game does not fully delete all the items in inventory.
These leftover items will still be there after the reload, effectively
being transferred from one save to another.
Derivative Glitches
The following glitches depend on IST. Click on the link for more information about each of them.
- Direct Inventory Corruption (DIC)
- Weapon Modifier Corruption (WMC)
- Prompt Entanglement (PE)
- Item Stack Underflow
数值讹转 (DIC)
Inventory Corruption is a form of Durability Transfer.
In the game, durability is stored as a fixed-point integer,
with 1
being 0.015
. For example, a weapon with durability 10
has the internal
value of 1000
. In the case of corruption, the durability is transferred
from an equipment - not to another equipment, but to an item. The value
then becomes the count of items. This is very useful, since
you can get a LOT of items from an equipment with relatively low durability
that’s easy to get.
This form of corruption was previously only possible using Memory Storage - another very complex glitch with a lengthy setup. With IST, however, Inventory Corruption is much easier, hence the name Direct Inventory Corruption.
We will go over a few game mechanics first in order to understand why DIC happens.
Setting Durability on Equipment
The game sometimes need to set the durability of the equipment in the inventory from the overworld weapon actor in order to keep the durability in sync. This could happen in a few scenarios, including:
- Using an equipment, such as attacking with weapon, shield surf and shooting an arrow (which uses both bow and arrow)
- Switching equipment
- After reloading from a save
The algorithm to do this is:
- Find the first item in the inventory list that is both equipped and is the same item that is trying to be set (for example, Master Sword)
- Set the value of that item
If you remember from Inventory Representation,
the game also need to sync this change to GameData
. However, syncing the whole
inventory whenever one value changes seem inefficient. Therefore, this form
of sync is done by directly taking the position of the item in the inventory list,
and setting the value of the item in the same position in GameData
.
This is correct if the GameData
is always in-sync with Visible Inventory
,
which would be the case most of the time. Therefore, all the inventory corruption
aims to do is cause GameData
to be desynced, then trigger a durability set.
Note that this is only one form of desync, which is the primary one used for inventory corruption. There is another form of desync used by inventory corruption using Inventory Storage, which is a derivative of Map Storage. We will not be going into the details for that.
GameData Corruption with IST
All it takes for corruption now is 2 things:
- Desyncing GameData
- Apply durability while GameData is desynced.
IST makes desyncing GameData trivial. Recall the 3 steps for reloading:
- Delete all items
- Load GameData
- Add items in GameData to Inventory
After these steps, the game doesn’t actually sync GameData
. Therefore,
whenever items are transferred, the GameData
is automatically desynced
after a reload.
Remember that reloading a save also causes durability to be applied?
This means inventory corruption automatically happens after a reload.
All the player needs to do to exploit this, is to transfer specific items
to desync the GameData
in the way so that equipped items are aligned
to the item to corrupt. This is why different IST setups exist to corrupt
different things in different speedruns.
This is also why it is important to follow the setup to unequip/equip
certain items before reloading, because the equipped item slot is what is
used for corruption. To be exact, the durability of the last equipped slot
is transferred into the first equipped slot in both Visible Inventory
and GameData
.
Aligning the Items
In a DIC setup, we need to align the equipped equipment with the item to corrupt. This is done by transferring the right number of Swords, Shields, Bows, and Arrows. Transferring anything after Arrows typically has no effect, because they don’t affect the positions of equipments since those categories are after equipments in inventory order.
Recall that transferring an item means it is not removed in the inventory. Since the items from GameData are then added on top of that, the transferred items will appear before the items that are loaded in. Effectively, transferred equipments will push items from the save to slots after it.
To determine the right type of equipment to transfer, consider the order of the categories:
- Since Shield is last, transferring any type of equipment will affect the position of shields
- Since Weapon is first, only transferring weapon will affect the position of weapons.
- The rest follow the same concept
For example, transferring 1 Bow, 1 Arrow, 1 Shield, will:
- Not change position of Weapons
- Push Bows by 1 slot
- Push Arrows by 2 slots
- Push Shields by 3 slots
Unsorted Inventory and Leftward Corruption
Note that GameData desynced in this way can only push the items to the right, not left. For example, Weapons can corrupt everything, but Bows cannot corrupt Weapons, and Shields cannot corrupt Weapons, Bows, or Arrows.
Corrupting items that are not possible to corrupt in normal inventory order is known as Leftward Corruption
,
or sometimes Forward Corruption
.
This is done by making the inventory into an order that is not normal. For example, to transfer
durability from a Shield to a Sword, the Sword must be put after the Shield. This state is typically known
as Unsorted Inventory
and opens up a whole different glitch category.
Achieving Unsorted Inventory
is relatively easy. All we need to look at is how the game
put (sort) the item into the correct category when you get something:
- The game always adds the item to the end of the inventory
- The game then sorts the inventory with the following rules:
- Two items should not change their relative order (if A is before B, A must also be before B after sorting)
- Two items that have the same category are considered equal
- Items that should appear in a category before other categories have lower values (say Sword is 0, Bow is 1, etc)
- The list is sorted from lowest value to highest
This type of sort is referred to as a stable sort using a predicate that only compares the category of the items.
The sorting itself cannot achieve the unsorted state, but absence of sort can.
The list code has one more optimization, that sort operations are skipped if
the list has no more than one element. Normally, having 0 or 1 element in the list
means the list is trivially sorted. However, mCount
is used for this optimization
and we know mCount
is not the actual number of items in the inventory.
All it needs for the sort to be skipped is to make your mCount
less than or equal to
one.
Unsorted Inventory can also be used to transfer more equipment with fewer Broken Slots by
putting Weapons after Key Items. This is typically used in speedrun setups where it could be
faster to not break as many slots. This is why some setups require dropping some weapons, then
immediately pick them up again. While picking up the weapons, the mCount
never surpasses
1
, causing the weapons you pick up remain at the end of the inventory.
武器附魔 (WMC)
A Weapon Modifier refers to the power-ups that can be found
on an equipment, such as Attack Up
or Durability Up
.
Weapon Modifier Corruption is a glitch enabled by IST
to transfer data from a cooked item to a weapon, interpreting the memory
as a Weapon Modifier.
During this corruption:
- The
Health Recover
value of the cooked item becomes theValue
of the modifier.- For regular food, this value is the number of quarter-hearts recovered. Between 0 and 120.
- For hearty food, this is the number of yellow hearts.
- The
Sell Price
value of the cooked item becomes theType
of the modifier.- The
Type
is a bit-flag, so WMC can enable multiple modifiers on the same equipment. - See
actWeapon.h
for values for each modifier type.
- The
You will see Prompt Entanglement (PE) often brought up together with WMC. This is because WMC relies on the data from a cooked item, and you can only get a very limited subset of possible cook data values by cooking with normal ingredients. PE allows cooking with unusual ingredients, which is required to get some modifier value/flag. However, WMC and PE are 2 separate glitches, and neither is required to perform the other.
Base Mechanism
WMC is possible because:
- The data for cooked item and the data for modifier is in the same memory
location for each item. i.e. if the item is a food, then the data is used
as cooked data, and if the item is a weapon, then it is used as modifier data.
- This is only true for
Visible Inventory
, notGameData
.
- This is only true for
- The data for cooked item is added separately from the item itself.
In step 2, the cook data is added after adding the cook item, and the game assumes the last added item is the cook item that is supposed to receive the data.
Therefore, a WMC setup typically involves:
- Making sure the last added item is the weapon to receive the corrupted modifier
- Make the cooked item that donates the data fail to load while the last added item is still the weapon, transferring the data to the weapon
Note that #2 essentially means that no item should be loaded between the weapon and the cook item.
Depending on how these 2 conditions are satisfied, the WMC setups can be further categorized.
In general, WMC can refer to any of the cases where the last added item is not the item that is supposed to receive the data.
You can technically corrupt any item in Visible Inventory
,
but only Equipments and Foods will have the data saved to GameData
.
It is not possible to transfer modifier between Weapons, because unlike food, the data for weapons are added in the same step as the item itself (condition 2 from above).
Currently, WMC is only possible when reloading the inventory from GameData
(for example
when reloading a save). This is because there is no known way to trigger adding a cook item
during normal game play while at the same time making it so the cook item doesn’t get added
successfully.
Food Limit
Using the food limit was one of the first methods to WMC. This WMC setup uses the fact that during a reload, any food after the first 60 will not load (under normal circumstances). This can be achieved by transferring 60 food into a save with a weapon, followed by the donor meal.
Example script:
get 1 hammer 1 wild-green[hp=120, price=113]
save
eat wild-green
get 60 dubious-food
!break 60 slots
reload
The step-by-step explanation:
- Note that in the save, the items are 1
hammer
and the donor meal: these are what will be added during reload. - Note that we are transferring 60
dubious-food
. - During the reload, the
hammer
loads in first. - When loading the donor meal, since there are already 60 food, it fails to load.
- Since the last-added item was the
hammer
, the data from the donor meal is transferred to the hammer.
The main drawback for this method is that it requires 60 food and 60 broken slots. Getting 60 broken slots is very tedious.
Stackable Food Limit
The reason why the previous setup required 60 broken slots, is because if we don’t transfer 60 food, then there will be food items that get loaded after the hammer. As a result, the cook data will be transferred to that item, instead of the weapon.
But wait! What if that’s exactly what we wanted? Instead of transferring the modifier directly to the weapon, we can do 2 transfers:
- Using the Food Limit method, transfer the data from the donor meal to a Stackable food (i.e. a roasted/baked/frozen food)
- Using Direct Inventory Corruption, corrupt the food value to >=500
- When loading a stackable item slot, if the value being loaded - plus the value of the item in the inventory - is greater than 999, the stack will fail to load (this is why we need >=500 in the previous step)
- When the stackable food fails to load, it can trigger WMC
Example script
# Setup
get 1 hammer
!break 1 slots
get 58 dubious 1 roasted-endura-carrot 1 wild-green[hp=120, price=113]
# This will make only the last food fail to load, transferring the data to the carrot
save; reload
# Clean up the foods now
eat wild-green; eat all dubious
save
# Corrupt the carrot stack
unequip hammer
eat roasted-endura-carrot
reload
save
# Finally transfer the data to the hammer
reload
As you can see, this method can work with a minimum of 1 broken slots, which is a big improvements over 60 broken slots. In speedruns, typically we use more broken slots anyway to corrupt other stuff and for duplicating food to quickly reach the 60 food required for the first transfer.
The Nullptr Exploit
Both previous setups require 60 food to make the first transfer happen. It would be really nice if that’s not the case. This is where the Nullptr Exploit comes in.
Recall that after adding the cook item (or fails to add), the game applies the cook data to the last added item without checking if it’s the cook item. However, when there is no last added item, the data is not added, and crucially, the game does not advance to the next cook data slot. This means when the next food loads, it will keep using the cook data of the previous food!
This can happen because in the GameData
, the cook data and the item themselves are not stored in the same array:
- The item name array has 420 strings, one for each item.
- The cook data array has 60 elements, one for each food.
When the Nullptr Exploit is triggered, the counter for the item array increments, but not the cook data array.
Using this exploit, 60 food is no longer required. However, this exploit is pretty tricky to trigger;
this is because mLastAddedItem
is only nullptr
before any item is added (with one exception being the Master Sword).
Master Sword (MSWMC)
This setup triggers the Nullptr Exploit using the fact that Master Sword cannot be duplicated.
The condition for this trigger is somewhat complicated:
- A Master Sword is transferred (can be broken or not broken)
- The save being loaded doesn’t have Master Sword being the first item
- This is because adding the first item skips the part check we rely on to trigger the exploit
- The Master Sword Recharge Timer in the save being loaded is non-zero
- The save being loaded has a Master Sword (either broken or not broken)
- 3 and 4 usually means the save has a broken Master Sword
In one sentence, this means to “transfer a Master Sword into a save with a broken Master Sword”.
When all of the above conditions are met, the last-added item is set to nullptr
, enabling the exploit.
The whole setup would be:
- Enable the exploit as described above
- In the same reload, load a food unsuccessfully, without loading any item in between
- This uses the exploit described in the previous section to cause the reuse of cook data
- Now any food that loads after will have the data that’s supposed to be on the food before it
- Continue the Stackable Food Limit setup
Travel Medallion (TMWMC)
This section is WIP and may contain inaccurate information. If you see any issues, or want to improve this section, please create a Pull Request.
The Travel Medallion is added in the Master Trials DLC. Unlike any other DLC items, it gets removed if you uninstall the DLC.
This can be used to trigger the Nullptr Exploit:
- Make a save with Travel Medallion being the first item, and food after it (using Unsorted Inventory )
- Close the game and uninstall the DLC
- If you have physical game without DLC + digital game with DLC, this can be done by ejecting the Virtual Game Card
- Otherwise, follow the steps on this Nintendo Support Article
- Reload the save, setup IST again to transfer some food to make the food fail to load
- Reload the save again, the Travel Medallion will not load as the first item since DLC is uninstalled, and the next food will fail to load because of the transfer
- Now any food that loads after will have the data that’s supposed to be on the food before it
- Continue the Stackable Food Limit setup
Unlike MSWMC, Travel Medallion does not set last added item to nullptr
, so it has very limited usefulness.
Zelda Notes (ZNWMC)
This section is WIP and may contain inaccurate information. If you see any issues, or want to improve this section, please create a Pull Request.
This method has not be verified. It is only theorized based on reverse engineering of version 1.8.0 of the Switch 1 Edition.
Zelda Notes is an item exclusive to the Nintendo Switch 2 Edition. When you uninstall NS2E, it gets removed from your inventory and can be used to trigger the Nullptr Exploit:
- Make a save with the Daily Bonus and Deposit Item being the first 2 items, and food after it (using Unsorted Inventory )
- Close the game and uninstall NS2E
- If you have the physical NS2E Game Card and the NS1E game (physical or digital), this can be done by removing the physical NS2E Game Card (then inserting the NS1E Game Card if you have a physical copy)
- If you only have the physical NS2E Game Card, this is not possible.
- Otherwise, follow the steps on this Nintendo Support Article to download the game without NS2E
- The rest is similar to TMWMC
选项纠缠 (PE)
This glitch is related to the Pouch Screen, which has not been reversed engineered. Most of the concepts are based on experiments, and may not reflect the actual implementation in the game.
This section is WIP and may contain inaccurate information. If you see any issues, or want to improve this section, please edit this file and open a Pull Request.
Prompt Entanglement, or PE, is a glitch that allows you to apply a prompt (like “Equip”, “Drop”, “Hold”, etc) from one item to another item that is not supposed to have that prompt. For example:
- Holding a Food (only Materials are normally holdable)
- Equipping a Material
- Eating a Key Item
Invalid Star Tab
To activate PE, the first step is to activate a state known as Invalid Star Tab. This is a state that allows the cursor (the box that highlights which item is currently selected in the inventory) to go to the “Key Items” icon.
Currently, the only known way to activate Invalid Star Tab is by having items in a category that you have not discovered. For example, have a material without picking up any material.
At first this seems impossible. However, the catch is “picking up” - you can obtain items without picking them up with IST. In an Invalid Star Tab setup, there are 3 general steps:
- Save with the tab you want to use undiscovered
- Pick up an item in that tab, which discovers the tab and gets you the item
- Use IST to transfer that item back into the save you made
Once the setup is done, you can verify Invalid Star Tab is active if any of the following is true:
- When you scroll to the right very quickly, the cursor ends up on the Star.
- When you go to the “System” screen, the cursor remains on the left screen. You can only see the cursor when you press “Right”, which moves it on to the “Save” button.
光标程错
The Cursor Glitch is not fully understood, since the inventory screen system is not reversed engineered. This section may contain inaccurate information.
When Invalid Star Tab is active, you can now perform the Cursor Glitch to achieve PE. This glitch uses a sequence of controller inputs to quickly move the cursor while Invalid Star Tab is active to confuse the inventory code, and puts the cursor on a tab that’s not the current tab you are viewing.
|- you are looking at this page
v
MATERIAL FOOD
[ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]
[ ] [ ] [ ] [ ] [ ] [ ] [ ] [X] [ ] [ ] <- cursor (X) is on another page
[ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]
[ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]
^
|- (this is where Link's model usually is on screen)
Typically, we refer to the position of the cursor by the Row and Column.
In the example above, we say the Cursor Glitch is active at Row 2, Column 3
,
or simply Row 2 Column 3 is activated
.
Since the Cursor Glitch is not fully understood, the community has put together a spreadsheet of different input sequences you can use to active each slot.
When Cursor Glitch is active, you can keep it active by moving tabs in groups of 3 (tap right-stick right 3 times, or left 3 times), without pausing too long between them. Pausing while not on a multiple of 3 tabs from where the slot is activated will reset the cursor’s position, losing the glitched state.
Capturing the Prompt
What the Cursor Glitch enables, is that we can now move the cursor to another item, while the inventory screen still “thinks” we are on the original item, so it opens the prompt of the original item when we trigger it.
When we trigger the prompt (pressing A
), the prompt used
comes from the item that is currently showing the description on the screen:
|- you are looking at this page
v
MATERIAL
[ ] [ ] [ ] [ ] [ ] Link is displayed here
[ ] [ ] [ ] [ ] [ ] [X] <- cursor (X) is on another page
[ ] [ ] [ ] [ ] [ ] ===================
[ ] [ ] [ ] [ ] [ ] <The item's name and description is displayed here>
When moving tabs in groups of 3, the Cursor Glitch causes the prompt
to be locked, meaning it will not update the name/description of the item.
You can force update it by going to the System screen and back (pressing R
then L
).
This is often referred to as “resetting” or “capturing” the prompt.
With the prompt locked, you can now move the cursor 3 tabs left or right,
which will change which item the cursor is on, but will not update the prompt.
Now, you can press A
to trigger and use the prompt.
In general, these are the steps to do any PE setup:
- Use the input sequence (the Cheat Code) to activate a slot
- Ensure the right prompt is captured by moving tabs in groups of 3, and optionally go to the System screen and back to reset the prompt
- Move tabs in groups of 3 to the target item, and use the prompt
Since you can only keep the glitch by moving tabs in groups of 3, this means PE can only be used between 2 items that are multiple of 3 tabs apart (i.e. have 2 other tabs between the source and target items).
Applications
Weapon Modifier Corruption
With PE, you can hold ingredients like stackable food that aren’t holdable normally. When these ingredients are cooked, their properties gets processed by the complex cooking system and produces meal values that aren’t obtainable by cooking normal ingredients, which can give better values for Weapon Modifier Corruption.
You can hold stackable food by either using “Hold” prompt from material,
pressing X
while locked to a material, or using the “Drop” prompt
from equipments. Using the “Drop” prompt will not put Link in the holding
state in inventory screen, allowing you to perform other actions while technically
holding.
Note that if you try to hold items that do not have a model (Food, or some Key Items), the game will crash when trying to render it in the inventory. You can workaround this with Super Hold Smuggle or some other method, which we will not go into depth here.
The simulator allows you to hold anything without crashing.
Removing Arrow Slots and Permanent Items
When you obtain a type of arrow, that arrow slot is stuck in the inventory
forever, even if you shoot the arrow to 0. With PE, you can entangle
a material prompt with the arrow prompt. Now you can press X
and use
hold to remove arrows. When you have 0
arrows, you can use
the eat
prompt to remove the slot completely.
Similar to removing arrow slots, you can remove permanent items like Sheikah Slate, Glider, Zora Armor, etc, by eating it.
Duplicate Materials
When using PE to hold, it subtracts the amount from the item you are holding, but checks the amount of the original item to see if you can keep holding. Since the amount of original item never decreases in the process, you can keep holding the item even if the stack is at 0. You can either unhold, or drop the items on the ground to realize the gain.
Note that if you use this method to duplicate material, you need at least 4 tabs of materials.
Durability Transfer and Desync Equipment
You can use PE to change equipment, while not changing the equipped status of the slot. This is very similar to Desyncing with Menu Overload.
To transfer durability:
- Equip the item to receive the durability
- Activate the slot with the item to give the durability
- Use the “Equip” prompt of that item on something else (for example, a material)
- Close Inventory
This will switch the equipment in the overworld while not in the inventory. The change equip action will cause a durability update, which transfers the durability.
Note that unlike durability transfer with Menu Overload, you do not need to use the equipment to update the durability. This is because the desync achieved by PE is the exact opposite of Menu Overload:
- Menu Overload desyncs by switching the equipment in the Inventory, but not in overworld
- PE desyncs by switching the equipment in the overworld, but not in the inventory
Since with Menu Overload, you do not switch equipment in the overworld, which does not trigger the change equip action. Therefore, using the equipment manually is required to update the durability.
You can also use this to unequip the One-hit Obliterator, which is more consistent than using Menu Overload. After performing the steps above, you will be able to unequip the OHO from the DPad Quick Menu.
模拟器的使用
了解IST基本原理可以帮助理解模拟器功能。见物品转存简介。
基本功能
模拟器通过运行IST脚本执行IST步骤。脚本中包含了指令。每个指令对应游戏中的操作。
如下是一个示例脚本。每一行是一个指令。
get 1 pot-lid 1 apple 1 slate 1 glider
equip Shield
!break 3 slots
save
unequip shield
hold apple; drop
reload
save
drop apple
reload
在App界面中,脚本需要在脚本编辑器内编辑。脚本改动后,模拟器会自动开始重新执行脚本。界面右侧会显示当前光标所在位置对应步骤的背包状态(状态为执行当前所在指令之后的状态)。
模式
模拟器App有3种编辑模式:
- 自动保存:默认模式。脚本的改动会自动保存到浏览器本地。下次打开模拟器的时候会自动读取。
- 不保存:脚本改动不会自动保存到浏览器,关闭浏览器会丢失改动。
- 只读:打开内嵌脚本网址时的默认模式。此模式脚本无法编辑。你可以切换到不保存模式做临时改动。 注意只读模式下,脚本报错不会显示。
模式可以用App标题栏左上按钮切换。
切换到自动保存时会覆盖浏览器本地保存的脚本!
如果不小心覆盖了本地脚本,可以使用浏览器命令行恢复。打开命令行(F12)并输入以下指令(可能需要先按照说明开启指令复制):
console.log(localStorage.getItem("Skybook.AutoBackupScript"))
按回车,并复制输出的指令。
注意每次切换到自动保存模式时,这里都会保存覆盖掉的指令。所以再次覆盖后就无法恢复了!
V3脚本转换
V3脚本可以自动转换为V4脚本,只需把网址中itntpiston
替换为 pistonite
替换为 pistonite
。
由于脚本是机器转换的,可能有些地方需要手动调整。可以把模式从只读切换为不保存,然后查看是否有报错。也可以直接看最后一步的结果是不是一样。
重要修改:
drop
指令在V4中只能丢能丢的物品。比如drop hasty-elixir
(丢弃速速药)会报错,需要改为eat hasty-elixir
(吃掉速速药)。pick up
会转换为get
。这是因为V4中pick-up
只能指定地上的物品。这不会导致出错,但是可能地上会多很多物品。可以在最后一步之后加一行!system [clear-ground]
来删除地上所有物品。- 选项纠缠需要用
entangle
指令触发。
指令语法
模拟器需要一个由指令组成的脚本提供IST步骤。大多数指令对应游戏中的操作,比如拿道具,丢道具,切换装备等。
指令可以被分为三大类:
- 操作类 Actions: 对应游戏中的操作,如:拿 -
get
, 捡起 -pick-up
,手持 -hold
。 - 注解类 Annotations: 前缀为
:
,用于改配置,如::slots
用于更改装备格子数。 - 高级类 Supercommands: 前缀为
!
,用于高级操作,如直接修改内存。这些操作通常无法在游戏中直接完成。
空白字符,如空格和换行,会被完全忽略。所以一个指令可以写成多行,多个指令也能写在一行。指令间可以加分号;
,也可以不加。
# 以下2个指令相同
get 1 apple 2 pot-lid hammer;
get
1 apple
2 pot-lid
hammer
# 多个指令在同一行,也不需要用分号隔开
hold 2 apples drop
# 但隔开可能更好看
hold 2 apples; drop
通常情况下,语法是区分大小写的。但包括物品搜索在内的某些功能不区分大小写。这里建议仅在必要情况下使用大写,其他情况都用小写。必要情况例如设定GDT数据名。
物品语法
大多数指令需要通过此语法设定物品。如 get
, drop
等。见 物品语法.
属性语法
属性语法以 属性+值 的方式提供一些指令的元数据。语法为:
[key1=value1, key2=value2, ...]
# `:` 和 `=` 都可用于分隔
[key1:value1, key2:value2, ...]
通常,属性名 key
以短横线命名法命名(kebab-case
),而数值可以是以下几类:
- 布尔
bool
-true
或false
- 如果值为
true
,可以不写,如[equip]
同[equip=true]
。
- 如果值为
- 整数
integer
- 十进制或0x
开头的十六进制,比如10
,0xa
. - 浮点数
float
- 十进制浮点数,如1.2
。(不支持科学计数法) - 词语
words
- 由字母组成的一个或多个词语,由短横线,下划线或空格分隔。如hello my-world
。 - 引号词
quoted
- 打上引号的内容,支持任何字符,如"你好世界"
(注意必须是英文的引号)。 - 尖括号词
angled
- 和词语类似,但打上<
和>
,内容不允许空格。如<Foo>
。
物品语法
get 3 pot-lid [durability=3]
# ^ 数量 ^ 名称 ^ 属性
同一指令中设定多种物品时,可直接连着写,或用逗号(,
)分隔。当数量为1
时,数量可以省略。如2 apples 3 bananas
更多例子:
get 2 apples 3 bananas
# 以下指令相同
get apple banana 2 core
get apple, 1 banana 2 cores
get 1 apple banana, 2 cores
根据不同指令,物品语法可以有三种语境:
-
FINITE_ITEM_LIST
(有限物品表)- 数量必须为数字,而非如
all
的关键词。 - 名称必须为物品而非类别。
- 设定的属性用于描述物品属性。
- 通常在获取物品的语境中使用,例如
get
指令。
- 数量必须为数字,而非如
-
INFINITE_ITEM_LIST
(无限物品表)- 数量可以是数字,或
infinite
关键词。 - 名称可以是物品或类别。
- 设定的属性用于描述物品属性。
- 当前没有指令使用此语境。
- 数量可以是数字,或
-
CONSTRAINED_ITEM_LIST
(指定物品表)- 数量可以是数字,或:
- 关键词
all
,指所有。 all but X
, 指除了X
个之外所有。
- 关键词
- 名称可以是物品或类别。
- 设定的属性用于匹配某个表(比如背包)中的物品
- 通常用于需要选定物品的指令,比如
hold
和eat
。 - 可使用位置属性。
- 数量可以是数字,或:
数量
数量在不同指令中可能意思稍有不同。比如,在吃东西eat
指令中,数量指格子内部数值(堆值)。因为讹转后的食物可以多次吃。而在出售sell
指令中,对于不可堆叠物品(比如食物),数量通常指格子数。
在指定物品表CONSTRAINED_ITEM_LIST
中,有两种特殊数量语法:all
和 all but
all
所有:寻找此物品并执行指令,直到找不到更多。all but X
会先计算物品数量,然后减去X
,再对物品执行该次数操作。注意如上所述,不同指令计算物品数量方式可能不同。
名称
物品名称可用以下4种方式设定:
Identifier
(标识符)- 物品标识符由字母,短横线和下划线组成。例如royal-claymore
或trav-bow
。标识符由固定算法解析到物品名。- 算法基于物品英文名。在物品名前还可以加英文名的料理效果,如
hasty-elixir
,sneaky-wild-greens
。 - 支持英文名复数后缀
-s
,-es
,-ies
- 支持某些物品的缩写。比如大鹫弓为
geb
,古代箭为aa
。
- 算法基于物品英文名。在物品名前还可以加英文名的料理效果,如
Actor
(内部名)- 内部名由尖括号词表示,直接指定游戏内部物品名。如get <Weapon_Sword_070>
(大师剑)。Localization
(全语言名)- 若不确定物品英文名,可使用物品其他语言的名称加引号。比如"espadon royal"
或"王族双手剑"
。- 引号内的内容将模糊匹配到物品
- 可使用语言代码锁定语言。如
"fr:espadon royal"
锁定法语。
Category
(类型)- 当在背包或其他表中选择物品时,可使用类型关键词代替物品名来匹配该类型的第一个物品。比如,当只有一个盾装备时,可使用unequip shield
解除当前盾。或pick-up 3 weapons
捡起地上3个物品,但是无所谓捡起的是什么武器。
属性
属性语法可用于设定物品附加属性:
- 在有限物品表
FINITE_ITEM_LIST
中, 属性用于设定物品自身属性。- 例如
get pot-lid[durability=1]
指令取得耐久为1
的锅盖。
- 例如
- 在指定物品表
CONSTRAINED_ITEM_LIST
中, 属性用于匹配选择的物品。- 例如,如果背包中有多个锅盖,
drop pot-lid[durability=1]
将匹配耐久为1
的锅盖并丢弃。
- 例如,如果背包中有多个锅盖,
属性表:
属性名 | 别名 | 说明 |
---|---|---|
durability | dura | (int 整数) 等同于设定 value 为设定值乘 100 |
effect | (int 整数或 string 字符串) 设定料理效果ID。数字直接指定内部ID(就算数字不合法)。字符串会被转换为ID。见 料理效果 | |
equipped | equip | (bool 布尔) 物品是否装备(拿物品时无效) |
held | hold , holding | (bool 布尔) 物品是否手持(拿物品时无效) |
ingr | (string 字符串) 设定料理的材料。材料名必须是标识符(见上)。此属性可多次使用设定多个材料。 | |
level | (int 整数) 设定料理效果等级 | |
life-recover | hp , modpower | (int 整数) 设定料理回复值,单位为四分之一心。同时可指定附魔威力。 |
modifier | modtype | (int 整数或 string 字符串) 设定附魔类型。不可用于设定料理效果。 整数值同 price 。字符串值可多次设定以添加多个附魔效果。当作为匹配使用时,如果仅设定了一个附魔类型,则可以匹配任何包括该附魔的附魔类型。若设定超过一个类型,则附魔类型必须完全匹配。 见 附魔类型 |
price | (int 整数) 设定料理出售价格。同时可指定附魔类型值。 | |
star | (int 整数) 装备升级(星)数。合法区间为 0-4 (包含)。 注意星数为修改物品名的语法糖。不同星数的同一件衣服实为不同物品。 | |
time | (int 整数) 设定料理效果持续时间。单位为秒。 | |
value | life | (int 整数) 设定物品值(可堆叠物品的数量,或武器耐久乘100) 注意不要和 life-recover 混淆 |
从多个匹配物品中选择
在指定物品表CONSTRAINED_ITEM_LIST
中,可能会有背包中有多个完全一样的物品格的情况。这种情况下可以使用位置属性直接指定物品位置。
通过from-slot
属性,可以指定第n
个物品。比如,如果背包中有3
个锅盖,drop pot-lid[from-slot=2]
会丢弃第二个。
序列号从1
开始计算。
也可以通过以下几种方法直接指定格子的位置:
# `slot` 为 `from-slot` 缩写
# 如果背包中有大于等于2格苹果,下面指令会从第二格吃
eat 2 apple[slot=2]
# 类别可以作为名称
# 下面指令会从背包所有类型为材料的格子中的第二格吃
eat 2 material[slot=2]
# 从材料页面,第一行,第二列吃苹果 (行数列数从1开始算)
eat 2 apple[category=material, row=1, col=2]
# 从第二个材料页面,第一行,第二列吃苹果
eat 2 apple[category=material, tab=2, row=1, col=2]
# 从第二个材料页面,第0号格子吃苹果
# 页面序号从1算,格子需要从0算, 下面是格子序号表
# 00 01 02 03 04
# 05 06 07 08 09
# 10 11 12 13 14
# 15 16 17 18 19
eat 2 apple[category=material, tab=2, slot=0]
# 从第0页面,第3号格子吃苹果
# 此处页面序号为所有页面总序号,从0开始算
eat 2 apple[tab=0, slot=3]
模拟器会在即将寻找该物品时计算物品位置。所以,当同一操作中该物品之前有物品,并因指令的操作改变了其他物品的位置,此时需要指定的位置可能和模拟器中一开始看到的位置不同。所以,不建议在用位置指定物品的指令中指定多个物品。可以将每一步分成单独的指令。
注释和笔记
Comments and Notes are text in the script that don’t affect the output of the command.
注释
Comments are lines that start with #
or //
. They are completely ignored.
# This is a comment
// This is also a comment
In the script editor, you can use the hotkey Ctrl + /
to quick toggle
selected lines between commented/uncommented.
注释块
Block Literal is a multi-line block that starts and ends with '''
(triple single-quotes).
'''
This is a block literal
It can have multiple lines
'''
Addtionally, a block literal can have a tag
, which is a string after the '''
that starts the block. For example, the note
tag can be used to add
notes to blocks of commands, which can be viewed in the Notes
extension.
'''note
Drop these in the same pile
'''
drop all weapons
drop all shields
模拟器系统
Skybook旨在100%准确模拟IST。其中使用了2种模拟方法:完全模拟(Emulation)和重实现(Reimplementation)。我们仅可能地完全模拟游戏中的子系统。但是,不是所有子系统目前都能完全模拟,特别是未逆向研究的子系统。有些子系统通过重实现已经能基本模拟所有功能,这些也不值得完全模拟。
模拟器中的子系统包括:
界面系统
The Screen
system simulates different dialogs and pause menus in the game.
For example, when pausing to access the inventory, or when selling items by talking
to a shop keeper.
Most of the time, the simulator can switch between screens automatically depending on the actions, so the effect of this system should be transparent to those who are used to previous versions of the simulator.
Understanding this system could be useful, if you want to explicitly control when you open a screen, which can be helpful when optimizing and verifying IST setups.
The simulator UI has a little icon next to the “Visible Inventory” title to indicate which screen you are currently on.
游戏状态
While not technically a screen, the Game itself can also have 2 different states:
Running
and, well, not Running
(closed).
The initial state of the simulation is similar to a new game. When executing most commands, the game will keep running, unless:
- You manually closed the game with the
close-game
command. - The game crashes.
When you encounter a game crash, note that it’s also possible it’s a bug in the simulator. Please report it on GitHub if the simulator crashes on a step that you don’t think is supposed to crash in game.
You can also view the detail of the crash in the Crash Viewer
Extension.
Whenever the game is closed in the middle of a simulation (either closed manually or crashed), it will not automatically restart. You have to use either of the commands below:
new-game
to start a new gamereload
orreload SAVE_NAME
to start the game and reload a saveSAVE_NAME
is the name of the save, see Save Files
界面类型
While in game, there are 4 screens that are simulated:
Overworld
:- The default state when you start a game.
- Player is able to move
- You can get/drop items
- … all the other things you can do in the overworld
Inventory
:- When you pause the game with the
+
button - Player can interact with items in the inventory
- When you pause the game with the
Shop Selling
:- When talking to a shop owner to sell items
- Player can select items in the inventory to sell
Shop Buying
:- When talking to Beedle or some other NPC to buy items
- Player can select from a list of items to buy
The Screen
system works like a state machine; when an action needs a certain
screen, it will try to transition to that screen state if possible, and display
an error if it couldn’t. The transition looks something like this:
Overworld
/---------|---------\
/ | \
/ | \
Inventory Shop Buying --- Shop Selling
For example, if you are in the inventory menu and need to talk to a shop owner to sell something
(i.e. to execute the sell
command):
- The simulator first checks if you are already in the
Shop Selling
screen - Since you are in the inventory screen, the simulator must return to
Overworld
by closing the inventory menu - Then, it simulates talking to a shop owner by transitioning to the
Shop
screen - Finally, it sells the item
- After all of that, it will stay in the
Shop
screen until it has to transition again
That all happens in a single sell
command!
手动切换界面
The following actions count as manually switching the screen. If the screen has been manually switched, the simulator will prevent certain automatic screen switches.
Inventory
:pause
to open the inventory- No automatic screen switches can happen until returned to overworld
unpause
to close the inventory and return to overworld
Shop
(buying and selling):talk-to NPC
to start buying or selling (NPC
can be any-
or_
connected word)- Screen can be automatically switched between
Buying
andSelling
, but not toOverworld
- When returned to overworld, screen can be automatically switched again to all types
- Screen can be automatically switched between
untalk
orclose-dialog
to return to overworld
Note that annotations for screen switching like :pause-during get
do
not count as manually switching screens, and the simulator
will still automatically switch screens afterward.
主世界系统
The Overworld
system simulates objects that the player interacts in the overworld,
known as Actor
s. However, the actual overworld in the game is very complex, and
most of the actors don’t even have anything to do with the inventory.
Therefore, the Overworld
system is a ultra-simplified simulation of only
the actors that are involved in inventory glitches:
- The player’s equipment (Weapon, Bow and Shield)
- Any items currently being held by the player in the overworld
- Any items (including materials and equipments) dropped by the player
丢弃物品上限
In the game, you can drop at most 10
items on the ground at a time.
When you drop the 11
-th item, the least-recent dropped item will despawn.
This limit is simulated by the Overworld
system in the following way:
- When dropping material with the
drop
command, or auto-dropped from a smuggled state, it gets added to the list of items on the ground - The least-recently dropped items will be removed from the list, until there are at most 10 items on the ground
- The removed items are not deleted immediately. You will see
Will despawn
in the tooltip text of the item in the simulator UI. - If you perform any action that takes some time so it’s impossible to preserve the despawning item, the item will be deleted.
It is implemented like this because it is possible to drop more than 10 items, but pick up the items fast enough before it despawns to keep the materials on the ground under the limit. This can be used to optimize IST steps.
For example, the following script will result in 15
apples in the overworld,
5
of which are in the Will despawn
state.
hold 5 apples; drop
hold 5 apples; drop
hold 5 apples; drop
Then:
- If you
pick-up 5 apples
right after, there will be10
apples left on the ground, and5
are added to the inventory. - If you
pause
, there will still be15
apples on the ground, since you couldunpause
and pick them up. - If you
get 3 bananas
, the despawning items will now be deleted, and there will be10
apples left on the ground. This is because it’s unlikely the apples are still there after you pick up some other item.
重置主世界
很长的IST步骤可能包含了游戏中多个区域,或是进入、离开神庙。主世界中的物品会因玩家离开区域而消失。在模拟器中,可以通过一些方式模拟:
- 正常会重置主世界的指令会自动重置,比如
reload
读档。- 可用
!system [loading-screen]
系统指令模拟触发加载界面。
- 可用
!system [clear-ground]
指令可以清除地上的物品,比如在离开某区域时。
指令参考
以下是按字母顺序排序的所有指令。点击指令查看详细说明。
指令 | 说明 |
---|---|
:accurately-simulate 可用于 ( get , sort ) | 禁用可能不精确的优化 |
!arrowless-smuggle | 用当前手持的物品执行无箭强持(可用于:smug 不适用的场景) |
!add-slot | 修改内存,绕过所有检查添加物品 |
!break | 修改内存制作转存格 |
buy | 买东西 |
close-dialog | 同 untalk |
close-inv | 同 unpause |
close-inventory | 同 unpause |
close-game | 关闭游戏 |
:discovered | 修改页面是否已经解锁 |
dnp | 丢弃材料或装备,然后捡起 |
:dpad | 指定切换装备由十字界面执行 |
drop | 丢弃材料或装备 |
eat | 吃东西 |
entangle | 触发选项纠缠 |
equip | 装备物品 |
get | 拿新物品 |
hold | 手持材料 |
!init | 初始化背包内存为某些物品 |
new-game | 开始新游戏 |
open-inv | 同 pause |
open-inventory | 同 pause |
overload | 触发过载 |
:overworld | 指定下一个指令在主世界中执行 |
pause | 打开背包 |
:pause-during | 某些指令执行时,中途打开背包 |
:per-use | 指定下一个use 指令消耗的耐久 |
pick-up | 从地上捡起物品 |
!remove | 强制删除物品,无法交互的物品也能删除 |
reload | 加载手动或命名档 |
:same-dialog (可用于 buy , sort ) | 指定下一个操作在同一个事件对话中执行 |
save | 存手动档 |
save-as | 存档并命名存档 |
!set-gdt | 修改GDT旗标 |
:slot | 同 :slots |
:slots | 修改装备类物品解锁了几个格子 |
:smug | 执行下一个 hold 或 drop 指令后,执行无箭强持 |
sort | 物品排序 |
spawn | 主世界生成物品 |
!swap | 交互两个物品节点位置 |
!system | 系统操作 |
talk-to | 和NPC对话触发购买或出售 |
:targeting | 修改选项纠缠目标物品 |
!trial-end | 结束挑战,恢复背包 |
!trial-start | 开始挑战,清空背包 |
unequip | 解除物品装备 |
unhold | 取消手持 |
unoverload | 取消过载 |
unpause | 关闭背包 |
untalk | 关闭NPC(购买/出售)对话框 |
use | 在主世界中使用装备或材料 |
!write | 修改物品内存数据 |
拿物品
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 toget
, but has additionally functionality to simulate buying from an NPC in the same dialog as selling.
语法
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
从地上捡起之前丢的物品
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.
从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.
新物品提示时开背包
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.
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
性能优化
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
细节
get
,pick-up
andbuy
all requireOverworld
screen.- You cannot get new items while holding items in the overworld
- with
:smug
, the held items will be dropped after getting the item
- with
素材操作
Performing actions on materials in the inventory. Some actions may apply to non-materials.
hold
command performs the “hold” prompt.- When used without a list of items, it enters holding state in inventory screen without holding anything.
unhold
command stops holding in inventory, or put away the items in overworld.drop
command is used to hold and drop items- When used without a list of items, it drops the currently-held items on the ground.
dnp
command is a shorthand fordrop
andpick-up
.eat
command performs the “eat” prompt.
语法
hold
hold
CONSTRAINED_ITEM_LIST
unhold
drop
drop
CONSTRAINED_ITEM_LIST
dnp
CONSTRAINED_ITEM_LIST
eat
CONSTRAINED_ITEM_LIST
Annotations:
:smug
- Enable Smuggling for Arrowless Offset
Examples
hold apple
hold 2 apple
hold 1 shroom 1 pepper
unhold
:smug hold 1 shroom 1 pepper
unhold
eat all materials all food
dnp 5 weapons
无箭强持
The :smug
annotation can be used to activate the item smuggle
state required for Arrowless Offset
(also known as Arrowless Smuggle
),
for the next hold
command, which is when the held materials are attached
to Link’s right hand instead of being held in front of him.
To do this in the simulator, put :smug
right before the hold
command.
:smug
hold 2 shrooms
# Now you are in Overworld, and held items are attached to Link's hand
You can also put :smug hold
on the same line (which sounds like smuggled, hehe).
To do this in the game, you need:
- A Shield
- A one-handed Weapon
To perform this:
- Enable Weapon Smuggle and make sure a shield is equipped
- Hold the
ZL
button - Hold items from up to 5 slots
- Switch to a one-handed weapon
- Switch to another one-handed weapon, or to something else and back if you are already equipping a one-handed weapon
- Jump and let go of
ZL
button, after landing, when the shield is to Link’s side, unequip the shield
While in this state, you can perform actions which are not normally possible, such as getting items or talking to NPC. While doing so, the simulator will delay-drop the items. This is essential to generate offsets. In game, you can do this by either:
- Whistle and perform the action (
Dpad Down > A
) quickly before the items drop - Pull out Bow and perform the action (
ZR > A
) quickly before the items drop
The :smug
annotation can also be used with drop
, for example,
when using Prompt Entanglement to drop-hold some item:
# Activate PE
entangle apple
# Suppose Torch is entangled with Apple
# This will drop-hold the Apple, then close inventory and perform Arrowless Smuggle
:smug drop torch
:smug
requires automatically switching to Overworld
screen. If the screen
was manually switched, the operation will fail. In this case, you can use the
!arrowless-smuggle
supercommand to manually activate the state
while already holding items in the overworld.
pause
# This will fail, because screen was manually switched
:smug hold 1 apple
# Do this instead (if removing the `pause` is not an option)
pause
hold 1 apple
unpause
!arrowless-smuggle
丢弃物品
The drop
is also used for dropping equipments, which has
a slightly different semantic. The description here only applies to materials.
When using drop
without any items, it means to drop
whatever is currently being held to the ground.
When using drop
with items, it will attempt to hold the items in up to
groups of 5, and drop them. This may not work as expected in rare cases, like
if you hit mCount=0
in the middle of dropping, you will no longer be able to hold
more items. In this case, you will get an error.
The dnp
command is equivalent to drop
, then pick-up
the same items. Note that dropped items will not despawn after pick-up
.
细节
hold
requiresInventory
screen, and you can only hold a maximum of 5 items.drop
requiresOverworld
screen when dropping held items. When a list of items is specified, it may switch screens multiple times to facilitate the action.- Certain actions are not possible when you are holding items.
装备操作
Operations on equipments in inventory.
equip
andunequip
changes the equipped status.drop
drops the equipment from the inventory.
语法
equip
CONTRAINED_ITEM_LIST
unequip
CONTRAINED_ITEM_LIST
drop
CONTRAINED_ITEM_LIST
Annotations:
:dpad
- Use the DPad menu instead of inventory menu to change equipments.
切换装备
Example
# Equip the first weapon
equip weapon
# Unequip the first **equipped** weapon
unequip weapon
# Equip multiple items
equip 1 royal-claymore 1 hylian-shield
# Unequip multiple items
unequip all shields all bows
# Unequip the second equipped Hylian Shield
unequip hylian-shield[slot=2]
# You can also equip armors and champion abilities
equip champion-tunic
unequip gale
# You cannot unequip arrows
unequip fire-arrow # Error! cannot unequip arrow
When using from-slot
or slot
for unequip
,
note that unequip
only targets the equipped items.
So slot=2
means the second equipped item. equip
and other commands target all items, so equip weapon[slot=3]
equips the third weapon in the inventory, regardless of which weapon
is currently equipped. If the third weapon is already equipped, you will
get an error.
This may seem like a weird design choice, but it makes intuitive sense when you use the command in most cases.
Normally, you would omit the amount for equip
or use 1
for multiple categories, since equipping another item
of the same category would
just unequip the previous one. However, in some configurations, the items won’t be auto-unequipped.
If you actually want to equip more than one item, you have to specify [equipped=false]
.
Otherwise, it will error when it hits an item that’s already equipped.
For example, equip all weapons[equipped=false]
.
unequip all
should always work as expected.
By default, changing equipments are assumed to be done in the pause menu. This should be ok in most cases. However, there are edge cases where action must be done through the DPad Quick Menu, examples include:
- You are holding items in the pause menu.
- The item slot is not visible in the pause menu, only in quick menu.
In these scenarios, you can use the :dpad
annotation to specify the equipment change should be
done via the quick menu.
Example
# Switch equipments with DPad quick menu
:dpad equip fire-arrow
:dpad unequip weapon
Note that :dpad unequip
can only be used to unequip the first equipped item in the quick menu,
and cannot be used to unequip arrows.
从背包丢弃装备
Use the drop
command to drop equipments, which deletes the item in inventory,
and spawns the item in overworld when the inventory is closed.
The game has a limitation on how many weapons can be dropped, but this is not implemented in the simulator.
Examples
drop all shields
drop all but 1 axe
主世界操作
主世界中可以执行的操作:
use
使用装备(消耗耐久)。也可用于在主世界中直接从背包删除物品,例如使用精灵。use fairy
.shoot
射箭,同use bow
(使用弓)。:overworld drop
直接在主世界中丢弃装备。
同时,spawn
指令可用于直接在主世界中(地上)生成物品。
语法
use CATEGORY_OR_ITEM
(默认一次)
use CATEGORY_OR_ITEM X times
shoot
shoot X times
:overworld drop
CONTRAINED_ITEM_LIST
spawn
FINITE_ITEM_LIST
可用注解:
:per-use X
- 设定每次使用装备时消耗的耐久。:overworld
- 使drop
在主世界执行。
使用装备
使用use
指令时,可以指定装备类型或装备中的物品名。
# 使用装备中的武器砸地
use weapon
# 砸5次地
use weapon 5 times
# 使用王族弓(射箭),必须当前装备王族弓才行
use royal-bow
# 用当前装备的弓射箭
shoot
:per-use
注解可用于修改消耗的耐久值。默认为100
。
# 炸盾消耗30耐久
:per-use 3000 use shield
特殊情况:
- 使用带
IsLifeInfinite=true
参数的武器时不会消耗耐久。 - 使用光之弓或黄昏光弓时不会消耗箭。
- 使用开光大师剑(GDT旗标
Open_MasterSword_FullPower
)时消耗指定耐久乘0.2
,当前耐久值小于300
除外。
使用(非装备)物品
如果use
指定的物品不是装备类,则会尝试直接从背包中移除该物品。唯一在游戏中的场景是删除精灵。但模拟器允许此法删除任何物品。
# 用精灵法制作转存格
hold fairy; use fairy; drop
丢弃装备
一些情况下,可以在不开背包的情况下将主世界装备丢弃,比如被电。
get axe
:overworld drop weapon
主世界生成物品
spawn
指令可用于在地上生成物品。此法生成的物品不受物品数量限制,且在过载状态下也能生成。
# 模拟射出一根炸箭掉到地上
shoot
spawn bomb-arrow
装备类物品可使用元属性附加耐久或附魔。其他元属性会被忽略。
细节
出售
The sell
command simulates selling items to a shop keeper,
or trading away Spirit Orbs or Korok Seeds.
语法
Example
talk-to beedle
sell all shroom all pepper
:same-dialog buy 5 arrows
close-dialog
Also see Buy.
制作转存格
制作转存格指增加物品计数差的操作。见物品转存简介。
你可以模拟游戏中制作转存格的方式,或直接用!break
高级指令修改内存制作。
无箭法
无箭法制作转存格需要的指令参考
无箭法是最常用的制作方式。只需要一个盾,一个单手武器,和收购物品的NPC。一次性可以最多做5个转存格:
- 触发无箭强持。
- 和商店NPC对话(非常快的按
ZR > A
或者吹哨A
)。 - 把所有手持的物品格子卖掉。
- 退出对话框。
无箭法示例脚本:
get 2 shroom 2 pepper 1 banana
:smug hold shroom pepper
sell all materials[held]
close-dialog
强持法
强持法和无箭法类似,通过卖掉强持的物品和手动丢弃制作转存格。
- 触发强持(电箭过载)。
- 卖掉手持的格子。
- 再手持一个物品解除强持。
- 丢掉手持的物品。 由于强持法需要再手持一个物品解除强持,一次性只能制作4格转存格。
get 2 shroom 2 pepper 1 banana
overload
hold shroom pepper
unoverload
sell all materials[held]
close-dialog
hold banana
drop
除了卖掉手持格,也可以通过进入挑战(如剑之试炼)删除背包中的格子,再拿一个新物品并手持,解除强持。注意因为拿的新物品会调用空闲表中的格子,此法一次性也只能最多制作4格转存格。
这也是IST第一次发现时使用的方法。
精灵法
在手持精灵格到最后一个的情况下用掉该格最后一个精灵可以制作一个转存格。
hold all but 1 fairy;
use fairy; # 自炸等
drop; # 丢弃手持的精灵
选项纠缠法
通过选项纠缠,可以通过同时吃和手持同一格来制作转存格。
- 把想要纠缠的格子吃光。
- 纠缠目标为虚像格时,会选定页面第一格为目标,所以需要吃光第一格并纠缠, 或者吃光想要纠缠的格子和第一格。
- 使用装备“丢弃”选项,手持吃光的格子。
- 关闭背包,丢弃手中的物品。
以下例子用了第三格纠缠(蘑菇shroom
),所以也需要吃光第一格苹果。
:discovered [bow, shield] # spacing for PE
get
1 torch 1 axe 1 hammer
1 apple 1 banana 1 shroom
eat all apple all shroom
entangle hammer
:targeting <empty>[category=material, row=1, col=3]
drop hammer
drop
纠缠
Activate Prompt Entanglement and perform actions on a slot using prompts from another.
entangle
activates PE and sets the target item:targeting
changes the target item, or allows you to target empty slots
语法
触发选项纠缠
While the Cursor Glitch is active, you can switch tabs in groups of 3 to keep the glitch active. Therefore, conceptually, when you activate a slot, all slots that are 3 tabs apart can be considered activated as well.
This action is simulated by the entangle
command.
# Targets the Pot Lid, and activates that slot, as well as all slots that
# are 3 tabs apart
entangle pot-lid
While a slot is activated, you will see a “Link” icon next to it.
If a slot that’s supposed to be activated does’t exist in a tab (i.e the tab doesn’t have enough items), there will be a phantom slot displayed in that location when in Tabbed View. This is only a visual effect of the simulator.
The effect of the activation will last until the inventory is closed. You can also
use another entangle
command to change which slot is activated.
Targeting an Item
The second step to using PE is to select a target item that will receive the prompt.
The :targeting
annotation is used to do that.
# If the item is in an activated slot, you can use the name to select it
:targeting apple
# You can also select the slot directly
# This is useful if you are targeting an empty slot (which can't be selected
# by item name, since there's no item there)
# Note that specifying the first item directly will not work, if the activated
# slot is not in row 1 and col 1.
:targeting <empty>[category=material, tab=1, row=1, col=3]
# ^ the name is ignored while targeting a slot directly, so it
# doesn't matter what you put here
:targeting
currently also searches slots that are not activated.
If there are multiple matches, you might need to use a Position Property
to specify the activated slot.
Finally, in the next command after :targeting
, you can perform
an action on a PE-enabled slot. If the target item can be reached by the item
in the action, the action will be performed on the target item instead.
entangle roasted-endura-carrot :targeting roasted-endura-carrot
drop pot-lid # will hold the roasted endura carrot
Since it can be redundant to activate, then target the same item,
entangle
will also target the item by default.
The command above can be shortened as:
entangle roasted-endura-carrot
drop pot-lid # will hold the roasted endura carrot
However, sometimes it might be clearer to write it as entangle
then :targeting
.
For example, during speedrun, it’s usually faster to entangle
the source item, to skip resetting the prompt, which means the item to setup
the entangle
is different from the item to target.
However, it’s up to your preference how to write the command.
The effect of :targeting
will only last until the next command,
but you can use multiple :targeting
within the same entangle
.
存读档
Handling game’s running and closed state, and simulation of save files:
save
command saves to the manual save slot.save-as file-name
command saves to a named save slot. You can later reload this save by its name. This is used to simulate auto-saves, but you can have unlimited number of them.reload
command reloads a manual or named save.new-game
reloads an imaginary save with the state of a new game.close-game
closes the game.
语法
save
save-as FILE-NAME
reload
reload FILE-NAME
close-game
new-game
FILE-NAME
can either be the same format as item identifier (like-this
, or with _
instead of -
), or a quoted string. Spaces and non-alphabetical characters are also
allowed in quoted names, like "Outside of Shrine"
or "神庙外"
.
Example
# Save to the manual save slot
save
# Save to a named save called `my-save`
save-as my-save
# Reload the manual save
reload
# Reload a named save
reload my-save
App中查看存档数据
Amongst other things, a save file for the game includes a copy of savable flags in GameData, which contains the items in the save. Therefore, the simulator displays save files similar to how it displays GameData.
Using the Save Files
extension, you will see a list of save names available at the
current step in the simulation. Clicking on a save will then display the items in that save.
Note that you can inspect saves even on steps where the game isn’t open.
新游戏/重启游戏
The reload
and new-game
are the only 2 commands that can
restart the game after it’s closed, either due to crash or was manually closed.
Currently, new-game
is implemented as reloading an imaginary save
made at new game. The implementation is as follows:
Game State | Action | Implementation |
---|---|---|
Running | reload | Reload the save |
Running | new-game | Reload the “new game” save |
Closed | reload | Start a new game, then reload the save |
Closed | new-game | Start a new game |
This is not 100% accurate to what the game does, but should be close enough.
系统页的模拟
save
(and save-as
if in inventory) will currently automatically unhold
the currently held items, similar to how the game does that when you switch to the System menu.
细节
save
requiresInventory
screen.save-as
can be performed in eitherInventory
orOverworld
.reload
requiresInventory
screen if the game is running.new-game
is similar, see implementation detail above.
排序
The sort
command can be used to sort items in a category.
语法
sort CATEGORY
sort CATEGORY X times
Annotations:
Examples:
sort weapons
sort materials 2 times
talk-to shop-keeper
sell all apples
:same-dialog sort material
untalk
装备类物品
For Weapon
, Bow
, Shield
, and Armor
categories, the game has 2 modes to sort them
that it toggles every time you sort.
For Weapon
, the modes are:
- By weapon type first, then weapon power, then weapon modifier, and finally item name.
- By item name first, then weapon type, then weapon power, and finally weapon modifier.
For Bow
and Shield
, the modes are:
- By power first, then modifier, then item name.
- By item name first, then weapon power or guard power, then modifier.
For Armor
, the modes are:
- By armor type first, then item name.
- By item name first, then armor type.
By default, the first time you sort one of these categories, it will be the first sorting
mode (not by item name first). You can toggle this with the !set-gdt
supercommand.
sort armors # will sort by armor type first (SortTypeArmorPouch changes from false to true)
sort armors # will sort by item name first (SortTypeArmorPouch changes from true to false)
!set-gdt <SortTypeArmorPouch>[bool=true] # manually set the flag to true
sort armors # will sort by item name first
sort armors # will sort by armor type first
# Flag name for other categories:
# - SortTypeWeaponPouch
# - SortTypeBowPouch
# - SortTypeShieldPouch
在出售界面排序
You can sort Armor
, Material
and Food
while selling items. By default, sort
assumes you want to sort in inventory screen, and it will closes the shop screen
and open inventory screen even if the category specified would allow you to sort in shop screen.
This would cause less confusion with automatic screen switch.
To actually sort in selling screen, you need to use the :same-dialog
annotation,
similar to buying from the same NPC without exiting dialog:
talk-to beedle
sort materials # error: cannot auto switch to inventory
:same-dialog sort materials # ok: opens selling screen
性能优化
For performance, the number of times is capped at an internal max, since sorting an already-sorted
list should have no effect. Use :accurately-simulate
to override this behavior.
# actually press Y 300 times for some reason
:accurately-simulate sort materials 300 times
细节
sort
requiresInventory
screen- unless
:same-dialog
is used in eitherShop Buying
orShop Selling
screen, in which case it will automatically switch toShop Selling
.
- unless
- Sorting will attempt to remove translucent items. If
mCount
is0
afterward in inventory screen, the inventory will become inaccessible. - Only
Armor
,Material
andFood
categories are allowed to be sorted while selling. - Sorting any armor subtype has the same effect as the armor type.
- Sorting category with broken slots may not fully sort it the first time. This is related to how the merge sort is implemented by the game, and is not a bug in the simulator.
过载
在游戏中,生成了超过物件系统(Actor System)上限的物件后,再生成物件会失败。此状态称为过载。
由于模拟器中没有像游戏一样的物件系统,仅提供指令触发和取消模拟的过载状态。
overload
用于触发过载unoverload
用于取消过载
语法
overload
unoverload
物品强持
若关闭背包时处于过载状态,则手持物品不会生成在主世界,称之为物品强持。
# 随便拿一些物品
get 2 apple 2 banana 2 core
# 触发过载
overload
# 手持并退出背包
hold 1 apple 1 banana 1 core
unpause
# 此时处于强持状态,所以可以正常拿物品
get diamond
物品置换
物品强持可用于物品置换(把物品A变成物品B)。
# 拿需要牺牲的材料并强持5个
get 6 apple; overload hold 5 apple
# 卖掉手持的格子
sell apple
# 拿需要置换的物品
get giant-ancient-core
# 取消手持完成置换
unhold
制作转存格
物品强持可用于制作转存格,见强持法制作转存格。
耐久继承
触发过载可以在不切换主世界装备的情况下切换背包装备,从而导致主世界和背包装备不同步,可以用于同类物品继承耐久。
# 把斧头耐久继承到近卫
get axe royal-guard-claymore
overload
equip royal-guard-claymore
unoverload
use weapon
细节
overload
可以在任何界面执行。unoverload
取消过载需要主世界界面。- 这是因为在游戏中打开背包后是没有办法取消过载的。
挑战
游戏中一些任务触发时会清空背包或提供临时道具,称之为挑战。只有挑战结束后,才能拿回原本的道具。
挑战包括:
- 剑之试炼
- 孤岛试炼(赛哈特诺岛)
- 英杰之诗的四个Boss战
每种挑战都有各自的事件流,比较复杂,所以模拟器仅提供!trial-start
和!trial-end
指令来触发和解除背包系统的挑战模式。
语法
!trial-start
!trial-end
- 开始挑战时:
- 所有除重要道具外的道具会被删除。
- 主世界武器会重置。
- 结束挑战时,背包的挑战模式会解除,并且GDT中物品会重新载入背包。
- 大多数情况下,使用
reload
指令读档也会自动解除挑战,无需其他操作。
- 大多数情况下,使用
大多数情况下,仅使用!trial-start
或!trial-end
就足以模拟游戏中的情况。但有些边界情况可能需要模拟事件流,请参考下面。
孤岛试炼
登上赛哈特诺岛时,手持的物品会自动放回背包。若无箭强持,则会掉落。请手动确保无手持物品。
# 确保处于主世界
unpause
# 开始挑战
!trial-start
放弃挑战离开岛时,会有一个加载界面。但完成挑战时不会有。
!trial-end
!system [loading-screen]
剑之试炼
剑之试炼更复杂:
# 确保无手持(可以强持)
unhold
# 剑试的事件流会自动装备大师剑,删除大师剑,然后再还给你
# 注意这里的指令并不能完美模拟事件流
equip master-sword; unpause; !remove master-sword; get master-sword
# 进入试炼模式
!trial-start
# 进入试炼时,会有一个加载界面传送到剑试地图
!system [loading-screen]
离开剑试:
# 解除试炼模式,有一个加载界面返回主世界
!trial-end
!system [loading-screen]
# 游戏自动重新给你大师剑
get master-sword
# 如果三阶全通,还需要设定开光的Flag
!set-gdt <Open_MasterSword_FullPower>[bool=true]
设置旗标
Change flag values in GameData (GDT), such as number of upgrade slots, whether a tab is discovered, and quest flags.
:slots
can be used to change the flag value for how many slots are available for Weapons, Bows and Shields:discovered
can be used to change which tabs are discovered
Moreover, !set-gdt
can be used to set any GDT flag.
语法
:slots [CATEGORY=NUM]
:discovered [CATEGORY=true|false]
!set-gdt <FLAG>[GDT_META]
修改装备格解锁数 (呀哈哈升级)
:slots
or :slot
sets these GDT flags
WeaponPorchStockNum
, BowPorchStockNum
and ShieldPorchStockNum
,
according to the category that is specified.
Examples:
# sets the number of weapon slots to 20 (singular/plural forms are both accepted)
:slots [weapon=20]
# sets the number of weapon slots to 10, and number of bow slots to 8
:slots [weapons=10, bows=8]
# you will get an error if the number is out of range
:slots [weapons=21, bows=4, shields=3]
# Ranges: (inclusive)
# Weapon: 8-20
# Bow: 5-14
# Shields: 4-20
修改页面是否解锁
:discovered
edits the IsOpenItemCategory
flag array.
The category is parsed in the same way as item categories.
With a few minor differences:
arrow
andarrows
are allowed, and they are the same asbow
/bows
- Specific armor subtype (Upper/Lower/Head) is not allowed, use
armor
/armors
instead
You can turn a tab to discovered with true
and to undiscovered with false
,
unspecified tabs are unchanged.
Examples
# Discover the weapon, bow, shield tabs
:discovered [weapon, bow, shield]
# Undiscover the armor tab
:discovered [armor=false]
When changing a tab from undiscovered to discovered, the inventory will not automatically
update until it is changed (i.e. when updateInventoryInfo()
is called again).
修改任意旗标
!set-gdt
can set any flag by name.
The name is specified with angled brackets (e.g. <PorchItem>
), to indicate the value should
be interpreted literally, just like with angled-bracketed item names.
The meta is where you specify the value. First, you need to specify one of the property keys:
bool
s32
(alias:i32
)f32
str32
(alias:string32
)str64
(alias:string64
)str256
(alias:string256
)vec2f
(alias:vector2f
)vec3f
(alias:vector3f
)
For non-vector types, the meta value is the value to set. Examples:
# Make Master Sword stay in True Form
!set-gdt <Open_MasterSword_FullPower>[bool=true]
# Sets Master Sword cool down timer
!set-gdt <MasterSwordRecoverTime>[f32=10.0]
For array values, use the index
property to specify the array index (alias: i
or idx
):
# Set the first item in GDT to Travel Medallion
# String values work without quotes if it only contains alphabetical characters and _ or -
!set-gdt <PorchItem>[str64="Obj_WrapDLC", i=0]
# Set the value of the 20-th item in GDT (0-indexed) to 1000
!set-gdt <PorchItem_Value1>[s32=1000, idx=20]
# Set the modifier value of the 10-th shield in GDT (0-indexed) to 1000
!set-gdt <PorchShield_ValueSp>[s32=1000, idx=10]
For vector values, instead of specifying the value with the vec2f
or vec3f
key,
use x
, y
, z
keys to specify each component. Only the components that
are specified will be changed
# Set the effect level of the first food to 3, leaving effect id unchanged
!set-gdt <CookEffect0>[vec2f, i=0, y=3]
# Set the sell price of the second food to 101, and the unused y value to 500
!set-gdt <CookEffect1>[vec2f, i=1, x=101, y=500.0]
高级操作
这些高级指令可以直接修改背包内存,非常适合用于测试或者绕开模拟器的限制。
语法
例子见下方每个指令的段落。
!break X slots
!init
FINITE_ITEM_LIST
!add-slot
FINITE_ITEM_LIST
!remove
CONSTRAINED_ITEM_LIST
制作转存格
模拟器支持用游戏中的操作制作转存格,见制作转存格。
!break
指令会修改背包表和空闲表的计数额外制作X个转存格。
!break 20 slots
添加物品格
!init
和!add-slot
指令会直接从空闲表中调用新物品到背包表。所有添加物品时检查的机制都会被绕开。注意空闲计数为0
时,依然不可以添加物品。
除此之外,!init
还会重置背包和空闲表的计数,所以转存格也会被消除。
例子:
# 在不排序的情况下设置背包状态
!init 1 slate 1 glider 5 apples
# 添加通常无法添加的物品(如下为神庙电梯)
!add-slot <DgnObj_EntanceElevator_A_01>
# 如果添加可堆叠的物品带有[value=...]属性,则数量变为要添加的格子数
# 下面指令会添加5格箭,每格有300根
!add-slot 5 arrow[value=300]
如果在打开背包界面时使用!init
或!add-slot
,背包界面和背包数据可能会不同步,导致添加的物品不能马上使用,需要关闭背包再打开。
虽然模拟器可以实现强制同步,但这样会导致一些内部状态改变,比如主世界装备和背包蓝格的对应关系。
强制删除物品
!remove
指令可用于强制删除物品:
- 箭,材料,食物和重要道具删除数量以格子值为准。
- 其他以格子数为准。
执行后,此指令会修复背包状态并和GDT数据同步。
例子:
!remove all cores
修改物品数据
!write
指令可以通过物品属性语法修改背包状态。执行后,背包状态会修复,但不会同步到GDT。
目前不支持修改物品的配料表。
例子:
# 把大师剑耐久设为0
# 注意,这样不会把大师剑变成损坏状态
# 如果要损坏大师剑(比如MSWMC),需要用`use`指令破坏大师剑
!write [value=0] to master-sword
# 把价格为101的炒菜的价格改为102
!write [price=101] to wild-greens[price=102]
# 如果直接指定物品位置,还可以修改该位置物品名
# 如下,修改材料页第一行第一列的物品为20耐久的王族双手剑
!write [dura=20] to royal-claymore[category=material, row=1, col=1]
!swap
指令选定2个格子,并交换它们节点在链表中的位置。执行后背包状态会修复,但是不会同步到GDT。
例子:
# 交互苹果和香蕉的位置
!swap apple and banana
# 交互装备中的王族双手剑和装备中的弓的位置
!swap royal-claymore[equipped] and bow[equipped]
如果在打开背包界面时使用!write
或!swap
,背包界面和背包数据可能会不同步,导致需要关闭背包再打开才能看到效果。
虽然模拟器可以实现强制同步,但这样会导致一些内部状态改变,比如主世界装备和背包蓝格的对应关系。
系统操作
!system
指令可直接操控模拟器底层系统。此指令不稳定,可能因为模拟器内部系统改变而在后续版本改变。
语法
!system [SYSTEM_META]
SYSTEM_META
元属性会解析为系统指令,并按顺序执行。
属性 | 说明 |
---|---|
dlc | (int 整数或 string 字符串) 更改游戏中AocManager 存的DLC版本号。由于具体实现原因,游戏需要处于运行状态才能修改DLC版本。见下。 数字 0 , 1 , 2 对应无DLC,第一天免费版DLC以及大师试炼。其他数字对应英杰之诗。字符串数值见DLC 版本名 |
delete-save | (无值或string 字符串) 删除存档数据。值为存档名,无值为手动存档。 |
clear-ground | (无值) 删除地上的所有物品,包括正在生成的物品。 |
clear-overworld | (无值) 删除主世界所有物品,包括玩家身上的装备。 |
sync-overworld | (无值) 同步 (即重新生成) 主世界玩家身上的装备。 |
reload-gdt | (无值或string 字符串) 载入存档数据到GDT,但是不载入背包。值为存档名,无值为手动存档。 |
loading-screen | (无值或string 字符串) 触发加载界面。可用特殊值no-remove-translucent 在不删除虚像格的情况下触发。 |
例子:
# 拿传送标注器,然后存档并删除DLC
get travel-medallion; save;
# 模拟修改机器状态为只装了DLC包1,没有包2
# 注意由于具体实现原因,!system只能在游戏运行时执行,
# 所以close-game需要在!system之后
!system [dlc=master-trials]
close-game
reload # 传送标注器不会载入背包
# 模拟进入神庙并通关神庙
!system [loading-screen]
get spirit-orb
!system [loading-screen]
属性常数值
以下为某些指令可用的非关键词属性常数值。
解析时会忽略_
,-
,和空格。
Cook Effects
These values can be used for the effect
item meta property
to specify cook effect for a food.
词语 | 说明 |
---|---|
allspeed | 同hasty |
attack | 同mighty |
attackup | 同mighty |
chill | 同chilly |
chilly | “Chilly” Cook Effect 内部值: Some(4) |
defense | 同tough |
defenseup | 同tough |
electro | “Electro” Cook Effect 内部值: Some(6) |
endur | 同endura |
endura | “Enduring” (Yellow Stamina) Cook Effect 内部值: Some(15) |
enduring | 同endura |
energizing | 同stamina |
exguts | 同endura |
exgutsmaxup | 同endura |
fire | “Fireproof” Cook Effect 内部值: Some(16) |
fireproof | 同fire |
guts | 同stamina |
gutsrecover | 同stamina |
hasty | “Hasty” (Speed Up) Cook Effect 内部值: Some(13) |
hearty | “Hearty” Cook Effect 内部值: Some(2) |
lifemaxup | 同hearty |
mighty | “Mighty” (Attack Up) Cook Effect 内部值: Some(10) |
movingspeed | 同hasty |
none | No cook effect 内部值: Some(-1) |
quiet | 同sneaky |
quietness | 同sneaky |
resistcold | 同spicy |
resistelectric | 同electro |
resistfire | 同fire |
resistflame | 同fire |
resisthot | 同chilly |
sneaky | “Sneaky” (Stealth Up) Cook Effect 内部值: Some(12) |
speed | 同hasty |
speedup | 同hasty |
spicy | “Spicy” Cook Effect 内部值: Some(5) |
stam | 同stamina |
stamina | “Energizing” (Stamina Up) Cook Effect 内部值: Some(14) |
staminaup | 同stamina |
stamup | 同stamina |
stealth | 同sneaky |
stealthup | 同sneaky |
tough | “Tough” (Defense Up) Cook Effect 内部值: Some(11) |
Weapon Modifiers
These values can be used for the modifier
/modtype
item meta property
to specify modifier for an equipment.
词语 | 说明 |
---|---|
addguard | 同guard |
addguardplus | Shield Guard Up+ 内部值: Some(0x80000100u32 as i32) |
addlife | 同durability |
addlifeplus | Durability Up+ 内部值: Some(0x80000002u32 as i32) |
addpower | 同attack |
addpowerplus | Attack Up+ (Weapon or Bow) 内部值: Some(0x80000001u32 as i32) |
attack | Attack Up (Weapon or Bow) 内部值: Some(0x1) |
attackup | 同attack |
critical | Critical Hit 内部值: Some(0x4) |
criticalhit | 同critical |
durability | Durability Up 内部值: Some(0x2) |
durabilityup | 同durability |
guard | Shield Guard Up 内部值: Some(0x100) |
guardup | 同guard |
longthrow | Long Throw 内部值: Some(0x8) |
multishot | Bow Multishot 内部值: Some(0x10) |
none | No modifier 内部值: Some(0) |
plus | Make the modifier “Yellow” 内部值: Some(0x80000000u32 as i32) |
quickshot | Bow Quickshot 内部值: Some(0x40) |
rapidfire | 同quickshot |
shieldsurf | 同surfmaster |
shieldsurfup | 同surfmaster |
spreadfire | 同multishot |
surf | 同surfmaster |
surfmaster | Shield Surf Up 内部值: Some(0x80) |
surfup | 同surfmaster |
throw | 同longthrow |
yellow | 同plus |
zoom | Bow Zoom 内部值: Some(0x20) |
DLC Version
These values can be used for the dlc
system property
in the !system
command.
词语 | 说明 |
---|---|
all | 同ver3 |
championballad | 同ver3 |
championsballad | 同ver3 |
day1 | 同ver1 |
mastertrial | 同ver2 |
mastertrials | 同ver2 |
nodlc | 同none |
none | No DLC 内部值: Some(0) |
plateau | 同ver1 |
ver1 | “Day 1” DLC 内部值: Some(1) |
ver2 | Master Trials (DLC Pack 1, ver 2.0) 内部值: Some(2) |
ver3 | Champion’s Ballad (DLC Pack 2, ver 3.0) 内部值: Some(3) |
自定义镜像
When running into code outside the normal inventory logic using glitches like Item Stack Underflow, the simulator will probably crash because it does not contain the full game to be able to execute setups that involves code outside of the normal inventory code.
BUT, the simulator is capable of executing the whole game’s code
if it is given access. This is referred to as the Full Mode or Custom Image Mode.
To do this, you need to create a BlueFlame image (a .bfi
file) from the
game files.
Create Image
To create the image, you need the following things:
- Dump of the game (only some files are needed, not all of them)
- A Nightly Rust toolchain
- If you don’t have rust installed, see here
For detailed instructions on what is needed and steps to create the image, see
the uking-relocate
tool. Follow the instruction on the tool’s README.
The env
Block
To tell the simulator to use a custom image instead of the default image,
put an env
block literal at the beginning of the script.
The env
block must be at the beginning, before any lines and comments.
Empty lines are allowed before the block.
The env
block should contain one <key> = <value>
per line. Here is an example:
'''env
image = 1.5
dlc = champions-ballad
program-start = 0x0000001234500000
stack-start = 0x0000005678900000
stack-size = 0x40000
heap-free-size = 0x40000
pmdm-addr = 0x0000003456789ab0
'''
If a value is invalid, it’s equivalent to that value being not specified. At the same time, you will see an error in the script editor.
The image
key specifies the version of the game.
Allowed values are 1.5
and 1.6
.
Currently, only 1.5
is supported. 1.6
is recognized but
not supported. Newer versions won’t be recognized by either
the simulator or uking-relocate
.
The rest of the keys are optional. If not specified, the simulator will use the internal default values.
Key | Value | Description |
---|---|---|
dlc | a DLC specifier (see below) | Specify the DLC version to simulate |
program-start | Region Address | The physical memory address of the start of the program region. This is checked against the program-start of the image file. The simulator cannot start if this doesn’t match. If this is not specified, any program-start will work. |
stack-start | Region Address | The physical memory address of the start of the stack |
stack-size | Size | The size of the stack, must be aligned to 4KB |
heap-free-size | Size | Size of the free region of the heap for the simulator to allocate memory |
pmdm-addr | Physical Address | The address of the PauseMenuDataMgr (in other words, the value of PauseMenuDataMgr* ). This is used to calculate heap start |
Large stack/heap size can slow down simulator start-up. It is recommended to only change these if the default does not work for you.
DLC specifier can be any string that contains 0
, 1
, 2
, or 3
, which correspond
to no DLC installed, DLC ver1.0 (Day 1)
, DLC ver2.0 (Master Trials)
and DLC ver3.0 (Champions' Ballad)
.
One of the following shorthand is recommended:
DLC Version | Possible Specifiers |
---|---|
No DLC | nodlc , none , uninstalled |
ver 1.0 | dlc-1 , ver1.0 , day-1 |
ver 2.0 | dlc-2 , ver2.0 , master-trials |
ver 3.0 | dlc-3 , ver3.0 , champions-ballad |
Invalid DLC version specifier defaults to ver3.0
.
A Region Address must be a hexadecimal string aligned to 0x100000
,
the most significant 6 hex-digits must be all 0
.
A Size must be a 32-bit positive integer, aligned to 0x1000
.
A size of 0
is the same as unspecified, and the internal defaults will be used.
pmdm-addr
must be aligned to 0x8
.
Furthermore, the program, stack, and heap regions must not overlap.
Upload the Custom Image
Once image
is specified in the env
block, refresh the page.
You should see a prompt that asks if you want to upload
a custom image. Select Setup
and follow the on-screen instructions
to upload the .bfi
file you created.
If the custom image fails to load, you can always select Use Default Image
in the prompt to start the application normally and fix your script.
The uploaded image is stored in your local browser.
Use Custom Image By Default
You can opt-in to always use your custom image for you own script, even when
the env
block doesn’t specify a custom image.
To enable this, check the box that says Use Custom Image by default for my scripts
when uploading the custom image.
Delete Uploaded Custom Image
You can open the
3-dot menu on the top of the app and select Delete Custom Image
.
This clears the custom image file that is stored in your local browser.
开发者文档
由于暂时没有时间翻译开发者文档,请参考英文版