Making a scenario using "Regicide" type of victory

ImageImageTalking about Modding for EE2 and EE2 AOS. New maps, patches, programs and Multiplayer scenarios.
Post Reply
Bogdan
Posts: 51
Joined: 25 Feb 2017, 17:26

Making a scenario using "Regicide" type of victory

Post by Bogdan » 07 Jul 2018, 13:56

Hi everyone! I'm making a scenario that uses type of victory which requires special units - Kings (or Leaders). I've forgotten the name of this unit, but I remember they were in the original game. I also remember that this unit should appear in the list of objects after the scenario mode is changing to the "Regicide" type of victory. However, in Unofficial Patch there's no King/Leader in the units list, so I can't start the game. What's the reason of problem and how can I made a scenario with Kings/Leaders?


User avatar
Leader
Dr.MonaLisa
Posts: 7109
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: Making a scenario using "Regicide" type of victory

Post by Leader » 08 Jul 2018, 10:49

This is actually strange.
The King for Regicide mode appears automatically on game-launch, near the first player's city center (it was like this since ver. 1.0).
I did a test to confirm it:
EE2_ScreenShot219.jpg
EE2_ScreenShot219.jpg (392.78 KiB) Viewed 193 times
One time on the Support Chat I remember somebody had problems with the map editor. He couldn't change the preview season from Winter.
It appears, that sometimes, from unknown for me reasons, map editor creates it's own config section in the settings.cfg file.

As first I would recommend to try the simple Settings Restore Solution from: https://www.ee2.eu/help/#lostsettings
(just remember to select some old archive, as the newest backups might contain already bad config)

If it doesn't help, you could go to "C:/Users/YourUsername/AppData/Roaming/Sierra/Empire Earth II/settings" directory and remove settings.cfg file. You could also re-download UP1.5, and during installation check option "Update and reset settings.cfg" (or something like this).

With a new settings file map editor should not use any configuration section, and everything should work as expected.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

Bogdan
Posts: 51
Joined: 25 Feb 2017, 17:26

Re: Making a scenario using "Regicide" type of victory

Post by Bogdan » 08 Jul 2018, 13:51

Thank you, working now. But is there any way to have Kings without building City Centres (may be using scripts, or something)? I'm absolutely sure 'King' was on the object placement list in the original game.

P.S. After settings restore I've lost all my campaigns progress and restoring back to the newest settings didn't help either. Do I have any chances to bring back game progress? :D

User avatar
Loewenherz
Posts: 65
Joined: 23 Sep 2017, 17:26
Location: Germany

Re: Making a scenario using "Regicide" type of victory

Post by Loewenherz » 08 Jul 2018, 14:03

AppData\Roaming\Sierra\Empire Earth II\settings\users.cfg

Then type:

Code: Select all

      {
         campaignName = "Korean"
         scenarios = [
            {
               scenarioName = "Korean1"
               saveGameName = ""
            }
            {
               scenarioName = "Korean2"
               saveGameName = ""
            }
            {
               scenarioName = "Korean3"
               saveGameName = ""
            }
         ]
      }
The "scenarioName" stand for a unlocked mission. You can get the name from the missions from the campaign ddf. files.
Attachments
Kampagne entpacken.zip
(2.13 MiB) Downloaded 4 times
Last edited by Loewenherz on 02 Aug 2018, 16:06, edited 1 time in total.
My EE2 Work:
EE2 Scripts - Notepad ++ User Defined Language make the scripting clearly and easy.
Grid Utility for EE2 and EE2X to create accurate maps.
IES Script Collection with all scenario scripts from EE2 1.5

Bogdan
Posts: 51
Joined: 25 Feb 2017, 17:26

Re: Making a scenario using "Regicide" type of victory

Post by Bogdan » 08 Jul 2018, 14:26

Thanks, I've coped with it) If only making a scenario with Kings was that easy

User avatar
Leader
Dr.MonaLisa
Posts: 7109
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: Making a scenario using "Regicide" type of victory

Post by Leader » 08 Jul 2018, 14:55

Bogdan wrote:
08 Jul 2018, 13:51
Thank you, working now. But is there any way to have Kings without building City Centres (may be using scripts, or something)? I'm absolutely sure 'King' was on the object placement list in the original game.
Maybe install the original game in version 1.2 to a new folder, then UP1.5 Developers: https://ee2.eu/patch/developers (if needed) and check?
I only remember Leaders units, or Campaign units (like some Queen, Roosevelt, etc.), but they didn't act like Kings, and they're still available by the Map Editor.
Bogdan wrote:
08 Jul 2018, 13:51
P.S. After settings restore I've lost all my campaigns progress and restoring back to the newest settings didn't help either. Do I have any chances to bring back game progress? :D
Maybe the newest archive had already restored settings? The backup is created after every 3mins+ game launch. Simply restore the older backup, from like 1-3 days ago.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

Bogdan
Posts: 51
Joined: 25 Feb 2017, 17:26

Re: Making a scenario using "Regicide" type of victory

Post by Bogdan » 08 Jul 2018, 21:22

Indeed, there's no King in object list.
Still, are there any ways to place Kings in the desired location of map? :)

User avatar
Leader
Dr.MonaLisa
Posts: 7109
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: Making a scenario using "Regicide" type of victory

Post by Leader » 08 Jul 2018, 23:15

Maybe Scripting?
Instead of Regicide it would be "Script Says So". Then create "King" units, give them script name, then set victory condition in the .ies script to lose scenario if {Unit_Script_Name} is dead.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

Bogdan
Posts: 51
Joined: 25 Feb 2017, 17:26

Re: Making a scenario using "Regicide" type of victory

Post by Bogdan » 09 Jul 2018, 10:07

Yes, but I don’t quite understand how to give King units to players in the fixed location. Do I need to include unit’s appropriate coordinates or how?

User avatar
Leader
Dr.MonaLisa
Posts: 7109
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: Making a scenario using "Regicide" type of victory

Post by Leader » 09 Jul 2018, 11:11

Any unit can be a King in your scenario, even a priest or a citizen.
Then you give him the script name (by double click in the map editor I think).
Then by .ies script you program, like:

Code: Select all

RULE ONESHOT
if (!DoesUnitExist("KingOfPlayer1")
)
then KingDeadAction
END_RULE

ACTION KingDeadAction
SCRIPT WORLD
  LoseScenario();
END_SCRIPT
END_ACTION
LoseScenario() probably isn't the best function in this case. Possibly "ForceSurrenderOffer(2, 1);" should be used, or anything else that fits the defeat behavior the best. Simply check the Scripting Docs\EE2 SCRIPTING.doc file for the best solution.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

Post Reply