Scheduled system upgrade on Sunday 21 April 2024 15:00-16:00 UTC - On that day, the wiki and other services might go down for 5-15 minutes.

AIDef:AI/PriestBossSynchroMode and The Great Plateau barrier: Difference between pages

From ZeldaMods (Breath of the Wild)
(Difference between pages)
Jump to navigation Jump to search
imported>Leoetlino
(import AI definitions from 1.5.0 (add missing AITreeVariables))
 
imported>Leoetlino
 
Line 1: Line 1:
{{AIDef
'''The Great Plateau barrier''' prevents Link from leaving the Great Plateau before he has acquired the paraglider.
|name=PriestBossSynchroMode
|type=AI
}}


== AITreeVariables ==
== Implementation ==
{|class="wikitable"
The barrier is implemented by two layers: one is a collision-based check (the voidout fog), another is hardcoded into Link's actor code.
! Name !! Type !! Default value !! Description
|-
| EquipWeaponBufIndex || Int || 0 ||
|-
| ReturnFromBananaMode || Bool || False ||
|-
| PriestBossMetaAIUnit || AITreeVariablePointer ||  ||
|-
|}


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>.


== Children ==
=== Fog ===
{|class="wikitable"
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.
! Name !! Description
|-
| 一列流星 ||
|-
| 一列突進 ||
|-
| 円陣弓 ||
|-
| 円陣突進 ||
|-
| 待機 ||
|-
|}


== Derived definitions ==
=== Actor code ===
=== シンクロモード (Priest_Boss_ShadowClone, 通常) ===
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.
{{AIDefDerived
 
|name=シンクロモード
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.
|group_name=通常
 
|derived_from=PriestBossSynchroMode
In that large AI function, the following piece of code can be seen:
|aiprog=Priest_Boss_ShadowClone
<source lang="c++">
}}
if ( !isDebug1 && !isDebug2 )
No overridden parameters.
{
=== シンクロモード (Priest_Boss_ShadowClone_Real, 通常) ===
  if ( !hasParaglider(0) &&
{{AIDefDerived
      (x < -1600.0 || x > -350.0 || z < 1400.0 || z > 2400.0) )
|name=シンクロモード
  {
|group_name=通常
    ...
|derived_from=PriestBossSynchroMode
    // 奈落開始待ち means 'wait for abyss start' (= voidout)
|aiprog=Priest_Boss_ShadowClone_Real
    return changeState(v1, "奈落開始待ち", 0);
}}
  }
No overridden parameters.
}
</source>
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's coordinates are not inside this rectangle:
 
[[File:The_Great_Plateau_barrier.png|center]]
 
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.
 
[[Category:Internals]]
[[Category:Game mechanics]]

Revision as of 13:05, 21 October 2018

The Great Plateau barrier prevents Link from leaving the Great Plateau before he has acquired the paraglider.

Implementation

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 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 IsGet_PlayerStole2.

Fog

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

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.

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.

In that large AI function, the following piece of code can be seen:

if ( !isDebug1 && !isDebug2 )
{
  if ( !hasParaglider(0) &&
       (x < -1600.0 || x > -350.0 || z < 1400.0 || z > 2400.0) )
  {
    ...
    // 奈落開始待ち means 'wait for abyss start' (= voidout)
    return changeState(v1, "奈落開始待ち", 0);
  }
}

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's coordinates are not inside this rectangle:

The Great Plateau barrier.png

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.