Talk:Floating Islands/Drop research

Calculations
Ok... how do we want these numbers calculated? I think count is going to be the easiest since there appears to not be a set amount of certain items. Obviously divided into the various types of brick/wall combinations... what else? -- Wynthyst  talk  02:35, 1 June 2011 (UTC)
 * Actually.....Brick/wall combinations don't affect chest items. The first floating island generated will always have a Shiny Red Balloon, 2nd will have Starfury, the 3rd will have Lucky Horseshoe, the rest will have a random chance of selecting any 3. --Deathmax 15:41, 1 June 2011 (UTC)

Items
I don't see the Rocket Boots listed, is it confirmed that the chests on floating islands don't have them? --Cloakedboltz 03:32, 1 June 2011 (UTC)
 * As of yet, no one has reported finding them, but nothing is "confirmed" -- Wynthyst [[Image:User Wynthyst sig icon.png ]] talk  03:42, 1 June 2011 (UTC)
 * Looking at the code, Rocket Boots will never spawn on floating island chests, or any chests in that matter. They will only drop from Goblins. --Deathmax 15:35, 1 June 2011 (UTC)
 * Sounds accurate to me. I've been skeptical about rocket boots being on islands for a while now.--Theothersteve7 20:32, 1 June 2011 (UTC)

I've looked in about ten floating island chests and probably about 300 chests overall. The only pieces of equipment left for me are the Cobalt Armor set. My overall experience with chests is that each one contains one "rare" piece of loot and a random assortment of common loot, such as bottles, arrows, and metal bars. The "rare" piece depends on environment; the chest classes are cave, underwater, floating island, dungeon, and jungle shrine. Note that normal cave chests can appear in other places. --Theothersteve7 20:32, 1 June 2011 (UTC)

When it says how many items found, does gold count as an item? Or just the other stuff in the chest? --Tryler12 2:41, 9 June 2011 (UTC)

Observations
From what I've observed, loot is not related to brick/wall color. Everything is random.

Reflector
Unless there's a rule against datamining/decompilation, why don't we just take a peek at the source to find out the generation algorithm? I can take a look tonight if I remember to do it and post my findings. RestfulMonad 01:30, 28 June 2011 (UTC)
 * Please do. Unless a sample size is near infinite it won't show 100% accurate info. --Moxxy 01:54, 28 June 2011 (UTC)
 * The code for placing chests in floating islands is indeed entirely independent from the house. The first floating island generated is guaranteed to have a Shiny Red Balloon, the next one a guaranteed Starfury and the third a guaranteed Lucky Horseshoe. All islands after the third are guaranteed to have a random one of those three treasures. The remaining contents of the chest use a shared chest generation method that I'm still picking apart (the structure of the code in this game is terrifying and I know it's not just the effects of decompilation!). Once I collate all the results I'll do a big edit to Chest and update it with the new 1.0.5 data. If it's not too late by the time that's done I'll take a look at how floating islands themselves are generated to see if there's any distribution bias. Like if it goes from left to right generating islands or just places them at random, and how many it places per world size and all that. RestfulMonad 04:26, 28 June 2011 (UTC)
 * Chest updated, checking out floating island gen now. RestfulMonad 05:57, 28 June 2011 (UTC)
 * Floating islands are generated by the following algorithm: Generate a random X coordinate in the ranges [MapWidth * 0.1, MapWidth / 2 - 80), (MapWidth / 2 + 80, MapWidth * 0.9]. If this coordinate is within 80 tiles of an existing floating island, increment an attempt counter and try again. If the attempt counter reaches 200, abort placing this island. To place an island, start 200 tiles from the top of the map and work downwards one tile at a time. When you reach a non-air tile, choose a random Y coordinate between 90 tiles from the top of the map and 100 tiles above the non-air tile chosen. If this is below roughly the top 1/6 of the map, decrease it until it isn't. Place a floating island at this coordinate.


 * So it seems that you will always have at least one floating island and therefore every map has a Shiny Red Balloon. Small maps have a max of 3 islands, medium is 5 and large is 6. Because the coords are random, there's no way to reliably find which island has which treasure. RestfulMonad 06:37, 28 June 2011 (UTC)