How to stop decompiling?

What do you do make it to where people can’t decompile maps? Any help would be greatly appreciated. Thanks again.

Not possible since a custom program can be made to ignore any flags or things put in place of the map to deter it.

Technically still possible just corrupt data the engine will ignore when reading maybe unused lumps just a theory.

Hmm I’ll have to look into it thanks.

You can try to threaten people with their life.

Source’s built-in decompile protection methods do not work against programs like BSPSource, so there really is no way to protect your map from being decompiled. You can however make it difficult for people to edit and recompile the map.

IMO the most effective method is a texture obfuscator, which will make it so that when the map is decompiled, every texture in the map will be changed to something else. In most cases the person decompiling will not go through the effort of re-texturing the entire map, but if the map is small then it could still happen.

Unfortunately, texture obfuscation has downsides, it will also change the surface properties of all materials in the map. You could be walking on a concrete surface, but if the obfuscator chose to replace all textures with a glass texture, walking or shooting the concrete floor will produce the glass sound effects. In TF2, models that should be lit by light_environment will not appear to be lit, so players and scenery in outdoor areas will appear much darker than they should be and look very out of place.

Something you could do to make it harder for people to edit the map is take all of the logic entities in the map and move them into the same position somewhere (don’t move entities that rely/use their location, only move things like logic_timer/math_counter/logic_auto, etc), then compile the final version of the map. You can also open the vmf in Notepad, scroll through and use the “replace” function on entity names to change them into strings of random numbers/letters, which if done correctly will not affect the map at all, but make it harder for people to change any of the maps entities.

Now that sounds like something I could do. Thanks for the help.

Why do you care? You shouldn’t do any of this, if people want to learn from your map because you did something good, you should be willing to share, odds are you’ve compiled maps to look at them (probably the reason you know about it)

It’s also not hard to make a quick program that moves all the logic entities out of each other, and it’s easy to follow inputs and outputs because you can simple double click on an output, and it takes you to the corresponding input.

When you decompile a map, it usually does a poor job of it, which leaves the map very unoptimised, it is not recommended to recompile because of this…

People do anyways. Look at downtown

This isn’t really true anymore, I’ve decompiled some of my own (unreleased) maps since I lost the VMFs to them and short of it breaking brush entities like func_detail into many pieces and losing the visgroups it’s nearly a 1:1 copy that compiles again without incident.

It is better to keep people believing this in the long run as it should discourage lazy decompiles, but that obviously doesn’t stop anyone.

I do remember there being a way to have the user copy of the map entities only while only the server has the full copy of the map but I can’t recall how.

Include the VMF in the map download. Problem solved!

server-side lump files, the map is stripped of all entity logic and placed in a .lmp that is hosted on the server and cannot be downloaded (afaik)
The players will receive a .bsp that includes only brush geometry and models and stuff, no entities.

The game merges the .bsp and .lmp files and the map is fully functional when played on the server, but if you tried to run the map offline or decompile the map, it will be lacking all the entities that make it work.

Some servers like to do this with maps that are made specifically for their community, as to prevent other servers from taking their maps and using them, thus creating “community exclusive maps” which are fucking stupid.

I was trying to see if there were ways to corrupt a .bsp so that when decompiled, the .vmf would be corrupted, but it appears that making small changes to anything will just corrupt the map outright and crash your game.
Wanted to add nested quotation marks post-compile so that hammer would crash when they tried to open the vmf :c

Not everyone is willing to release their editable versions of their work, and that’s totally fine. Most people allow it if you just ask them anyways. It’s about the principle, not the action. It’s not the best feeling to have someone take your work and not get credit for any of it.

Seriously, it isn’t that hard to ask, and even less harder than it’s been since workshop allows one to actually be directly linked to the author’s steam profile.