How eezstreet/swateliteforce works
Project Type and Purpose
• This is a large-scale Unreal Engine 2 mod (“SWAT: Elite Force”) that overhauls SWAT 4’s gameplay, AI, assets, UI and multiplayer.
• It bundles UnrealScript source, compiled script classes, game assets, configuration files, build scripts, editor extensions and launchers into a cohesive mod that plugs into the SWAT 4 engine.
File Structure Analysis
• Top level
– CompileSource.bat, GenerateMD5.bat, LaunchSEF.bat/LaunchSwatEd.bat, Dedicated Server.bat – build/run scripts and wrappers.
– README.md, LICENSE.md, CHANGELOG.md, Reversing Notes.txt – docs.
• Content/Classes
– Pre-compiled UnrealScript classes (.u) and art assets (meshes, textures).
• Extras
– Editor extensions, source zips, helper executables.
• Source
– /Game – mod logic organized in feature subsystems (AICommon, Gameplay, Scripting, SwatAICommon, SwatEquipment, SwatGame, SwatGui, etc.).
– /Unreal – engine core and editor source trees (Core, Engine, Editor, GUI, IpDrv, SwatEd, UWindow, IGEffectsSystem, etc.).
• System
– .ini configuration files, localization, master server and gameplay tuning.
• .gitattributes, .gitignore – VCS settings.
Key README Insights
• Build pipeline: UnrealScript compiler invoked via CompileSource.bat → outputs .u files into System/.
• Runtime launch: LaunchSEF.bat starts the game with modded scripts and content; LaunchSwatEd.bat starts the SWAT editor with mod extensions.
• Code style: tabs vs spaces, brace conventions, naming conventions – UnrealScript standards.
• Mod logic divided into Campaign, QMM, AI improvements, equipment subsystems, GUI improvements, networking & admin.
1. Unreal Engine Core
– Engine binary (Swat4X.exe) & subsystems (Renderer, Physics/Havok, Audio, Networking, Scripting VM).
2. Editor Module
– SwatEd.exe + editor classes/plugins in Extras/ and Source/Unreal/SwatEd
3. Mod Source Code
– /Source/Game: gameplay subsystems (AI, Equipment, GUI, Campaign, Scripting)
– /Source/Unreal: shared engine enhancements supporting mod (UnrealEd, Core tweaks)
4. Build Tools
– CompileSource.bat → UnrealScript compiler → .u output in System/
5. Content Assets
– Content/Classes: compiled .u script classes, art assets (meshes, textures)
6. Configuration
– System/*.ini: tuning, campaign definitions, traps, objectives, multiplayer settings
7. Launch Scripts & Utilities
– LaunchSEF.bat, Dedicated Server.bat, Extras/LaunchSEF.exe, GenerateMD5.bat
8. Networking & Admin
– WebAdmin HTTP service (port 6000), JSON endpoints, master server browser plugin, GameRanger integration
• Build tools → compile .uc (Source/Game + Source/Unreal) → produce .u (System/ + Content/Classes)
• Engine Core loads:
– Script VM loads .u classes
– Renderer/Physics/AUDIO load assets & effects
– System .ini applies configuration
• Launch Scripts invoke Engine with mod search paths (SEF/System, SEF/Content)
• Editor Module loads same engine core with editing plugins to modify Content/Classes & System configs
• Networking components communicate with external services:
– Master server (Swat4Stats, GameSpy legacy)
– WebAdmin HTTP interface (in-game / out-of-game monitoring)
– GameRanger (third-party lobby)
c. Architectural Patterns & Principles
• Plugin/Extension pattern: mod code and assets live side-by-side with engine code, loaded at runtime.
• Modular subsystems: AI, Gameplay, Equipment, GUI, Networking separated into logical packages under Source/Game.
• Separation of concerns:
– Build layer (compilation)
– Runtime engine layer
– Content/data layer (assets + configs)
– Tooling layer (editor, scripts)
• Use of external configuration (.ini, XML) for tuning and localization → supports flexibility and non-rebuild changes.
d. Key Technologies & Frameworks
• Unreal Engine 2 / UnrealScript (.uc, .u)
• Havok physics integration
• Windows batch scripting (.bat) and custom launcher executables
• HTTP/WebAdmin service for server-side administration
• GameRanger and master-server protocols for matchmaking