Talk:Biome spread

Walls do not spread biomes
Confirmed here on forums. --MentalMouse42 (talk) 04:54, 17 August 2019 (UTC)
 * According to the 1.3.5.3 source code, that is not entirely true. Walls do spread, but they only affect natural purity walls. Here is what I found:
 * Natural Corrupt Grass Walls, natural Ebonstone Walls (both regardless of foreground block type – can be none at all), and Corrupt grass can all convert any Grass Wall, Jungle Wall, or Flower Wall (all three natural or manually placed, does not matter) within a radius of 2 tiles to a natural Corrupt Grass Wall, but only if there is at least one Corruption-related block (Demonite Ore, Corrupt grass, Corruption plants/flowers, Vile Mushroom, Ebonstone Block, Corruption Thorny Bush, Ebonsand Block, or Purple Ice Block) within a radius of 20 tiles. Crimson and Hallow seem to be quite similar to that (although Hallow cannot convert Jungle Walls, as it cannot convert any Jungle tiles).
 * There is some... unexpected behavior, though: Above the surface, the Crimson does not have this Crimson-related-block-within-20-tiles restriction, but instead the restriction that there does need to be a Crimson-related block in front of the Crimstone/Crimson Grass Wall. Below the surface, this seems to be true for all three biomes. I am highly skeptical about this, because it would be very arbitrary to let only surface Corruption and Hallow spread quite differently from the rest (or am I missing something here?). I assume an error occurred during decompiling which led to certain variable names being swapped (especially because there is unused, unnecessary code nearby, which would imply behavior like described above – if the variable names were correct).
 * The Underground Desert has a separate spreading mechanism: Natural Ebonsandstone Walls, natural Hardened Ebonsand Walls (both regardless of foreground block type – can be none at all), and Ebonsandstone Blocks can convert any Sandstone Wall, natural Crimsandstone Wall, or natural Pearlsandstone Wall to a natural Ebonsandstone Wall and can convert any natural Hardened Sand Wall, natural Hardened Crimsand Wall, or natural Hardened Pearlsand Wall to a natural Hardened Ebonsand Wall. Both conversions can only happen within a radius of 2 tiles and only if there is any Corruption-related block within a radius of 20 tiles.
 * I would like to get some input on this before adding it to the article, especially regarding what I called "unexpected behavior" above. After doing some more source-digging, I realized that Corruption and Crimson are not actually always as similar as I had thought, but this still seems odd to me. Has anybody experienced something in that regard?
 * --Rye Greenwood (talk) 04:09, 18 August 2019 (UTC)
 * Thank you for the source-dive! I wouldn't assume an error in decompiling -- unless you know your decompiler is unreliable, this sort of thing is exactly what a decompiler is expected to get right.  It's entirely plausible that some code got orphaned when a dev decided to make the Crimson behavior more distinct from Corruption.  In any case, you have brought out a core of useful information:  "Walls cannot infect blocks, but they can infect other walls within 2 tiles, if there are infected blocks nearby.  Unlike blocks, walls may also convert walls from other infectious biomes.  The exact restrictions on wall infection vary with both the infectious biome and the underlying biome."  That much can go right in the page, and I'll put it there, then come back to try and summarize the details here.  --MentalMouse42 (talk) 11:41, 18 August 2019 (UTC)
 * OK, I'm back. I'll try to summarize your findings so far, and you can tell me if I've got it right.
 * Natural infected grass, grass walls, or stone walls can convert natural or placed pure grass, jungle or flower walls into infected grass walls, except that Hallow can't convert jungle walls.
 * Corruption, Hallow, and underground Crimson need an biome block within 20 tiles. Surface Crimson instead requires an biome block in front of the source wall.
 * Natural infected sandstone or hardened-sand walls, or infected sandstone blocks, can infect natural sandstone or sand walls, including those of other biomes, again only if there's a biome block within 20 tiles.
 * Here you discuss Corruption but not Crimson. Given the preceding, I think it's worth checking if Crimson (and/or Hallow) have any differences.
 * In all cases, wall infection range is 2 tiles, rather than the 3 tile range for block infection.
 * Any wall which becomes infected thereafter counts as a natural wall. (What about placed walls which get infected or purified by powder/water/solution?)
 * Does that look right? --MentalMouse42 (talk) 13:32, 18 August 2019 (UTC)
 * Thank you for structuring that thing. I glanced through the code again to confirm everything and found another exception that I missed (I have to admit, I was rather tired yesterday): In regards to Hallowed wall spread, only natural Hallowed Grass Walls and Hallowed grass blocks can convert other walls – Pearlstone Walls cannot.
 * I realize I have not expressed myself unambiguously enough. Only Corrupted and Hallowed walls that are above the surface require a biome tile nearby (that 20-tile range) to spread. The rest instead requires the source tile to contain a biome block in the foreground.
 * Apart from that, it looks good. The term "underground Crimson" should probably be avoided, because that refers to the actual biome, which exists in the Cavern layer (whereas here, the mechanics already apply just below the surface, i.e. in the Underground layer).
 * In the Underground Desert, Crimson and Hallow behave exactly like the Corruption.
 * I'll list the biome tiles which are necessary for spread here (they are the same for both above- and below-surface wall spread), because there are certain inconsistencies (who would have thought):


 * Last point: Yes, all walls that get converted to biome variants, regardless of whether they were placed manually or naturally, are afterwards considered natural. I am not sure how much of a difference this makes (I do not think there are that many walls with both natural and manual forms), but well, that is how it is.
 * Thrown Powder can safely be ignored, since it only affects foreground blocks. Thrown Water and Clentaminator solutions behave similarly in that they always convert all pure and biome variants of Grass Walls (player-placed or not), Stone Walls, Sandstone Walls, and Hardened Sand Walls to the respective biome counterpart.
 * --Rye Greenwood (talk) 21:46, 18 August 2019 (UTC)
 * Addition: In-game testing revealed that the 20-tile range limit is not always adhered to in practice (https://imgur.com/a/AnRklmB), only sometimes. I guess it should be treated more as an estimate. --Rye Greenwood (talk) 22:05, 18 August 2019 (UTC)
 * Thanks again for your delving. Unfortunately, it's late here and I'm going to be out early tomorrow, so it may not be until tomorrow evening that I can edit the page.  (I'm fine if you decide to do it yourself.)  As far as "how much of a difference this makes": Consider that Underground Desert is defined by the presence of natural walls... and now we know a way to turn placed walls into natural walls!  Win!  --MentalMouse42 (talk) 02:00, 19 August 2019 (UTC)
 * Sneaking in here for a bit before I head out: Just to confirm a few points:
 * Demonite counts for a foreground block, but not Crimtane? Including in Underground desert?
 * Conversely, even above the surface, Crimson always requires a block at the source tile?
 * ETA: You say pearlstone walls can't spread, what about pearlsand and pearlsandstone walls? Come to think of it
 * Plant blocks do count underground, unless it's also desert?
 * ETA2: Does the desert have to register as a desert biome in normal fashion (sand blocks), or does this apply any time one of the desert walls is the source?
 * They do seem to have taken pains that each of the biomes has some unique variation, don't they....
 * --MentalMouse42 (talk) 10:58, 19 August 2019 (UTC)

I've merged the above info into the page, with the clarification that plants are not actual blocks. --MentalMouse42 (talk) 14:16, 19 August 2019 (UTC)
 * Looks pretty thorough & came up with unexpected side-discovery (how-to naturalize walls). Thanks for getting all that nailed down; it'll save a lot of work.  No more Meteor Hamaxing around the entire Corruption (and pickaxing out the purified stuff Just In Case).  208.89.33.43 18:41, 19 August 2019 (UTC)


 * MentalMouse, I hope you do not mind that I have turned your bulleted list into a numbered list; I can refer to the different points more easily that way:
 * Demonite Ore only counts as a biome tile for regular Corrupted wall spread (both above and below the surface), not in the Underground Desert. Crimtane Ore is never considered a biome tile.
 * Yes, surface Crimson always requires a biome tile at the spreading wall's tile. Only surface Corruption and Hallow do not. (I suspect I have misunderstood your question, because I actually thought this has been clear already... Did you mean something else?)
 * Natural Hardened Pearlsand Walls and natural Pearlsandstone Walls are the two wall types spreading Hallowed walls in the Underground Desert. Outside of the Underground Desert, only natural Hallowed Grass Walls and Hallowed grass blocks can spread Hallowed walls, as already discussed. (So a Pearlstone Wall could technically "spread" Hallowed walls in the Underground Desert if it was behind a Pearlsandstone Block, but that is because the wall behind a Pearlsandstone Block does not matter (see 5. below).)
 * Yes, plant tiles (including Vile/Vicious Mushrooms) always qualify as biome tiles outside of the Underground Desert. (By the way, I made a small mistake loosely related to this: Crimson/Hallow vines are always considered biome tiles as well, even in the Underground Desert – although a vine in the Underground Desert would surely be more than a strange sight. I edited the overview above accordingly.)
 * The decision of whether or not to apply Underground Desert behavior is entirely determined by the source (spreading) tile. For the Underground Desert mechanics to take action, the source tile has to contain any Sandstone Wall, any Hardened Sand Wall, or any Sandstone Block (in all three cases disregarding the other (wall/block) content of the tile for this step). Conversely, for the regular spread behavior to take effect, the source tile needs to contain any natural infected Grass Wall/Stone Wall/grass block, excluding Pearlstone Walls, again disregarding the rest of the tile's content.
 * There is no other requirement for the Underground Desert behavior. (So the Underground Desert spread may even happen on a Floating Island; well... if there somehow happened to be a natural Hardened Sand Wall/Sandstone Wall to spread to nearby... – yeah, generally, it will be limited to the actual Underground Desert by the restrictions.)
 * The biome to convert the target wall to is determined by the contents of the source tile, checking in the following order: Crimson wall → Crimson block → Hallowed wall → Hallowed block → Corruption wall → Corruption block. Qualifying walls are the respective natural Stone/Grass/Hardened Sand/Sandstone Walls and qualifying blocks are the biome tiles we already know (but only the ones which apply in the Underground Desert, of course, so e.g. no plants).
 * Examples:


 * {| class=terraria

! colspan=2 | Source tile !! rowspan=2 | Biome the target wall will be converted to ! Block !! Wall
 * || || Crimson
 * || || Crimson
 * || || Hallow
 * || || Corruption
 * }
 * All examples trigger Underground Desert spread behavior due to one of the source tile's contents pertaining to the group of Underground Desert tiles I mentioned above.
 * I guess it cannot hurt to outline the specifics of Underground Desert behavior again, now that I have talked so much about it; so just to be crystal clear: If Underground Desert behavior is "activated", due to the source tile being related to the Underground Desert as described above, any natural Sandstone Wall or any natural Hardened Sand Wall within 2 tiles around the source tile will be converted to the biome determined by the order above. At least one biome tile of the respective biome needs to be present within a 20×20-tile rectangle around the source tile for the conversion to succeed. Thus, the main difference here is that Sandstone Walls/Hardened Sand Walls of other biomes, not just the pure variants, can be converted. Another interesting difference is that the source wall is not always determining the biome to convert the target wall to (I mean, this is also partly true for regular, non-Underground-Desert spread, but there a Hallowed grass block in front of a Crimstone Wall can spread both biomes, whereas in the Underground Desert that would not be possible).
 * --Rye Greenwood (talk) 23:28, 19 August 2019 (UTC)
 * }
 * All examples trigger Underground Desert spread behavior due to one of the source tile's contents pertaining to the group of Underground Desert tiles I mentioned above.
 * I guess it cannot hurt to outline the specifics of Underground Desert behavior again, now that I have talked so much about it; so just to be crystal clear: If Underground Desert behavior is "activated", due to the source tile being related to the Underground Desert as described above, any natural Sandstone Wall or any natural Hardened Sand Wall within 2 tiles around the source tile will be converted to the biome determined by the order above. At least one biome tile of the respective biome needs to be present within a 20×20-tile rectangle around the source tile for the conversion to succeed. Thus, the main difference here is that Sandstone Walls/Hardened Sand Walls of other biomes, not just the pure variants, can be converted. Another interesting difference is that the source wall is not always determining the biome to convert the target wall to (I mean, this is also partly true for regular, non-Underground-Desert spread, but there a Hallowed grass block in front of a Crimstone Wall can spread both biomes, whereas in the Underground Desert that would not be possible).
 * --Rye Greenwood (talk) 23:28, 19 August 2019 (UTC)


 * No problem with the numberings. And you were pretty clear, I just felt the need to confirm particularly "surprising" findings.  Over the next day or two I'll see how much of these newest details I can work into the page, though again, you're welcome to join in.  One quibble:  Given you previously mentioned a 20-tile radius, I suspect that in this last note, you meant to say "a 41×41 rectangle around the source tile".
 * ETA: Also, we now know how to put a natural Desert wall in a sky island, and it's easy enough to put grass in the Underground desert, where I'd guess that it would grow vines.

--MentalMouse42 (talk) 01:40, 20 August 2019 (UTC)


 * Hmm... again, confirming a "surprising" point: If I understand you correctly, that corrupt grass wall with a sandstone block in front of it, would only corrupt sand or sandstone walls, but not other grassy walls?  While a crimson grass wall with a non-sandy pure block in front of it would only crimson grassy walls, not sandy walls? --MentalMouse42 (talk) 03:14, 20 August 2019 (UTC)
 * Also: If there is in infected grass wall with an infected sandstone block in front of it, I get the impression that the Underground Desert mechanics take precedence? --MentalMouse42 (talk) 11:43, 20 August 2019 (UTC)


 * Okay, I've taken a shot at working this information into the page. Where your comments seemed to contradict each other, I went with the latest statement.  Can you check the result for correctness?
 * One oddity I ran across elsewhere: This forum user seems to have encountered a situation where Crimson walls were spontaneously reverting to purity (pre-Hardmode).  I suspect Z-fighting, but otherwise don't know what to make of it, and the thread is from almost a year ago.  --MentalMouse42 (talk) 13:10, 20 August 2019 (UTC)