Changes

1,961 bytes added ,  07:55, 3 January 2023
→‎Lava Bat floors: Added info from code that indicates lava bats only spawn on level 20 and 40.
Line 47: Line 47:  
Since of our wiki says that the Lava Bats spawn on the first 50 floors, which is not correct. Each time I play, the only floors I see them on are floors 20 and 40 on floors that have not been inhabited by [[Mummy|Mummies]]. [[User:9000|9000]] ([[User talk:9000|talk]]) 8:27, 11 September 2022 (UTC)
 
Since of our wiki says that the Lava Bats spawn on the first 50 floors, which is not correct. Each time I play, the only floors I see them on are floors 20 and 40 on floors that have not been inhabited by [[Mummy|Mummies]]. [[User:9000|9000]] ([[User talk:9000|talk]]) 8:27, 11 September 2022 (UTC)
 
:If you can find proof that it's not random in the game code, then we can change the wiki. [[User:Margotbean|margotbean]] ([[User talk:Margotbean|talk]]) 18:29, 11 September 2022 (UTC)
 
:If you can find proof that it's not random in the game code, then we can change the wiki. [[User:Margotbean|margotbean]] ([[User talk:Margotbean|talk]]) 18:29, 11 September 2022 (UTC)
 +
::In the function to populate the levels (StardewValley.Locations.MineShaft.getMonsterForThisLevel, which in turn is called from StardewValley.Locations.MineShaft.populateLevel), has a few sections to generate a bat.
 +
::The first is for Dino floors, which result in an iridium bat, then there are the options for the mines, then for Skull Cavern, there are 2 options to generate a bat, with the conditions:
 +
::(this.mineLevel % 20 == 0 && distanceFromLadder > 10f) or (this.mineRandom.NextDouble() < 0.33 && distanceFromLadder > 10f && this.mineLevel >= 171)
 +
::The first case matches the claimed behaviour of only seeing them on floors 20 and 40; and the latter case will produce an iridium bat.
 +
::Additionally, before either of these checks, it checks if it is loaded a DarkArea, in which case it will only spawn a ghost or a mummy.
 +
::
 +
::However, further down in the populateLevel function, it also checks (this.mustKillAllMonstersToAdvance() && this.EnemyCount <= 1), and adds a bat if true. But this doesn't specify the level so it should be a normal bat, not a lava bat.
 +
::
 +
::The only other location I can find it spawning a bat is in StardewValley.Locations.MineShaft.spawnFlyingMonsterOffScreen
 +
::In this case, for the Skull Cavern, it first checks (this.mineLevel < 171 || Game1.random.NextDouble() < 0.5) and if that is true it will spawn a serpent, if it is false it will spawn a bat.
 +
::
 +
::So unless I am missing something, the only options for bat spawns are:
 +
::* Normal bat spawning if you need to kill all the monsters to advance and no monster spawned.
 +
::* Lava bat spawning on level 20 and 40 (given it is not a dark area).
 +
::* Iridium bat spawning on level 51 and above, either on screen during the normal population event, or offscreen while still on the floor.
 +
::So Lava bats should only spawn on level 20 and 40. I'll update the main page to say that.[[User:JackBlack69|JackBlack69]] ([[User talk:JackBlack69|talk]]) 07:54, 3 January 2023 (UTC)
70

edits