Making a scenario using "Regicide" type of victory

Modding, Map Editor, IES Scripting and Other Questions
User avatar
Bogdan
Posts: 149
Joined: 25 Feb 2017, 17:26
Location: Kyiv, Ukraine
Been thanked: 3 times

Making a scenario using "Regicide" type of victory

Post by Bogdan »

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
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

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

Post by Dr.MonaLisa »

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 3056 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
User avatar
Bogdan
Posts: 149
Joined: 25 Feb 2017, 17:26
Location: Kyiv, Ukraine
Been thanked: 3 times

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

Post by Bogdan »

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: 244
Joined: 23 Sep 2017, 17:26
Has thanked: 7 times
Been thanked: 21 times

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

Post by Loewenherz »

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 153 times
Last edited by Loewenherz on 02 Aug 2018, 16:06, edited 1 time in total.
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
User avatar
Bogdan
Posts: 149
Joined: 25 Feb 2017, 17:26
Location: Kyiv, Ukraine
Been thanked: 3 times

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

Post by Bogdan »

Thanks, I've coped with it) If only making a scenario with Kings was that easy
User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

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

Post by Dr.MonaLisa »

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
User avatar
Bogdan
Posts: 149
Joined: 25 Feb 2017, 17:26
Location: Kyiv, Ukraine
Been thanked: 3 times

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

Post by Bogdan »

Indeed, there's no King in object list.
Still, are there any ways to place Kings in the desired location of map? :)
User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

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

Post by Dr.MonaLisa »

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
User avatar
Bogdan
Posts: 149
Joined: 25 Feb 2017, 17:26
Location: Kyiv, Ukraine
Been thanked: 3 times

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

Post by Bogdan »

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
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

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

Post by Dr.MonaLisa »

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

Return to “Questions”