• StormFox - Environment mod
    48 replies, posted
  • Avatar of Nak
  • [t]https://i.imgur.com/zqn1dU8.png[/t] StormFox is a free environment mod that will freshen your GMod experience with weather, light, effects and textures! It is made to support as many people as possible. This means SF runs mostly on the client, will adjust its quality to each individual machine and even try to adjust itself to most maps for the best outcome. [t]https://steamuserimages-a.akamaihd.net/ugc/856103815147064955/DDC288550B441586AD75D73D9BBB15A0AEB76D2A/[/t] [t]https://steamuserimages-a.akamaihd.net/ugc/856103815146961992/4721FD37EB8834590554399A8B6A4ADE63BAC0DC/[/t] [t]https://i.imgur.com/7UmgJ9W.png[/t] [QUOTE=Features] - Day/ Night cycle (With a chance of seeing shooting stars) - Rain, fog, thunder, wind and many other effects. - Dynamic weather generation. - Environment sounds. E.g. calm rain hiting the window. - Snow texture replacement. Grass, dirt and roads will be covered in snow. - Dynamic shadow and light (This option is off by default) - Lamps that can be placed by admins and light up doing the night or in dark storms. - Map lights will be turned on doing the night. - CAMI support for most adminmods. - Wiremod support - Wind physics (off by default on servers) .. and many more features to come[/QUOTE] [url=http://steamcommunity.com/sharedfiles/filedetails/?id=1132466603]Workshop[/url] Known Isues: - Dynamic lights aren't casting shadows! The Gmod engine only support 8 lights with shadows at all times. Careful not to place too many lightentities near each other. - I'm lagging! Be sure the weather quality is at 0, if the problem still persists, try set it manually at 1. Dynamic shadows can also be expensive on big maps. - There are snow at the wrong places! Some maps use outdoor textures indoors, you can fix this by setting sf_replacment_dirtgrassonly to 1. - Some of the effects are missing. Check if the map got all entities supported. You can find missing entities displayed on the weather controller. [img]https://i.imgur.com/YNnWf09.png[/img] This is a beta, there might be unknown bugs or missing features. Post any errors or bugs and I'll see what I can do. GitHub: [url]https://github.com/Nak2/StormFox[/url] API-support: [url]http://steamcommunity.com/workshop/filedetails/discussion/1132466603/1520386297700498884/[/url] Last update: [QUOTE]Changelog: - Made weather-data shared (Optimization and better clientside support). - Rewrote a lot of files with help from Coderall. - Added lightningbolts (They got a higer change of striking higer grounds, and they do hurt). - Made the wind push/unfreeze props. (Off by default on servers) - Added radioactive-rain (For testing the new weather compatibility). - Added sf_disablelightningbolts [0/1] and sf_disableweatherdebuffs [0/1]. (sf_disableweatherdebuffs are on by default on servers) - Fixed a tiny error on launch - Fixed "gray skybox" - Weather now supports more adv functions .. like changing names and icons. - Pressing E on the weekly_weather screen, will now show freedom units.[/QUOTE]
  • Looks awesome - having trouble connecting to my server but once it's fixed I will be trying this out!
  • So I'm getting these green cubes in game. [t]https://i.imgur.com/zleQdC3.png[/t] [editline]11th September 2017[/editline] And red cubes too. [t]https://i.imgur.com/R89meUG.png[/t] [editline]11th September 2017[/editline] Also maybe round the temperatures to 1 or 2 decimal places? [editline]11th September 2017[/editline] Also maybe make the 3d2d for the weekly display ignoreZ or move it forward a tiny bit so theres no z fighting.
  • Avatar of Nak
  • Ups, the green/red cubes is a debug script that gets activated when developer convar is 1. Pushed a new update out: - Fixed errors when maplights got deleted. - Removed leftover debugoverlays. - Fixed the weather-generator ignoring weather changes and rounded the variables. - Moved the screen a bit forward for weekly_weather entity.
  • Avatar of Vioxtar
  • Checked it out yesterday. Really neat. I really like what you did with the sounds as well. It took me a while to realize I had to press the title 'Set Weather' on the weather controller entity to change it. The rain looks good. Two things I found a little bit off-putting though was the glowing snow particles (perhaps use the existing things you know about the weather - like day/night cycle, time/fog etc to adjust their color accordingly) and the slightly weird fog artifacts (I could quite clearly tell where it ended or that it was used to cover up where it wasn't raining etc). Looking forward to see how this evolves!
  • 10x Better than Atmos [editline]11th September 2017[/editline] btw can I have permission to see how you did the changing ground texture of the map?
  • [QUOTE=Nak;52669901]Ups, the green/red cubes is a debug script that gets activated when developer convar is 1.[/QUOTE] What's Ups? There's blue ones too I guess they are part of it too.
  • Avatar of Nak
  • [QUOTE=matik04;52670208]btw can I have permission to see how you did the changing ground texture of the map?[/QUOTE] No need for permission to look at my stuff, however its easier if I just show you an example: [code] local oldTextures = {} function ReplaceMaterial(iMat,texture) if not oldTextures[iMat] then -- Save the old texture oldTextures[iMat] = iMat:GetTexture("$basetexture") end iMat:SetTexture("$basetexture",texture) end function UndoMaterial(iMat) if not oldTextures[iMat] then return end iMat:SetTexture("$basetexture",oldTextures[iMat]) end [/code] [QUOTE=G4MB!T;52670218]What's Ups? There's blue ones too I guess they are part of it too.[/QUOTE] Ups as in it was a mistake. They changed colors depending on what they hit. Should be removed now.
  • Avatar of Nak
  • [QUOTE=code_gs;52670294]Could you put the code on a repo somewhere so we can submit PRs?[/QUOTE] Going to git it at some point. Maybe later today.
  • Avatar of Yashirmare
  • Would it be possible to add out of the box support for different gamemodes, such as TTT. Take for example on round start a random time and weather is activated (Going to do this myself but for others they might like it) Edit: Also, what is the client cvar for "Ultra High Quality"
  • Avatar of Nak
  • [QUOTE=Yashirmare;52670320]Would it be possible to add out of the box support for different gamemodes, such as TTT. Take for example on round start a random time and weather is activated (Going to do this myself but for others they might like it) [/QUOTE] Should be doable. I've been thinking about making an addon for extreme weather and a gamemode that uses SF. I'll repost the functions here; This is what I've written so far. There are more functions but its mostly internal stuff. [t]https://cdn.discordapp.com/attachments/298193993781477383/355485577841344522/unknown.png[/t] [code] --Shared -- Time StormFox.GetTime(pure) -- Returns 0-1440. Pure will make it ignore the 6 decimals synchronization attempt. StormFox.GetDaylightAmount() -- Easy function that returns 1 doing the day and 0 doing the night. Between 0-1 at sunset/sunrise StormFox.GetRealTime(Use_12clock) -- Returns the time in a 24clock or 12clock format -- Data StormFox.SetData(str,var[, timestamp]) -- Sets and syncs the data with clients(if server). Setting a timestamp (0-1339) will make the variable leap smoothly towards the given time (Without sending more data) StormFox.GetData(str,default) -- Returns the data -- Basic StormFox.GetBeaufort(ms) -- Retuns the windspeed in a beaufort scale and description. StormFox.CelsiusToFahrenheit(cel) -- Returns degrees in freedom unit. StormFox.GetWeatherName() -- Tries to descripe the current weather. -- Skybox (This is for cloud stuff later) StormFox.Is3DSkyBox() StormFox.SkyboxScale() StormFox.MapOBBCenter() StormFox.SkyboxOBBMaxs() StormFox.SkyboxOBBMins() StormFox.WorldToSkybox(Vector) StormFox.SkyboxToWorld(Vector) --Server -- Time StormFox.SetTime(24clock-str or 0-1440) -- StormFox might get confused for a few seconds tho. -- Data StormFox.SetGhostData(str,var[,timestamp]) -- Sets the data without sharing -- Weather StormFox.GetWeathers() -- Returns a list of valid 'weathers'. StormFox.AddWeather(name,weatherdata) -- Weatherdata is a table of data that descripe it. StormFox.SetWeather(name,procent) -- Procent goes from 0-1. Allows you to set the 'amount'. -- Weather-logic StormFox.AddWeatherCondition(name,{min-clock,max-clock},[min-procent,max-procent},{min-length,max-length},func canPick) -- Allows the weather-generator to pick the weather. StormFox.GenerateNewDay(dont_update_clients) -- Creates a new day. Useful for skipping a day if rain. --Client --Env StormFox.GetExspensive() -- Returns the weather-quality (0-7 or 0-20 for ultra). StormFox.Env.IsOutside() -- Returns true if standing under open sky. StormFox.Env.IsInRain() -- Returns true if standing in the rain/wind direction. StormFox.Env.NearOutside() -- Returns true if standing near the outside. StormFox.Env.FadeDistanceToWindow() -- Returns a number between 0-1. Where 1 is when you stand next to a window. StormFox.Env.FadeDistanceToRoof() -- Returns a number between 0-1. Where 1 is when you stand against the roof. --Basic StormFox.GetWeatherSymbol() -- Returns the material for the current weather [/code] P.S. Don't use StormFox.SetTime regularly, SF can get confused and turn the sky into a disco-floor if you do it at a bad point. [QUOTE=Yashirmare;52670320] Edit: Also, what is the client cvar for "Ultra High Quality"[/QUOTE] The cbox for "Ultra High Quality" is not a cvar, but rather stored as a cookie. Its only there to allow users (And the automatic system) to get sf_exspensive (The quality convar) up to 20. The cookie is stored as: cookie.GetNumber("StormFox_ultraqt",0)
  • Avatar of Yashirmare
  • [QUOTE=Nak;52670372] P.S. Don't use StormFox.SetTime regularly, SF can get confused and turn the sky into a disco-floor if you do it at a bad point. [/QUOTE] Ah so using that to set the time randomly on round start probably wouldn't be the best of ideas. Can it just happen at random or does it only bug out if you do it while SF is already transitioning to another time (So say the time is 9am, I then set it to 3PM but before it lerps to 3PM I change it again to 11PM, I assume that would disco-ize the sky?) [QUOTE=Nak;52670372]The cbox for "Ultra High Quality" is not a cvar, but rather stored as a cookie. Its only there to allow users (And the automatic system) to get sf_exspensive (The quality convar) up to 20. The cookie is stored as: cookie.GetNumber("StormFox_ultraqt",0)[/QUOTE] Ahhhh, well in that case I'm just going to set my slider max to 7, most players aren't going to have a machine good enough for much higher than that; Im already getting reports of some bad performance but Im looking into that. I've also made it so that you can change all the options in its own tab in the F1 menu so the players don't have to use console commands.
  • Avatar of Nak
  • [QUOTE=Yashirmare;52670428]Ah so using that to set the time randomly on round start probably wouldn't be the best of ideas. Can it just happen at random or does it only bug out if you do it while SF is already transitioning to another time (So say the time is 9am, I then set it to 3PM but before it lerps to 3PM I change it again to 11PM, I assume that would disco-ize the sky?)[/QUOTE] Yep, it uses the time to lerp between the values, so setting it at the wrong time will mess it up. [QUOTE=Yashirmare;52670428]Ahhhh, well in that case I'm just going to set my slider max to 7, most players aren't going to have a machine good enough for much higher than that; Im already getting reports of some bad performance but Im looking into that. I've also made it so that you can change all the options in its own tab in the F1 menu so the players don't have to use console commands.[/QUOTE] If you set the slider at 0, it will auto adjust to your FPS.
  • Avatar of Yashirmare
  • [QUOTE=Nak;52670526] If you set the slider at 0, it will auto adjust to your FPS.[/QUOTE] Yeah I know, still getting reports of bad FPS even when they're on that setting, I've advised them to put it to 1 and see if that helps
  • [QUOTE=Altair_PT;52670828]Does the wind react with finned props or other props?[/QUOTE] You means things like grenades ? or small items ? I want to know as well !
  • Avatar of TheVingard
  • Could you add a feature to turn off the skybox and time systems, so it can just be used as a weather system? Additionally, it seems to crash on this map: [url]https://steamcommunity.com/sharedfiles/filedetails/?id=505686775[/url]
  • Avatar of Nak
  • [QUOTE=Altair_PT;52670828]Does the wind react with finned props or other props?[/QUOTE] [QUOTE=grafik_error;52670876]You means things like grenades ? or small items ? I want to know as well ![/QUOTE] I have given it a thought, however it might cause the server to lag. I'm a bit worried with the sandbox servers. [QUOTE=TheVingard;52670947]Could you add a feature to turn off the skybox and time systems, so it can just be used as a weather system?[/QUOTE] SF uses the time to make variables lerp smoothly, disabling time would make most effects freeze atm. I might make an update and option later, that fixes and allows you to do this. [QUOTE=TheVingard;52670947]Additionally, it seems to crash on this map: [url]https://steamcommunity.com/sharedfiles/filedetails/?id=505686775[/url][/QUOTE] Looks like gmod crashes when SF tries to save the map-materials. I'm a bit unsure why or how, but after messing around a bit it seems fine now. I'll upload the changes in next patch. [EDIT] New update: - Balanced the fog - Added an option to disable fog (from this mod) - Fixed dynamiclight - Added some effects and some for maps without light_env - Added an option to disable the weekly weather - Should support sf_timespeed 0
  • Avatar of Yashirmare
  • Show me what you got. (I replaced the moon texture...) [t]https://steamuserimages-a.akamaihd.net/ugc/867363083306243082/7AD535DEA48E52BA0E6740E1E4E03C7AE2EC2B64/[/t]
  • [QUOTE=Yashirmare;52678048]Show me what you got. (I replaced the moon texture...) [t]https://steamuserimages-a.akamaihd.net/ugc/867363083306243082/7AD535DEA48E52BA0E6740E1E4E03C7AE2EC2B64/[/t][/QUOTE] Omg :thebest:
  • Avatar of B1ts
  • How is the performance of this script? i've seen alot of people complaining of the old weather and atmos scripts for causing alot of lag... i would love to use this on my server but is it optimized? Thanks in advance :}
  • Avatar of code_gs
  • [QUOTE=B1ts;52679241]How is the performance of this script? i've seen alot of people complaining of the old weather and atmos scripts for causing alot of lag... i would love to use this on my server but is it optimized? Thanks in advance :}[/QUOTE] "Optimized" isn't really the correct word to use here. Scripts can be fully optimised but still have large performance impact due to necessary but expensive operations being done. You should try to benchmark the frame-delta difference between the same sequence/scene with and without the addon active. [editline]14th September 2017[/editline] Any update on getting the addon available through git?
  • Avatar of Nak
  • New update out. [media]https://www.youtube.com/watch?v=p9ab2TUTJHQ[/media] - Added a weather HUD - Fixed purple shadows - Added an option to disable atuoweather creating snow - Added an option to disable skybox-creation along with other entities - Added cold breath (Thirdperson and indoor fix coming soon)
  • Avatar of Nak
  • New update out with some effects [media]https://www.youtube.com/watch?v=wcbu3_7xcyQ[/media] Also now on GitHub: [url]https://github.com/Nak2/StormFox[/url]