My scenarios for Empire Earth 2
- Loewenherz
- Posts: 244
- Joined: 23 Sep 2017, 17:26
- Has thanked: 7 times
- Been thanked: 21 times
Re: My scenarios for Empire Earth 2
Since Empire Earth 2 doesn't usually have 41 billion players, I assume it's a memory problem.
List of tutorials, useful threads and utilities (look here before posting): Here
Add Pics to Map: viewtopic.php?f=54&p=25184#p25184
Loews Work: viewtopic.php?f=54&t=5160
Add Pics to Map: viewtopic.php?f=54&p=25184#p25184
Loews Work: viewtopic.php?f=54&t=5160
- Dr.MonaLisa
- High Representative
- Posts: 8713
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 109 times
Re: My scenarios for Empire Earth 2
I wonder if it can be fixed by the anti-IES-crashing thing: https://ee2.eu/patch/#1.5.5Bogdan wrote: ↑07 May 2022, 22:03Hello Mona! I think something went wrong when that text was updated... There's a strange bug that didn't appear before:Dr.MonaLisa wrote: ↑14 Feb 2022, 16:11 Hi Bogdan. Thanks for the information. I'll update texts when I'll be working on the next update. It might take longer than usual this time, but hopefully that's not an issue.
It appears when scenario is loaded, but only if another scenario was played before. So if you just launch the game and then select "Cold War 1965" from the menu, it goes well. However, if you played another scenario before, quit and then started this one, the error message shows up. Really strange, I must saySpoiler
Error.png
Could you try it?* Added a Fix for unhandled exception crashes when loading a big .ies script:
#To enable it, in UP1.5 Settings add the custom configuration command: "FixForIESLoadingCrashes=1";
#To disable it, in UP1.5 Settings add the custom configuration command: "FixForIESLoadingCrashes=0";
#Warning: This fix causes a memory leak every time you load a script. Large Address Aware option should be enabled.
#The fix works only for the DirectX 9 executables, so you need to "Enable DirectX 9" in UP1.5 Settings before.
I don't think the text tweaks could affect it. Did you by any chance enable the Advanced Cache Preloading option that comes with the newest update?
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: My scenarios for Empire Earth 2
I applied FixForIESLoadingCrashes configuration command and everything loads ok now. However, I disabled this command then and nothing fails so far. Maybe it's because "generated up1.5 files and game cache was deleted"? I don't know, but this scenario loads successfully now (every time), even with that script turned off.
No, I didn't enable Advanced Cache Preloading as it was said that this is beta and I decided to hold off
No, I didn't enable Advanced Cache Preloading as it was said that this is beta and I decided to hold off
- Dr.MonaLisa
- High Representative
- Posts: 8713
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 109 times
Re: My scenarios for Empire Earth 2
That's strange. It was either some memory corruption, or a real issue in .IES script.
Deleting cache shouldn't be affecting scenarios, but who knows I think the cache is being cleared automatically after minor updates (that's why first launch takes longer).
Actually, I viewed your ColdWar_script.ies script.
There is an error.
Second, you made INITIALIZATION with undefined variables. At the time when "SetTechEnabled(USA, "Citizen", false)" is called, the number of player "USA" can be a random memory. Since it was not defined, it points to the address where some random memory bytes are. That's why sometimes it might be "0" which could work, and sometimes it might be random hex value which fails. The order in these scripts matters. Numbers definitions should be above Initialization and generally above any function calls that could use them.
Deleting cache shouldn't be affecting scenarios, but who knows I think the cache is being cleared automatically after minor updates (that's why first launch takes longer).
Actually, I viewed your ColdWar_script.ies script.
There is an error.
It should be either:RULES FOR WORLD
SCENARIO
END_SCENARIO
////////////////////////////////////////////////////////////
// DEFINITIONS
////////////////////////////////////////////////////////////
DEFINITIONS
// OBJECTIVES
//PLAYERS
constant int USA
constant int DOMINICAN_REPUBLIC_1
constant int DOMINICAN_REPUBLIC_2
constant int SOVIET_UNION_1
constant int SOVIET_UNION_2
END_DEFINITIONS
////////////////////////////////////////////////////////////
// INITIALIZATION
////////////////////////////////////////////////////////////
INITIALIZATION
PauseCalendar(true);
SetCurrentMonth(6);
PauseWeatherSystem(true);
SetMaxEpochUI(13);
SetTechEnabled(USA, "Citizen", false);
CarveShroudArea(1, "Vision_Area1");
CarveShroudArea(1, "Vision_Area2");
CarveShroudArea(1, "Vision_Area3");
CarveShroudArea(1, "Vision_Area4");
CarveShroudArea(1, "Vision_Area5");
CarveShroudArea(1, "Vision_Area6");
CarveShroudArea(1, "Vision_Area7");
LockDiplomaticState(1, 2);
LockDiplomaticState(1, 3);
LockDiplomaticState(1, 4);
LockDiplomaticState(1, 5);
LockDiplomaticState(2, 1);
LockDiplomaticState(2, 3);
LockDiplomaticState(2, 4);
LockDiplomaticState(2, 5);
LockDiplomaticState(3, 1);
LockDiplomaticState(3, 2);
LockDiplomaticState(3, 4);
LockDiplomaticState(3, 5);
LockDiplomaticState(4, 1);
LockDiplomaticState(4, 2);
LockDiplomaticState(4, 3);
LockDiplomaticState(4, 5);
LockDiplomaticState(5, 1);
LockDiplomaticState(5, 2);
LockDiplomaticState(5, 3);
LockDiplomaticState(5, 4);
PausePlayerAI(2, true);
PausePlayerAI(4, true);
//PLAYERS
USA = 1;
DOMINICAN_REPUBLIC_1 = 2;
DOMINICAN_REPUBLIC_2 = 3;
SOVIET_UNION_1 = 4;
SOVIET_UNION_2 = 5;
END_INITIALIZATION
// ////////////////////////////////////////////////////////////
// //RUNS AFTER CINEMATIC, BEFORE OBJECTIVES OPEN
// ////////////////////////////////////////////////////////////
or:constant int USA = 1;
constant int DOMINICAN_REPUBLIC_1 = 2;
constant int DOMINICAN_REPUBLIC_2 = 3;
constant int SOVIET_UNION_1 = 4;
constant int SOVIET_UNION_2 = 5
First of all, the constant values can't be changed / updated. So the "USA = 1" part would most likely have no effect, because variable is not writable. Not 100% sure if that's how it works in EE2, but it's how it's supposed to be. So it could be changed to the dynamic variable by simple "int" without "constant" in front.int USA
int DOMINICAN_REPUBLIC_1
int DOMINICAN_REPUBLIC_2
int SOVIET_UNION_1
int SOVIET_UNION_2
USA = 1;
DOMINICAN_REPUBLIC_1 = 2;
DOMINICAN_REPUBLIC_2 = 3;
SOVIET_UNION_1 = 4;
SOVIET_UNION_2 = 5;
Second, you made INITIALIZATION with undefined variables. At the time when "SetTechEnabled(USA, "Citizen", false)" is called, the number of player "USA" can be a random memory. Since it was not defined, it points to the address where some random memory bytes are. That's why sometimes it might be "0" which could work, and sometimes it might be random hex value which fails. The order in these scripts matters. Numbers definitions should be above Initialization and generally above any function calls that could use them.
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: My scenarios for Empire Earth 2
Hm, I didn’t see that coming. I guess I just copied that part from another script and simply missed that. Yes, it’s logical that numbers should be defined at first, I wonder how it still works in other scenarios…
Added after 17 minutes 25 seconds:
So, regarding constant values, this is how they are written in the "Boston" EE2 team's example script:
...
Also, in other my scenarios SetTechEnabled, as well as other functions, came after the players list. I don't know why, in "Cold War" a function with player number is above players list, so yes, it didn't go well)) Could you please move the players list earlier?
Added after 7 minutes 7 seconds:
I think this will work:
In other scripts things like this ran fine...
Added after 17 minutes 25 seconds:
So, regarding constant values, this is how they are written in the "Boston" EE2 team's example script:
Code: Select all
DEFINITIONS
//PLAYERS
constant int HUMAN_PLAYER
constant int LARRY_PLAYER
Code: Select all
INITIALIZATION
//PLAYERS
HUMAN_PLAYER = 1;
LARRY_PLAYER = 2;
Added after 7 minutes 7 seconds:
I think this will work:
Code: Select all
////////////////////////////////////////////////////////////
// DEFINITIONS
////////////////////////////////////////////////////////////
DEFINITIONS
// OBJECTIVES
//PLAYERS
constant int USA
constant int DOMINICAN_REPUBLIC_1
constant int DOMINICAN_REPUBLIC_2
constant int SOVIET_UNION_1
constant int SOVIET_UNION_2
END_DEFINITIONS
////////////////////////////////////////////////////////////
// INITIALIZATION
////////////////////////////////////////////////////////////
INITIALIZATION
//PLAYERS
USA = 1;
DOMINICAN_REPUBLIC_1 = 2;
DOMINICAN_REPUBLIC_2 = 3;
SOVIET_UNION_1 = 4;
SOVIET_UNION_2 = 5;
PauseCalendar(true);
SetCurrentMonth(6);
PauseWeatherSystem(true);
SetMaxEpochUI(13);
SetTechEnabled(USA, "Citizen", false);
CarveShroudArea(1, "Vision_Area1");
CarveShroudArea(1, "Vision_Area2");
CarveShroudArea(1, "Vision_Area3");
CarveShroudArea(1, "Vision_Area4");
CarveShroudArea(1, "Vision_Area5");
CarveShroudArea(1, "Vision_Area6");
CarveShroudArea(1, "Vision_Area7");
LockDiplomaticState(1, 2);
LockDiplomaticState(1, 3);
LockDiplomaticState(1, 4);
LockDiplomaticState(1, 5);
LockDiplomaticState(2, 1);
LockDiplomaticState(2, 3);
LockDiplomaticState(2, 4);
LockDiplomaticState(2, 5);
LockDiplomaticState(3, 1);
LockDiplomaticState(3, 2);
LockDiplomaticState(3, 4);
LockDiplomaticState(3, 5);
LockDiplomaticState(4, 1);
LockDiplomaticState(4, 2);
LockDiplomaticState(4, 3);
LockDiplomaticState(4, 5);
LockDiplomaticState(5, 1);
LockDiplomaticState(5, 2);
LockDiplomaticState(5, 3);
LockDiplomaticState(5, 4);
PausePlayerAI(2, true);
PausePlayerAI(4, true);
END_INITIALIZATION
- Dr.MonaLisa
- High Representative
- Posts: 8713
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 109 times
Re: My scenarios for Empire Earth 2
Maybe .IES scripts use "constant" as something with different permissions, and it's still modifiable. But normally in programming, "const" shouldn't be modifiable: https://www.geeksforgeeks.org/const-keyword-in-cpp/
I would recommend you to simply change it to "int", then we are 100% sure that assigning the player ID to it works fine. I'm not sure about the Boston script, maybe they made a mistake themselves. Let's not forget that mistakes are one of the main reasons why Unofficial Patch 1.5 exists.
Example:
I would recommend you to simply change it to "int", then we are 100% sure that assigning the player ID to it works fine. I'm not sure about the Boston script, maybe they made a mistake themselves. Let's not forget that mistakes are one of the main reasons why Unofficial Patch 1.5 exists.
Example:
If you want, please update your .IES scripts and attach the newest versions of your scenarios in .zip. Then I'll add it to the next update.— Fixes in the .IES scripts (used for custom scenarios):
* Fixed: "AdvancePlayerEpoch: Invalid epoch 15" bug;
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: My scenarios for Empire Earth 2
Ok, could you please send me .ies files for all my scenarios that you have included in the game already? So that I had the latest versions and didn't update it with my old scripts
Added after 21 minutes 43 seconds:
Also,
doesn't work, as map editor says "expected END_DEFINITIONS" after the last int string. So this part
should probably be in INITIALIZATION section only. Then it works
Added after 9 minutes 16 seconds:
And also something like this
returns the same "expected END_DEFINITIONS" error after the "USA" part, so such formula will not work
Added after 21 minutes 43 seconds:
Also,
Code: Select all
int USA
int DOMINICAN_REPUBLIC_1
int DOMINICAN_REPUBLIC_2
int SOVIET_UNION_1
int SOVIET_UNION_2
USA = 1;
DOMINICAN_REPUBLIC_1 = 2;
DOMINICAN_REPUBLIC_2 = 3;
SOVIET_UNION_1 = 4;
SOVIET_UNION_2 = 5;
Code: Select all
USA = 1;
DOMINICAN_REPUBLIC_1 = 2;
DOMINICAN_REPUBLIC_2 = 3;
SOVIET_UNION_1 = 4;
SOVIET_UNION_2 = 5;
Added after 9 minutes 16 seconds:
And also something like this
Code: Select all
constant int USA = 1;
- Dr.MonaLisa
- High Representative
- Posts: 8713
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 109 times
Re: My scenarios for Empire Earth 2
.ies scripts are not included in UP1.5. I downloaded it from your first post in this topic. So I don't know if they're the newest versions or not.
Yes, setting ints should probably go to INITIALIZATION section. Whichever works should be fine. Just important to be above function calls.
EDIT: Hmm, was Loew editing these scenarios? I don't think so, but worth to confirm.
Yes, setting ints should probably go to INITIALIZATION section. Whichever works should be fine. Just important to be above function calls.
EDIT: Hmm, was Loew editing these scenarios? I don't think so, but worth to confirm.
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: My scenarios for Empire Earth 2
Yes, he did edit them. So if scripts are not with the game.. Where are they?
- Dr.MonaLisa
- High Representative
- Posts: 8713
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 109 times
Re: My scenarios for Empire Earth 2
.IES scripts are loaded to the scenario file (and kind of compiled). So it's impossible to extract them.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains