BSPSource can detect various anti-decompilation protection methods used by mappers to prevent reverse engineering of their maps. Understanding these methods helps you know what to expect from decompiled output.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ata4/bspsrc/llms.txt
Use this file to discover all available pages before exploring further.
Protection Methods
BSPSource detects six different protection methods:1. VMEX Entity Flag (no_decomp)
Detection: Entity withno_decomp keyvalue
2. VMEX Texture Flag (tools/locked)
Detection: Presence oftools/locked texture in texture list
Purpose: Signals that the map is protected against decompilation
Impact: Low - BSPSource ignores this flag
Detection in code:
3. VMEX Protector Brush Flag
Detection: Three specific brushes with exact dimensions:- Brush 1: 1×4×9 units
- Brush 2: 4×9×1 units
- Brush 3: 9×1×4 units
- All sides use the same texture
- Brushes are axis-aligned
- All three must exist together
Protected brushes are written to a separate func_detail entity in the “VMEX protector brushes” visgroup.
4. BSPProtect Entity Encryption
Detection:entities.dat file in pakfile
Requirements:
- BSP version 20 (Source 2007/2009)
- ICE-encrypted entity lump
5. IID Entity Obfuscation
Detection: All entity targetnames are numeric6. IID Nodraw Texture Hack
Detection: >90% of brush sides use nodraw texture (texinfo = 0) Purpose: Corrupts texinfo optimization to break texture reconstruction Impact: High - Most textures will be incorrect or missing Detection in code:Protection Check
Run protection detection before decompilation:Protection Constants
Handling Protected Maps
Skip Protection Check
Protected Entity Handling
Protected entities are marked in visgroups:Protected Brush Handling
Protected brushes are written separately:Protection Method Details
Brush Protection Algorithm
Protector brushes are detected using these checks:Nodraw Detection Algorithm
Protection Impact Summary
| Method | Impact | Recoverable |
|---|---|---|
| VMEX entity flag | Low | Yes |
| VMEX texture flag | Low | Yes |
| VMEX protector brushes | Low | Yes |
| BSPProtect encryption | High | No |
| IID entity obfuscation | Medium | Partial |
| IID nodraw hack | High | No |
Configuration Example
Working with Protected Maps
VMEX flags detected
VMEX flags detected
These are informational markers. Decompilation will work normally. Protected elements are marked in visgroups for reference.
BSPProtect encryption detected
BSPProtect encryption detected
Entity data is unrecoverable. You can still extract brush geometry and worldspawn, but all other entities will be missing or incomplete.
Nodraw hack detected
Nodraw hack detected
Textures are severely corrupted. You can reconstruct geometry but will need to manually re-texture most surfaces. Use
faceTexture override for debugging.Entity obfuscation detected
Entity obfuscation detected
Entities will decompile but targetnames are meaningless numbers. You’ll need to manually reconstruct logical entity relationships.
Bypassing Protection
BSPSource intentionally ignores VMEX-style flags (entity, texture, brush) as these are informational rather than technical protections. What can be bypassed:- VMEX flags (automatically ignored)
- Protector brushes (flagged but decompiled)
- BSPProtect encryption (requires decryption key)
- Nodraw hack (texture data is corrupted)
- Entity obfuscation (targetnames are lost)
Related Topics
- Texture Options - Fixing corrupted textures
- Embedded Files - Detecting encrypted pakfile content
- Entity Handling - Understanding entity reconstruction
Protection Detection Output
When protection is detected, BSPSource logs:bspprot.getProtectionMethods() to get a formatted list: