Garry's Mod

Garry's Mod

gm_construct_flatgrass_v6-2
 此主題已被置頂,因此它可能很重要
Grocel  [開發人員] 2013 年 7 月 22 日 下午 2:30
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.
最後修改者:Grocel; 2018 年 5 月 24 日 下午 12:04
< >
目前顯示第 1-15 則留言,共 25
Periodic Table 2013 年 8 月 22 日 上午 11:19 
how do i install this?
Grocel  [開發人員] 2013 年 8 月 22 日 下午 1:46 
Put it in lua/autorun/server.
BenDragon81037 2013 年 10 月 13 日 上午 6:29 
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  [開發人員] 2013 年 10 月 13 日 上午 7:49 
Please do some screenshots on other dark maps for comparisons. Also what shadows do not work?
BenDragon81037 2013 年 10 月 13 日 上午 11:39 
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  [開發人員] 2013 年 10 月 13 日 下午 3:28 
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.
最後修改者:Grocel; 2013 年 10 月 13 日 下午 3:30
BenDragon81037 2013 年 10 月 14 日 上午 6:06 
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  [開發人員] 2013 年 10 月 14 日 上午 10:54 
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 2013 年 10 月 15 日 上午 8:55 
yeah, thanks, I hope this script improves.
Chad 2013 年 12 月 5 日 上午 10:19 
It went straight from evening to morning on my server the 1st test.
Grocel  [開發人員] 2013 年 12 月 6 日 上午 9:45 
What do you mean? Did you change some settings?
Grocel  [開發人員] 2014 年 4 月 15 日 下午 6:25 
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.
最後修改者:Grocel; 2018 年 11 月 28 日 上午 9:55
Grocel  [開發人員] 2014 年 4 月 18 日 上午 8:17 
I just updated the script again. I fixed some bugs and made the shadow movement between day and night a bit nicer.
erysdren 2014 年 10 月 27 日 下午 2:18 
How can I add this to my maps?
(maps i have made)
Grocel  [開發人員] 2014 年 10 月 27 日 下午 3:08 
引用自 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.
最後修改者:Grocel; 2016 年 2 月 7 日 上午 9:51
< >
目前顯示第 1-15 則留言,共 25
每頁顯示: 1530 50