Setting time of day for scenario

ImageImageTalking about Modding for EE2 and EE2 AOS. New maps, patches, programs and Multiplayer scenarios.
Post Reply
Sat42
Posts: 100
Joined: 03 Dec 2018, 18:01

Setting time of day for scenario

Post 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?

User avatar
Dr.MonaLisa
High Representative
Posts: 7916
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: Setting time of day for scenario

Post 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).
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Sat42
Posts: 100
Joined: 03 Dec 2018, 18:01

Re: Setting time of day for scenario

Post 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...
User avatar
Dr.MonaLisa
High Representative
Posts: 7916
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: Setting time of day for scenario

Post 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.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Sat42
Posts: 100
Joined: 03 Dec 2018, 18:01

Re: Setting time of day for scenario

Post 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...
User avatar
Dr.MonaLisa
High Representative
Posts: 7916
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: Setting time of day for scenario

Post by Dr.MonaLisa »

Can you try this thing? viewtopic.php?p=24879#p24879
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Sat42
Posts: 100
Joined: 03 Dec 2018, 18:01

Re: Setting time of day for scenario

Post by Sat42 »

Yes I tried and am replying in that thread right now!
Sat42
Posts: 100
Joined: 03 Dec 2018, 18:01

Re: Setting time of day for scenario

Post by Sat42 »

For anyone coming across this thread - a solution now exists!
Please check the following tutorial:
viewtopic.php?f=54&t=5418
Post Reply

Return to “EE2 files, modding, maps, testing, etc.”