Page 1 of 10

Making a scenario using "Regicide" type of victory

Posted: 07 Jul 2018, 13:56
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?

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

Posted: 08 Jul 2018, 10:49
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 3064 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.

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

Posted: 08 Jul 2018, 13:51
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

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

Posted: 08 Jul 2018, 14:03
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.

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

Posted: 08 Jul 2018, 14:26
by Bogdan
Thanks, I've coped with it) If only making a scenario with Kings was that easy

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

Posted: 08 Jul 2018, 14:55
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.

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

Posted: 08 Jul 2018, 21:22
by Bogdan
Indeed, there's no King in object list.
Still, are there any ways to place Kings in the desired location of map? :)

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

Posted: 08 Jul 2018, 23:15
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.

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

Posted: 09 Jul 2018, 10:07
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?

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

Posted: 09 Jul 2018, 11:11
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.