I want scenario (and map) remember the season I choose (November), but when I exit map editor or run test game, season is changing to 'July'!
How can I save seasons settings for scenario or map?
Map editor doesn't remember seasons settings
- Dr.MonaLisa
- High Representative
- Posts: 8708
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 108 times
Re: Map editor doesn't remember seasons settings
Hello.
I think seasons can be only set by .ies scripts.
You can learn about scripting by reading files present in game folder/Scripting Docs
When you create an .ies script it should be pasted to: "Empire Earth II\Scripts" (or "Empire Earth II The Art of Supremacy\Scripts" if it's EE2: AOS).
Then you can load the script in the Map Editor -> Mission Properties (.ies button).
The values you should be interested in are:
Basically you can control almost everything by the .ies scripts. You can pause or resume weather system, etc.
Example:
create an empty file for example named: "set_November.ies" (using Notepad++ or normal windows notepad), and paste (remember to scroll the text, it's longer than the box):
Then copy it to the Documents folder I mentioned above, load in the map editor, and it's done!
Remember that the game can use only 1 .ies script for the single scenario, so if you want to add more things you should edit the existing script, and re-load it every time you make a change.
I think seasons can be only set by .ies scripts.
You can learn about scripting by reading files present in game folder/Scripting Docs
When you create an .ies script it should be pasted to: "Empire Earth II\Scripts" (or "Empire Earth II The Art of Supremacy\Scripts" if it's EE2: AOS).
Then you can load the script in the Map Editor -> Mission Properties (.ies button).
The values you should be interested in are:
Code: Select all
// The calender shouldn't advance
PauseCalendar(true);
// Set the starting month to July
SetCurrentMonth(7);
PauseWeatherSystem(true);
Example:
create an empty file for example named: "set_November.ies" (using Notepad++ or normal windows notepad), and paste (remember to scroll the text, it's longer than the box):
Code: Select all
RULES FOR WORLD
SCENARIO
END_SCENARIO
////////////////////////////////////////////////////////////
// DEFINITIONS
////////////////////////////////////////////////////////////
DEFINITIONS
// OBJECTIVES
//PLAYERS
END_DEFINITIONS
////////////////////////////////////////////////////////////
// INITIALIZATION
////////////////////////////////////////////////////////////
INITIALIZATION
PauseCalendar(true);
SetCurrentMonth(11);
// CONSTANTS
////normal stuff like poplimt diplomatic things and something which ends with ;
//PLAYERS
END_INITIALIZATION
// ////////////////////////////////////////////////////////////
// //RUNS AFTER CINEMATIC, BEFORE OBJECTIVES OPEN
// ////////////////////////////////////////////////////////////
Remember that the game can use only 1 .ies script for the single scenario, so if you want to add more things you should edit the existing script, and re-load it every time you make a change.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
- Dr.MonaLisa
- High Representative
- Posts: 8708
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 108 times
Re: Map editor doesn't remember seasons settings
You're welcome. Feel free to ask in case of further questions/problems.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Re: Map editor doesn't remember seasons settings
Oh, and where I can put in a line implying no weather condition?
- Dr.MonaLisa
- High Representative
- Posts: 8708
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 108 times
Re: Map editor doesn't remember seasons settings
As you can read in: Scripting Docs\EE2 SCRIPTING.doc:
It will stop the weather system instantly after game start.
But in case some other weather already started, it can be fixed by:
So basically this should be enough:// void PauseWeatherSystem(bool in_bPause)
// Pause and unpause the automatic weather system. This is independent
// of the calendar. Pausing the automatic weather system stops the
// game engine from generating new weather events and changing the
// weather. You must pause the automatic system before changing the
// weather state with script calls. Passing true for in_bPause
// pauses the system, and passing false unpauses the system.
// When you unpause the system, the game will automatically revert
// to the state it had before you paused it.
// See ChangeToWeather for an example
// void ChangeToWeather(enum eWeatherState in_whichWeather,
// float in_fTransitionTime)
// Change to the specified weather state. eWeatherState is an
// enumeration of the different possible weather conditions. (See
// enums below.) These conditions include normal, light rain, heavy
// rain, light snow, heavy snow, light dust and heavy dust. When this
// command is called, it causes the game to change to the specified
// state. This can change lighting, the skybox, the fog and
// atmospheric particle effects. It may also have gameplay effects,
// like limiting line of sight and damaging units. Certain elements
// can take time to transition to the new state, light lighting and
// fog. These will gradually change over the number of seconds
// specified by in_fTransitionTime. I recommend about 2-3 seconds.
// Please feel free to bug Matt Corthell for assistance with this.
// NOTE: Make sure you call PauseWeatherSystem before changing the
// weather state.
// In this example, we decide to start a rain storm. We will
// transition to the storm over two seconds.
PauseWeatherSystem(true);
ChangeToWeather(kWeatherState_RainHv, 2);
// Enumeration of the different weather states. Normal is the default.
ENUM eWeatherState {
kWeatherState_Normal,
kWeatherState_RainLt,
kWeatherState_SnowLt,
kWeatherState_DustLt,
kWeatherState_RainHv,
kWeatherState_SnowHv,
kWeatherState_DustHv,
kNumWeatherStates,
};
Code: Select all
////////////////////////////////////////////////////////////
INITIALIZATION
PauseWeatherSystem(true);
But in case some other weather already started, it can be fixed by:
Code: Select all
////////////////////////////////////////////////////////////
INITIALIZATION
PauseWeatherSystem(true);
ChangeToWeather(kWeatherState_Normal, 2);
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Re: Map editor doesn't remember seasons settings
It works. Thanks
Topic Solved & Locked
If anyone has the same problem, please open a new topic
If anyone has the same problem, please open a new topic