The Chain of Command
Tomahawk Pack
Mission Editor's Manual
v. 1.0
May, 2004
III. Controls and Status Variables
IV.A. UA Scripts and functions
IV.B.i. Master control scripts
ARPM.sqs (Angular Recursive Path-finding Module)
CoC_WDU25Warhead.sqs, CoC_BLU97Warhead.sqs, CoC_NUKEWarhead.sqs
WDU25.sqs, BLU97.sqs, LNUKE.sqs
WDU25Spoof.sqs, LNUKESpoof, BLUThread.sqs, BLU97Spoof.sqs
To use Tomahawks with the Chain of Command Unified Artillery (UA), the file CoC_Arty.pbo must be in an active addons folder.
i. Place the CoC_Obelisk on the map. (side Logic/CoC Unified Artillery/CoC_Obelisk. For UA 1.0, use a side WEST obelisk; for 1.1, use a side LOGIC one).
ii. Place the CoC Tomahawk Launcher at the launch location on the map.
iii. Enable a system of control (make player a Forward Observer, place a CoC_Radio object, or an "enable radio weapons" patch.
For more details, see the CoC_Arty quick help file.
The Tomahawks can also fly without UA. Treat them like a regular aircraft: place them on the map, set a flyinheight, set behavior to careless, and set waypoints. To detonate the Tomahawk, use:
unit Fire "CoC_CMPayload"
to active the BLU-97 submunition dispenser, use:
unit Fire "CoC_CMBluload"
see also the demo mission in this pack.
CoC_BLU97 (Clusterbomb submunition)
CoC_BLU97Spoof (dummy CB submunition for multiplayer)
CoC_BLU97Fire (Round fired by cruise missile, used to match BLU97 and BLU97Spoof fields)
CoC_WDU25: (1000 lb HE explosion)
CoC_CMNUKE: 1 KT Nuclear warhead (the IRL W-80 is 300 KTs)
CoC_CMSmoker: parent of dummy rounds fired by CM Launcher
CoC_BLU97S: dummy round to signify a TLAM-D launch
CoC_WDU25S: same, for TLAM-C
CoC_CMNUKES: for TLAM-N
CoC_CMLauncher magazines (add these magazines to the launchers to launch more missiles):
CoC_BLU97: For CoC_CMLauncher,each magazine translates into one TLAM-D (fires CoC_BLU97S)
CoC_WDU25: each magazine has one TLAM-C (fires CoC_WDU25S)
CoC_CMNUKE:each magazine has one TLAM-N(fires CoC_ CMNUKES)
Tomahawk Magazines:
CoC_CMPayload mags:
CoC_WDU25wh: 1 WDU25
CoC_CMNUKEwh: 1 CoC_CMNUKE
CoC_CMBluload mag:
CoC_BLU97wh: Fires a 12-round burst of CoC_BLU97Fires in 2 seconds.
CoC_CMLauncher: carried by the CoC_CruiseLauncher (all types)
CoC_CMPayload: Carried by the TLAM-N and TLAM-C
CoC_CMBluload: Carried by the TLAM-D
Vehicles
CoC_CruiseLauncher: UA-compatible cruise launcher. It has no model, just a logic location
CoC_CruiseLauncherE: the same, for East
CoC_CruiseLauncherG: for Resistance
CoC_TomahawkBlock2: the parent cruise missile
CoC_TomahawkBlock2WDU: TLAM-C, 1000lb HE warhead
CoC_TomahawkBlock2BLU: TLAM-D, 166 BLU-97 clusterbombs.
CoC_TomahawkBlock2NUKE: TLAM-N: 1 1KT Nuclear Warhead
CoC_TomahawkBlock2WDUE, CoC_TomahawkBlock2BLUE, CoC_TomahawkBlock2NUKEE: East versions (so AI will engage)
CoC_TomahawkBlock2WDUG,
CoC_TomahawkBlock2BLUG, CoC_TomahawkBlock2NUKEG: Res versions (so AI will
engage)
CoC_CMChild: the submerged submarine object that can be tied to the launcher.
Game Logics
CoC_CMFlyByCamera, CoC_CMFlyByGroundCamera,CoC_CMFollowCamera:
enables a camera (SP only) that follows the cruise missile from launch to
detonation in one of three modes. (sets variable
CoC_CMCamera to "flyby", "flybyground" and
"follow" respectively).
CoC_CMMakeDestructible: sets CoC_CMChild to True. On UA
initialization, the launcher creates a child object (CoC_CMChild), and places
it on the spot of the launcher. If the child object is destroyed, the launcher
is disabled.
CoC_Espionage
CoC_CMRApproved
CoC_CMRCancel
CoC_CMRComplete
CoC_CMRLaunch
CoC_CMRReady
CoC_CMRReceiving
CoC_CMRRequest
CoC_CMRUnable
CoC_CMfin
CoC_CMscoop
CoC_CMwing
CoC_CMlaunch
CoCCMOff: Turn off all CM scripts
CoCCMMinRange: Minimum range (m) from Launcher to target. Default is 1000
CoCCMMaxRange: MaximumRange (m) from Launcher to target. Default is 600000
CoC_CMCPUpause: controls how aggressively ARPM pathfinding uses CPU time. Default is .00003. Set lower for higher CPU usage and quicker pathfinding times; higher for slower pathfinding and lower CPU usage.
CoC_CMDebug: turn on debug messages
CoC_CMCameraMode: string to turn on various cruise missile tracking cameras. Valid values are "follow", "flyby", "flybyground”, and “none”
CoC_CMChild: spawn a
static submarine on location of launcher, bind launcher health to sub health.
CoCCMInit: boolean CMstart has turned on
CoCCMLaunchers: array of registered CruiseLaunchers local to client.
CoC_CMLaunching: indicates the last Cruise Launcher to fire.
CoC_CMCamera: camera used by CoC_CMCameramode
CoCCMWarheads: used by action-menu system
CoCCMWarheadNames: used by action menu system
CoCCMLib: array pointing to gamelogic of type "CoC_CM". Used by UA as a pointer to the CoC_CM directory and UA library files (.sqfs in root directory)
CoC_CMCurrent: used by Cruise01launch.sqs (local to server) to indicate missile to effects on fired EH (run on all clients).
CoC_MissileArr%: used by ARPM and related scripts to build waypoint paths for Tomahawk navigation.
CoC_MissilePilot%: used by Tomahawk guidance to steer missiles.
CoC_MissileGroups: contains all groups which can be used by CoC missiles.
CoC_CMLBI: reserved
CoC_CMLBM: array of remote BLU-97Fire objects to be processed by BLUThread.sqs
CMstart.sqs
Called by CoC_CruiseLauncher init EH, initializes and registers Cruise Launcher as a CoCasset. It then starts CoC_Arty's IFcommand.sqs, and CMOrders.sqs.
CMOrders.sqs
Called by CMStart after UA initialization. The variables passed are all pretty obsolete, but I digress. Anyway, CMOrders is resident and runs the CruiseLauncher. It processes the orders passed to it by UA, returns cruise missile status, and kicks up fire missions (run through ARPM).
avails.sqf: used by UA 1.1. Is an array that corresponds to list of UA units in types.sqf. Within each type-entry, each entry corresponds to options on the FED dialog. Subarray format is [default setting, ["OPTION NAME", "OPTION NAME"]].
Order is:
Rounds in Effect ([Default, [minimum RIE, maximum RIE]])
Fire Modes (Fire When Ready, AMC, ToT, etc.)
Distributions (Sheaves and so on)
Angle (LA, HA, MRSI, etc.)
Not used: warheads (see magazines.sqf)
displays.sqf: as per UA 1.0
firemenus.sqf: as per UA 1.0
funcs.sqf: as per UA 1.0
magazines.sqf: used by UA 1.1. Is an array corresponding to types.sqf, used to describe warheads to UA systems. Format is:
["Class Type of Magazine", "Display Name For Warhead", Fuzes Available (2^0 = Quick, 2^1 = Time, 2^2 = VT, 2^3 = Smoke fuzing, 2^4 = not used (yet) ), airburst height in M for time and VT fuzing, boolean (probably not used)]
markers.sqf: as per UA 1.0
menus.sqf: as per UA 1.0
names.sqf: UA 1.1. Corresponds to types.sqf – these are the text names to use on FED displays for the corresponding assets.
types.sqf: as per UA 1.0
called by CMOrders.sqs.
format:
[launcher, target position, warheadtype, "firemode", "FireOrder", "Posture", number of missiles to fire (,priority)] exec "\CoC_CM\scripts\ARPM.sqs"
launcher: unit name of CoC_CruiseLauncher
target position: [x,y,z] location
warheadtype: one of "CoC_BLU97", "CoC_WDU25" or "CoC_CMNUKE"
"FireMode": of format "CoCIFA%fm" where % corresponds to Launcher UA asset number
"FireOrder": of format "CoC_IFA%fi"
"Posture": of format "CoC_IFA%p"
number of missiles to fire: a number.
priority (optional): a number corresponding to
priority. Values are; 0 (RUN – not used by UA), 1 (HIGH), 2 (
ARPM uses several complex pathing routines to determine a path to target, when it calculates a suitable path, it registers the UA asset as "Ready to Fire", then orders the CruiseLauncher to fire.
called by CruiseLauncher fired EH. It sets CoC_CMLaunching to the launcher, then waits for CoC_CMCurrent to change. When CoC_CMCurrent points to a valid missile, it starts the launch drop effects on the missile.
called by ARPM. Handles the launch effects.
Takes:
["RouteVarName", group, "warheadtype", Missile Position, "Posture"]
"RouteVarName": name of a global variable that contains an array, of format [[[x,y,ASL], flyinheight] ...]. Alternatively, it can be passed an array of [x,y,z] coordinates, for cutscenes.
group: an open group on the side of the launcher.
"warheadtype": as in ARPM
Missile Position: the x,y,z position of the launcher.
"Posture": CoCIFA%p as with ARPM
Launch controls the missile during the rocket booster stage of flight. When the turbofan engines have spooled up and the missile is underway, it hands over to cruise02guidance.sqs
called by cruise01launch.sqs. Runs guidance to final waypoint
Takes:
[missile, "RouteVarName", "warheadtype"]
missile: unit name of missile.
"RouteVarName": as in cruise01launch.sqs
"warheadtype": as in ARPM
Guides missile through intermediate waypoints.
Called by cruise02launch.sqs. Flies cruise missile into an optimal weapon release/detonation posture.
takes:
[missile, waypoint, "warheadtype"]
missile: unit name of missile.
waypoint: [x,y,z] of target.
"warheadtype": as in ARPM
calls warhead scripts.
Take: [missile, targetobject]
missile: unit name of missile
targetobject: game logic at target point.
Arm warhead and release it (fire) at appropriate moment.
called by Tomahawk Fired EH. Sets off the appropriate effects for the munition type. Basically routes to effect scripts below.
take:
[missile, driver, shell]
missile: unit name of missile
driver: unit name of missile AI pilot
shell: unit name of shell fired
They set off the explosion (or sub munitions), call up the effects, and delete the cruise missile, and the pilot (at the same time, they conveniently dump the pilot off in the ocean to destroy any evidence).
These handle the effects on remote clients for Cruise Missile munitions.
handles the drop effects for BLU-97 submunitions.
returns a bunch of spherical vectors to make a nice pretty fireball
manages the position and vectors for each of the 12 sub shots.
called by Cruise Missile init EH. Governs animations and appearances, and initializes some variables.
init.sqf
sets up a camera to follow a target object.
Takes:
[target, offset, ispolar, fov]
target: unit name of target.
offset: either [x,y,z] cartesian, or [front, right, z] 2-D polar.
ispolar: false = offset is cartesian; true = offset is 2-D polar.
FOV: camera field of view (as in CamSetFov)
CMFuze.sqs