Campaign Gamemode Prefab

Campaign Gamemode Prefab V1

  • Hey you! Yes, you! Add images to your downloads, it's free! Use the orange "Manage Download Image" button in the top right.

Campaign Gamemode Prefab V1

The most complex gamemode logic

Campaign Gamemode

The goal of campaign mode is similar to TC, taking over the map non-linearly. What is different is that CM has 1 round to capture the final point or hold the most points by the end of the time (no overtime, no time is added on cap).

The main gimmick of this gamemode is that if you penetrate you have the potential to capture multiple points at once! With a single capture it is possible to hold 3/7 points to hold 6/7, but be warned, to be in a position to capture more than 1 point at once you are vulnerable to being cut off yourself.

What is supplied in this download

Inside cm_logic.vmf you will find all 226 entities with all 1901 outputs needed for this gamemode. There are optional relays not included but can be used if needed (will be covered later). There is also cm_logic_unabridged.vmf with BSP that contains a full example with annotated logic if you wish to make any edits. There is also a folder called Prefabs which contains essential prefabs split between 4 folders (merge this folder with Team Fortress 2\bin\Prefabs to use in Hammer), in alphabetical order:


  • Connector Doors : This contains doors that go between the main area and the A-B & D-E areas. These are super fancy multi-modal true one way doors.
  • Control Points : Control points, some of these are super fancy and contain capture areas for multiple points.
  • Misc : This contains spawns (with visualiser and teleport), stun (covered later), and core logic (same as cm_logic but as a prefab - place 2 in one map and you will crash).
  • Spawn Doors : Spawn doors for each spawn position and direction (diagram below) in both short and long area between the shutters and the door.
The multiple capture mechanic

An interactive diagram can be found at https://skylarkx.uk/cm.

Points are linked together as shown in the interactive diagram above and the spawns and doors diagram below. For a point to be cappable there needs to be different points on either end of the link. Points must also be connected through other points to their main point. Severing a connection between points and home means those seperated points are captured.

How this works is on A, B, D, and E there is an extra capture area which is linked to a bonus point. Depending on if for instance blu capturing A will result in capturing D (currently owned by red) because blu has B, upon capturing A the second capture area is enabled and the bonus point is renamed (details about renaming points below) and captured. This will show in the killfeed as capturing A then capturing D and the map will show that blu owns all but red's home. This also works with 2 bonus points, same example but red owns C capturing A will capture A, C, and D, and will show in the killfeed. Something to note is that it is possible for a bonus control point cap to be blocked, the capture time is immediate however each bonus capture takes around 200ms. It is also possible for players to leave the bonus capture area (but after a second everything is reset so there's no lingering bonus capture area active).

Connector doors, the why and the how

With so many control points teams will end up being spread out, which leaves certain areas unprotected like final control point and home connector (A-B for red, D-E for blu). So there are connector doors which are really fancy they act as a one way for one team and two way for the other; but that's not all, they act as a true one way, even if a defender holds the door open attackers cannot sneak in (there's a nodraw respawn visualiser that is enabled and disabled); on top of that they can be held open for when the area is unlocked and nothing gets screwed when the doors are reset to be one and two way with someone in the triggers.

The idea is that while teams have spawns they also have home areas. The main area is locked off and has a stun with a hurt which is activated 15 seconds after doors lock just to clear out the area, this area is opened when both base points are held by the enemy. There is also a home connector which is between the 2 base points, this area is locked off when the defenders have both base points (if blu captures A, regardless of B, the connector is opened up allowing blu to travel between A and B), buildings can be built in this home connector.

Spawn doors are another issue, below.

Spawns and you

Each team has 3 spawns: rear, middle, and forward.
  • Rear is occupied when the team is forced back when they only have only their main control point.
  • Middle is when a team owns any 2-5 control points
  • Forward is occupied when the other team is in rear/when the team owns all but the opponant's main control point.
Those in forward are teleported back to middle when forward spawn is lost.

Rear and middle can be merged into a single spawn room.

How do you get out of spawn rooms? Spawn doors!

Spawn doors is the largest prefab folder with 16 different prefabs across 4 positions, for 2 teams, with 2 "styles".

Spawn doors comprise of 2 main parts, the door, and the locking shutter. When a spawn door is too adventageous or the spawn room is disabled the locking shutter, locks (don't try to jam yourself in it, you'll die, but dw it's slow), the inner door is also locked. These doors come in 2 styles which changes the distance between the door and the shutter either normal, with minimal distance, and extended with a space (don't worry you can't get stuck there).

There are spawn doors for (Red/Blu) A/D, B/E, A-B/D-E, and C/C.

Here's a diagram for spawns and doors

Click to view larger
campaign-spawns-and-doors.png


Control points' names

Due to how the bonus point works control point names are duplicated in order for the killfeed to show it correctly. You will need to open up the VMF in a text editor that has find and replace. Control points are named in the format $point_0_name where the 0 can be a number between 0 and 6 inclusive. From 0 to 6 you will rename 1,3,3,9,3,3,1 times. Be warned, it is very unlikely but if you name your control point something like classname or something that exists already in the VMF if you try to rename it again it will rename important details. However you can rename a point to classname as long as you don't then rename classname. Renaming points to letters is safe but when renaming rather than rename A you rename "A" and include quotation marks in the output name, such as "New A".

Hooks

Hooks are a brand new features to gamemodes, but no gamemode has been complex enough to need them. These hooks do not exist in any of the prefabs, but their outputs do, they are made by you and use a standard naming system which are called when needed.

These Hooks come in 2 flavours, relays, and props. Relays are fully featured and props need some custom props.


  • (Relay) own_{point}_to_{point}_{team} e.g. own_0_to_1_red (red owns red main to A). This is fired to tell the relay that that team owns the route between 2 points. The points are smallest to larger. 1_to_4 yes, 4_to_1 no.
  • (Relay) direction_{point}_to_{point}_{team} e.g. direction_3_to_4_blu (blu can go from C to D to capture a point, this relay exists at C. 4_to_3 exists at D and red will be triggered). This is used to set custom props such as arrows to tell players "You're blu, you can go here to go to a point" while directions that lead to their point will be set to "none" but own_ will have fired - the intended use is to have arrows for direction, and plain colour for own. Relays for both directions exist.
  • (Prop) prefer_{point}_to_{point}_{team}* e.g. prefer_3_to_4_blu (skin 4, means that if standing between C and D signs for control point should show "E"). This takes into account location and what is the best move, in this case blu owns C and E, if red captures E they lose C as a bonus point, so should capture D to protect C.
Author
Skylark
Downloads
268
Views
921
First release
Last update
Category
Prefabs

More downloads from Skylark