######################## CounterAttack Custom Levels ########################
#
# Custom levels are an in development feature, currently users have to create
# the levels as xml files by hand. To create a new level navigate to your
# CounterAttack directory (In steam right click on CounterAttack->Properties,
# go to 'LOCAL FILES' then click 'BROWSE LOCAL FILES'. Inside the
# CounterAttack_Data folder create a new folder called "CustomLevels".
# Create a new file called "[name].cam"
#
# The levels are XML files and as such can be edited in any text editor.
# On Windows I use Notepad++, but there are tons of other options which should
# all work fine.
#
# Levels are a collection of XML elements with values.
# You can read more about XML here:
# https://www.w3schools.com/xml/
#
# Some examples of possible values are:
# [string] is basically anything you can type
# [float] is a real number (... -5652.336, 1, 1.5, 825612345.126354, ... )
# [int] is a whole number (..., -1, 0, 1, 2, 3, ...)
# [bool] is a flag, it accepts (true,false)
#
# Here you can find a very simple example with a few enemies and a boss level:
# https://pastebin.com/XBdCSHtu
#
# Tags:

##### ROOT TAGS ####

<starttext>[string]</starttext>
# This is the text shown on the popup when the level starts

<version>[float]</version>
# Version of this map. This will be used when syncronizing maps with
# online players.

<counterattackversion>[string]</counterattackversion>
# Required CounterAttack version. For now use "0.19".

<balevel>[int]</balevel>
# An enemy strength modifider. Higher gives them more health. 1 is default.

<useterrain>[bool]</useterrain>
# Should the ground/terrain be used on this level?

<startdelay>[float]</startdelay>
# Delay before the player ships spawn.
# Default is 1

<spawnxoffset>[float]</spawnxoffset>
# An offset applied to the spawn location for all ships
# Default is 60

<musicfile>[string]</musicfile>
# Specify a custom music file.
# Supported files wav, ogg

<musicvolume>[float]</musicvolume>
# Custom music file volume. Between 0 and 1.
# default is 1

<background>[string]</background>
# Selects the skybox, default is BluePurpleStripe
BluePurpleStripe
BlueSoft
BluePurple
Blue-Nebula
BluePurpleStripe
Purple
Red
Red-Fire
Red-Starry
Red-Fire 1
SunHigh
Beach
brightSky
Cloud666
nightSky
planet2
PlanetLaunch
startingPlanetSky
startingPlanetSky 2
SunSet
Twilight

<leveltype>[string]</leveltype>
# Selects the level type
Space
FlyingPlanet
TankPlanet
Underwater
Launch
TallSpace

<spawns>[spawn]</spawns>
# A list of [spawn]s. Describes what to spawn and where/when to spawn it.

##### Spawn Tags #####
# [spawn]
# Spawn is a wave of enemies.

<Boss>[bool]</boss>
# If marked as a boss, when killed the level will end. Default false;

<hpbar>[bool]</hpbar>
# If true the spawned unit will display an HP bar when it comes on screen

<position>[float,float,float]</position>
# Where the spawn will start. The default spawner speed is 10 units/second, so
# '60,0,0' takes about 6 seconds to reach '0,0,0'

<rotation>[float,float,float]</rotation>
# Start rotation.
# Default is 0,0,0

<spawnpos>[float]</spawnpos>
# When the spawnables are activated / start to show in the play area. Before this
# they are disabled for optimization purposes. Default 55.
int

<healthmulty>[float]</healthmulty>
# Multiplies the spawns health by this value. Default is 1.

<sizehmulty>[float]</sizehmulty>
# Multiplies the spawns size by this value. Default is 1.

<timebetweenspawns>[float]</timebetweenspawns>
# The time between each spawn.

<type>[string]</type>
# Enemies that can be spawned. Also capital ships. Capital ships shouldn't have
# any tags besides type.
Asteroid
Asteroid2
Asteroid3
BeamerFirer
BeeBoss
BigBadBossPulser-s
Blaster
Boomer
BulletEnemy
Charger
Cruiser
DoubleBlaster
DroneHost
BasicDrone
FinalForm
HunterProc
MineLayer
NemesisNoLoad
RandomBurster
Shooter
SlowBeamFirer
Sniper
SpreadShot
SuperDrone
SuperHard
TriBeamer
TriSnipe
Cargo
Ultimate Jammer
FlatWorm
Shooterv2Pros
SSCenter
SSArm1
SSArm2
SSBackground
SSBox
SSWheel

# Capital Ships
BeamFrigate
Corvette
Destroyer
GunFrigate
ProtoCruiser
BattleCruiser

# Friendly Ships
SupportFighter
SupportFighterHeavy
LoneFighter
SupportFighterAdv

<behaviour>[behaviour]</behaviour>
# defines behaviours for enemies. Don't apply behaviours to capital ships.

<xspeed>[float]</xspeed>
# The horizontal speed when spawned. This speed takes effect at position X=75.
# Default is -10.

<yspeed>[float]</yspeed>
# The vertical speed when spawned. This speed takes effect at position X=75
# Default is 0

<rotspeed>[float]</rotspeed>
# Rotation Speed.
# Default is 0

###################Functional Movement#################
# There is sin1/sin2/cos1/cos2 for functional movement
# Each of these will add movement base off of the function
# an enemy with just sin1 will make an up and down pattern
# an enemy with just cos1 will make a back and forth pattern
# an enemy with both sin1 and cos1 will either go in a circle or pendulum (depending on offset)
#######################################################

<sin1mag>[float]</sin1mag>
# The magnitude for this sin movement function
# Ignored if 0

<sin1freq>[float]</sin1freq>
# The frequency for this sin movement function
# Ignored if 0

<sin1off>[float]</sin1off>
# The offset for this sin movement function
# Default is 0

<functiongrowth>[float]</functiongrowth>
# Changes the functional movement magnitude over time
# Default is 0

#######################################################

<setspeeds>[setspeed]</setspeeds>
# A list of speeds to set and positions to set them. This can be used to
# give an enemy more complex movement.

#### Setspeed Tags ####
# Tags for [setspeed] element

<yactivated>[bool]</yactivated>
# Should this setspeed trigger when the enemy reaches a specific vertical position
# Default false.

<xactivated>[bool]</xactivated>
# Should this setspeed trigger when the enemy reaches a specific horizontal position
# Default false.

<pos>[float]</pos>
# The position at which this setspeed will be triggered

<xspeed>[float]</xspeed>
# the horizontal speed to set when triggered

<yspeed>[float]</yspeed>
# the vertical speed to set when triggered

<repeate>[bool]</repeate>
# Should this setspeed repeate? If true it will happen every time the enemy
# reaches the position. If false it will only trigger once.
# If true <activations> is ignored

<activations>[int]</activations>
# How many times can this setspeed be triggered?