Pelagus: Simple Wind Direction
Simple mod that randomizes wind direction based on location and time.
Description
<p>EDIT: This mod was still not enough for my liking, so feel free to <a href="https://mods.vintagestory.at/pelaguswinds">check my wind direction randomizer</a>.</p> <p> </p> <p>Fork of <a href="https://mods.vintagestory.at/simplewinddirection">https://mods.vintagestory.at/simplewinddirection</a><br /><br />It just adds a config to change how often wind direction changes time and area-wise.</p> <p>It works with Joy Of Sailing and any mod that relies on vanilla wind calculation.<br /><br />Config, it's a bit of a guess because I'm not the author:</p> <pre class="language-javascript"><code>{
"areaScale": 3.0, //affects size of areas with same wind. Bigger number mean bigger areas with same wind direction "timeScale": 2.0 //affect how fast wind speed (or how often wind changes, not sure) changes with passage of time, bigger number means slower changes "timeScaleConstant": 25.0, //Similar to timeScale, but bigger number here means faster changes
}</code></pre> <p>Here's the code for how mod calculates wind, so you can try to make your better guess:<br /><br /></p> <pre class="language-csharp"><code>private void OnGetWindSpeed(Vec3d pos, ref Vec3d windSpeed) { double windMagnitude = windSpeed.X;
windSpeed.X = Math.Abs((xNoise.Noise(pos.X / areaScale, api.World.Calendar.TotalHours * timeScaleConstant / timeScale, pos.Z / areaScale) * wrapTimes) % 2d - 1) * 2d - 1d; windSpeed.Z = Math.Abs((zNoise.Noise(pos.X / areaScale, api.World.Calendar.TotalHours * timeScaleConstant / timeScale, pos.Z / areaScale) * wrapTimes) % 2d - 1) * 2d - 1d;
windSpeed.Normalize(); windSpeed *= windMagnitude; }</code></pre>
Ratings & reviews
Sign in to leave a rating or comment.

