;
; Tactical Ops
; - http://www.tactical-ops.net
;
; Tactical Ops Mapping doc
;

- Table of content
  ^^^^^^^^^^^^^^^^
[1] - Basics -
[2] - Classes Reference -
[3] - Tutorials -
 - [3.1] - Breaking glass tutorial -
 - [3.2] - Custom footsteps sounds -


[1] - Basics -
    ^^^^^^^^^^

  The map must contain two separate areas where the two teams will start.
  Be sure to set enough startpoints, and the right classes to define the team bases.

  If you need special classes or scripts for your Tactical Ops map, drop us a line.

  map name must start with 'SW-'

  Player starts are tricky. To avoid problems, test your map with 16 players (or bots)
  No Telefrag should happen. (note that servers can accept up to 32 players!)

  Be careful to Pathnode the level well. It takes some time and practice.

  Special classes are required, read below.

  Do not use mirrors, they not only cause slow downs but also ugly bugs on player models.
  Or make them very small. ;)

  Be sure to add NavPoints to the maps, so Hostages and Bots can move a bit ;)
  Check out: http://unreal.epicgames.com/UT_AI.htm

  Units
  ~~~~~
  Make the map realistic by respecting the scales.
  48 units ~= 1 meter
  Vents are currently 64*64 units and must start from the ground (you cannot jump while
  crouched yet). [That will be recoded soon]


[2] - Classes Reference -
    ^^^^^^^^^^^^^^^^^^^^^

