Lump
Default lump type for lumps inside a BSP file.Constructor
index- Position in the lump tabletype- The lump type enum value
Methods
LumpType
Enumeration of all lump types used in BSP files across different versions.Common Lump Types
Static Methods
get (by name)
name- Lump name (e.g., “LUMP_ENTITIES”)bspVersion- BSP version to consider for version-specific lumps
- The matching
LumpType, orLUMP_UNKNOWNif not found
get (by index)
index- Lump table index (0-63)bspVersion- BSP version to consider
- The matching
LumpType, orLUMP_UNKNOWNif not found
Instance Methods
getIndex
getBspVersion
Example Usage
GameLump
Special lump type for game-specific lumps stored insideLUMP_GAME_LUMP.
Methods
getName
getFlags
setFlags
setCompressed
Common Game Lumps
| FourCC | Name | Description |
|---|---|---|
sprp | Static Props | Static prop placement |
prps | Prop Names | Static prop model names |
prpl | Prop Leaves | Static prop leaf associations |
LumpFile
Utility for loading and saving individual lumps from.lmp files.
Constructor
bsp- Parent BSP filebspVersion- BSP version for standalone usage
Methods
load
.lmp file. The version-less variant uses little-endian byte order.
Parameters:
file- Path to the.lmpfilebo- Byte order for reading
save
.lmp file.
Parameters:
file- Path to save the.lmpfile
getLump / setLump
LMP File Format
The LMP file header (20 bytes):| Offset | Type | Field | Description |
|---|---|---|---|
| 0 | int | lumpOffset | Offset to lump data (usually 20) |
| 4 | int | lumpIndex | Lump table index |
| 8 | int | lumpVersion | Lump version |
| 12 | int | lumpSize | Size of lump data |
| 16 | int | mapRevision | Map revision number |
Example Usage
Related
Entities
Entity classes and key-value handling
Structs
BSP file structures and data types