Left 4 Dead 2

Left 4 Dead 2

View Stats:
Tito-A Apr 2, 2023 @ 11:16pm
"-insecure" Error when running map in Hammer
I've been trying to make my first custom map for Left 4 Dead 2 using Hammer. When I try to compile the map there are no problems. But after I finish loading the game I get an error saying "You have -Insecure in the launch options which will prevent you from connecting to VAC secured servers." But when I go through the properties of L4D2 > General > Launch options, there is nothing written there. I spelled the map name correctly. And there were no errors when compiling. I'm not sure what I'm supposed to do now and I am very new to making maps.
< >
Showing 1-15 of 20 comments
ᴿᴱᴻᴱ™ Apr 3, 2023 @ 2:02am 
Thats normal dont worry.
A map started by hammer will always force -insecure afaik.
That wont be the case when you open up your game normally and starr the map by console or by menu.
Tito-A Apr 3, 2023 @ 5:07am 
Originally posted by ᴿᴱᴻᴱ™:
Thats normal dont worry.
A map started by hammer will always force -insecure afaik.
That wont be the case when you open up your game normally and starr the map by console or by menu.
whenever I go into the console and try the "map" command my map doesn't come up
ᴿᴱᴻᴱ™ Apr 3, 2023 @ 8:34am 
do you see the bsp in your map folder?
Tito-A Apr 3, 2023 @ 5:56pm 
Originally posted by ᴿᴱᴻᴱ™:
do you see the bsp in your map folder?
yes
AlwaysToast Apr 3, 2023 @ 10:56pm 
There are three different ways to launch L4D2, the normal game, tools mode, or from Hammer. The launch options for L4D2 (the standard game) won’t impact how Hammer launches the game (and vice versa). If you are talking about compiling maps, we are going to be assuming you are launching from Hammer (unless you state otherwise). In the launch options Don’t Run Game after compiling is not checked.

When you go to compile your map, in the normal (not expert) Run Map interface do you have there is a field called Additional Game Parameters. That’s the launch options for L4D2 when launching from Hammer. For you what is in the Additional Game Parameters field?

Like I have: -toconsole -dev -console +sv_lan 1
Potentially you are missing some basic options that makes the console function.

Second: The more information we have about your potential problem, the more likely we are to find it based on knowledge rather than blind guessing. I realize you are new and may not know what the relevant information is, but more information is better. As it is possible you have several problems instead of just one.

Your map compiles, but doesn’t load. You told us when you went to try to use the console, you spelled the name correctly. But that doesn’t tell us the name. What’s the file name of the map?

As it's much easier for us to figure out if you have a problem with the name of your map (like spaces or special characters) if we know what you named the map.
Tito-A Apr 4, 2023 @ 4:30am 
Originally posted by AlwaysToast:
There are three different ways to launch L4D2, the normal game, tools mode, or from Hammer. The launch options for L4D2 (the standard game) won’t impact how Hammer launches the game (and vice versa). If you are talking about compiling maps, we are going to be assuming you are launching from Hammer (unless you state otherwise). In the launch options Don’t Run Game after compiling is not checked.

When you go to compile your map, in the normal (not expert) Run Map interface do you have there is a field called Additional Game Parameters. That’s the launch options for L4D2 when launching from Hammer. For you what is in the Additional Game Parameters field?

Like I have: -toconsole -dev -console +sv_lan 1
Potentially you are missing some basic options that makes the console function.

Second: The more information we have about your potential problem, the more likely we are to find it based on knowledge rather than blind guessing. I realize you are new and may not know what the relevant information is, but more information is better. As it is possible you have several problems instead of just one.

Your map compiles, but doesn’t load. You told us when you went to try to use the console, you spelled the name correctly. But that doesn’t tell us the name. What’s the file name of the map?

As it's much easier for us to figure out if you have a problem with the name of your map (like spaces or special characters) if we know what you named the map.

I open my custom map through Hammer by going to pressing F9. Im not sure what most of these means but here are my settings

  • Run BSP
    Normal
  • Run VIS
    Normal
  • Run RAD
    Normal
  • both "Don't run the game after compiling" and "Wait for keypress when done compiling" are unchecked

and the Additional game parameters are "-toconsole -dev -console +sv_lan 1"

After compiling, the game opens and then loads. When the loading finishes I am met with the error saying "You have -Insecure in the launch options which will prevent you from connecting to VAC secured servers."

The map name is also "co_myroom02"

