Owl.png Wiki reading hard on the eyes? Try out our Dark Theme! Visit the preferences page while logged in and select Hydra Dark. Owl.png

As part of the Unified Community Platform project, your wiki will be migrated to the new platform in the next few weeks. Read more here.

Wind

From Terraria Wiki
Jump to: navigation, search

Wind is a mechanism in Terraria which influences the movement of various objects, as well as the occurance of Windy DaysDesktop version and Sandstorms.

Wind speed ranges between 0 to 59 mph. The 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.

Desktop version The Windy Day event occurs when the wind speed is 20 mph or higher, and ends when wind speed decreases below 17 mph.Verify

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

Functionality Desktop version[edit | edit source]

There are two core values in the code that control wind speed: windSpeedCurrent and windSpeedTarget, both of which are updated each tick[1]. The speed at which windSpeedCurrent changes is determined by the following formula:

speed = |windSpeedTarget/50 * (1 + rain intensity * 5/9) - windSpeedCurrent/50| * 0.0015;

where windSpeedTarget and windSpeedCurrent are in the mph values used by the game. The game stores both values as float values, where < 0 is eastward wind, and > 0 is westward wind. When a world is created, it will generate with winds up to but not exceeding 20 mph, and a variable windCounter is set to prevent changes for the next 15 - 45 seconds. After this period is over, there are a series of random chances that the wind will increase or decrease by up to a certain amount, which occurs on loop every 15 - 45 seconds (a "gust").[2]

Chance Target wind speed change
25% -1.25 mph to 1.25 mph
37.5% -2.5 mph to 2.5 mph
37.5% -5 mph to 5 mph

A second counter (extremeWindCounter) decreases by one each time a gust occurs. When it hits zero, it causes an "extreme gust". It is both reset on world generation and when an extreme gust is triggered.

Chance Occurance
21.66% Target wind is set to 0, and no gusts will occur for the next 2 - 8 minutes.
21.66% Target wind increases by -10 mph to 10 mph
36.83% Target wind increases by -20 mph to 20 mph
19.85% Target wind increases by -40 mph to 40 mph

When an extreme gust occurs, the target wind speed will dictate how many more gusts it will take for another extreme gust to occur.

Target wind speed Amount of gusts until an extreme gust
0 - 15 mph 10 - 30 gusts
> 15 mph 15 - 40 gusts
> 25 mph 20 - 50 gusts
> 35 mph 25 - 60 gusts

Finally, if a gust has flipped the direction of the wind, there is a 66% chance that the target wind speed will flip its direction back to the original direction it was facing in. After all these steps, the target wind speed is capped to 40 mph.

Effects[edit | edit source]

Wind affects the following:

Object Effect
Windy Day Event occurs when wind speed is 20 mph or higher in any direction.
Sandstorm Has a chance to occur when wind speed is 30 mph or higher in any direction.
Windy BalloonWindy BalloonDesktop version Affects movement direction and spawn location. Spawn rate will increase with increased wind speeds.
Angry DandelionAngry DandelionDesktop version Affects the direction, animation and movement of fired projectiles, and the animation of the enemy itself. The enemy can only fire in the direction the wind is moving. Spawn rate will increase with increased wind speeds.
LadybugLadybugDesktop version Affects movement direction; Will only spawn if the winds exceed 20 mph in any direction.
Ecto MistDesktop version Affects movement direction.
Release DovesRelease DovesDesktop version Affects movement direction.
KitesKitesDesktop version Pushes when not behind walls.
WaterWater Affects animation, distortion when Waves Quality is enabled.
Music BoxMusic BoxDesktop, Console, Old-gen console, and Mobile versions Affects note drift direction.
Silly Balloon MachineSilly Balloon MachineDesktop and Console versions Affects balloon movement.
Precipitation (Rain, Blizzard, Sandstorm, etc) Affects particle movements.
Clouds Affects drift direction.
Bubble MachineBubbles Affects drift direction.
Detonating BubbleDetonating Bubble Affects drift direction.
Angry TumblerAngry TumblerDesktop and Console versions Pushes.
PartyParty Background BalloonsDesktop and Console versions Affects balloon drift direction.
Players with the Mighty WindDesktop and Console versions debuff Pushes.
North PoleNorth Pole Snowflakes Affects drift direction.
Paper AirplanePaper AirplanesDesktop version Carries.
Snake Charmer's FluteSnake Charmer's FluteDesktop version Affects the notes spawned by the usage of the flute.
Background ambience Affects the movement of lost kites, groups of butterflies, the pegasus, pixie posses, vultures, groups of birds, seagull groups, gastropod groups, balloon slime groups, hellbat groups, bat groups, wyverns, air balloons and airships in the background.
ChimneyChimneyDesktop, Console, and Mobile versions Desktop version Pushes the smoke particles that it emits.
FireflyFirefly / Lightning BugLightning Bug Will not spawn if the winds exceed 20 mph in any direction.
ButterflyButterfly Will not spawn naturally or from shaken trees if the winds exceed 20 mph in any direction.
Witch's BroomWitch's BroomDesktop version Pushes the small light on the tip of the handle.
Leaf BlockTrees and Living Tree Leaf Blocks Leaves are dropped with increasing frequency with increasing wind speeds. Said leaves are also affected by wind.
TreeTreetops Animates the tops of trees with leafy tops.
VinesVines Pushes.
Lantern NightLantern Night Background LanternsDesktop version Affects drift direction.
Release LanternRelease LanternDesktop version Affects drift direction.
Wind ambience track Affects volume. Only plays if the windspeed is greater than 20 mph.
Waterfalls Affects animation.
Pin WheelPin WheelDesktop version Affects spin animation.
Pin FlagsPin FlagsDesktop version Affects animation speed.
Weather VaneWeather VaneDesktop version Affects animation.

Furniture[edit | edit source]

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.

Mighty Wind Desktop version[edit | edit source]

  • Mighty Wind by default will push players mph * 0.0012 pixels per second. If the wind speed is > 25mph, then this value increases by 37%. If the player is falling or jumping, this value increases by 50%. Finally, 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.

Notes[edit | edit source]

  • At exactly 0 mph, the game will prefer westward wind, but due to the decimal system used for wind speeds, this value will often be near, but not exactly 0.
  • On the title screen, wind is initialized with speeds up to 40 mph. This will not carry over to generated worlds, however, which will instead start with winds up to 20 mph.
    • Due to the these initial speeds, there is a 1/400 chance that the world will spawn with a Windy Day in progress.
  • Winds will decrease to zero during Lantern Nights, provided the player is not controlling the windspeed with Journey Mode.
  • Only the target wind speed will be saved with a world, and when the same world is loaded the current wind speed will be set to the target. This can cause slight differences in wind speeds when a player exits and re-enters a world.

Trivia[edit | edit source]

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

Scrapped Projectile Physics[edit | edit source]

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.

When the feature is active, 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. This will change their x velocity by wind mph * 0.002 pixels per tick, or wind mph * 0.12 pixels per second.

A projectile's x velocity in this state cannot exceed 16, but this limit is never reached as the max possible wind speed, 40 mph, can only push projectiles up to 14.4 pixels per tick.

  • Functionality Console VersionMobile version[edit | edit source]

    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 .3 + .5 * (Percentage cloud cover / 100)
    • 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.

    References[edit | edit source]

    1. A tick is a time unit countable by the software. Most of Terraria's updating logic happens every tick. A tick has the length of 1/60th of a second, hence there are 60 ticks in a second and 3600 ticks in a minute.
    2. Information taken from the Desktop version Desktop 1.4.0.5 source code, function UpdateWeather() in Terraria.Main.cs