Left 4 Dead 2

Left 4 Dead 2

Not enough ratings
Competitive Boss Spawner System for Custom Maps (Version 1.2)
By NF and 2 collaborators
Boss Spawner System for custom levels that mimics features of competitive configs (ProMod, ZoneMod, etc.) and adds new ones!
   
Award
Favorite
Favorited
Unfavorite
Intro
This is a competitive boss spawn system Wolphin, Daroot Leafstorm and I created for "Dark Carnival: Remix" and can be easily used in other custom maps.

The download contains scripts, materials, uncompiled optimized tank model and a prefab VMF with the entities you need.

Copy and paste both lines together in your browser: https://mega.nz /file/hwFk2SSZ#lO9QgfvF_g3U3GqzqURTukNiDE0M915ZWJVr9R6iK6s
Features
With this system you can now place any amount of Tank and Witch spawns to your level exactly where you want them to appear, one Tank and Witch are chosen randomly at the beginning of the level but will be identical across rounds. Players can vote to change the location of both the Tank and Witch before the first round begins.

Both the Tank and Witch are visible in the map (rather than spawning until the survivors are near) and will glow from any range while the round hasn't begun, once the round begins the Witch glow will disappear and the Tank glow range will be reduced.

Tanks are given about 5 seconds of fire immunity upon spawning to avoid getting pre-lit by molotovs since the Survivors will know where it appears.

Witch randomness is reduced in this new system: Witches will now always spawn facing the path you take through the map, making crowns have less of a luck element to it and preventing the Witch to make any turns or rotations as she stands up and runs towards the survivors.

Competitive command compatibility
This system has full compatibility with competitive configs, typing the command ~tank or ~witch will print the boss location and flow percentage. The flow percentage must be obtained manually, the download includes a script to obtain this data.



Safe area boundaries
Add a safe area boundary to any map that doesn't have a beginning saferoom and the system will remove the boundary once the round has begun. Place the boundary along the nav marked as start area.



Tank boundaries
Both teams will be able to see a boundary of the EXACT location the survivors must travel to spawn the Tank, this includes the location of the Tank. This is achieved by using triggers and func_brushes rather than relying on nav flow.



Voting
The available locations for the Tank and the Witch will be printed in console by saying the command ~tank_spots and ~witch_spots respectively.



A location can then be voted for by saying the command ~tank_spot # and ~witch_spot # respectively. The majority of players must approve for the vote to succeed, players can vote by saying the command ~yes or ~no. The voting will end after 10 seconds.

The location of a Tank and Witch cannot be changed after the first round begins.

Enjoy!
How to use
This guide will assume you created your own search path in the gameinfo.txt of Left 4 Dead 2 to create your campaign addon:



Add the materials to your search path
Use any path you want for the two material files included (tank_boundary.vmt & versus_boundary.vmt) under the materials folder in your search path, you will need to fix the material paths for the boundaries in the prefab VMF included.

Add the boss spawer script to your search path
Rename the script custom_boss_spawner.nut with a unique name for your campaign addon to avoid conflicts, example: dead_center_boss_spawner.nut

Then add the script to your /scripts/vscripts folder under your search path.

Add the Tank and Witch entities to your level
Open the prefab VMF custom_boss_system.vmf and do not rename any of the entities as these names are searched by the script.

To load the script in your level, use a info_gamemode entity to run the script when OnVersusPostIO, do not use OnVersus, you can target the info_director entity or a logic_script entity.



For the safe area boundary use the versus_safe_areaboundary func_brush entity, remember to either spawn it with a point_template when it's the versus game mode or delete the entity when the game mode isn't versus.



Add the filter_activator_team entity anywhere in your map, this is so the triggers only detect survivors.

There are 10 sets of Tank and Witch spawn entities included in the prefab VMF you can easily copy and paste to your level.

Each Tank set's entity names are prefixed with a unique id:
  • info_zombie_spawn: tank_spawn_<id>
  • point_template: tank_spawner_<id>
  • trigger_once: tank_trigger_spawn_<id>
  • func_brush: tank_trigger_boundary_<id>
The 4 entities must all have the same identifier and can be anything as long as they are unique, you don't need to use the identifiers included in the prefab VMF.

A rule of thumb is to place the info_zombie_spawn 10% flow away from the trigger_once.

I recommend copy and pasting the info_zombie_spawn & point_template together as the bottom of the point_template is how far from the ground the placeholder Tank will appear. The info_zombie_spawn has an odd collision model where it needs to be higher than it looks off the ground or the zombie will spawn below the map.



The Witch only needs one entity (info_zombie_spawn) and are also prefixed with a unique id: witch_spawn_<id>

Remember to place the info_zombie_spawn higher off the ground so that the zombie doesn't spawn below the map.

Create your level's boss spawn script
Now you need to create a boss spawn script that includes a list of every Tank and Witch set with their respective location description and flow percentage. There is a script file included called example_boss_spawn you can use, rename it to something similar to your level's name, example: c1m1_boss_spawn



Remember to update the first line of the script to match your boss spawner script name!

Each spawn set is represented by an array which includes:
  • The first item is the identifier of the Tank or Witch spawn set.
  • The second item is the description of the spawn location.
  • The third item is the flow percentage in units from 0 to 100.

You can use the script included called get_flow.nut to obtain the current flow at your location, travel to the position where your tank boundaries are and run the script in console by writing: script_execute get_flow



Organize the list from lowest flow percentage to highest.

Prevent director from spawning Tanks and Witches
To do so, add the following properties to your mission file for every level on versus mode:

"versus_boss_spawning" { "spawn_pos_min" "1" "spawn_pos_max" "0" "witch_and_tank" "0" "tank_chance" "0" "witch_chance" "0" }

There is a mission_file_example.txt file included.
3 Comments
dsaS 7 Jun, 2023 @ 5:42pm 
Singularity's Marauder 16 Mar, 2021 @ 12:39pm 
@CGR Did you leave your brain at the public bathroom?
Benjamin🏖 14 Mar, 2021 @ 2:07pm 
tell your community to succ you know what NF