Missions (scripting): Difference between revisions

From Ashes of the Singularity - Official Wiki
Jump to navigation Jump to search
m (Updated look.)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:<span style="position: absolute; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px);">{{FULLPAGENAME}}</span>}}
{{HeaderTemplate
|welcome=Missions (scripting)
}}


The first thing you have to do when creating a new campaign mission or standalone scenario is define the global settings for the mission. This is done in the top-level <Mission> tag, right at the top of your XML file.
The first thing you have to do when creating a new campaign mission or standalone scenario is define the global settings for the mission. This is done in the top-level <Mission> tag, right at the top of your XML file.
==Required Arguments==
 
{{SectionTemplate
|h=h3
|title=Required Arguments
|content=}}
*'''Title''' - Title of the mission (refers to a line in a .csv file in \Assets\UIText\ )  
*'''Title''' - Title of the mission (refers to a line in a .csv file in \Assets\UIText\ )  
*'''Description''' - Description of the mission (refers to a line in a .csv file in \Assets\UIText\ )  
*'''Description''' - Description of the mission (refers to a line in a .csv file in \Assets\UIText\ )  
Line 10: Line 19:




== Optional Arguments (Gameplay) ==
{{SectionTemplate
 
|h=h3
|title=Optional Arguments (Gameplay)
|content=}}
*'''HideTerrain''' - Should the world start revealed or not? [ 1 | 0 ]  
*'''HideTerrain''' - Should the world start revealed or not? [ 1 | 0 ]  
*'''NoAttrition''' - Set this to make buildings not lose any health in uncontrolled regions. [ 1 | 0 ]  
*'''NoAttrition''' - Set this to make buildings not lose any health in uncontrolled regions. [ 1 | 0 ]  
Line 17: Line 28:
*'''NoSeedVictory''' - Set this to disable the generic Nexus-kill victory [ 1 | 0 ]  
*'''NoSeedVictory''' - Set this to disable the generic Nexus-kill victory [ 1 | 0 ]  
*'''EnableCreeps''' - Are creeps enabled in this map? [ Heavy | Random | Light | '''Normal''' | Off | 1 &nbsp;| 0 &nbsp;]  
*'''EnableCreeps''' - Are creeps enabled in this map? [ Heavy | Random | Light | '''Normal''' | Off | 1 &nbsp;| 0 &nbsp;]  
*'''DefensiveBonus''' - Defensive advantage for units in friendly territory [ High | Low | '''None''' | 1 | 0 ]  
*'''DefensiveBonus''' - Defensive advantage for units in friendly territory [ High | Low | '''None''' | 1 | 0 ]  
*'''MetalIncome '''- Determines the rate of metal income [ VeryLow | Low | '''Normal''' | High | VeryHigh ]  
*'''MetalIncome '''- Determines the rate of metal income [ VeryLow | Low | '''Normal''' | High | VeryHigh ]  
Line 29: Line 39:
*'''SupplyLines'''- Are supply lines required in this map?&nbsp; [ Off | Disabled | 0&nbsp;| On | Default | '''Enabled''' | 1 ]
*'''SupplyLines'''- Are supply lines required in this map?&nbsp; [ Off | Disabled | 0&nbsp;| On | Default | '''Enabled''' | 1 ]


==Optional Arguments (Frontend) ==
 
{{SectionTemplate
|h=h3
|title=Optional Arguments (Frontend)
|content=}}
*'''Image''' - Campaign: The image displayed when this mission is selected  
*'''Image''' - Campaign: The image displayed when this mission is selected  
*'''ImageFade''' - Campaign: The image displayed when this mission isn’t selected  
*'''ImageFade''' - Campaign: The image displayed when this mission isn’t selected  
Line 40: Line 54:
*'''PostMovie''' - Movie to play on completing the mission (must be a valid .webm path, starting in \Assets\)  
*'''PostMovie''' - Movie to play on completing the mission (must be a valid .webm path, starting in \Assets\)  


==Scenario Example==
 
{{SectionTemplate
|h=h3
|title=Scenario Example
|content=}}
  <Mission Title="Scenario_InceptionPHC_Title" Description="Scenario_InceptionPHC_Description" Map="Oneiros"
  <Mission Title="Scenario_InceptionPHC_Title" Description="Scenario_InceptionPHC_Description" Map="Oneiros"
   ImageBig="UI/Art/Ascendancy/AscendancyMissionImages/AscendancyCannons.dds"
   ImageBig="UI/Art/Ascendancy/AscendancyMissionImages/AscendancyCannons.dds"
Line 54: Line 72:
Adding scenarios is relatively straightforward; just drop your XML file in the \Assets\Scenario\ directory and it should show up in the in-game list.
Adding scenarios is relatively straightforward; just drop your XML file in the \Assets\Scenario\ directory and it should show up in the in-game list.


'''Note''': If you add a scenario file and then the Ascendancy Wars screen is blank, it means you confused the XML parser. Check your XML for missing tag endings (which look like '''</Trigger>''' or the '''/>''' at the end of a self-closing tag) and other errors.
'''Note''': If you add a scenario file and then the Campaign screen is blank, it means you confused the XML parser. Check your XML for missing tag endings (which look like '''</Trigger>''' or the '''/>''' at the end of a self-closing tag) and other errors.
 


==Campaign Example==
{{SectionTemplate
|h=h3
|title=Campaign Example
|content=}}
  <Mission Title="Escalation_Altaria_Title" Description="Escalation_Altaria_Description" Map="Altaria"
  <Mission Title="Escalation_Altaria_Title" Description="Escalation_Altaria_Description" Map="Altaria"
   Image="UI/Art/Ascendancy/AltariaSelected.dds"
   Image="UI/Art/Ascendancy/AltariaSelected.dds"

