Salam! I hope everyone's doing well.
Last time around, I mentioned that I'll be working on implementing a Time of Day (Day/Night) Cycle feature using UnrealScript in UDK. Since then, I've come a long way and the first iteration of my efforts is up for download. Unfortunately, I don't have a video of it to show you guys but I'll try and upload one as soon as I get the chance. UDK developers can download it at the link below. Be sure to read the description first, though. For those of you who would also like to read a quick guide on how to use this system, read on.
Installation instructions are present with the download. Here, I'll just be explaining the in-Editor usage and the important options that this feature provides to you. After installation and opening up the Editor, you can find it in the Content Browser underneath Actor Classes tab, Lights and then DirectionalLights. A shot of all the Time of Day related options is shown below.
The really important ones are the first eight going from "Starting Time In Hours" to "Exp Height Fog Actor":
> Starting Time In Hours:
Here, you'll basically be telling at what time of day do you want the cycle to start. The values range from 0 indicating 00 00 Hours all the way up to 24 which indicates 24 00 hours, using an increment of one hour.
> Time Of Day Cycle Enabled:
This decides whether the cycle itself is simulated or not. The starting time you'll give as input will still be taken into account setting everything accordingly.
> "Total Simulation Time" and "Update Time":
The reason I'm mentioning these two together is because they are mathematically related. Total Simulation Time decides how long it takes for 24 hours to completely simulate, while "Update Time" decides how frequently, or rather after how many seconds, the update calls are made in the code. A higher value of "Update Time" means that the highest value of "Total Simulation Time" increases, while the reverse is also true.
> "Sunrise End" and "Sunset Start":
These are angles that determine the extent between which the colors of the sunrise and the sunset respectively are gradually changed. The colors of Morning gradually change completely to the colors of Noon in between the horizon at angle 0 degrees and the Sunrise End angle, where as the colors of Noon gradually change completely to the colors of Evening starting at Sunset Start angle and ending at the horizon at angle -180 degrees.
> Sky Interp Actor:
This is the actor that'll have the sky material applied to it and its properties changed during the simulation. Set this value to your sky dome making sure that it's an Interp Actor.
> Exp Height Fog Actor:
This Fog actor will have its colors and brightness changed during the simulation. Due to the way the values for this actor are set, make sure to use this only in a standalone game. EDIT: Property changes for this actor during execution will not be visible during "Play In Editor". You'll have to run your game and load your map in it to see the changes for it.
Almost all of the settings that follow cater to the brightness and colors of the different aspects of the simulation. Experiment with them to see the results that they yield. You can also gain information about a setting by hovering your mouse over it to see the tool tip.
I hope that this piece of code helps people out in their development. Now that this is done, I'll be continuing with the development of game modes for Feud.
Thanks for reading! As always, feedback is welcome.