And when I copy paste the log to https://www.interlopers.net/errors?page=errors&params= there are no errors
AlwaysToast Apr 4, 2023 @ 7:18am 
Quick Breakdown
Originally posted by Tito-A:
Run BSP
Normal
BPS is the world geometry and functional stuff. It’s also generally the fastest thing to calculate and you can leave it on normal basically all the time.
Originally posted by Tito-A:
Run VIS
Normal
VIS is visibility. The empty space on the map is cut into visleaves (basically empty cubes of space), and then the game calculates which other visleaves you can see if you are standing in each one. Which lets if figure out what parts of the world should be rendered, based on where the players are in the map.

So maps with lots of small spaces (generally interiors made of tunnels and rooms) with short sightlines compile VIS fast, but maps that are basically one big room (generally exterior maps) tend to take a long time. The more you optimize your map (generally making small brushes into func_details to cut down on the number of visleaves created).

You can turn it off if you are trying to check something quick (like if you are trying to check a trigger or placement of a prop). This saves time especially if you have a very large map. In general VIS times go up with the size of your map (but you can make the time it takes go down by optimizing the map). If you don’t run VIS, the map won’t know when to not draw stuff, which can have a serious negative impact on gameplay/lag/stuttering/etc.
Originally posted by Tito-A:
Run RAD
Normal
RAD is lighting. You can turn it off if you need to check something that has nothing to do with lighting, and you want the map to load really fast. The map will load in fullbright mode. Or you can run it on fast if you want the map lit ok, but exact shadows don’t matter for what you are testing.

The more lights you have, the longer RAD takes to compile (it has to calculate all the light bouncing off surfaces). If you get to the point where you are doing an advanced compile, you can make the lighting calculate extra stuff, which takes even longer, but makes the map slightly more pretty.

Note source is an old game engine. It has some serious limitations on how lighting is done.

Within RAD is HDR (High Dynamic Range). L4D2 basically only uses HDR lighting (if you want brush entities of func_breakable_surf with a glass surfaces to work right you need HDR on). I’d suggest just checking the HDR button and leaving it.

Originally posted by Tito-A:
  • both "Don't run the game after compiling" and "Wait for keypress when done compiling" are unchecked
“Wait for keypress…” Just means the compile window won’t close until you select it and press a key. If Hammer is successfully starting L4D2, then after you close it, the compile window will still be up. If you have a compile issue (like a leak) that prevents Hammer from starting L4D2, then you can just look at the compile window instead of looking up the log ( also saves you trying to read it as things scroll past really fast). So turning it on or off is a matter of personal preference.

Originally posted by Tito-A:
After compiling, the game opens and then loads. When the loading finishes I am met with the error saying "You have -Insecure in the launch options which will prevent you from connecting to VAC secured servers."
Normally your map should load right up, then you get the insecure message when you exit a map back to the L4D2 menu. As was previously stated, getting the insecure error always happens. It’s the fact that you aren’t getting into your map, and can't load it via console that is weird.

It's hard to figure this problem out, because I don't know how I could make a map that compiles properly, but doesn't show up in the console command.

Originally posted by Tito-A:
The map name is also "co_myroom02"
Assuming the quotes aren't actually in the map name, that seems fine.

In Hammer try Alt + p buttons to pull up the problem list. See if there are any errors about bad geometry or displacements.

If the map is named properly (it seems to be) and has been compiled and therefore saved, it should have a .bps in /Left 4 Dead 2/left4dead2/maps/
Which you say it does. So you should be able to open it with the console command once hammer has loaded L4D2.

Where is the .vmf saved?
Example: /Left 4 Dead 2/mapsrc/myproject1

It should also have a copy of the .bps in the folder with the .vmf file.

