Yiga Clan member spawns: Difference between revisions
m
Corrected footsoldier Demon Carver chance to match source code
imported>Leoetlino |
imported>Dion starfire m (Corrected footsoldier Demon Carver chance to match source code) |
||
(5 intermediate revisions by one other user not shown) | |||
Line 15: | Line 15: | ||
=== Condition 1: AreaData === | === 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. | 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. | ||
* Area 0: GerudoHighlands | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 1: WestHateru | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 2: TamulPlateau | |||
** Enemy_Assassin_Middle x1 | |||
* Area 3: HeburaMountains | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 4: GerudoHighlands | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 5: HeburaMountains | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 6: CentralHyrule | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 8: HyruleForest | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 9: HeburaMountains | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 10: HyliaLake | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 11: LanayruWaterSources | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 12: CentralHyrule | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 13: EastHateru | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 14: HyruleForest | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 15: EldinMountains | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 16: HyruleForest | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 17: EldinCanyon | |||
** Enemy_Assassin_Middle x1 | |||
* Area 18: TabantaFrontier | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 19: WestHateru | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 20: TamulOutback | |||
** Enemy_Assassin_Middle x1 | |||
* Area 21: GerudoDesert | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 22: TamulOutback | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 23: TabantaFrontier | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 24: FironeGrassland | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 25: FironeGrassland | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 26: CentralHyrule | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 27: TabantaFrontier | |||
** Enemy_Assassin_Middle x1 | |||
* Area 29: FironeGrassland | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 30: TamulSea | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 31: TabantaFrontier | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 32: CentralHyrule | |||
** Enemy_Assassin_Middle x1 | |||
* Area 33: TamulPlateau | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 36: FironeGrassland | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 37: HeburaMountains | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 39: HeburaMountains | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 40: GerudoDesert | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 41: CentralHyrule | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 42: TabantaFrontier | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 43: HateruSea | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 48: TabantaFrontier | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 49: WestHateru | |||
** Enemy_Assassin_Middle x1 | |||
* Area 52: EldinMountains | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 53: EldinMountains | |||
** Enemy_Assassin_Middle x1 | |||
* Area 54: TamulSea | |||
** Enemy_Assassin_Middle x1 | |||
* Area 57: LanayruSea | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 58: HateruSea | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 59: WestHateru | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 60: HyruleForest | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 61: EastHateru | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 62: EastHateru | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 63: HyruleHill | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 65: LanayruWetlands | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 70: CentralHyrule | |||
** Enemy_Assassin_Middle x1 | |||
* Area 71: TamulPlateau | |||
** Enemy_Assassin_Middle x1 | |||
* Area 72: GerudoDesert | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 73: GerudoHighlands | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 74: FironeGrassland | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 75: TamulPlateau | |||
** Enemy_Assassin_Middle x1 | |||
* Area 76: CentralHyrule | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 78: EastHateru | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 80: TabantaFrontier | |||
** Enemy_Assassin_Middle x1 | |||
* Area 81: HyruleHill | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 82: CentralHyrule | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 83: TabantaFrontier | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 86: EastHateru | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 87: GerudoDesert | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 88: HyruleForest | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 89: EldinMountains | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 90: FironeGrassland | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
* Area 93: WestHateru | |||
** Enemy_Assassin_Shooter_Junior x1 | |||
=== Condition 2: Event flow === | === Condition 2: Event flow === | ||
Line 38: | Line 179: | ||
* Blademasters are allowed to spawn, and their weapon is a Windcleaver (Weapon_Lsword_074) | * 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) | * 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) | * Footsoldiers now carry a Demon Carver (Weapon_Sword_073) instead of a Vicious Sickle (Weapon_Sword_053) 75% of the time. | ||
'''Otherwise''', only footsoldiers are allowed to spawn | '''Otherwise''', only non-archer footsoldiers are allowed to spawn, 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 that because non-archer footsoldiers do not have auto placement entries, this effectively means no Yiga enemy can dynamically spawn. | ||
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. | 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:Internals]] | ||
[[Category:Game mechanics]] | [[Category:Game mechanics]] |