User:4e696e6a6f795844/Sandbox3

windspeedcurrent*50 is the mph < 0 is east, > 0 is west. at exactly 0 windspeed, the game will prefer westward wind, but due to the decimal system used for wind speeds, the value will often be near 0, but not exactly

on load windspeedcurrent is set from to -0.8 to .8 (-40mph to 40mph)

windydaymusic starts at 20mph, but the music will not end unless it goes below 17?

target windspeed is sum of windspeedTarget and 0.55 * maxRaining <--?.

0.0003 += diff windspeed from target windspeed * 0.0015 rate change. windSpeedCurrent adjusts to targetwindspeed each frame via ^^^

while not on the game menu, there is a windcounter that provides boosts of speed to the wind every so often. each frame: while windcounter > 0 25% chance for targetwindspeed to be boosted by up to 1.25mph else, 50% chance for targetwindspeed to boosted by up to 2.5mph else, targetwindspeed will be boosted by up to 5mph

each frameL while windCounter <= 0 and extremeWindCounter <= 0 windCounter is set for the next 15-45 seconds, preventing the boosts above. It also sets extremeWindCounter for the next 1/6-1/3 seconds, preventing extremewind boosts. 13/30 chance for either wind to be halted for the next 2-8min, or for target wind to be boosted by up to 10mph else 13/20 chance for target wind to be boosted by up to 20mph otherwise, targetwind will be boosted by up to 42.5mph.

if the targetWindSpeed is > 15mph, then extremeWindCounter will not be triggered for an additional 5-10 ticks. if the targetWindSpeed is > 25mph, then extremeWindCounter will not be triggered for an additional 10-20 ticks. > 35mph then then extremeWindCounter will not be triggered for an additional 15-30 ticks.

in the time that extremeWindCounter is disabled, windCounter is continuously reset to a value between15-45 seconds, preventing any target wind boosts or changes.

windspeedTarget is then capped at 40mph.

the game considers it "toowindyforbuterflies" if the windspeed is > 20mph.

only the target windspeed will be saved with a world, and when it is loaded the currentwindspeed will be set to the target.

a world will generate with a non-zero windspeed up to 20mph, and prevent further changes to wind for the next 15-45 seconds. Therefore, with great luck, there is a possiblility for a Windy Day to start very quickly after spawning.

ladybugs movement windyballoons movement Ecto Mist movement Angry Dandelion animation animation and movement of Angry Dandelion Seeds pushes release doves pushes kites, when not behind walls (see notes) carries paper airplanes

Notes spawned by usage of the Snake Charmer's Flute Effects the movement of lost kites, groups of butterflies, pegasus, pixie posses, vultures, groups of birds, segaull groups, gastropod groups, balloon slime groups, hellbat groups, bat groups, wyverns, and airships, in the background. Chimney smoke water strider spawns (only if windspeed is > 20mph) angry dandelion/windy balloon spawns (spawnrate increases with increased wind speeds) angry dandelion ai: (can only fire in the direction of the wind) dragonflies will spawn in groups of 1-3 (33% chance for each additional one) near cattails during the day if wind speeds exceed 20mph. fireflies and lightningbugs will not spawn if the windspeeds exceed 20mph. butterflies will not spawn naturally nor from shaken trees if wind speeds exceed 20mph. ladybugs will only spawn if windspeeds exceed 20mph. leaves dropped by trees/living wood leaves bubbles from bubble machine animates the small light on the witch broom. trees and living wood leaves will drop leaves with increasing frequency based on wind speeds. pushes the tops of trees with leafy tops pushes sunflowers pushes vines

At lower speeds, the leaves drop with a lower frequency (5mph -> 1/2000 chance, 10mph 1/1000, 15mph 1/450, 1/300, 1/200, 1/130, 1/75, 1/50). While the maximum speed is 40mph, however, there is code for cases up to and exceeding 55mph, with chances being as low as 1/10 each tick.

Some furnitures are affected by wind when on the surface and either in front of any of the following walls, or behind no wall at all.

