Skip to content

web site for Freelancer Discovery community to provide info about game stuff for players. It is able to switch between SSG and SSR ways to run it.

License

Notifications You must be signed in to change notification settings

darklab8/fl-darkstat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

how it looks

Description

online version of the flstat to navigate game data of the game Freelancer. You can see data about Bases, Guns, Ships and multiple other stuff.

It is able to work in two mods:

  • Static Site Generator to build html/css/js files to deploy them for example to github pages (In this way runs for Freelancer Vanilla and FLSR)
  • Live web backend for more nearly real time update of content (useful for Discovery). Cached behind CDN to run smmothly

See demos:

Contains sub projects

  • darkcore Readme - reusable web part for freelancer related web tools. We can say it is filling same niche as "Framework" in normal projects.
  • darkrelay - subproject to make darkstat having dynamic backend, which helps to break limitations of a static site generator which darkstat originally started as.
  • configs - ORM library to access configs data.

Support

  • It was made in mind with supporting Freelancer Discovery as first order.
  • Support is extended to Vanilla version.
  • Any other mode will be supported on request, see contacts to get in touch.
    • things were tested for HD edition at some point of time
    • for Freelancer Sirius Revival at some point of time
    • for Open Sirius at some point of time

Development setup

The project assumes

  • u are working with it through VSCode IDE, and having installed Go extension
  • And having templ extension
  • we use VScode's way to inject env var "ENVERANT_ENV_FILE": "${workspaceFolder}/.vscode/enverant.json" for terminal, debugging and test running configurations in order to use all dev env variables specified in enverant.json file
  • Your var CONFIGS_FREELANCER_FOLDER must point to existing root of a Freelancer game. Which can be Freelancer Vanilla, Discovery or FLSR at this point.
  • Succesful configuration IDE assumes u are able to run in debug mode prject in web mode at least as it is specified in launch.json
    • And u are able to launch specific unit tests in debug mode by clicking in IDE onto green appeared arrows at the left from test function names. Vscode uses "go.testEnvVars" in settings.json to inject the same enverant.json for the functioning of tests.

General instruction:

  • git clone the repo https://github.com/darklab8/fl-darkstat.git
  • install golang of project version or higher (potentially will work anyway).
  • install templ
    • go install github.com/a-h/templ/cmd/templ@latest
    • check specific version in go.mod
    • In case of emergency we could use vendored in version perhaps
  • check environment variables to set
    • set your own environment variable FREELANCER_FOLDER to Freelancer Folder
    • ensure it was set. echo $FREELANCER_FOLDER at Linux or echo %FREELANCER_FOLDER% at windows
    • Check to have set other values from enverant.json
    • full list of variable possible to set available in help command go run . help
  • install Taskfile and check commands to run
    • run some command, for example task web
  • if u wish access to task dev:watch that reloads running web server on file changes, then install pip install watchdog[watchmedo] and ensure watchmedo binary is available to task dev:watch command written in Taskfile

If u have problems with configuring development environment, then seek my contacts below to help you through it ^_^

Development, how to regenerate proto related code

  • task grpc:docker:gateway // for docker way to run file updates for grpc and its gateway // assumes docker is available of unix socket
  • task grpc:protoc:gateway // to run grpc file updates locally without docker. // assumes u did same stuff as protoc stage in Dockerfile

Features

  • Long term maintance support for dozen of years. Minimum dependencies software with Golang and Htmx.
  • full GitOps. On commit push to redeploy it automatically
  • scans Freelancer folder and builds to static assets (html/css/js) deployable to Github pages or any other static assets serving place.
  • Usable locally for Linux and Windows.
  • Cross mod support is available
    • Freelancer Discovery
    • Vanilla Freelancer
    • Freelancer Sirius Revival
    • may be will working for any other mod, if not, then request support

Darkstat has API access

JSON rest one, with swagger documentation

