Left 4 Dead 2

Left 4 Dead 2

36 ratings
Placing entities Via Commentary.txt wo/ compile.
By мяFunreal
Have you ever done a long final compile on a map and realized you forgot a prop or entity?
Recompiling is a No-Go. Read here on how to add things using commentary files instead.
   
Award
Favorite
Favorited
Unfavorite
Foreword
Sometimes you forget an entity, or you realize that players found a way to exploit missing clips.
Whatever the case, you want to fix this, but you don't want to go through an hour of VRAD.
This is where the commentary files come in handy.

They were supposed to be just for commentary entities, which are the little speech bubbles.
Yet you can add any point entity to maps with these files.
L4D2 uses it for info_remarkable, but also to add props and env_player_blocker's to fix exploits.

You do not need any special tools, unless you count Notepad++ as special.
Any text editor will do though.

Note:
This is only useful for adding entities.
This can not be used to modify existing entities. For that, you need to edit .lmp files instead.
This can not be used to add weapon spawns to survival maps. The items won't spawn even if they have the required targetnames, which is used to spawn entities via point_templates.
Speedrunning commentary%
In my case, these shelves need some defibrillators


1
We begin by adding the entities into your map like normal.
Save the map, just so that the entities actually exist, should you ever have an actual reason to recompile the map.


2
Copy these entities by pressing CTRL+C.
Make a new map, right click any 2D Viewport and press Paste Special.


In the next window, make sure to only paste one single copy without transforms.
This will paste the entities in exactly the same location in this empty map.


Save this empty map with whatever name you want.


3
Open the VMF of this new map in Notepad++.


4
Replace the entire section at the top until the very first "entity" line with:
"Entities" {


5
Scroll down to the very end and replace the camera and cordon with an additional }.


6
Replace all "Editor Brackets" (Data inside may differ with yours)
editor { "color" "0 0 200" "visgroupshown" "1" "visgroupautoshown" "1" "logicalpos" "[0 0]" }
with
"mapupdate" "1"

You can use Notepad++ to select the entire section and replace all of it at once.



This is the entire file now. I have added tabs just to make it look a bit nicer.


7
Save this file as "mapname_commentary.txt" in the maps folder.


That's literally it.
Load the map and marvel at stuff being added without staring at VRAD for an hour!


Don't forget to ship this file with your maps.
Turning a commentary into a map
You can do the exact same thing in reverse.
You can load a commentary in a text editor, add the required map parts and save it as a vmf. load it in hammer and copy paste the entities into your map.

7 Comments
stalin 24 Feb, 2022 @ 5:43pm 
This comment is awaiting analysis by our automated content check system. It will be temporarily hidden until we verify that it does not contain harmful content (e.g. links to websites that attempt to steal information).
мяFunreal  [author] 22 Feb, 2022 @ 6:37pm 
you probably can, yea. but the game will probably crash if you do so.
stalin 22 Feb, 2022 @ 12:18pm 
can you go over the entity limit with this?
翻斗花园牛爷爷 15 Feb, 2022 @ 8:08am 
nice
Ban4uk 14 Feb, 2022 @ 10:06am 
):boomer:
мяFunreal  [author] 13 Feb, 2022 @ 2:58pm 
Yes. Yes you can.
You can place any point entity you want anywhere you want and the game wouldn't care.
Wizard 13 Feb, 2022 @ 2:05pm 
Lol can you mod existing maps with this and just add pills everywhere?

Louis approves.

https://www.youtube.com/watch?v=wOBNrAtIhRo