The Great Plateau barrier: Difference between revisions

Marked this version for translation
(add translate tags)
(Marked this version for translation)
 
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>
<!--T:1-->
'''The Great Plateau barrier''' prevents Link from leaving the Great Plateau before he has acquired the paraglider.
'''The Great Plateau barrier''' prevents Link from leaving the Great Plateau before he has acquired the paraglider.


== Implementation ==
== Implementation == <!--T:2-->


<!--T:3-->
The barrier is implemented by two layers: one is a collision-based check (the voidout fog), another is hardcoded into Link's actor code.
The barrier is implemented by two layers: one is a collision-based check (the voidout fog), another is hardcoded into Link's actor code.


<!--T:4-->
The thing to know about the Great Plateau kill fog and box is that they both disappear after you get the paraglider. The corresponding GameData flag is called <code>IsGet_PlayerStole2</code>.
The thing to know about the Great Plateau kill fog and box is that they both disappear after you get the paraglider. The corresponding GameData flag is called <code>IsGet_PlayerStole2</code>.


=== Fog ===
=== Fog === <!--T:5-->


<!--T:6-->
This one is simple: Link will void out as soon as he touches it. The fog is a regular [[map unit]] actor that spawns whenever IsGet_PlayerStole2 is not set.  
This one is simple: Link will void out as soon as he touches it. The fog is a regular [[map unit]] actor that spawns whenever IsGet_PlayerStole2 is not set.  


=== Actor code ===
=== Actor code === <!--T:7-->


<!--T:8-->
Even if the fog is removed or if the player manages to avoid the fog (by stasis launching for example), Link will still void out when he gets too far away from the Plateau.
Even if the fog is removed or if the player manages to avoid the fog (by stasis launching for example), Link will still void out when he gets too far away from the Plateau.


<!--T:9-->
It turns out that IsGet_PlayerStole2 is also checked by the [[executable]]. More precisely, its value is queried by 5 functions in the entire program. One of them is the [[AIDef:AI/PlayerNormal]] code which is responsible for handling events for the GameROMPlayer (Link) actor.
It turns out that IsGet_PlayerStole2 is also checked by the [[executable]]. More precisely, its value is queried by 5 functions in the entire program. One of them is the [[AIDef:AI/PlayerNormal]] code which is responsible for handling events for the GameROMPlayer (Link) actor.


<!--T:10-->
In that large AI function, the following piece of code can be seen:
In that large AI function, the following piece of code can be seen:


<!--T:11-->
<source lang="c++">
<source lang="c++">
if ( !sForceEnableGlidingAndSurfingAndGiveRupees && !sIsDungeon )
if ( !sForceEnableGlidingAndSurfingAndGiveRupees && !sIsDungeon )
Line 37: Line 45:
</source>
</source>


<!--T:12-->
A few notes:
A few notes:
* 奈落開始待ち 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.
Line 44: Line 53:
* Essentially, what this piece of code does is force Link to void out if (a) debug flags aren't set, (b) he doesn't have the paraglider, (c) Link is not within the bounds of the following rectangle:
* Essentially, what this piece of code does is force Link to void out if (a) debug flags aren't set, (b) he doesn't have the paraglider, (c) Link is not within the bounds of the following rectangle:


<!--T:13-->
[[File:The_Great_Plateau_barrier.png|center]]
[[File:The_Great_Plateau_barrier.png|center]]


<!--T:14-->
On the MainField (Hyrule) and AocField (Trial of the Sword) maps, Link is effectively surrounded by an ''infinitely'' high box that he is not allowed to leave until he has the paraglider.
On the MainField (Hyrule) and AocField (Trial of the Sword) maps, Link is effectively surrounded by an ''infinitely'' high box that he is not allowed to leave until he has the paraglider.


<!--T:15-->
It is a simple, hardcoded, coordinate-based check, and it is embedded in the ''core'' Player actor code, so glitching past it is impossible barring major bugs that would likely leave the game broken and unplayable.
It is a simple, hardcoded, coordinate-based check, and it is embedded in the ''core'' Player actor code, so glitching past it is impossible barring major bugs that would likely leave the game broken and unplayable.


<!--T:16-->
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.
</translate>
</translate>