The following furnitures are affected by wind when the above conditions are met. Chandeliers Lanterns Short Grass Plants Mushrooms Acorns Corruption Plants Vile Mushroom Short Jungle Plants Jungle Spore Nature's Gift Glowing Mushroom Tall Grass Plants Tall Jungle Plants Herbs Short Hallowed Plants Tall Hallowed Plants Short Crimson Plants Vicious Mushroom Strange Plants Orange Bloodroot Pink Prickly Pear Lime Kelp Blue Berries Yellow Marigold Sky Blue Flower Green Mushroom Teal Mushroom Oasis Grass Gemcorns Sakura Saplings Willlow Saplings

blizzard/sandstorm visual effects cloud drift direction lantern night lantern drift direction release lantern drift directoin volume of the wind background noise speed of snow particles in the snow biome animation speed of waterfalls speed of pinwheel animation animation of golf flags speed of weather vane animation{stub} animation of kites Animation of furniture?? its somewhere in here water distortion is affected by wind Northpole still has wind properties balloons in bg during party lantern nights will cause target windspeed to be set to 0. rain animation

mighty wind: pushes players mph * 0.0012 pixels per second. if the windspeed is > 25mph, then this value increases by 37%. If the player is falling or jumping, this value increases by 50%. If the player moves left or right, this value is decreases by 20%, and will be capped at 0.072 pixels per frame. Running into opposing wind with enough speed will cause the player to emit particles similar to the effect of running with hermes boots. moving left or right on a mount while at a stationary height negates the effects of mighty wind.

Scrapped Projectile Physics
In the game code, there is a boolean Main.windPhysics that triggers a feature where projectiles would be affected by wind. As it is disabled, there is no such feature in the game currently. Below is a detailed description of the feature's effects.

Notably, this feature would attempt to disable wind effects on the north pole, however it is unknown if this was to prevent conflict with existing code or to remove the feature outright.

all projectiles below, when on the surface, and not stuck in tiles or behind walls, will be affected by wind. This occurs only if they are moving against the current wind direction, or if their x velocity is less than wind mph * 0.36. will change their x velocity wind mph * 0.002 pixels per tick, or wind mph * 0.12 pixels per second.

Their x velocity in this state cannot exceed 16, but this limit is never reached as the max possible wind speed, 40mph, can only push projectiles up to 14.4 pixels per tick (without friction).

mph * 0.36

A second if statement can be found in the code that never triggers, nor would do anything in-game if triggered. It is presumably a leftover from testing this feature. if (Main.windPhysics) { ref x = ref base.velocity.X;	x += Main.windSpeedCurrent * Main.windPhysicsStrength; }

