Map Editor - population limit

ImageImageTalking about Modding for EE2 and EE2 AOS. New maps, patches, programs and Multiplayer scenarios.
Post Reply
Cristo96
Posts: 3
Joined: 29 Nov 2018, 12:25

Map Editor - population limit

Post by Cristo96 » 29 Nov 2018, 12:32

How can i change the population limit and the epoch limit in the map editor? i'm creating a scenario


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

Re: Map Editor - population limit

Post by Dr.MonaLisa » 29 Nov 2018, 13:43

Hi.
This is only possible by the .ies script.
First of all, please read this topic to learn basic things: viewtopic.php?f=54&t=1737
You can learn all available scripts from file Empire Earth II\Scripting Docs\EE2 SCRIPTING.doc (the folder where game is installed).

Here's how to load an .ies script in game: viewtopic.php?f=54&t=1737
Dr.MonaLisa wrote:
30 Oct 2014, 03:31
.ies is a script file, should be stored in:
Documents\Empire Earth II\Scripts

To load an .ies in the map editor:
Image

.scn is a scenario file: map + loaded script, defined areas, mission properties, etc.
You're interested with population limit change. The simplest way:
1. Go to "Documents\Empire Earth II\Scripts" (or "Documents\Empire Earth II The Art of Supremacy\Scripts" if it's EE2: AOS).
2. Configure Windows Explorer to show files extensions: https://www.technorms.com/29024/show-hi ... indows-7-8
3. Download and install Notepad++ https://notepad-plus-plus.org/download/
4. Create an empty text file, but rename .txt extension to .ies. Call it for example "Cristo96_scenario.ies".
5. Click the right mouse button on that file, then "Edit with Notepad++" from the list.
6. Paste the following content to that file:

Code: Select all

RULES FOR WORLD

SCENARIO
END_SCENARIO
  

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

 // OBJECTIVES

 //PLAYERS

END_DEFINITIONS

////////////////////////////////////////////////////////////
// INITIALIZATION 
////////////////////////////////////////////////////////////
INITIALIZATION

SetMaxPopCapacity(1, 999);
SetMaxPopCapacity(2, 999);
SetMaxPopCapacity(3, 999);
SetMaxPopCapacity(4, 999);
SetMaxPopCapacity(5, 999);
SetMaxPopCapacity(6, 999);
SetMaxPopCapacity(7, 999);
SetMaxPopCapacity(8, 999);
SetMaxPopCapacity(9, 999);
SetMaxPopCapacity(10, 999);

 // CONSTANTS

 ////normal stuff like poplimt diplomatic things and something which ends with ;

 
 //PLAYERS
END_INITIALIZATION

//  ////////////////////////////////////////////////////////////
//  //RUNS AFTER CINEMATIC, BEFORE OBJECTIVES OPEN
//  ////////////////////////////////////////////////////////////
Please remember to remove "SetMaxPopCapacity" for players who are not in game. For example if there are only 4 players in game, change "SetMaxPopCapacity(5, 999);" to "//SetMaxPopCapacity(5, 999);" to disable it (or simply remove from the file).

To block other epochs:

Code: Select all

//NO RESEARCH. NO GOING TO EPOCH 2
SetMaxEpochUI(1);
SetTechEnabled(HUMAN_PLAYER, "Main2", false);
Change "HUMAN_PLAYER" to player ID (number).
For example if you want to block epoch 2 for all players, add after "SetMaxPopCapacity(10, 999);":

Code: Select all

SetMaxEpochUI(1);
SetTechEnabled(1, "Main2", false);
SetTechEnabled(2, "Main2", false);
SetTechEnabled(3, "Main2", false);
SetTechEnabled(4, "Main2", false);
SetTechEnabled(5, "Main2", false);
SetTechEnabled(6, "Main2", false);
SetTechEnabled(7, "Main2", false);
SetTechEnabled(8, "Main2", false);
SetTechEnabled(9, "Main2", false);
SetTechEnabled(10, "Main2", false);
Final script file:

Code: Select all

RULES FOR WORLD

SCENARIO
END_SCENARIO
  

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

 // OBJECTIVES

 //PLAYERS

END_DEFINITIONS

////////////////////////////////////////////////////////////
// INITIALIZATION 
////////////////////////////////////////////////////////////
INITIALIZATION

SetMaxPopCapacity(1, 999);
SetMaxPopCapacity(2, 999);
SetMaxPopCapacity(3, 999);
SetMaxPopCapacity(4, 999);
SetMaxPopCapacity(5, 999);
SetMaxPopCapacity(6, 999);
SetMaxPopCapacity(7, 999);
SetMaxPopCapacity(8, 999);
SetMaxPopCapacity(9, 999);
SetMaxPopCapacity(10, 999);

SetMaxEpochUI(1);
SetTechEnabled(1, "Main2", false);
SetTechEnabled(2, "Main2", false);
SetTechEnabled(3, "Main2", false);
SetTechEnabled(4, "Main2", false);
SetTechEnabled(5, "Main2", false);
SetTechEnabled(6, "Main2", false);
SetTechEnabled(7, "Main2", false);
SetTechEnabled(8, "Main2", false);
SetTechEnabled(9, "Main2", false);
SetTechEnabled(10, "Main2", false);

 // CONSTANTS

 ////normal stuff like poplimt diplomatic things and something which ends with ;

 
 //PLAYERS
END_INITIALIZATION

//  ////////////////////////////////////////////////////////////
//  //RUNS AFTER CINEMATIC, BEFORE OBJECTIVES OPEN
//  ////////////////////////////////////////////////////////////
For more options simply read "EE2 SCRIPTING.doc" from the folder mentioned above. Also please don't forget to check some topics available in this subforum. There are sample script files and other useful posts.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

Cristo96
Posts: 3
Joined: 29 Nov 2018, 12:25

Re: Map Editor - population limit

Post by Cristo96 » 30 Nov 2018, 12:43

thx a lot, i'll try to make it :D

Added after 1 hour 33 minutes 45 seconds:
i did it :D anyway how can i set CPU level (easy, normal, hard, very hard) and how can i set an explored map? (map explored with only the fog of war)

Is there a complete list of these settings?

Added after 8 minutes 57 seconds:
i just want to have on my hands the possibility to set this scenario like a classic game (changing population limit, epoch limit, CPU level, map...) cuz there isn't this possibility in the map editor :'(

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

Re: Map Editor - population limit

Post by Dr.MonaLisa » 30 Nov 2018, 20:16

Did you read the "EE2 SCRIPTING.doc" document? Was there any function that could fit your needs? If yes, please provide the code you used, so I can see if it was correct.
For explored map I would use:

Code: Select all

ToggleFogOfWar(false);
ToggleFogOfWar(true);
It will disable the fog of war (revealed map) and re-enable it, but all items will remain explored.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

Cristo96
Posts: 3
Joined: 29 Nov 2018, 12:25

Re: Map Editor - population limit

Post by Cristo96 » 01 Dec 2018, 14:54

Yeah i found the code for the fog of war, i found so many codes but not for the CPU level... :'( i can only set the attack priority for a determinated cpu player but i can't set his power level :(

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

Re: Map Editor - population limit

Post by Dr.MonaLisa » 01 Dec 2018, 15:13

AI_SetAttackFactor, AI_SetBuildTimeFactor, AI_SetBuildCostFactor do the same thing as AI levels in EE2. Just need to find % number in AI level description and set the same.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

Post Reply

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