Yiga Clan member spawns and LevelSensor.byml: Difference between pages

From ZeldaMods (Breath of the Wild)
(Difference between pages)
Jump to navigation Jump to search
imported>Leoetlino
 
imported>Leoetlino
No edit summary
 
Line 1: Line 1:
Yiga Clan members are spawned by two different systems.
<onlyinclude>
{{resloc|path=Ecosystem/LevelSensor.byml|locations=[[Bootup.pack]]}}
'''LevelSensor.byml''' is the main configuration file for the LevelSensor subsystem (which handles parts of [[difficulty scaling]]). Its file format is [[BYML]].
</onlyinclude>
All information related to difficulty (enemy and weapon) scaling is stored in this configuration file. Human-readable versions dumped from [[Renotesfiles:game files/1.0.0 LevelSensor.yml|1.0.0]] and [[Renotesfiles:game files/1.5.0 LevelSensor.yml|1.5.0]] are included in the [https://github.com/leoetlino/botw-re-notes botw-re-notes] repo. A [[Renotesfiles:game files/1.0.0 1.5.0 LevelSensor.yml.diff|diff between 1.0.0 and 1.5.0]] is also provided in the repo.


Some are statically spawned by [[PlacementMgr]], which means that they are listed in [[map unit]]s and visible on the [https://objmap.zeldamods.org object map]. However, after Link completes enough main quests, most Yiga Clan members the player sees are actually dynamically spawned by [[AutoPlacementMgr]].
[1.4.0] Flag entries for Golden enemies, Igneo Talus Titan and Monk Maz Koshia were added to the kill point table. Weapon entries for the One-Hit Obliterator and Weapon_Sword_503 were also added to the weapon scaling list. They cannot receive any modifier. (Yes, the developers forgot to add golden enemies to the config in 1.3.0.)


== Static ==
[[Category:Content (BotW)]]
=== Traveler (disguised Yigas) ===
These are linked to 'Link' tags that make them spawn if and only if the Electric_Relic_AssassinFirst flag (set when the Yiga Clan Hideout location text appears) ''or'' Npc_Kakariko001_TalkEnd (set after talking to Impa) flag is set.
 
=== Near the hideout ===
The ''five'' non-disguised static Yiga clan members inside and near the hideout seem to be spawned unconditionally.
 
== Dynamic ==
Other Yiga Clan members are not listed on the map. This is because they are dynamically spawned by a component called the AutoPlacement Manager. Unlike PlacementMgr, AutoPlacementMgr doesn't use map units to determine which actors to spawn. The current [[map area]] the player is in and various configuration files control whether Yiga enemies spawn or not.
 
=== Condition 1: AreaData ===
Just like other auto-generated actors, Enemy_Assassin_Shooter_Junior or Enemy_Assassin_Middle must be listed in an area's auto-generated enemies for Yiga Clan members to be spawned by AutoPlacementMgr.
 
=== Condition 2: Event flow ===
Just like other auto-generated actors, the AutoPlacement event flows for Enemy_Assassin_Shooter_Junior or Enemy_Assassin_Middle must call the CreateData action for them to be spawned.
 
The full set of conditions can be found here:
* Enemy_Assassin_Middle: https://eventviewer.zeldamods.org/viewer.html?data=/d/AutoPlacementNear_Enemy_Assassin_Middle.json&params=1&entry=EntryPoint0
* Enemy_Assassin_Shooter_Junior: https://eventviewer.zeldamods.org/viewer.html?data=/d/AutoPlacementNear_Enemy_Assassin_Shooter_Junior.json&params=1&entry=EntryPoint0
 
=== Condition 3: AutoPlacementMgr ===
This series of checks is specific to Yiga enemies and hardcoded in AutoPlacementMgr (in the [[executable]]).
 
'''If the Electric_Relic_GetBack flag is set''', which happens when Link opens the Thunder Helm chest in the hideout and the quest log shows this message:
<blockquote><poem>
You retrieved the chief's heirloom from the
thieves' leader!
 
It's time to head back to Gerudo Town
and return the heirloom to Riju!
</poem></blockquote>
 
Then:
* Blademasters are allowed to spawn, and their weapon is a Windcleaver (Weapon_Lsword_074)
* Archers are allowed to spawn, and their weapon is a Duplex Bow (Weapon_Bow_040)
* Footsoldiers now carry a Demon Carver (Weapon_Sword_073) instead of a Vicious Sickle (Weapon_Sword_053) 25% of the time.
 
'''Otherwise''', only footsoldiers are allowed to spawn dynamically, and '''only if''' [the player has talked to Impa ''or'' the Electric_Relic_AssassinFirst flag is set]. In this case, their weapon is always a Vicious Sickle.
 
Note: if Electric_Relic_GetBack is set, [[AIDef:Action/CreateAndReplaceAssassin]] will create Yiga enemy actors with the DropTable parameter set to "HighRank". This causes them to drop better items upon defeat.
 
<div class="mw-collapsible mw-collapsed">
Source: (with the code cleaned up)
<div class="mw-collapsible-content">
<source lang="c++">
// This is at 0x710073D7FC in Switch 1.5.0
bool yigaWeaponStuff(sead::SafeString& enemyName, sead::SafeString& weaponName, bool wantFootsoldier,
                    const sead::SafeString& disguisedActorName)
{
  const bool isFootsoldier = wantFootsoldier || enemyName == "Enemy_Assassin_Junior";
  const bool isShooterJunior = enemyName == "Enemy_Assassin_Shooter_Junior";
  weaponName = "";
 
  if ( !wantFootsoldier && isFootsoldier )  // well, this is a bug!
  {
    enemyName = "";
    return false;
  }
 
  if ( wantFootsoldier )
  {
    if ( disguisedActorName == "Npc_Assassin_001" )
      enemyName = "Enemy_Assassin_Junior_Npc_001";
    else if (disguisedActorName == "Npc_Assassin_002")
      enemyName = "Enemy_Assassin_Junior_Npc_002";
    else
      enemyName = "Enemy_Assassin_Junior";
  }
 
  // If the player has opened the Thunder Helm chest
  // (more precisely: basic signal was emitted by the chest)
  if ( getFlag_ElectricRelic_GetBack() )
  {
    // Footsoldier
    if (isFootsoldier)
    {
      if ( random() < 0.75 )
        weaponName = "Weapon_Sword_073";  // Demon Carver
      else
        weaponName = "Weapon_Sword_053";  // Vicious Sickle
    }
    // Archer
    else if (isShooterJunior)
    {
      weaponName = "Weapon_Bow_040";  // Duplex Bow
    }
    // Blademaster
    else
    {
      weaponName = "Weapon_Lsword_074";  // Windcleaver
    }
    return !enemyName.empty();
  }
 
  // Otherwise, if the player has NOT opened the chest:
  // Only footsoldiers are allowed to spawn
  // And *only if* [the player has talked to Impa or Electric_Relic_AssassinFirst is set]
  //
  // Note that non-archer footsoldiers are not dynamic spawns.
  if (isFootsoldier && (getFlag_Npc_Kakariko001_TalkEnd() || getFlag_Electric_Relic_AssassinFirst()))
  {
    weaponName = "Weapon_Sword_053";  // Vicious Sickle
    return true;
  }
 
  // In any other case, blank out the enemy name and prevent it from spawning.
  enemyName = "";
  return false;
}
</source>
</div>
</div>
 
[[Category:Internals]]
[[Category:Game mechanics]]

Revision as of 22:52, 21 October 2018

This resource is found in Bootup.pack.

Its canonical resource path is "Ecosystem/LevelSensor.byml".

LevelSensor.byml is the main configuration file for the LevelSensor subsystem (which handles parts of difficulty scaling). Its file format is BYML.

All information related to difficulty (enemy and weapon) scaling is stored in this configuration file. Human-readable versions dumped from 1.0.0 and 1.5.0 are included in the botw-re-notes repo. A diff between 1.0.0 and 1.5.0 is also provided in the repo.

[1.4.0] Flag entries for Golden enemies, Igneo Talus Titan and Monk Maz Koshia were added to the kill point table. Weapon entries for the One-Hit Obliterator and Weapon_Sword_503 were also added to the weapon scaling list. They cannot receive any modifier. (Yes, the developers forgot to add golden enemies to the config in 1.3.0.)