Team Duplication - By Tim Smith (a.k.a. Saint Bob)


General

Team duplication is a method of mirroring a group of map elements for the creation of team based maps.  Team duplication goes beyond the normal functionality of the QuArK duplicators by providing automatic adjustment of entity names, textures, spawnflags, specifics, turrets, targetnames, targets, teams, and rotating doors.

Note: It is strongly suggested that you open the sample jailbreak map while reading these instructions.


Setup

Team Groups

Team duplication works by locating specially named groups.  Each team must be contained in a group called 'teamx' where x is the team number starting with 1.  The first team, team1, is used as the template for all of the other teams.

Team Origin

Each team group must contain a brush call 'origin'.  This brush must be directly under the team group and can not be contained in a sub group of the team group.  The origin brush, which should not be confused with the origin texture flag, is used to provide an anchor and placement point for the group.  This brush usually has the skip textureflag set since it is usually not part of the actual map.

Team Group Specifics

Each team group contains specifics that inform the team duplication software what elements of the map must be adjusted. 

In many cases, multiple specifics can be created of a given type.  The team duplication software starts looking for specifics starting at 1 until one can not be found.

symmetry (all teams but team1)

This specific defines along what axis the mirroring will be done.  The valid values are 'X', 'Y', and 'XY'.

spec#name (used only in team1 group)

Name of the specific to be changed.

spec# (all team)

The text of the specific.  If the value of spec# in team1 is found in an object in a mirrored team, then the text of the specific is changed to the text of spec# found in the mirrored team's group.  Also, if the value of spec# from the team's group is found in an object in the mirrored team, then the text of the specific is changed to the text of the spec# found in team1.

entity# (all team)

Replace the given entity name with the name supplied in the mirrored team's group.   Like spec#, the reverse is also true.

spawnflag#name (used only in team1 group)

The name of an entity to adjust.

spawnflag# (all team)

The mask of the bit to be changed.  The reverse is also done.

texture# (all team)

The name of a texture to change.  The reverse is not done.


Other Object Adjusted

Turrets

It is impossible for QuArK to properly rotate a turret.  Since it doesn't know if the turret is being adjusted by the user or duplicated by an automated process.

Team duplication will locate turrets and adjust them so that they will function normally.

Very few mods support turrets

func_door_rotating

If a door is rotating on the x or y axis, then the reverse flag will be toggled if the team is being duplicated along that axis.


Targetname, Target, and Team specifics

For team duplication to automatically adjust the targetname, target, and team specifics, they must be formatted in a specific manner.

name#

Where name is the name of the targetname, target, or team and # is the team number.

Example:

Consider a button that opens a door.  The targetname for the could be called 'door_1' and the target of the button set to 'door_1'.  When team duplication is done, the targetname and target would be changed to 'door_2' for team 2.

If a targetname, target, or team specific ends in the number of the team being created, then the number will be changed to team 1.  Thus if team 1 contained a button for 'door_2', then when the door gets duplicated for team 2, then the targetname is changed to 'door_1'.