Making a scenario using "Regicide" type of victory

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

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

Post by Bogdan » 16 Jul 2018, 10:54



Added after 27 minutes 55 seconds:
Here's the whole script:

Code: Select all

ACTION KingDeadAction5
SCRIPT WORLD
if ((PlayerInGame(5)) &&(!IsPlayerHumanControlled(5))){
  SetAIDiplomacyEnabled(5,true);
  ForceSurrenderOffer(5, 1);
  SetAIDiplomacyEnabled(5,false);
}
else {
CreateNamedGroup("Group_Korea_4");
AddUnitsByTypeToGroup("Group_Korea_4", "MobileUnits", 5, kPlayerMode_Self, NULL);
AddUnitsByAttributeToGroup("Group_Korea_4", "BareBoneBuilding", 5, kPlayerMode_Self, NULL);
if(NumUnitsInGroup("Group_Korea_4") > 0){
SelectGroupForPlayer("Group_Korea_4", 5);
KillSelection();
ClearSelection();
}
}
END_SCRIPT
END_ACTION
Still issues :roll:
Attachments
Снимок.PNG
Снимок.PNG (4.32 KiB) Viewed 234 times
Снимок 2.PNG
Снимок 2.PNG (3.94 KiB) Viewed 234 times


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

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

Post by Dr.MonaLisa » 16 Jul 2018, 11:25

Invert
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 » 16 Jul 2018, 11:29

What exactly?

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

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

Post by Dr.MonaLisa » 16 Jul 2018, 11:59

Functions with arguments.
This is in the documentation, just read. I can't check it now (phone).
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 » 16 Jul 2018, 12:42

Hm, everything seems to be repaired by changing

Code: Select all

AddUnitsByAttributeToGroup("Group_Korea_1", "MobileUnits", 2, kPlayerMode_Self, NULL); 
AddUnitsByTypeToGroup("Group_Korea_1", "BareBoneBuilding", 2, kPlayerMode_Self, NULL);
to

Code: Select all

AddUnitsByTypeToGroup("Group_Korea_1", "BareBoneBuilding", 2, kPlayerMode_Self, NULL);
AddUnitsByAttributeToGroup("Group_Korea_1", "MobileUnits", 2, kPlayerMode_Self, NULL); 
At least, I was able to finish scenario for the first time :lol:

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

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

Post by Bogdan » 16 Jul 2018, 12:47

I really don't think it's a temporary state of things, since if script had any issues, scenario had never finished good. So it must be over. Hooray!

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

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

Post by Dr.MonaLisa » 16 Jul 2018, 12:51

Depends, my World Simulator scenario still uses to crash at unexpected moments, after 2-3 hours in game. Script errors are sometimes hard to detect.

For AddUnitsByAttributeToGroup - they're in zips\dbunittypeattributes.ddf
For AddUnitsByTypeToGroup - they're Unit Types from .ddf files in zips\db.zip\Units.
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 » 16 Jul 2018, 14:24



Added after 11 minutes 34 seconds:

Code: Select all

historicalInfo = "At dawn on Sunday, 25 June 1950, Kim Il-sung ordered the communist Korean armies to cross the 38th parallel. The North Koreans had a combined arms force including tanks supported by heavy artillery. On 28 June, Seoul fell.\n\nIn early July, U.S. forces arrived; in the Battle of Pusan Perimeter (August–September 1950), the U.S. Army withstood North Korean Army attacks meant to capture the city. Meanwhile, General MacArthur began planning a landing at Incheon; by 15 September, the amphibious assault forces were delivered.\n\nBy 1 October 1950, the UN Command repelled the North Korean Army northwards past the 38th parallel. The UN Command were unconvinced that the Chinese will openly intervene and that caused a fatal mistake - mistaken belief that the Chinese would not enter the war, leading to major allied losses because of Chinese "People's Volunteer Army".\n\nFor the remainder of the Korean War the UN Command and the PVA fought, but exchanged little territory; the stalemate held."
Attachments
EE2_ScreenShot6.jpg
EE2_ScreenShot6.jpg (532 KiB) Viewed 231 times

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

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

Post by Bogdan » 16 Jul 2018, 14:36

It looks like historicalInfo is limited to only 321 characters :( Do you know the max size of it in symbols?

Added after 1 hour 39 minutes 33 seconds:
Also, I see other scenarios have description more than 321 characters. How it could be?

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

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

Post by Dr.MonaLisa » 16 Jul 2018, 16:20

You didn't escale the quote character.

Code: Select all

"
It should be

Code: Select all

\"
Everywhere in text within main quotes.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

Post Reply

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