TDEF

application/octet-stream

Safe

Magic Bytes

Offset: 0
54 44 45 46

Trigger Definition (TDEF) is a proprietary data format created for managing event-driven logic within specialized game engines and interactive simulation software. These files are primarily used to define conditions, actions, and scriptable behaviors that occur during real-time program execution. While the format is considered safe for standard use, it is largely legacy and has been superseded by modern engines that utilize integrated visual scripting or standardized metadata formats like JSON and YAML.

Extension

.tdef

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .tdef files in Python

Python
def is_tdef(file_path: str) -> bool:
    """Check if file is a valid TDEF by magic bytes."""
    signature = bytes([0x54, 0x44, 0x45, 0x46])
    with open(file_path, "rb") as f:
        return f.read(4) == signature

How to validate .tdef files in Node.js

Node.js
function isTDEF(buffer: Buffer): boolean {
  const signature = Buffer.from([0x54, 0x44, 0x45, 0x46]);
  return buffer.subarray(0, 4).equals(signature);
}
Go
func IsTDEF(data []byte) bool {
    signature := []byte{0x54, 0x44, 0x45, 0x46}
    if len(data) < 4 {
        return false
    }
    return bytes.Equal(data[:4], signature)
}

API Endpoint

GET /api/v1/tdef
curl https://filesignature.org/api/v1/tdef

Related Formats