So I'd been rooting around the forums for a day/night cycle tutorial, and I've found a few - this one is by far the most comprehensive - but I couldn't find any that were nearly simple enough. :)
This lighting system is done using only the lighting systems in game, entirely through triggers, and assumes you're creating a Campaign (Liberty) map as opposed to a Melee (Liberty) map. Simply copy the trigger below and voila!
The comments were simply left in for convenience... 85 seconds is 1.25 minutes, meaning a full day will take 5 in-game minutes. You can increase the day's length - or portions - by increasing the wait time. I chose game time so that the lighting will be adjusted regardless of the player's game speed choice. Oh, and that initial action outside the loop (with 0.0 blend time) is fairly important... it sets the lighting/time of day immediately. If you'd like your map to start at night, it only takes some minor tweaking. Without this immediate action though, your lighting will look weird as it blends into the loop.
As I said this is extremely rudimentary and may be extremely inefficient, but it works nicely. Any questions, comments or ways of improving this are welcome!
fucking WOOT! ty ty so much, found them. ok so what are dependencies exactly? do more dependencies have any effect ? as in will the map run slower, bigger file size? or does it just indicate the path to assets? ty again.
I don't have a definition of what dependencies are, I'm sure someone else can tell you more accurately, but to kind of answer your question: your map should not noticeably run any slower than before, with this method.
dependencies will enable/disable certain features including campaign units. Story mode models ect. So if u want all the units available to you make sure u switch on all dependencies as the default only gives you melee units there are hundreds more units in the game that you can use. I don’t really know too much more about what they do.. just that if only melee is turned on you don’t have access to hardly any of the cool stuff as far as models go. someone else may hav alot more knolege about them than I@o0sask0o: Go
This seems to be the only way that I'm aware of to easily get a day cycle that is synced to a in-game seconds. The other method (as linked in the OP's first sentence) runs day/night off of "Time per Game Loop" which seems to be proprietary to game engine mechanics only and is not linked with game seconds.
I'm glad to have stumbled upon this alternate method. I'll give it a try and see how it works. I was about to pull my hair out trying to figure out what the heck is going on with Time per Game Loop mechanics.
would love a way to change the sight range on units +2 or -2 as well.
I haven't tested this, but it should work. Just make two behaviors, Vision Day and Vision Night. You would then probably just need to add the behavior that modifies its Maximum sight during the day, and again at night modifies it.
I haven't tested this, but it should work. Just make two behaviors, Vision Day and Vision Night. You would then probably just need to add the behavior that modifies its Maximum sight during the day, and again at night modifies it.
Thank you very much
Using the following during the code work perfectly, you do have to add the behavior to all units you want to be affected
Tech Tree - Allow the <extra sight> behavior for player 1
Tech Tree - Disallow the <extra sight> behavior for player 1
The other method (as linked in the OP's first sentence) runs day/night off of "Time per Game Loop" which seems to be proprietary to game engine mechanics only and is not linked with game seconds.
Today opening up the editor I got this nice tooltip:
The smallest time interval that a trigger can wait is 1/16th of a second (0.0625 second) which is equivalent to one game loop.
I guess that gives a little bearing on the default timing of the "Game Loop" time unit.
So I'd been rooting around the forums for a day/night cycle tutorial, and I've found a few - this one is by far the most comprehensive - but I couldn't find any that were nearly simple enough. :)
This lighting system is done using only the lighting systems in game, entirely through triggers, and assumes you're creating a Campaign (Liberty) map as opposed to a Melee (Liberty) map. Simply copy the trigger below and voila!
The comments were simply left in for convenience... 85 seconds is 1.25 minutes, meaning a full day will take 5 in-game minutes. You can increase the day's length - or portions - by increasing the wait time. I chose game time so that the lighting will be adjusted regardless of the player's game speed choice. Oh, and that initial action outside the loop (with 0.0 blend time) is fairly important... it sets the lighting/time of day immediately. If you'd like your map to start at night, it only takes some minor tweaking. Without this immediate action though, your lighting will look weird as it blends into the loop.
As I said this is extremely rudimentary and may be extremely inefficient, but it works nicely. Any questions, comments or ways of improving this are welcome!
Cannot find for the life of me the sunrise and sunset settings only day test night test for mar sara, where are they located?
@o0sask0o: Go
Do you have Campaign dependencies on?
fucking WOOT! ty ty so much, found them. ok so what are dependencies exactly? do more dependencies have any effect ? as in will the map run slower, bigger file size? or does it just indicate the path to assets? ty again.
@o0sask0o: Go
I don't have a definition of what dependencies are, I'm sure someone else can tell you more accurately, but to kind of answer your question: your map should not noticeably run any slower than before, with this method.
dependencies will enable/disable certain features including campaign units. Story mode models ect. So if u want all the units available to you make sure u switch on all dependencies as the default only gives you melee units there are hundreds more units in the game that you can use. I don’t really know too much more about what they do.. just that if only melee is turned on you don’t have access to hardly any of the cool stuff as far as models go. someone else may hav alot more knolege about them than I@o0sask0o: Go
thanks for the replies
This seems to be the only way that I'm aware of to easily get a day cycle that is synced to a in-game seconds. The other method (as linked in the OP's first sentence) runs day/night off of "Time per Game Loop" which seems to be proprietary to game engine mechanics only and is not linked with game seconds.
I'm glad to have stumbled upon this alternate method. I'll give it a try and see how it works. I was about to pull my hair out trying to figure out what the heck is going on with Time per Game Loop mechanics.
Gonna try it tonight after work as well. I have been wondering about this forever! AWESOME!!
Worked nicely.
An additional tutorial on how to link up a reduced sight range during night and on an upgrade for night vision to negate the reduction would rock :)
I have a tutorial that covers how to do this a different way.
It is the Dynamic Skybox link in my sig
would love a way to change the sight range on units +2 or -2 as well.
I haven't tested this, but it should work. Just make two behaviors, Vision Day and Vision Night. You would then probably just need to add the behavior that modifies its Maximum sight during the day, and again at night modifies it.
Thank you very much
Using the following during the code work perfectly, you do have to add the behavior to all units you want to be affected
Tech Tree - Allow the <extra sight> behavior for player 1
Tech Tree - Disallow the <extra sight> behavior for player 1
Today opening up the editor I got this nice tooltip: The smallest time interval that a trigger can wait is 1/16th of a second (0.0625 second) which is equivalent to one game loop.
I guess that gives a little bearing on the default timing of the "Game Loop" time unit.
I believe that under stats of a unit in data editor (with advanced fields on) is something saying:
Sight Bonus _______ Night 0 Dawn 0
That may be what you're looking for.
I believe that under stats of a unit in data editor (with advanced fields on) is something saying:
Sight Bonus _______ Night 0 Dawn 0
That may be what you're looking for.
I believe that isn't that simple.