Yiga Clan member spawns: Difference between revisions

Jump to navigation Jump to search
imported>Leoetlino
(Created page with "Yiga Clan members are spawned by two different systems. Some are statically spawned by PlacementMgr, which means that they are listed in map units and visible on the...")
 
imported>Leoetlino
(5 intermediate revisions by the same user not shown)
Line 20: Line 20:


The full set of conditions can be found here:
The full set of conditions can be found here:
* Enemy_Assassin_Middle: https://eventviewer.zeldamods.org/?data=/d/AutoPlacementNear_Enemy_Assassin_Middle.json&params=1&entry=EntryPoint0
* 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/?data=/d/AutoPlacementNear_Enemy_Assassin_Shooter_Junior.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 ===
=== Condition 3: AutoPlacementMgr ===
This series of checks is specific to Yiga enemies and hardcoded in AutoPlacementMgr (in the [[executable]]).
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 gets back the Thunder Helm from the hideout and the quest log shows this message:
'''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>
<blockquote><poem>
You retrieved the chief's heirloom from the
You retrieved the chief's heirloom from the
Line 35: Line 35:
</poem></blockquote>
</poem></blockquote>


...then Blademasters are allowed to spawn. In this case, Footsoldiers carry a random weapon:
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++">
<source lang="c++">
// probability: roughly 75%
// This is at 0x710073D7FC in Switch 1.5.0
if (sead::Random::getU32() / (U32_MAX+1) < 0.75)
bool yigaWeaponStuff(sead::SafeString& enemyName, sead::SafeString& weaponName, bool wantFootsoldier,
  weapon = "Weapon_Sword_073"; // Demon Carver
                    const sead::SafeString& disguisedActorName)
else
{
  weapon = "Weapon_Sword_053"; // Vicious Sickle
  const bool isFootsoldier = wantFootsoldier || enemyName == "Enemy_Assassin_Junior";
</source>
  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";
  }


'''Otherwise''':
  // If the player has opened the Thunder Helm chest
* if Electric_Relic_AssassinFirst ''or'' Npc_Kakariko001_TalkEnd is set; '''and'''
  // (more precisely: basic signal was emitted by the chest)
* if the enemy is Enemy_Assassin_Junior, ''or'' a disguised Yiga, and in possibly more conditions{{check}}
  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();
  }


then only Footsoldiers may be dynamically generated, and they will only wield Vicious Sickles.
  // Otherwise, if the player has NOT opened the chest:
  // Only footsoldiers are allowed to spawn dynamically
  // And *only if* [the player has talked to Impa or Electric_Relic_AssassinFirst is set]
  if (isFootsoldier && (getFlag_Npc_Kakariko001_TalkEnd() || getFlag_Electric_Relic_AssassinFirst()))
  {
    weaponName = "Weapon_Sword_053";  // Vicious Sickle
    return true;
  }


Note: if Electric_Relic_GetBack is set, [[AIDef:Action/CreateAndReplaceAssassin]] will create Yiga enemy actors with the DropTable parameter set to "HighRank".
  // In any other case, blank out the enemy name and prevent it from spawning.
  enemyName = "";
  return false;
}
</source>
</div>
</div>


[[Category:Internals]]
[[Category:Internals]]
[[Category:Game mechanics]]
[[Category:Game mechanics]]
Anonymous user

Navigation menu