Page 1 of 1

Setting time of day for scenario

Posted: 18 Nov 2020, 20:16
by Sat42
So I might consider having my scenario cycle through day and night but as a first idea, I wanted to set the time of day to morning:

Code: Select all

// Set the time of day (military time)
SetCurrentTimeOfDay(6);   
This doesn't seem to work! Things always look like it is midday by default.
Is my syntax wrong?

Re: Setting time of day for scenario

Posted: 19 Nov 2020, 00:42
by Dr.MonaLisa
This function doesn't work, or does something else. No solution for it. Same with "HasTextBeenTyped" or something like this.

I remember updating my old Multiplayer scenarios to enable Cycle Time of Day, by editing some RAM memory (that UP1.5 uses). It could be done on a game save, which is used for Multiplayer scenarios (Test Mission -> Save game -> Move from Save_SP to Save_MP folder in Documents).

Re: Setting time of day for scenario

Posted: 19 Nov 2020, 11:27
by Sat42
Thanks for the answer.
That's a shame - you basically cannot make a nighttime scenario! Also weird because the official scenarios sometimes do start at different times of the day (e.g. The Three Kingdoms for the Korea campaign).

I think I will try to enable Cycle Time of Day for this one...

Re: Setting time of day for scenario

Posted: 19 Nov 2020, 11:30
by Dr.MonaLisa
Are you sure that they start at different time of day? Maybe I remember something wrong, maybe the initial start of day is respected by game in Test Mission thing.

Re: Setting time of day for scenario

Posted: 19 Nov 2020, 12:48
by Sat42

Ancient Chosun scenario, default noon lighting.

BUT look here

The Three Kingdoms, evening lighting.

I really wish we could figure this out!

I haven't found a function in the editor to set time of day, and since that script I shared doesn't work...

Re: Setting time of day for scenario

Posted: 19 Nov 2020, 12:57
by Dr.MonaLisa
Can you try this thing? viewtopic.php?p=24879#p24879

Re: Setting time of day for scenario

Posted: 19 Nov 2020, 12:58
by Sat42
Yes I tried and am replying in that thread right now!

Re: Setting time of day for scenario

Posted: 23 Nov 2020, 10:09
by Sat42
For anyone coming across this thread - a solution now exists!
Please check the following tutorial:
viewtopic.php?f=54&t=5418