<html><pre>

======================
REPLAY SCRIPT TUTORIAL
======================


========================================================
                    PREPARATION
========================================================

Im going to do this pretty fast but its not that hard so here we go.

1. Record a ghost on the map you want to try (make sure to run around most spots of the map)

2. Load this cfg in q3.

---replay.cfg---

//Reset variables 
set camID 0
set actID 0

//Activator and Camera binds
bind 8 "replay set act $actID VOLUME $posX $posY $posZ $ $ $"
bind 9 "replay set act $actID VOLUME $ $ $ $posX $posY $posZ"
bind 0 "replay set cam $camID $posX $posY $posZ $angX $angY $angZ"

bind UPARROW    "varMath camID + 1"
bind DOWNARROW  "varMath camID - 1"
bind RIGHTARROW "varMath actID + 1"
bind LEFTARROW  "varMath actID - 1"


//View binds
set m1 "df_ghosts_miniviewdraw 2 ; bind 1 vstr m2"
set m2 "df_ghosts_miniviewdraw 0 ; bind 1 vstr m1"
bind 1 vstr m1

set r1 "df_demos_replaymode 2 ; bind 2 vstr r2"
set r2 "df_demos_replaymode 4 ; bind 2 vstr r1"
bind 2 vstr r1

//Load and Save Replayscript
bind z "replay save new_replay"
bind x "replay load new_replay"

//Ghost for testing the script
bind h "ghost #1 play"
bind j "ghost #1 stop"

df_ghosts_miniviewdraw 0 
df_demos_replaymode 4

----------------

3. Load the map you want to make a replay for (devmap)

4. Press z to save a "empty" replayfile (the replayfile shows up in /defrag/replayscripts/new_replay.cfg)



---EMPTY REPLAY FILE---

///////////////////////////////////////////////////////////////////////
// DO NOT EXECUTE IN QUAKE3 !!!
// This is a Defrag Recam/Replay script file.
// The file must be placed in the "replayscripts" folder.
// The filename should be the mapname with .cfg extension.
///////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////
// The maximum number of variables (VAR) is: 50
// VAR ID                        VarName      Value


///////////////////////////////////////////////////////////////////////
// The maximum number of cameras (CAM) is: 50
// CAM ID      X      Y      Z    P    Y    R


///////////////////////////////////////////////////////////////////////
// The maximum number of transitions (TRAN) is: 50
// TranTypes: TIME, POSX, POSY, POSZ, POSXY, POSXZ, POSYX, POSYZ, POSZX, POSZY
// TRAN ID  TranType DType ID ID Speed Loop


///////////////////////////////////////////////////////////////////////
// The maximum number of activators (ACT) is: 50
// ACT ID ActType  <...>
// ACT ID MANUAL      On
// ACT ID TIMER     Time
// ACT ID TRANEND     ID
// ACT ID RADIUS       X      Y      Z Radius
// ACT ID VOLUME      X1     Y1     Z1     X2     Y2     Z2


///////////////////////////////////////////////////////////////////////
// The maximum number of links (LINK) is: 100
// LINK ID DType ID DType ID

---EMPTY REPLAY FILE---



This doesnt really tell you anything at the moment but to see the actual buildup of the script I included a blank one

Preparations complete,  lets get to the real work



========================================================
            PLACING ACTIVATORS AND CAMERAS
========================================================

1. Place the first activator over the spawnpoint to activate the first camera directly on the spawn.

   - noclip to one corner of the acivator you want to make,  press 8,  fly to the other corner press 9

** Note: after you create your very first activator corner, you must type: "/replay validate" in the console to see you entities.

   - now you will see a green box with a number in it just like on the picture.

   - press RIGHTARROW to choose the next activator ID, repeat the procedure until you have all the activator you wants

2. Place cameras
 
   - Fly to the place you want a camera (angle doesnt matter if you wont use a static camera) and press 0
   - press UP to change to the next cam ID and go to the next place you want a camera. Repeat until all cameras are placed.

3. Save (by pressing z)

Now you have a replayfile with some info in it.  Open it in notepad to see whats in it. 

=== the important part of the file ===

// CAM ID      X      Y      Z    P    Y    R

   CAM  0   -179     -4    182   87   -2    0
   CAM  1    614    117    147   11  -97    0
   CAM  2    623    102    816   32  -86    0
   CAM  3    608      4    799    6    3    0

// ACT ID VOLUME      X1     Y1     Z1     X2     Y2     Z2

   ACT  0 VOLUME    -286   -232     11   -106    242     73
   ACT  1 VOLUME     411     81    113    448    -54    272
   ACT  2 VOLUME     697     51    849    763    -55    762

======================================


here you can clearly see that 4 cameras and 3 zones are made.


========================================================
            GETTING DOWN WITH NOTEPAD
========================================================

Its time to LINK the project together, set cameramodes and transitions. 

For a slow start we can just link the first activator to the first camera.

At the bottom om the textdocument you may add :

   LINK 0  ACT    0 CAM    0

that will LINK the first activator with the first camera.
save the notepad document and load the script in q3 with x.

There you can clearly see the link between the first camera and the first activator. (red rail)

Now you may want to set what cameramode you want to have,  then you have to make a VAR for it and link to the var.

   VAR 0  df_demos_cameramode   5.000 

that will store the cameramode 5 variable in the first var,  now we have to link it aswell.

   LINK 1  ACT    0 VAR    0

save the notepad document and load it in q3 (x)

Now load up the demo you made to watch if that first activator worked.  (it should work)