Latest revision as of 15:36, 24 November 2020


Missions (scripting)


The first thing you have to do when creating a new campaign mission or standalone scenario is define the global settings for the mission. This is done in the top-level <Mission> tag, right at the top of your XML file.

Required Arguments

  • Title - Title of the mission (refers to a line in a .csv file in \Assets\UIText\ )
  • Description - Description of the mission (refers to a line in a .csv file in \Assets\UIText\ )
  • Synopsis - Brief description of the mission (refers to a line in a .csv file in \Assets\UIText\ )
  • Map - What map this mission uses (must be the name of a folder in \Assets\Maps\ )
  • EnableCreeps - Are creeps enabled in this map? [ Heavy | Random | Light | Normal ]
  • ImageBig - Campaign: The close up image of the planet | Scenario: The image used on the Ascendancy Wars screen


Optional Arguments (Gameplay)

  • HideTerrain - Should the world start revealed or not? [ 1 | 0 ]
  • NoAttrition - Set this to make buildings not lose any health in uncontrolled regions. [ 1 | 0 ]
  • NoVPVictory - Set this to disable the generic Turinium victory [ 1 | 0 ]
  • NoSeedVictory - Set this to disable the generic Nexus-kill victory [ 1 | 0 ]
  • EnableCreeps - Are creeps enabled in this map? [ Heavy | Random | Light | Normal | Off | 1  | 0  ]
  • DefensiveBonus - Defensive advantage for units in friendly territory [ High | Low | None | 1 | 0 ]
  • MetalIncome - Determines the rate of metal income [ VeryLow | Low | Normal | High | VeryHigh ]
  • RadioactiveIncome - Determines the rate of radioactive income [ VeryLow | Low | Normal | High | VeryHigh ]
  • QuantaIncome - Determines the rate of quanta income [ VeryLow | Low | Normal | High | VeryHigh ]
  • BuildSpeed- Determines the rate of construction [ VerySlow | Slow | Normal | Fast | VeryFast ]
  • CaptureSpeed- Determines the region capture speed [ Slow | Normal | Fast ]
  • AirUnits - Are air units enabled in this map? [ Off | Disabled | 0 | On | Default | Enabled | 1 ]
  • Juggernauts - Are juggernauts enabled in this map? [ Off | Disabled | 0 | On | Default | Enabled | 1 ]
  • Orbitals - Are orbitals enabled in this map?  [ Off | Disabled | 0 | Limited | On | Default | Enabled | 1 ]
  • SupplyLines- Are supply lines required in this map?  [ Off | Disabled | 0 | On | Default | Enabled | 1 ]


Optional Arguments (Frontend)

  • Image - Campaign: The image displayed when this mission is selected
  • ImageFade - Campaign: The image displayed when this mission isn’t selected
  • CompImage - Campaign: The image displayed when the mission is selected and already completed
  • CompImageFade - Campaign: The image displayed when the mission is not selected and already completed
  • ImageRadius - Campaign: How big the image is
  • PlanetPosition - Campaign: Where the planet is displayed in the campaign screen
  • Prereq - Campaign: Title of the mission that must be completed to unlock this (refers to a line in a .csv file in \Assets\UIText\ )
  • PreMovie - Movie to play when loading the mission (must be a valid .webm path, starting in \Assets\)
  • PostMovie - Movie to play on completing the mission (must be a valid .webm path, starting in \Assets\)


Scenario Example

<Mission Title="Scenario_InceptionPHC_Title" Description="Scenario_InceptionPHC_Description" Map="Oneiros"
  ImageBig="UI/Art/Ascendancy/AscendancyMissionImages/AscendancyCannons.dds"
  Synopsis="Scenario_InceptionPHC_Synopsis"
  EnableCreeps="1"
  NoVPVictory="1"
  NoSeedVictory="1"
  NoAttrition="1"
  HideTerrain="0"
>

This is a good example of a scenario's <Mission> arguments. Note that the victory conditions will need to be explicitly laid out in triggers, since we've disabled both the VP and Nexus victories.

Adding scenarios is relatively straightforward; just drop your XML file in the \Assets\Scenario\ directory and it should show up in the in-game list.

Note: If you add a scenario file and then the Campaign screen is blank, it means you confused the XML parser. Check your XML for missing tag endings (which look like </Trigger> or the /> at the end of a self-closing tag) and other errors.


Campaign Example

<Mission Title="Escalation_Altaria_Title" Description="Escalation_Altaria_Description" Map="Altaria"
  Image="UI/Art/Ascendancy/AltariaSelected.dds"
  ImageFade="UI/Art/Ascendancy/AltariaDeselected.dds"
  CompImage="UI/Art/Ascendancy/AltariaSelected_Complete.dds"
  CompImageFade="UI/Art/Ascendancy/AltariaDeselected_Complete.dds"
  Synopsis="Escalation_Altaria_Synopsis"
  ImageBig="UI/Art/Ascendancy/TeleportPopupPlanets/Altaria.dds"
  ImageRadius="0.8"
  Prereq="Escalation_Alnilam_Title"
  PlanetPosition="0.898,0.737"
  EnableCreeps="1"
  NoVPVictory="1"
  NoSeedVictory="1"
  NoAttrition="1"
  HideTerrain="0"
  PreMovie="Movies/Escalation9_Intro.webm" 
  PostMovie="Movies/Escalation9_Exit.webm" 
>

This is an example of the more involved <Mission> arguments for a campaign scenario. Most of the additional stuff is to set up the frontend campaign screens correctly.

Note that campaigns must be put in their own subfolder in the \Assets\Campaign\ directory, and need an additional EpisodeData.csv file to function properly.