. s_SWATLevelInfo (extends NavigationPoint)
  ~~~~~~~~~~~~~~~
  This class is required by any Tactical Ops map. it defines the scenario. You need only one per map.

  Here's what you can set:
  - TO_Scenario:
    [ScenarioName] - (String) - Name of your scenario.
    [ScenarioComment] - (String x2) - Description of the situation
    [CT_Mission] - (String x 4) - Mission for Special Forces
    [Terr_Mission] - (String x 4) - Mission for Terrorists

  - TO_Rules:
    [MaxEvidence] - Maximum number of Evidence to spawn in the Level (do not exceed 8 for a medium sized level).

  - TO_Objectives
    Here you can set a maximum of 10 objectives for each Team.
    Please note that the objective order is important.

    - [ObjectiveMeaning]
      This sets what happens when an objective is accomplished
      . OM_Nothing - Nothing
      . OM_TeamNotification - Sends a message to whole team
      . OM_GameNotification - Sends a message to ALL players
      . OM_RoundWin - Round is won for that team

    - [ObjectivePriority]
      This affects how the Objective is assigned to bots
      . OP_None - Never done
      . OP_Always - accomplished several times, no order, doesn't interfere with round wining.
      . OP_AlwaysPrioritary - accomplished several times, no order and is vital to win the round.	
      . OP_AlwaysOrder - accomplished several times in Order, doesn't interfere with round wining.
      . OP_AlwaysOrderPrioritary - accomplished several times in Order and is vital to win the round.	
      . OP_Once - accomplished once, no order, doesn't interfere with round wining.
      . OP_OncePrioritary - accomplished once and is vital to win the round.
      . OP_OnceOrder - accomplished once in Order, doesn't interfere with round wining.
      . OP_OnceOrderPrioritary - accomplished once in Order and is vital to win the round.

      * An Objective can only be assigned to a bot if it hasn't been accomplished already.

      * Order * means the objective is assigned to a bot only if all previous Order Objectives have
      been accomplished

      * Once * Means the objective will be assigned to a single Bot (Leader).
      While a leader is assigned to a *once* objective, it can't be assigned anymore.

      * Always * means the objective 'may' be assigned to any bot asking for an objective.

      * Prioritary * - if all Prioritary Objectives are accomplished then the round is won.

    - [ObjectiveType]
      . O_DoNothing - Wait 
           Not considered as a valid objective.
      . O_GoHome - Go to random home base [s_ZoneControlPoint] (bHomeBase)
           optional SWATPathnode as [Target] supported.
      . O_AssaultEnemy - Go to random Enemy home base s_ZoneControlPoint (bHomeBase)
          (optional SWATPathnode as Target supported)
      . O_FindClosestBuyPoint - Go to nearest Buy s_ZoneControlPoint (bBuyPoint)
      . O_SeekForHostages - Enables Rescue hostage scenario.
          Go to random bHostageHidingPoint s_ZoneControlPoint then brings back hostages 
          to home base (for Special Forces) or bHostageHidingPoint (for Terr).
          If ObjectiveMeaning is set to OM_RoundWin then 75% of hostages rescued (25% loss tolerated) will result in a win.
      . O_GotoLocation - Go to nearest [Target]
          [Target] can be a SWATPathNode or any other Actor.
      . O_TriggerTarget - Go to Target and trigger it 
          use preferably s_Trigger
          s_Trigger can support an optionnal SWATPathNode
      . O_CollectSpecialItem - Go to SpecialItem and pick it (Cocaine, ..) (s_SpecialItemStartPoint)
          This Objective can't be accomplished yet, so it can't be set as Order nor Prioritary.
          AlwaysObjective seems a good choice.
      . O_Escape -  Go to nearest s_ZoneControlPoint (bEscapeZone)
          If 75% of the team escapes, they win the round.
      . O_CollectEvidence - Go to Evidence and collect it.
          This Objective can't be accomplished yet, so it can't be set as Order nor Prioritary.
          AlwaysObjective seems a good choice.

    - [Target]
      Optional Objective target. It can be almost any actor. SWATPathNodes or s_Triggers are good examples.
      It's not supported by all objective types.

    - [bObjectiveAccomplishedToggle] means the objective can be toggled accomplished or not.
      A door for example. You open it, objective is accomplished, someone closes it, then 
      it's not accomplished anymore.
      !!! Currently removed, would need to remove every SWATLevelInfo, and re-add them :( !!!


. StartPoints: (default UT player starts)
  ~~~~~~~~~~~~
  Be sure to set the startpoints as follows:
  Team 0 - Terrorists
  Team 1 - Special Forces

  Not setting enough startpoints will cause bugs (telefragging)!! It is recommended to have at least 10 to 15 startpoints for each team.
  Be sure to add the right s_ZoneControlPoint to cover all startpoints with home base and buy points.
  (plus rescue points for Special Forces)


. s_NPCStartPoint (extends NavigationPoint)
  ~~~~~~~~~~~~~~~
  Startpoints for hostages.
  set [bHostage] to true to spawn a hostage there. Set [bIsFree] to true if you want the hostage to be free (move around) or false if you don't want the hostage moving.


. s_EvidenceStartPoint (extends NavigationPoint)
  ~~~~~~~~~~~~~~~~~~~~
  Add some of those startpoints in the map. Around 20 is a nice value for a medium sized map.
  Not more than 8 Evidence will be randomly spawned there.


. s_SpecialItemStartPoint (extends NavigationPoint)
  ~~~~~~~~~~~~~~~~~~~~~~
  Set [bIsCocaine] to spawn the cocaine special item. (for cocaine scenario).
  Set [bIsOICW] to spawn the OICW weapon. (weapon stealing scenario).

  Set [Weight] to set the weight of the item. (not for OICW).


. s_ZoneControlPoint (extends NavigationPoint)
  ~~~~~~~~~~~~~~~~~~
  This navigation point defines special zones in the game.
  It is generally recommended to set multiple zones in a map. 
  (for example set multiple bHostageHidingPoints in hostage rescue scenarii.
  The terrorists will hide the hostages to these places and Special Forces will go to these places to look for hostages. 
  By setting wisely the zones on your map the bots will navigate well your map and explore each area.)
  Use [CollisionRadius] and [CollisionHeight] to define to effective range of that zone.
  (warning: CollisionRadius is used if the parameter [radius] (obsolete) is set at its default value: 200. This is left for compatibility).
  [OwnedTeam] sets the Team that owns that zone.
  Set Actors->Radii view on the viewport properties to view the ladder collision cylinder.

  !!! You must be careful that 2 s_ZoneControlPoint actors musn't intersect !!!
  If you notice bugs such as the Zones not present when you join a game, or the zones remains on the whole level. 
  Check the collision cylinder of all your zones. 2 zones musn't intersect.
  For HomeBase, check that the player starts are within the zone and not on the edge or outside.

  You can set:
  - bHomeBase - For both Special Forces and Terr home base (Owned team required)
  - bBuyPoint - For both Special Forces and Terr home base and buy points. (Owned team required)
  - bRescuePoint - Only for Special Forces home base and rescue points
  - bEscapeZone - When player reaches that point he escapes. (Owned team required)
  - bHostageHidingPlace - For Terrorists, where they hide Hostages (and where Special Forces look for hostages)
  - bC4Location - Zone to drop C4.


. TO_Ladder: (extends NavigationPoint)
  ~~~~~~~~~
  Place the TO_Ladder actor in the middle of your ladder shape in the map.
  Set the [CollisionRadius] and [CollisionHeight] to cover the whole ladder shape. 
  (be sure that the CollisionHeight covers the whole ladder shape height + at least 48 units above, so the player can get out of the ladder).
  Set Actors->Radii view on the viewport properties to view the ladder collision cylinder.


. s_Trigger (extends Triggers)
  ~~~~~~~~~
  Works just like the usual trigger, but also supports the 'Use' key.
  [bUseRadius] - Currently required. Set it to true.
  [Radius] - Radius in units. Within this [Radius], and if the player presses the 'Use' key, then the trigger
    is activated.
  [OptionalSWATPathNode] if you want the bots to use a SWATPathNode that leads to your trigger.
    (only works when set as objective).


. s_SWATPathNode (extends NavigationPoint)
  ~~~~~~~~~~~~~~
  Path to drive the bots to some special location.
  You can set 8 optionnal [NextNP] s_SWATPathNode to build your path.
  Bots will randomly pick one.
  Use [PauseTime] if you want the bot to pause a bit, and not run as hell. Do not abuse too much on it.
  Set [bLastOne] to true if it's the last s_SWATPathNode of your path. (and tells the bots the completed the path)


. s_RainGenerator (extends Actor)
  ~~~~~~~~~~~~~~~
  Place the RainGenerator where you want the rain to start falling.
  !! Note that the RainGenerator works perfectly in network (no additionnal lag, it is client-side).
  !! Note that you can only have a single RainGenerator in your map.
  You can set the following:

  [RainType] = {RT_Rain, RT_Snow}

  [interval] = Seconds between drips
  [variance] = % size delta of drips (draw scale of the drip/snowflake)
  [dropradius] = Radius around generator to drip in (in UT units)
  [DropSpeed] = speed %.
  [NumberOfDrips] = Number of Drips to be spawned at each interval. (This value will be scaled depending on lag to a minimum of 1/4 of it's default value)

  // Rain specific
  [bMeshRainDrop] = if set to true, uses 3D models instead of sprites (which is slower if you want a lot of drips :)

  //Snow specific
  [bJerky] = irregular movements (doesn't fall straight like rain)
  [Jerkyness] = Jerkyness value.


. TO_BlockingPath (extends NavigationPoint)
  ~~~~~~~~~~~~~~~
  Use this actor instead of a normal PathNode to prevent the bots from going
  trough a certain hallway after a certain event. Simply trigger the actor to
  prevent the bots from going there. The BlockingPath 'resets' after each round.


. TO_DamageMover (extends Mover)
  ~~~~~~~~~~~~~~
  When you use this mover type, the mover has a cumulative damage threshold instead of the single shot threshold. 
  For example, if you want a window to break after 10 shots instead of one, 
  use this mover type and  set it's [MoverHealth] property to 300.

  Important: To be able to use this mover type, here's what you have to do:

  1.. Open UnrealEd.
  2.. Go to View \ Advanced Options \ Editor \ Advanced \ EditPackages
  3.. Add the 's_SWAT' to the package list (w/o the brackets)
  4.. Restart UnrealEd
  5.. Once you have the brush you want to add as a DamageMover, right-click on the AddMover button and select TO_DamageMover.


. TO_ExplosionChain (extends ExplosionChain)
  ~~~~~~~~~~~~~~~~~
  If for some reason you need an explosion in your level, use this. 
  It is exactly like the normal ExplosionChain, but this one respawns every round.
  If you have a big 'chain' of explosions, make sure to set the RespawnTime high enough so your explosions don't trigger themselves! 
  (It is set to 5 seconds by default)


. TO_ProjectileSpawner (extends Effects)
  ~~~~~~~~~~~~~~~~~~~~
  This class is an improvement over the MortarSpawner class. 
  It permits the spawning of any Projectile on a specific trajectory. 
  For example, if you wanted to make a trap that shoots arrows at the player, you would put a TO_ProjectileSpawner and set it's ProjectileType property to 'arrow'.

  Usable properties:

  [ProjectileType]: The type of projectile you want to shoot (must be child of class Projectile)
  [bDeviate]: Defines if the projectiles deviates from it's predefined trajectory, or always hits it's target
  [Deviation]: The amount of deviation the projectile is given
  [FireSound]: A sound you want to be played when the projectile is shot
  [bInfiniteProjectiles]: Does the ProjectileSpawner an infinite number of projectiles ?
  [NumProjectiles]: If not, how much projectiles does it have?
  [bAutomaticFire]: Does the ProjectileSpawner shoots projectiles automatically at regular interval, or does it need to be triggered?
  [RateOfFire]: If bAutomaticFire is true, this sets the rate at which the projectiles are fired.


* s_AttackPatrolPoint (NavigationPoint) - Remove them from your map
  Obsolete

* s_HostageControlPoint (NavigationPoint) - Remove them from your map
  Obsolete

* s_HomeControlPoint (NavigationPoint) - Remove them from your map
  Obsolete

* s_Ladder and s_LadderTop - Remove them from your map
  Obsolete


[3] - Tutorials -
    ^^^^^^^^^^^^^^

[3.1] - Breaking Glass Tutorial - (breakable glass that respawns every round)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Make your glass you want to break, make it into a mover and set its KeyFrame1 to someplace outside your level.
Now add a BreakingGlass next to it. (its under effects).

 * Mover Properties
 ------------------

	Events:
     	  Event - B1 (or whatever name you want for the breaking glass event)
	Mover:
          bDamageTriggered = TRUE
     	  bTriggerOnlyOnce = FALSE 
          DamageThreshold = 10.00000 (put whatever you want to stop wepons from breaking it.)
  	  MoverEncrochType = Ignore
    	  MoveTime = 0.000000
	Object:
   	  InitState = TriggerControl ( !!!!!!!!!!Here's the trick!!!!!!!!!! )

  * BreakingGlass
  ---------------

	Advanced
     	  bNoDelete = TRUE 
	Collision
   	  bBlockPlayers = FALSE
     	  bProjTarget = FALSE
	Effects
          bOnlyTriggerable = TRUE
	Events
          Tag - B1 (should be the same as Event on the mover)
	ExplodingWall
    	  bTranslucentGlass = TRUE
          bUnlitGlass = TRUE


[3.2] - Footsteps sounds -
      ^^^^^^^^^^^^^^^^^^^^
	Set the Footstepsound property of your textures to any sound located there: TODatas.footsteps
for example: TODatas.footsteps.FM_metalstep1

the current supported floor materials are:
	FM_Stone,
	FM_metalstep,
	FM_snowstep,
	FM_stonestep,
	FM_woodstep,
	FM_woodwarmstep,

