LeviSnoot / FNFest-Status

Updates your current status in Fortnite Festival.
MIT License
4 stars 1 forks source link
fn-fest fnfestival fortnite fortnite-festival

FNFest-Status

Monitor and display the status of Fortnite Festival events.

Features

What does it do?

You can use the demo web app I created to add a "Now Playing" widget to your streams by adding it as a Browser Source in OBS (further insctructions below)

The script (playerStatus.py) simply reads your Fortnite log file (located in %localappdata%\FortniteGame\Saved\Logs\FortniteGame.log) and filters it for known events relating to Fortnite Festival. It calls on a cached version of the public Fortnite Festival Content API to match song ID's from the log to their metadata such as track and artist names.

Prerequisites

Installation

  1. Clone the repository
    git clone https://github.com/LeviSnoot/FNFest-Status.git
    cd FNFest-Status
  2. (Optional, but recommended) Create a virtual environment
    python -m venv venv
    .\venv\Scripts\activate
  3. Install the required dependencies
    pip install -r requirements.txt

Config

Creating config file

Copy config-example.ini and rename it to config.ini.

Port number

If you have a service already running on port 5000, change the port value under [obswidget] -> port to whatever you'd like. You'll be able to access the web app at http://127.0.0.1:<port-number>.

Discord Client ID

If you plan to use the Discord Rich Presence, you first need to create an application in the Discord Developer Portal (a guide is provided in the Discord Rich Presence section). You'll find the Client ID of your application in the Oath2 section of your app.

Replace the dummy value under [DISCORD] -> client_id with the actual Client ID of your application.

Usage

Run main.py to start the status monitor. This will only be useful if you're debugging or developing other uses that leverage the resulting status.json file that is created.

python main.py 

If you run main.py with the CLI options --web and/or --discord you will have a lot more useful functionality, which is further described in the Stream Widget and Discord Rich Presence sections.

python main.py --web --discord

The script currently works best if you start it after Fortnite has launched and you're in the lobby. I plan to make it work more robustly as a background service in future updates.

Stream Widget

Image: Stream Widget running from a 720x420px browser window.

Once you've started main.py with --web, add a browser source in OBS (or any other streaming software that supports browser sources).

URL: http://127.0.0.1:<port-number>

Width: 520px

Height: 420px

FPS: 60

Leave everything else default, including Custom CSS.

NOTE: The width and height values are the minimum required to display info properly. Extending the height won't really affect anything but you can (and probably should) set the width to anything over 520px. I recommend setting the width to 720px as this will display most song titles without truncation.

Discord Rich Presence

pypresence

To show your status in Fortnite Festival in Discord, you need to launch main.py with --discord. But some setup is going to be required first. Here's what you need to do:

  1. Create a new Application in Discord's Developer Portal. You should name this application "Fortnite Festival", as the name of the app affects how the presence is displayed.
  2. (Optional) You can upload an app icon which will be displayed in idle states.
  3. Copy the Client ID from the OAuth2 tab on the left side of your application, and paste it into your config.ini as described in the Config section.

Updating

Just pull the repo for now. If you don't know how to do this, just navigate to where you first cloned the repo, and in that directory, do:

git pull

Roadmap

Check the Projects section.

Known issues

Disclaimer

This project is not affiliated with, endorsed by, or in any way associated with Epic Games, Fortnite or Discord. All product names, trademarks, and registered trademarks are property of their respective owners.

License

This project is licensed under the MIT License. See the LICENSE file for details.