Scene: Difference between revisions

From ZeldaMods (Breath of the Wild)
Jump to navigation Jump to search
imported>Leoetlino
No edit summary
imported>Leoetlino
(add info about Starting event flows)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
Scene changes — which are essentially warps that trigger loading screens — can be explicitly triggered with three different actions: ChangeScene, FromCDungeonToMainField and ToCDungeon.
''Not to be confused with [[map]]s, [[Map unit|map units]] or [[Stage|stages]]''.


All three actions are very similar; in fact they share the same base class. However, the first one is the most flexible action since the other two can only be used for shrines.
<onlyinclude>'''Scenes'''<ref>"SceneWorkTime" @ 0x7100A89528 (Switch 1.5.0)</ref> are active instances of a [[stage]]. By design, exactly one scene is active at a time. The active scene is managed by [[GameScene]], which is responsible for generating and unloading stages and changing to another scene.</onlyinclude>


== Actions ==
== Scene changes ==
=== ChangeScene ===
In practice, '''scene changes''' are essentially warps that trigger loading screens. They can be explicitly triggered with three different actions: ChangeScene, FromCDungeonToMainField and ToCDungeon.
{|class="wikitable"
! Key !! Type !! Example || Description
|-
| WarpDestMapName || str || MainFieldDungeon/RemainsFire
MainField/A-1
|
|-
| WarpDestPosName || str || StartR ||
|-
| FadeType || int || 0 ||
|-
| StartType || int || 0 ||
|-
| EvflName || str || Demo622_1 || Name of the event flow to start after warp is complete
|-
| EntryPointName || str || Demo622_1 || Name of the entry point in the event flow
|}


Exported by EventSystemActor as Demo_ChangeScene.
All three actions are very similar; in fact they share the same base class. However, the first one is the most flexible action since the other two can only be used for shrines.


=== FromCDungeonToMainField ===
Scene changes can also be triggered from [[AIDef:Action/AreaRoot]].
{|class="wikitable"
! Key !! Type !! Example || Description
|-
| StartType || int || 0 ||
|-
| EvflName || str || Demo008_4 || Name of the event flow to start after warp is complete
|-
| EntryPointName || str || Demo622_1 || Name of the entry point in the event flow
|}
Exported by EventSystemActor as Demo_FromCDunToMainField.


Special purpose variant of ChangeScene which automatically sets WarpDestMapName and WarpDestPosName to <code>CDungeon/%s</code> and <code>Entrance_1</code> respectively.
=== Actions ===
==== ChangeScene ====
{{link to article|link=AIDef:Action/ChangeScene}}


The dungeon map name is determined from the player’s coordinates and location markers in <code>Map/MainField/Static.mubin</code>. The coordinates of each <code>Dungeon</code> marker are compared with the player’s; if Link is within 100 distance units of (x,y,z) the dungeon name is extracted from the <code>SaveFlag</code> name (e.g. Location_Dungeon051 -&gt; Dungeon051) and used as the warp destination map name.
==== FromCDungeonToMainField ====
{{link to article|link=AIDef:Action/FromCDungeonToMainField}}


=== ToCDungeon ===
==== ToCDungeon ====
{|class="wikitable"
{{link to article|link=AIDef:Action/ToCDungeon}}
! Key !! Type !! Example || Description
|-
| StartType || int || 0 ||
|-
| EvflName || str || Demo008_2 || Name of the event flow to start after warp is complete
|-
| EntryPointName || str || Demo622_1 || Name of the entry point in the event flow
|}
Exported by EventSystemActor as Demo_ToCDungeon.


Special purpose variant of ChangeScene which automatically sets WarpDestMapName and WarpDestPosName to <code>MainField/%s</code> [new map name, e.g. A-1] and <code>%s</code> [current map name, e.g. CDungeon100_1] respectively.
=== Warp cutscene ===


The new map name is determined using <code>Map/MainField/Static.mubin</code> and the current map name.
[[Demo|Demo005_1]] is used as the event flow for most warps, for example when fast travelling to shrines, towers, Travel Medallion and Divine Beasts.


== Warp cutscene ==
Entry point <code>ClearRemains</code> is used when completing a Divine Beast. The main difference between <code>CommonFunc</code> and <code>ClearRemains</code> is the warp effect (sound and visual).


[[Demo|Demo005_1]] is used as the event flow for most warps, for example when fast travelling to shrines, towers, Travel Medallion and Divine Beasts.
== Starting event flows ==
An event flow can be scheduled to start immediately after a scene change is completed, right before control is yielded to the player. For the scene change actions mentioned above, the parameters <code>EvflName</code> and <code>EntryPointName</code> can be used to specify a custom event flow.


Entry point <code>ClearRemains</code> is used when completing a Divine Beast. The main difference between <code>CommonFunc</code> and <code>ClearRemains</code> is the warp effect (sound and visual).
That same system is also used for game-initiated scene changes (e.g. reloading a save or going to the title screen). In such cases, [[GameScene]] automatically determines which event flow and entry point to use during [[GameScene#Stage generation step 11-5b]].


[[Category:Internals]]
[[Category:Internals]]

Latest revision as of 22:02, 12 October 2019

Not to be confused with maps, map units or stages.

Scenes[1] are active instances of a stage. By design, exactly one scene is active at a time. The active scene is managed by GameScene, which is responsible for generating and unloading stages and changing to another scene.

Scene changes

In practice, scene changes are essentially warps that trigger loading screens. They can be explicitly triggered with three different actions: ChangeScene, FromCDungeonToMainField and ToCDungeon.

All three actions are very similar; in fact they share the same base class. However, the first one is the most flexible action since the other two can only be used for shrines.

Scene changes can also be triggered from AIDef:Action/AreaRoot.

Actions

ChangeScene

Full article: AIDef:Action/ChangeScene

FromCDungeonToMainField

Full article: AIDef:Action/FromCDungeonToMainField

ToCDungeon

Full article: AIDef:Action/ToCDungeon

Warp cutscene

Demo005_1 is used as the event flow for most warps, for example when fast travelling to shrines, towers, Travel Medallion and Divine Beasts.

Entry point ClearRemains is used when completing a Divine Beast. The main difference between CommonFunc and ClearRemains is the warp effect (sound and visual).

Starting event flows

An event flow can be scheduled to start immediately after a scene change is completed, right before control is yielded to the player. For the scene change actions mentioned above, the parameters EvflName and EntryPointName can be used to specify a custom event flow.

That same system is also used for game-initiated scene changes (e.g. reloading a save or going to the title screen). In such cases, GameScene automatically determines which event flow and entry point to use during GameScene.

  1. "SceneWorkTime" @ 0x7100A89528 (Switch 1.5.0)