When you load your map via Hammer (L4D2 starts, but your map doesn't), can you load other maps via the console command:
map mapname

So like: map c1m1_hotel

If you can load the official campaigns, then we know the console is working properly.

Can you load other custom maps?
If you don't have another map, just make a test map in the same file folder that is an empty cube with textures on the inside, with an info_ player_start inside so you have another map to test that is incredibly simple. Then compile it.

If the second map works, and the .vmf are in the same file, then it's not a file location issue. Then try to reload the map with the: map filename

If you can load official maps, but can’t load the second basic map from the same file folder, then the location of your map in the file system may be the issue.

Originally posted by Tito-A:
And when I copy paste the log to https://www.interlopers.net/errors?page=errors&params= there are no errors
It is possible for something to be catastrophically wrong in the compile log, but the problem is not technically an error. I don't think that is what is going on here. But you shouldn't assume everything is OK in the compile log, just because it technically has no errors.
Last edited by AlwaysToast; Apr 4, 2023 @ 7:19am
Tito-A Apr 4, 2023 @ 7:35pm 
Originally posted by AlwaysToast:
In Hammer try Alt + p buttons to pull up the problem list. See if there are any errors about bad geometry or displacements.
Immediately it says "No errors were found.

Originally posted by AlwaysToast:
If the map is named properly (it seems to be) and has been compiled and therefore saved, it should have a .bps in /Left 4 Dead 2/left4dead2/maps/
I was unable to find the .bps file of my map within the folder

Originally posted by AlwaysToast:
Where is the .vmf saved?
Its saved in /Left 4 Dead 2/sdk_content/mapsrc/MyL4D2 Map Projects. Inside the folder there are 5 files
co_myroom02.bsp
co_myroom02.log
co_myroom02.prt
co_myroom02.vmf
co_myroom02.vmx
However, there is no .bps file
Originally posted by AlwaysToast:
When you load your map via Hammer (L4D2 starts, but your map doesn't), can you load other maps via the console command
I am able to load the official map campaigns and I am even able to load tutorial01_complete which I can also run through Hammer.

Originally posted by AlwaysToast:
Can you load other custom maps?
I am able to load custom maps from the workshop but the thing with my map is that its just a square room with "info_player_start", "info_survivor_position", "light", and "env_cubemap" nothing more.

I think the problem is the .bps file because I can't find that in /Left 4 Dead 2/left4dead2/maps but Im not sure what to do about it.
AlwaysToast Apr 4, 2023 @ 8:25pm 
Ok, the lack of a .bps makes me think hammer isn’t setup properly (it may have just started out with the wrong info). So check your settings against this.

In Hammer, Go to Tools -> Options.. (all the way at the bottom)
A dialog box should open up, with a couple of tabs. I’m only going to list things that I think might be causing the problem.

In the Game Configurations tab:
Configuration: Left 4 Dead 2
Game Data files: $SteamUserDir\left 4 dead 2\bin\left4dead2.fgd

Game Executable Directory: $SteamUserDir\left 4 dead 2
Game Directory: $SteamUserDir\left 4 dead 2\left4dead2
Hammer VMF Directory: $SteamUserDir\left 4 dead 2\sdk_content\mapsrc

In the Build Programs tab:
Configuration: Left 4 Dead 2
Game executable: $SteamUserDir\left 4 dead 2\left4dead2.exe
BSP executable: $SteamUserDir\left 4 dead 2\bin\vbsp.exe
VIS executable: $SteamUserDir\left 4 dead 2\bin\vvis.exe
RAD executable: $SteamUserDir\left 4 dead 2\bin\vrad.exe
Place Compiled maps in the directory before running the game: $SteamUserDir\left 4 dead 2\left4dead2\maps
Tito-A Apr 4, 2023 @ 8:46pm 
Everything was the same except for "Place Compiled maps in the directory..." it was set for Left 4 Dead 2/sdk_content/mapsrc instead of \left 4 dead 2\left4dead2\maps but whenever I try to run the game, after it finishes compiling L4D2 does not open. Previously (Before all of this), when I tried running the map it would compile but It would not run L4D2, I saw a youtube video( I forgot what vid was that) that said if I changed it to /sdk_content/mapsrc it would run. It did. But the when it finishes loading it would show me the "-insecure" error.
AlwaysToast Apr 4, 2023 @ 9:26pm 
Those are my settings (which work fine for me). So setting: Place Compiled maps in the directory before running the game: $SteamUserDir\left 4 dead 2\left4dead2\maps
Prevents L4D2 from loading from hammer (like you just tried it)?

That makes me think you actually have some corrupted files or something (at this point might as well see that’s true or not). The problem is a corrupt file could be in the game or the tools.

So I suggest you go to your Steam Library. Go to Left 4 Dead 2, Right click, properties ->Local Files -> Verify integrity of game cache. It may take a while, then tell you if it needs to reaquire any files (aka you in fact had corrupt files).
Then do the same for the Left 4 Dead Authoring tools.

If it does come up with any corrupt files, then try setting the Place Compiled Maps back to: $SteamUserDir\left 4 dead 2\left4dead2\maps
Tito-A Apr 4, 2023 @ 9:38pm 
Alright
Tito-A Apr 5, 2023 @ 12:29am 
I finished verifying both L4D2 and L4D2 Authoring Tools but now whenever I try opening co_myroom02 through Hammer there is an Error loading the file "File C:\Program files (x86)\Steam\steamapps\common\Left 4 Dead 2\sdk_content\mapsrc\My L4D2 Map Projects\co_myroom 0.2\co_myroom02.v line 1: unexpected symbol '{'" I haven't changed the changed the name or anything and looking at the file name its still "co_myroom02.vmf".

Ive tried just making a new map but now whenever I try to run the map it just compiles and doesn't finish compiling. I tried making another map but now it just saves into a .rmf file now. Feeling like just quitting now
AlwaysToast Apr 5, 2023 @ 10:44am 
Originally posted by Tito-A:
I finished verifying both L4D2 and L4D2 Authoring Tools
Did you actually have any corrupt files?
It would be nice to know if something was fixed. As if nothing changed, we just have the same situation.
Originally posted by Tito-A:
but now whenever I try opening co_myroom02 through Hammer there is an Error loading the file "File C:\Program files (x86)\Steam\steamapps\common\Left 4 Dead 2\sdk_content\mapsrc\My L4D2 Map Projects\co_myroom 0.2\co_myroom02.v line 1: unexpected symbol '{'" I haven't changed the changed the name or anything and looking at the file name its still "co_myroom02.vmf".
I’m not suggesting you do this, I’m just explaining that the error is possible to fix: The .vmf file, is basically just a giant list of all the things that make up the level. You can open it up with notepad (or any text editor) and see how items are listed. If you know how brackets work in scripts, you could manually search through the text find the extra bracket and remove it, or close it as needed. I think that error is telling you the extra bracket is on line 1. But not something I expect someone new to modding to understand. Also given you have a very basic map it would be faster to start over.
Originally posted by Tito-A:
Ive tried just making a new map but now whenever I try to run the map it just compiles and doesn't finish compiling. I tried making another map but now it just saves into a .rmf file now. Feeling like just quitting now
I understand your frustration.
It sounds like there is still an error in the Tools -> Options.
The problem is just a single wrong character in any of the file name settings, could be causing the problem. Or it could be something else I’m not thinking of.

But once you get Hammer setup, you shouldn’t have to do this again. I don’t even remember what year I set up Hammer it was so long ago.

If you want to keep going:
I’m going to suggest you try compiling a map you didn’t setup. Just so we can remove any errors you might make as a variable.
Steps
In /Left 4 Dead 2/sdk_content/mapsrc
Make a new folder: mytest
This keeps everything contained, so you can delete it later.

In Hammer, open styleguide_semiurban.vmf from In /Left 4 Dead 2/sdk_content/mapsrc
Save as
Save it into /Left 4 Dead 2/sdk_content/mapsrc/mytest
Give it a new name like: temp_test1
Just make sure you can’t confuse it with the old file.

Close hammer. Open hammer, load the test map with the new name.
Run Map, use the normal setting. Only run the map once.

If it compiles properly, and L4D2 opens, and the map loads up. Then things are setup. You just have to worry about problems of building a map now.

If it complies properly, and L4D2 opens, but the map doesn’t load. Something is set up wrong, but I don’t know what.

If the compile fails. After you think it has failed compiling. Close Hammer.

Tell us which result you got (you can skip copying the compile log if the result was everything worked).
Go into /Left 4 Dead 2/sdk_content/mapsrc/mytest
Open the compile log (the .txt document with the same name as the test map).
Copy that entire text and post it here.

Why: Because if the compile is failing at a specific step, would give us some idea of where to look for an error in the settings. Also, anyone can reproduce the compile by making a copy of the same map. So we can compare your results to a working result of the same map.
Tito-A Apr 10, 2023 @ 6:45pm 
Originally posted by AlwaysToast:
Did you actually have any corrupt files?
It would be nice to know if something was fixed. As if nothing changed, we just have the same situation.

Last I remember, there were 2 corrupt files in Left 4 Dead 2 but I do not remember if there was any corrupt files in the Authoring tools because I wasn't paying much attention.

I verified the files again recently and this time there were no corrupt files.

Originally posted by AlwaysToast:
Save it into /Left 4 Dead 2/sdk_content/mapsrc/mytest
Give it a new name like: temp_test1
Just make sure you can’t confuse it with the old file.

For some reason, whenever I save maps now it changes to .rmf files Im not sure why this happens but it only started after I verified both L4D2 and the Authoring tools.

Originally posted by AlwaysToast:
Close hammer. Open hammer, load the test map with the new name.
Run Map, use the normal setting. Only run the map once.

I cant do the other steps because every file I save on hammer changes to a .rmf file.
< >
Showing 1-15 of 20 comments
Per page: 1530 50

Date Posted: Apr 2, 2023 @ 11:16pm
Posts: 20