Garry's Mod

Garry's Mod

gm_construct_flatgrass_v6-2
 This topic has been pinned, so it's probably important
Grocel  [developer] 22 Jul, 2013 @ 2:30pm
This map supports day night cycle scripts.
To take advantage of the day night support use a lua script like this:
Download[www.dropbox.com]

http://www.youtube.com/watch?v=kTB2djx7Zz4

Pleace discuss about related problems and suggestions here.

Installation:
This is demo/experimental release for developers and mappers. It is not designed for user friendliness. You can use it productive environments, but I do not recommend to do so.

Put it in the folder: lua/autorun/server
Use it only when you know what you do. DON'T be like "how 2 uze m8???"!

Concommands/ConVars:
dnc_reset, Resets the day.
dnc_pause, Pauses the day.
dnc_settime <hours>, Sets the day time.
dnc_gettime, Shows the day time.
dnc_getdaylength, Shows the realtime length of a day.

dnc_setdaylength <number>
- The duration of one day in seconds. Min: 1 second, Max: 7 days (604800 seconds), Default: 1 hour (3600 seconds)

dnc_realtime 0/1
- Turns the real time mode on. It will lock the sun position to the system clock. 1 = On, 0 = Off, Default: 0 )

dnc_sun_yaw <number>
- The rotation of the sun rotation plane in degrees. 0 makes the sun go from West to East. Default: 0

dnc_sun_roll <number>
- The inclination of the sun rotation plane in degrees. 90 makes the sun go an equator like path. Min: 15, Max: 165, Default: 90

Credits:
Original by: Industrial17 Team
Modified by: Grocel

Notes:
Keep in mind, this map is compiled in a special way, so it can support day-night systems such as that script. Using maps without such a day-night support will not work! And no there is no way to make it work without recompiling the map.
Last edited by Grocel; 24 May, 2018 @ 12:04pm
< >
Showing 1-15 of 25 comments
Periodic Table 22 Aug, 2013 @ 11:19am 
how do i install this?
Grocel  [developer] 22 Aug, 2013 @ 1:46pm 
Put it in lua/autorun/server.
BenDragon81037 13 Oct, 2013 @ 6:29am 
Unfortunitely there are lighting problems that comes with this map and the Day/Night cycle script.

When I try any lights at night, they don't seem to work properly and shadows do not work properly.

Not sure why this is, but I do not like it.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=185500148
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=185499435
Grocel  [developer] 13 Oct, 2013 @ 7:49am 
Please do some screenshots on other dark maps for comparisons. Also what shadows do not work?
BenDragon81037 13 Oct, 2013 @ 11:39am 
Light comparisons, the light's height is approximately the same as the one on my previous post.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=185765596
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=185765671

You can see that compared to my previous post, the lights are more radiant then the construct_flatgrass_V6-2 day night cycle script.

Also about the shadow problems.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=185767267

If I recall, the shadow is supposed to face away from the source of light.

There's only 1 server which implemented it correctly, which would be the AMS advanced build server.

I am not sure what is causing this problem but it shouldn't really happen.
Grocel  [developer] 13 Oct, 2013 @ 3:28pm 
Well thanks for that report, I will take a look at the shadows. The owner of the AMS advanced build server probably has fixed it on his own.

The more bright lights are probably caused by the contrast between the darkness and the light. On gm_construct_flatgrass_v6-2 the darkness is much brighter than on that other map, so the difference between the lights and the map is less strong. That's probably causing the light to look less bright.

I think making the darkness more dark would, cause more problems at daytime, because of source limits the day shadows are the light of the night. The nighttime is basically putting everything under a shadow.
Last edited by Grocel; 13 Oct, 2013 @ 3:30pm
BenDragon81037 14 Oct, 2013 @ 6:06am 
Yeah...I'm not sure what's going on, but my theroy on it would be that the map still thinks that it is day, even though the script is making it night.

The best way to get true results, would be to include some day/night override on the script so you can actively make it day/night on preference, then compare your script with a re-compiled version of the map, take screenshots noting accurate measurements of where you put your items, shine lights etc. because my screenshots can only be taken in a certain sequence of the script so I don't really have enough time to note exact measurements of everything.

The recompiled map would act like a comparison, being set in close to the atmosphere of wshich you have achieved in the script, then go to the place you took the measurements in and creae more screenshots and compare your script with the map, note any differences and try to work it out.

I think the only way to work out this problem, would be through deep anyalsis.
Grocel  [developer] 14 Oct, 2013 @ 10:54am 
The lua script is just turning off the <Brightness> of the light_environment. The <Brightness> is the light of the sun while the <Ambient> is the "light" of the shadows (= light at nighttime). Also you should read the script, there are concommand that are holding, reset or set the time of the day. Look up the dnc_* prefix in the console. Since the script was more or less an experimental release, I haven't documented these commands yet. :)
BenDragon81037 15 Oct, 2013 @ 8:55am 
yeah, thanks, I hope this script improves.
Chad 5 Dec, 2013 @ 10:19am 
It went straight from evening to morning on my server the 1st test.
Grocel  [developer] 6 Dec, 2013 @ 9:45am 
What do you mean? Did you change some settings?
Grocel  [developer] 15 Apr, 2014 @ 6:25pm 
I made an update to the script: I fixed some issues and added support for the shadow controller entity. That will make the dynamic shadows follow the sun if there is a shadow control named "shadow" in the map. You can download it in the OP.
Last edited by Grocel; 28 Nov, 2018 @ 9:55am
Grocel  [developer] 18 Apr, 2014 @ 8:17am 
I just updated the script again. I fixed some bugs and made the shadow movement between day and night a bit nicer.
erysdren 27 Oct, 2014 @ 2:18pm 
How can I add this to my maps?
(maps i have made)
Grocel  [developer] 27 Oct, 2014 @ 3:08pm 
Originally posted by Jack Skellington³:
How can I add this to my maps?
(maps i have made)

You can download the vmf[xp-dev.com] of the map and extract the important entities. They are grouped and next to a spawn area. Just search for the env_sun or light_environment entity. Then you need to adjust the map filter in the script in line 12.

However, use it properly you would need to fully read the script and to know what you do. Because it's meand to be adjusted by the mapper.
Last edited by Grocel; 7 Feb, 2016 @ 9:51am
< >
Showing 1-15 of 25 comments
Per page: 1530 50