TheStarport / FLHook

A Server Improvement for Freelancer.
GNU General Public License v3.0
30 stars 15 forks source link

FLHook - A Server Improvement for Freelancer

Build Discord Maintenance Website shields.io

Bugs Code Smells Coverage Duplicated Lines (%) Lines of Code Maintainability Rating Quality Gate Status Reliability Rating Security Rating Technical Debt Vulnerabilities

Installation

N.B. FLHOOK ONLY WORKS WITH THE 1.1 PATCH INSTALLED. USING IT WITH 1.0 WILL CRASH FLSERVER!

For the purpose of this readme, your Freelancer root installation folder (e.g. by default C:\Program Files (x86)\Microsoft Games\Freelancer) will be referred to as ..

  1. Copy all files from dist\$Configuration to your .\EXE directory. You may selectively remove some of the default plugins as desired.
  2. Edit .\EXE\dacomsrv.ini and append FLHook.dll to the [Libraries] section.
  3. Launch FLServer.exe, this should generate a fresh FLHook.json file.
  4. Edit this file as needed and relaunch FLServer.exe.

Plugin Installation

Typically, plugins are distributed as DLL files (or archives with a DLL and configuration files). The plugin DLL needs to be in .\EXE\plugins. Verify with the plugin's documentation for additional setup steps.

Configuration

All configuration options are found in .\EXE\FLHook.json and are documented therein. Note that plugins may create additional options, either in this file or elsewhere. Refer to the plugin's documentation for more information.

User Commands

User commands may be entered in game by every player in chat and can be enabled or disabled in the JSON config. Enter them in game to get a description, and use /help to list all of them.

Compiling

Starting with version 4.0, Visual Studio 2022 is required. To compile, simply build the solution as normal. The final build will be found in dist, whereas intermediate files are located in int and bin.

If you wish to develop a new plugin within the solution, please see our Plugin Development section in the docs.

If you would like the build process to copy FLHook as well as any enabled plugin, you may set the FLHOOK_COPY_PATH environment variable to your .\EXE directory. If it is not set, no such copy will occur. Unlike the dist folder structure, no configuration subfolder will be created, so Debug and Release builds will overwrite one another.

Compiling Instructions

  1. Install Visual Studio 2022, required toolchains/modules are: MSVC v142 (x86), C++ MFC for v142 build tools, C++ ATL for v142 build tools, C++/CLI support for v142 build tools.
  2. If you don't already have vcpkg installed and setup, do so. Instructions available here: https://github.com/microsoft/vcpkg/tree/master#quick-start-windows - Ensure you do the steps pertaining to Visual Studio.
  3. Clone this repository (git clone --recursive https://github.com/TheStarport/FLHook.git)
  4. Open project\FLHook.sln
  5. Ensure you are on Release (or ReleaseWithDebug for development) and build the solution.
  6. Build Solution. vcpkg should download a number of dependencies.

Contributing and Support

Merge requests are welcome. The old Forge SVN repositories are no longer tracked and will not be merged into this repository unless the commit author also creates a merge request here.

For any and all support, please join the Discord or visit the forums and look for the FLHook section. Github issues are available for bug reports and feature requests only.

Credits

Special thanks to:

FLHook uses a heavily modified version of flcodec.c.