projectiles immune to wind physics: Space Gun 20 Water bolt 27 Retinazer's Eye Laser 83 Gastropod Lasers 84 Laser Rifle Lasers 88 Destroyer Lasers 100 Frost Staff 359 Frost Brand 119 Gem Staff Projectiles 121-126 Ice Elemental projectiles 128 Frost Hydra Frost Blast 309 Rune Wizard Rune Blasts 129 Ice Golem Frost Beam 257 Golem's Fireball/ Eye Beam 258-259 Giant Cursed Skull projectile 299 Shadowflame Hex Doll projectiles 496 Skeleton Sniper Sniper Bullet 302 Scourge of the Corruptor projectiles 306 Blizzard Staff Projectiles 337 North Pole Snowflakes 344 North Pole Spear 343 North Pole Spear 342 Ice Queen's Frost Wave 348 Ice Queen's Frost Shard 349 Mini Retina Lazer from Optic Staff 389 Brain Scrambling Bolt (Brain Scrambler's) 436 Gigazapper's Spearhead 437 Laser Machinegun 439 Maritain Saucer Lasers 449 Maritain Walker laser ray 592 Electrospehere missle (electrosphere launcher) 442 Charged Blaster Orb (Charged Blaster Cannon) 459 Moon Lord's Phantasmal Bolt 462 Lunatic Cultist Fireball/Shadow Fireball 467-468 Twinkle 538 Nebula Floater's Nebula Laser 576 Storm Diver's Vortex Laser 577 Nurse Syringes 583-584 Flying Dutchman Blowup Smoke 594 MoonLord Blowup Smoke 622 Amber Staff Amber Bolt 597 Portal Gun's Portal Bolt 601 Nebula ARcanum 617 Nebula Arcanum explosion shot 619 ^^ shot shard 620 ^^ subshot 618 Nebula Blaze 634-635 Luminite Arrow Trail 640 Luminite Arrow 639 Lunar Flare 645 Sky Fracture 660 Onyx Blaster Onyx 661 Dark Mage's Dark Energy 675 Flying Dragon's Hearty Slash projectile 684 Sky Dragon's Fury alt shot 709 Ancient Doom's Prophecy's End 593 Scutlix Laser (Scutlix Mount) 606 Storm Spear Shot (732) Thunder Zapper projectile 731

^^^ immune to wind physics

DO USE WIND PHYSICS Magical Harp notes Crystal shards from crystal bullets/the magic weapon Icy merman blast 177 Crystal Serpent Charges (521-522) Beach Ball Flares Firework Rockets 167-170 Fireworks Box Rockets All Rope Coils Bunny CAnnon's Explosive Bunnies Bubble Gun Bubbles Nail Gun Nails Bladetongue Ichor Splash Spore Sac Spore Gas Wooden Arrow1 Flaming Arrow2 Unholy Arrow4 Jester's Arrows5 Bullet14 Meteor Shots36 Harpy Harpy Feathers38 Hellfire Arrows41 Blowpipe Seeds51 Hornet STingers55 since i can use {getprojinfo} stopping names and just using nums this is alot 81 82 91 98 103 117 120 158 159 160 161 172 174 176 178 180 184 195 207 225 242 246 248 259 265 267 270 275 276 278 279 282 283 284 285 286 287 289 311 312 323 325 336 337 345 350 355 357 374 376 389 408 424 425 426 440 ??? not 439?? need to check this again 469 472 474 477 478 479 484 485 495 498 507 508 532 572 581 585 587 605 616 638 662 685 671 676 680 682 686 706 710 711 712 719 763 772 811 814 819 837 876 920 921 926 937 3 21 48 54 69 70 621 93 162 166 240 249 300 304 318 330 347 370 371 471 497 501 504 510 520 599 861 868 869 909 936 15 95 96 253 502 17 31 39 40 42 56 65 67 68 71 109 179 241 354 411 412 413 414 736 737 738 812 24 50 53 183 185 196 261 277 326 327 328 346? 352 378 400 401 402 450 473 480 483 515 538 870 928 776-801 803-810 28 29 30 37 75 102 108 133 134 135 136 137 138 139 140 141 142 143 144 164 303 338 339 340 341 397 470 516 517 519 588 637 681 773 862 863 903 904 905 906 910 911 930 43 201 202 203 204 205 527 528 529 530 531

--- Wind is a mechanism in Terraria which influences the movement of various objects.

Wind speed ranges between 0 to 40 mph, and wind can blow from either the west or east. Informational accessories such as the Weather Radio show the direction the wind is blowing from, not towards (so for example, "25 mph W" means that the wind is blowing 25 mph from the west).

Wind primarily affects things that have no effect on gameplay, such as cloud movement speeds, blizzard and sandstorm background effects, and the animations of the surface of water and trees. However, it occasionally plays a part in how the game plays, such as its effects on Detonating Bubbles and its effects on players afflicted with Mighty Wind. The UFO Mount summoned by the Cosmic Car Key also seems to be slightly pushed by wind, but it is unnoticeable unless firing a weapon that bounces at a corner for a long period of time.

The Weather Radio, Fish Finder, PDA, and Cell Phone all list the wind speed in the upper right corner of the screen.

Effects
Each tick✅ the w

--old There are two base values the game uses when determining windspeed, "windSpeed" and "windSpeedSet". windSpeedSet is a value set to determine what value windSpeed should gradually change to, but both values are used intermittently throughout the code to affect certain objects. The game takes the following steps to determine windSpeed:


 * If windSpeed is not already equal to windSpeedSet, move it closer by .001
 * Change windSpeedSpeed by a value from -.001 to .001 (-.002 to .002 when night)
 * Cap windSpeedSpeed to -.002 or .002
 * Change windSpeedTemp by windSpeedSpeed (windSpeedSpeed x 2 if raining)
 * Cap windSpeedTemp by
 * Set windSpeedSet to windSpeedTemp
 * Loop

Overall this means that there are stronger wind speeds when it is nighttime and/or raining. However, as sandstorms do not count as rain, sandstorms do not actually cause increased wind speeds. Also notable is that more clouds in the sky means higher potential for higher wind speeds, whether it is raining or not.

Wind affects the following: