A native Delphi/Object Pascal implementation of a Fallout 2 SSL script compiler that produces binary-compatible .int files.
- Complete SSL Parser - Handles all Fallout 2 scripting syntax
- Lexer/Tokenizer - Full lexical analysis with error reporting
- AST Generation - Clean Abstract Syntax Tree architecture
- Bytecode Generator - Produces Fallout 2 virtual machine opcodes
- INT File Writer - Creates binary-compatible .int files
- Built-in Function Database - Supports 100+ Fallout 2 script functions
- Preprocessor - Supports
#include,#define,#ifdef/#ifndef/#else/#endif - CLI Compiler - Command-line interface (
sslc.exe) - VCL GUI - Optional Windows GUI frontend
procedure start begin
display_msg("Hello Wasteland");
end
if (local_var(0) == 1) then begin
give_exp_points(100);
end
while (counter < 10) do begin
counter := counter + 1;
end
switch (flag_value) begin
case 1: display_msg("Case 1"); break;
case 2: display_msg("Case 2"); break;
default: display_msg("Default");
endThe compiler supports C-style preprocessor directives:
#define NPC_REACTION_VAR 7
#include "headers/define.h"
#ifdef DEBUG_MODE
display_msg("Debug mode enabled");
#endif#define/#undef- Define/remove macros#include- Include other script files (both"file"and<file>syntax)#ifdef/#ifndef/#else/#endif- Conditional compilation
- Delphi 12 Athens or newer (Win64 target)
- Windows 10/11
- Open
sslc.dprojin Delphi IDE - Select Win64 platform
- Build (Shift+F9)
- Output:
bin\sslc.exe
- Open
FalloutCompiler.dprojin Delphi IDE - Select Win64 platform
- Build (Shift+F9)
- Output:
bin\FalloutCompiler.exe
# Compile single file
sslc.exe script.ssl
# Specify output directory
sslc.exe -o output\ script.ssl
# Verbose output
sslc.exe -v script.ssl- Run
FalloutCompiler.exe - Click Open to load an .ssl file
- Click Compile to compile
- View output in the right panel
Source (.ssl)
↓
[Preprocessor] → Processed source (macros expanded, includes resolved)
↓
[TLexer] → Tokens
↓
[TParser] → AST (Abstract Syntax Tree)
↓
[TBytecodeGenerator] → Bytecode
↓
[TINTWriter] → Binary .int file
| Unit | Description |
|---|---|
uBuiltins.pas |
Built-in function database and opcode definitions |
uLexer.pas |
Tokenizer for SSL syntax |
uAST.pas |
Abstract Syntax Tree node types |
uParser.pas |
SSL parser producing AST |
uBytecode.pas |
Bytecode generator |
uINTWriter.pas |
Binary INT file writer |
uPreprocessor.pas |
C-style preprocessor (#include, #define, etc.) |
uCompiler.pas |
Main compiler orchestration |
sslc.dpr |
CLI entry point |
FalloutCompiler.dpr |
GUI entry point |
Generated .int files are compatible with:
- Fallout 2 (original)
- Fallout Et Tu (UP+)
- sfall / mods using standard INT format
Example scripts are in TestScripts\:
hello.ssl- Basic display messagevariables.ssl- Variable usage and conditionalsskillcheck.ssl- Skill check exampletest_include.ssl- Include directive example
MIT License
This is a functional compiler, not a mock implementation. All systems are designed for real Fallout 2 modding workflows.
See CHANGELOG.md for detailed change history.