Alternatively we offer Client generation through gRPC!

  • With gRPC you can export our proto file and generate client with precise data structs and methods of API for your any language! Be it C#, Javascript, Python or even C++
    • Full list of supported languages here https://grpc.io/docs/languages/
    • You get static typing validations
    • You get performance boosts from using grpc compression stuff
    • We change server side smth? Just regenerate the lib to keep up with updates ^_^
    • Import darkstat proto file for its usage and generate client lib from it with protoc command
    • addresses to connect:
      • for local instance localhost:50051, or optionally unix socket /tmp/darkstat/grpc.sock at linux for extra performance boosts.
      • for deployed instances for discovery and vanilla, they are hosted over darkgrpc.dd84ai.com and darkgrpc-vanilla.dd84ai.com accordingly. 80 and 443 ports accordingly
      • see example in golang of interacting with grpc if desired
      • up to date exposed grpc domains can be found in this file as rpc_prefix + zone combination
    • Make sure to set in your client option to increase accepting data size grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(32 * 10e6)).
    • NOTE: By default Grpc goes through grpc endpoint and uses compression of Protocol Buffers. Ability to go Json in API Gateway (for which Swagger documentation is provided) is ONLY FALLBACK for situations when people unable to go gRPC native way. If you will go through gRPC getting started instruction, u will receive automatically for your language client generated to utilize Protocol Buffers

What makes different from regular flstat

  • Obviously online
  • i also added at last Commodities view with prices per volume ^_^ better reflecting situation for Freelancer Discovery.
  • It is interesting to see in Ship details exact Hp Types of equipment you can install onto ship. Other tabs like Guns, Shields, Engines show those Hp Type, so u could find equipment exactly supported for your Light Fighter, Heavy Fighter, Gunboat, Cruser or whatever (u can sort by column to find all such equipment)
  • Tractors tab has info regarding Discovery IDs and where to buy them ^_^
  • other extra tabs like Engines, CMs added
  • Tabs for different equipment could be showing more full list of equipment in "Show all" mode.
  • Has searching/filtering options with multiple matching items shown
  • You can pin items for comparison
  • For Discovery Freelancer, u can select ID/Tractor and having guns/ships etc filtered/shown according to what your ID can use without power core regeneration debuffs. Shows ID compatibility (75% ID compatibility at any equiped item will mean having only 75% of Power core regeneration)
  • For up to date list of different features read its embedded documentation at "Docs" tab

Usage

Local usage

  • download latest from https://github.com/darklab8/fl-darkstat/releases , they are autobuilt from CI, so they will be always there.
  • put file into root of Freelancer folder and start
    • optionally launch from anywhere, just add env variable FREELANCER_FOLDER with location to freelancer folder root.
  • visit http://localhost:8000/ as printed in console to see web site locally
  • Launching from cmd or any other console at Freelancer folder path is preferable. Because u will see detailed log output.
    • optionally see all list of possible env vars and sub commands by running darkstat help command

P.S. The tool uses lazy filesystem approach by grabbing first file with matching name. I did not use full paths. So don't have folder "DATA2" duplicating all files in same Freelancer folder

Docker usage

  • Docker releases are available too. tag production is latest stable and running in prod.
  • Configuration for its running check in terraform infra code of module darkstat
    • you need to point at least volume -v /data:/path_to_frelancer_folder
    • and point required environment variables as described there
      • get full list of possible environment variables and commands with command like docker run -it darkwind8/darkstat:production help
    • docker images are built for amd64 and arm64 :)

Acknowledments

Contacts

See anouncements at Discovery Freelancer forum thread

License

fl-darkstat was originally created by Andrei Novoselov (aka darkwind, aka dd84ai) The work is released under AGPL license, free to modify, copy and etc. as long as you keep code open source and mentioned original author. See LICENSE file for details.

About

web site for Freelancer Discovery community to provide info about game stuff for players. It is able to switch between SSG and SSR ways to run it.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •