Page 1 of 1

Calendar Progression Not Working

Posted: 28 Nov 2019, 00:05
by KVCNFF037
I recently re-installed EE2x and installed the Unofficial 1.5 patch. When I am in game, attempting to create scenarios utilizing the in-game Map Editor, the calendar will not progress. I've played the created map/scenario in both "Test" and "Saved Scenario" modes, and neither appear to advance the month.

If I recall from back when the game was new, there was a red bar that would fill up the month slot to signify the passage of time. I managed to get the time of day to transition (cycle, 15 minute) utilizing the option under the menus, as well as got the month in which the scenario was starting to change to January. I then launched the scenario using the main menu, and played for approximately 35 minutes, during which time the time settings appeared to transfer from dawn, through afternoon, and into sunset. During those 35 minutes, there was no change in the month text or in the black bar surrounding it.

Is there something I am missing, or doing wrong, in order to get the month to progress while playing?

Thank You

Re: Calendar Progression Not Working

Posted: 28 Nov 2019, 00:41
by Dr.MonaLisa
Hi.
I think the calendar is paused (by default) in custom scenarios.

The thing worth to read is: viewtopic.php?f=54&t=1737
Especially, how to load it to a scenario: viewtopic.php?p=19687#p19687

I think there is a sample .ies script that would solve your problem: viewtopic.php?p=20389#p20389
Simply copy the content since "RULES FOR WORLD" and paste to a new file in Documents/Empire Earth II The Art of Supremacy/Scripts
The file should have .ies extension (not .txt).

Please tell me if you need more details or clarification.

Re: Calendar Progression Not Working

Posted: 28 Nov 2019, 00:54
by KVCNFF037
I was looking at the sample scripts, and it seems like there is a lot of scenario specific things in them before you get to the section concerning the calendar and weather. Do all headings need to be in the .ies in order for the script to be accepted? Or can it be just in the Rules for World section?

I guess I just don't understand how exactly the game would work (in the instance of using the same setup for different scenarios to use the variable climate/calendar).

Re: Calendar Progression Not Working

Posted: 28 Nov 2019, 01:03
by Dr.MonaLisa
I think everything needs to be put in the .ies script, because it's separated on definitions, initialization sections, etc. Setting the month on game start and enabling the calendar is actually in the initialization section, but could be done in a rule, like it change the month at 10th minute of game, etc.

As far as I know, custom scenarios never had enabled calendar. it always had to be configured by scripting.

Re: Calendar Progression Not Working

Posted: 28 Nov 2019, 02:02
by KVCNFF037
Dr.MonaLisa -

I took (parts of) the code from the guide in the scripts folder and tried to narrow it down as much as possible. Enclosed in the "Code" box is the line for line text that I have in my ".ies" file. I have loaded that file into two separate custom maps and run in the editor's test. Both maps cycled weather, time of day, and month appropriately.

Thank you for your help! I would count this topic as resolved, though I may still play with the coding to see if I can streamline it down more.

Code: Select all

RULES FOR WORLD

SCENARIO
  name = "Thunder Dome"
  brief = "Welcome to the Empire Earth 2.  \n\nYou can close this window by pressing the 'Close' button."
  //victory = "You are victorious!"
  //loss = "You have lost."
  hints = "- Games should be fun."
  historicalInfo = "."
  //description = "Welcome to the Empire Earth 2 Thunderdome..."
  //date = "circa 1190 AD"
END_SCENARIO


////////////////////////////////////////////////////////////
// DEFINITIONS 
////////////////////////////////////////////////////////////
DEFINITIONS

END_DEFINITIONS

////////////////////////////////////////////////////////////
// INITIALIZATION 
////////////////////////////////////////////////////////////
INITIALIZATION
  // The calender should advance
  PauseCalendar(false);
  // Set the starting month to March
  SetCurrentMonth(3);
  // Set the time of day (military time)
  SetCurrentTimeOfDay(09);
  PauseWeatherSystem(false);
END_INITIALIZATION
(EDIT: I took more text out of the coding and tested that it still cycles months, time of day, and weather.)

Re: Calendar Progression Not Working

Posted: 28 Nov 2019, 08:23
by Dr.MonaLisa
Thanks for the info! I can't believe I posted "PauseCalendar(true)" jn the example...

I'll move this topic to the modding subforum, so it can remain open for the potential further questions.