Freelancer Universal Framework
  • C++ 97.7%
  • CMake 1.2%
  • Python 0.9%
  • PLpgSQL 0.2%
Find a file
2026-04-20 02:11:04 +02:00
.forgejo cicd: update install dependencies step 2026-04-14 18:01:29 +01:00
assets fix: ensure that user discriminators are generated properly 2026-03-17 16:09:17 +00:00
cmake chore: remove a collection of warnings and bad headers, update the assert statements to be clang-compatable 2026-04-13 19:39:25 +01:00
docs fix: setSaveDirectoryRelativeToExecutable now true by default 2026-04-19 12:50:00 +02:00
FLUF fix: ensure LuaContext can compile without MSVC compiler extensions enabled 2026-04-19 11:16:56 +01:00
module_tools ci: post-build script for module tools 2026-04-14 13:04:49 +01:00
modules chore: remove a collection of warnings and bad headers, update the assert statements to be clang-compatable 2026-04-13 19:39:25 +01:00
profiles cicd: apply squash - fixup cicd bulid process, disable nightly until new hardware provisioned 2026-03-28 14:50:47 +00:00
scripts feat: add basic implementation of the lua context 2026-04-18 19:58:12 +01:00
vendor chore: fix compile errors caused by mismatched SDK 2026-04-19 07:13:40 +02:00
.clang-format feat: update ui manager to take std::functions, add OnApplicationReady hook 2026-03-03 16:17:17 +00:00
.gitattributes feat: sort module load order, implement example modules 2024-11-08 11:06:40 +00:00
.gitignore chore: update post build to create .tar.xz file 2026-03-28 18:10:37 +00:00
.gitmodules refactor: delete old command code, import modern imcp module 2026-03-01 00:55:03 +00:00
cli.py Merge branch 'master' into flhook 2026-03-13 12:31:01 +01:00
CMakeLists.txt feat: add basic implementation of the lua context 2026-04-18 19:58:12 +01:00
CMakePresets.json cicd: apply squash - fixup cicd bulid process, disable nightly until new hardware provisioned 2026-03-28 14:50:47 +00:00
conan-linux.lock cicd: apply squash - fixup cicd bulid process, disable nightly until new hardware provisioned 2026-03-28 14:50:47 +00:00
conan-windows.lock cicd: apply squash - fixup cicd bulid process, disable nightly until new hardware provisioned 2026-03-28 14:50:47 +00:00
conanfile.py feat: add basic implementation of the lua context 2026-04-18 19:58:12 +01:00
LICENSE.md feat: sort module load order, implement example modules 2024-11-08 11:06:40 +00:00
metadata.rc.in fix: add missing resource string from Fixes.dll 2026-03-27 15:20:37 +01:00
PCH.cpp refactor: ensure shared PCH is working properly, begin implementing IServer hooks 2026-01-16 22:06:51 +00:00
PCH.hpp feat: fix up autobuy UI & messaging. Reverse engineer additional parts of UI controls 2026-03-07 23:01:33 +00:00
README.md chore: fix README.md typo 2026-04-20 02:11:04 +02:00
requirements.txt build: refactor cmake functions, implement FLHook conan requirements 2026-01-14 14:43:30 +00:00

Fluf Logo

N.B. This project is still in a pre-release state and likely contains bugs or issues that cause instability.

What is FLUF

FLUF is a client/server framework for the video game Freelancer (2003). It is designed to make the game easier to write C++ code edits for and provide a set of common utils and APIs. New code units are called 'modules' (to be distinct from FLHook plugins) and a collection of core modules are available within this repo, as well as some example ones provided.

Running

In the release packages there are a number of files. For basic (non-developer) usage, extract FLUF.dll and the crt files into your EXE folder of Freelancer and add FLUF.dll to dacom.ini after all the vanilla dlls (by default flmaterials.dll is the last in the list).

After running the game once, if loading was successful, there should be a yml file in your EXE folder created (assuming non-read only) which can be used to configure FLUF. At this point you can setup which modules FLUF loads and use, and you can extract the modules folder to the EXE folder from the release package, as well as the DATA files to your Freelancer DATA folder.

In the case of using FLUF.UI, the vanilla renderer or FLAR (OpenGL based renderer) is supported: Freelancer Advanced Renderer.

Documentation

Refer to docs: https://the-starport.com/forums/docs/fluf

Runtime Requirements

For general usage, it is assumed that the VS2022 Redists are installed on the system.

Building

Requirements

This project can be build on both Linux and Windows. Both assume that Python 3.11+ is installed.

For Windows you should have Visual Studio 2022 installed with all the latest libs. This project builds with the v143 toolchain and C++20.

You will need the 7z tool which can be installed via the installers on 7-zip.org. On Windows systems at least, you will need to add the location of the 7z binary to your PATH, e.g. C:\Program Files\7-Zip\. This must be done before running the cli.py dependencies step below.

Linux requires compilation to be done through MSVC Wine. Follow the instructions there for setting it up. Once setup in your directories of choice, add these to your .bashrc* (or convert to your shell of choice):

# MSVC
MSVC="PATH_TO_MSVC"
# e.g. MSVC="$HOME/msvc"
export MSVC
source $MSVC/bin/x86/msvcenv.sh

# User specific environment
if ! [[ "$PATH" =~ "$MSVC/bin/x86" ]]; then
    PATH="$MSVC/bin/x86:$PATH"
    PATH="$MSVC/bin:$PATH"
    PATH="$MSVC/kits/10/Lib/10.0.22621.0/um:$PATH"
    PATH="$MSVC/VC/Tools/msvc/14.41.34120/lib:$PATH"
fi
export PATH

For both Windows and Linux, once all the prerequisite steps are completed the build steps are the same and the following commands can be run:

pip install -r requirements.txt
python cli.py dependencies
python cli.py configure
python cli.py build

--help can be appended to configure and build to see additional options. Once these commands have been run you can open the folder with an IDE of your choice, like Visual Studio Code or CLion.

Post Build

On successful build, a python script will run that copies all of the build artefacts into the dist folder. If you set BINARY_COPY_DESTINATION in build.conf, it will also copy the entire contents of that folder to the specified destination directory. It must be an absolute directory, and any backslashes must be escaped.

GOTCHYAs & Troubleshooting

  • This project uses CMake presets, ensure that your IDE supports them and has any needed extensions. VSCode for instance, requires a CMake plugin in order to function.
  • When using CLion on Windows, the default toolchain is often not correct and overrides some of the conan build settings. Ensure that the active toolchain looks like this.
  • On Linux, if you get an error saying 'CMAKE_CXX_COMPILER not found' or similar, it is possible that your CLion is not reading from your .bashrc file and environment variables should be added to .profile instead.
  • In case of CMake errors, try updating to the latest version. At the time of writing, CMake version 4.2.3 works just fine.

Credits

FLUF would not be possible without all the work done by the Freelancer community over the last 2 decades. Changes from Adoxa's plugins, FLHook, FLHDE, and more have been incorporated into this codebase, and we couldn't have gotten this far without standing on the shoulders of giants.

  • Lazrius - Project Creator
  • Aingar - Co-Creator, significant help with reverse engineering and hook creation
  • JosByte - Helped with bug reports and porting over a number of old features
  • BeagleRush - Commissioned the RaidUI module
  • Nekomaru - Artist who created the icon
  • IrateRedKite - Testing