The Great Plateau barrier/zh: Difference between revisions
(Created page with "這個霧的原理跟遊戲裡其他的霧一樣,都是儲存在 map unit 裡的同一種物件(碰到就會觸發事情的物件)。如果 IsGet_PlayerStole2 是 fa...") |
No edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
== 實作 == | == 實作 == | ||
台地結界一共有兩層:第一層是圍繞台地的霧,林克只要碰到霧就會被抓回來。第二層是林克的角色模組裡埋了一個檢查林克位置的機關,只要檢查失敗就迷昏林克。 | |||
林克拿到滑翔傘後,這兩層結界會同時消失。這是因為 <code>IsGet_PlayerStole2</code> 這個 flag 被設成 true 了 | 林克拿到滑翔傘後,這兩層結界會同時消失。這是因為 <code>IsGet_PlayerStole2</code> 這個 flag 被設成 true 了 | ||
Line 12: | Line 12: | ||
這個霧的原理跟遊戲裡其他的霧一樣,都是儲存在 [[map unit]] 裡的同一種物件(碰到就會觸發事情的物件)。如果 IsGet_PlayerStole2 是 false,那遊戲就會生成霧,否則不生成。 | 這個霧的原理跟遊戲裡其他的霧一樣,都是儲存在 [[map unit]] 裡的同一種物件(碰到就會觸發事情的物件)。如果 IsGet_PlayerStole2 是 false,那遊戲就會生成霧,否則不生成。 | ||
=== | === 模組裡的機關 === | ||
很多玩家注意到,即使有辦法避開抓人的霧(靜止器擊飛等等),林克還是會在離台地不遠處被遊戲迷昏抓回來。 | |||
後來我們發現 [[executable]] (遊戲的執行檔)會直接去看 IsGet_PlayerStole2 的值,而且總共有五個地方在看。其中一個最要命的地方是 [[AIDef:AI/PlayerNormal]],這段 code 負責處理跟林克本人有關的事情。 | |||
這個 AI function 非常長,其中有一段很刺眼的 code 如下: | |||
<source lang="c++"> | <source lang="c++"> | ||
Line 36: | Line 36: | ||
</source> | </source> | ||
解釋: | |||
* 奈落開始待ち means (roughly) 'wait for abyss start'. It is the name of the [[AIDef:Action/PlayerHellStartWait]] action for the Player_Link aiprog. | * 奈落開始待ち means (roughly) 'wait for abyss start' (深淵、開始、等待). It is the name of the [[AIDef:Action/PlayerHellStartWait]] action for the Player_Link aiprog. | ||
* sIsDungeon is set when [[GameScene]] [https://gist.github.com/leoetlino/c3e625367affc6a2dadffb9c92d73f6f generates a stage]. It is false if and only if: | * sIsDungeon is set when [[GameScene]] [https://gist.github.com/leoetlino/c3e625367affc6a2dadffb9c92d73f6f generates a stage]. It is false if and only if: | ||
**the map type isn't any of the following type: MarioClubTestDungeon, CDungeon, MainFieldDungeon | **the map type isn't any of the following type: MarioClubTestDungeon (蛤?), CDungeon 神廟裡, MainFieldDungeon 神獸裡 | ||
**'''and''' (the map type isn't GameTestDungeon) or the map name is ActorViewer or in debug mode{{check}}. | **'''and''' (the map type isn't GameTestDungeon) or the map name is ActorViewer or in debug mode{{check}}. | ||
* | * 總地來說,遊戲在滿足下列條件時會把林克抓到 (-1021, 253, 1792):一除錯模式沒開、二林克沒有滑翔傘、三林克出現在這個長方形外: | ||
[[File:The_Great_Plateau_barrier.png|center]] | [[File:The_Great_Plateau_barrier.png|center]] | ||
也就是說,只要林克在主世界跟劍之考驗裡,它的身旁就會有一層無形的結界,直到林克拿到滑翔傘後才解除。 | |||
由於這個結界的運作方式太過樸實無華(二話不說直接檢查座標),而且相關的檢查又是寫死在林克的身體裡,我們認為在拿到滑翔傘前打破這個結界的機會很渺茫。 | |||
Given that events can be delayed and that the actual voidout is done by a demo/cutscene, it is possible to get Link stuck in the PlayerHellStartWait state indefinitely and technically leave the authorized area without being voided out immediately. However, doing any kind of useful action (walking, gliding, riding a horse, etc.) is still impossible, as the paraglider check is done before handling any other regular state. As soon as Link leaves the waiting state, he will be voided out. | Given that events can be delayed and that the actual voidout is done by a demo/cutscene, it is possible to get Link stuck in the PlayerHellStartWait state indefinitely and technically leave the authorized area without being voided out immediately. However, doing any kind of useful action (walking, gliding, riding a horse, etc.) is still impossible, as the paraglider check is done before handling any other regular state. As soon as Link leaves the waiting state, he will be voided out. |
Latest revision as of 20:30, 12 May 2020
The Great Plateau barrier 台地結界是遊戲裡阻止林克在拿到滑翔傘前就離開初始台地的機制。
實作
台地結界一共有兩層:第一層是圍繞台地的霧,林克只要碰到霧就會被抓回來。第二層是林克的角色模組裡埋了一個檢查林克位置的機關,只要檢查失敗就迷昏林克。
林克拿到滑翔傘後,這兩層結界會同時消失。這是因為 IsGet_PlayerStole2
這個 flag 被設成 true 了
霧
這個霧的原理跟遊戲裡其他的霧一樣,都是儲存在 map unit 裡的同一種物件(碰到就會觸發事情的物件)。如果 IsGet_PlayerStole2 是 false,那遊戲就會生成霧,否則不生成。
模組裡的機關
很多玩家注意到,即使有辦法避開抓人的霧(靜止器擊飛等等),林克還是會在離台地不遠處被遊戲迷昏抓回來。
後來我們發現 executable (遊戲的執行檔)會直接去看 IsGet_PlayerStole2 的值,而且總共有五個地方在看。其中一個最要命的地方是 AIDef:AI/PlayerNormal,這段 code 負責處理跟林克本人有關的事情。
這個 AI function 非常長,其中有一段很刺眼的 code 如下:
if ( !sForceEnableGlidingAndSurfingAndGiveRupees && !sIsDungeon )
{
if ( !getFlag_IsGet_PlayerStole2(false) &&
(x < -1600.0 || x > -350.0 || z < 1400.0 || z > 2400.0) )
{
player->respawn_pos.x = -1021.7286376953125;
player->respawn_pos.y = 253.31527709960938;
player->respawn_pos.z = 1792.6009521484375;
AI_AIBase::changeState(this, "奈落開始待ち", 0);
return;
}
...
}
解釋:
- 奈落開始待ち means (roughly) 'wait for abyss start' (深淵、開始、等待). It is the name of the AIDef:Action/PlayerHellStartWait action for the Player_Link aiprog.
- sIsDungeon is set when GameScene generates a stage. It is false if and only if:
- the map type isn't any of the following type: MarioClubTestDungeon (蛤?), CDungeon 神廟裡, MainFieldDungeon 神獸裡
- and (the map type isn't GameTestDungeon) or the map name is ActorViewer or in debug mode[check].
- 總地來說,遊戲在滿足下列條件時會把林克抓到 (-1021, 253, 1792):一除錯模式沒開、二林克沒有滑翔傘、三林克出現在這個長方形外:
也就是說,只要林克在主世界跟劍之考驗裡,它的身旁就會有一層無形的結界,直到林克拿到滑翔傘後才解除。
由於這個結界的運作方式太過樸實無華(二話不說直接檢查座標),而且相關的檢查又是寫死在林克的身體裡,我們認為在拿到滑翔傘前打破這個結界的機會很渺茫。
Given that events can be delayed and that the actual voidout is done by a demo/cutscene, it is possible to get Link stuck in the PlayerHellStartWait state indefinitely and technically leave the authorized area without being voided out immediately. However, doing any kind of useful action (walking, gliding, riding a horse, etc.) is still impossible, as the paraglider check is done before handling any other regular state. As soon as Link leaves the waiting state, he will be voided out.