8000 GitHub - altair-sossai/l4d2-playstats-web: This application offers a ranking and statistics site for Left 4 Dead 2 matches using the "Left 4 Dead 2 Match Data API". It features player rankings, recent matches, and comparisons, available at https://l4d2.com.br/.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

This application offers a ranking and statistics site for Left 4 Dead 2 matches using the "Left 4 Dead 2 Match Data API". It features player rankings, recent matches, and comparisons, available at https://l4d2.com.br/.

Notifications You must be signed in to change notification settings

altair-sossai/l4d2-playstats-web

8000 Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Left 4 Dead 2 Match Stats and Ranking Site

This ASP.NET MVC application (net9.0) serves as a ranking and statistics site for Left 4 Dead 2 matches.

For an example of this site in action, visit the Brazilian community site at https://l4d2.com.br/.

Features

  • Ranking System: Utilizes data provided by the "Left 4 Dead 2 Match Data API" to create a comprehensive ranking system. API Repository
    • The ranking system is reset every two months by default, though this can be configured as needed.
    • Previous rankings can be consulted.
  • User-Friendly Interface: Displays rankings, latest matches, player rankings, and player comparisons in an intuitive and accessible format.
  • Brazilian Community: Currently available to the Brazilian community at https://l4d2.com.br/.
  • Steam API Integration: Requires a Steam developer key (SteamApiKey) to fetch player information. Instructions for creating a Steam API key are provided below.
  • Data Dependency: Directly relies on the "Left 4 Dead 2 Match Data API" to retrieve and display player data.
  • In-Game Integration: Can be opened directly within the game when used in conjunction with the l4d2_playstats_sync plugin. Configuration details for the plugin are provided below.
  • Connected Players Indicator: A flag in the site header shows how many players are currently connected to the server.
  • Language Support: The site currently supports English, Portuguese (Brazil), and Spanish.
  • Theme Support: The site offers both light and dark themes, providing users with the option to choose their preferred mode.
  • Technology Stack: Built using Bootstrap v3.4.1 and jQuery v1.12.4 to ensure compatibility with the in-game browser.
  • Responsive Design: The site is fully responsive and adapts to both desktop and mobile devices.

Requirements

1. Left 4 Dead 2 Match Data API

This API is responsible for receiving data generated by the l4d2_playstats plugin (GitHub Link), storing it in an Azure Storage Account table, and exposing the data through a REST API. You can find detailed setup instructions for this API at the following link: L4D2 PlayStats API Setup.

2. Valid Steam API Key

At times, the application needs to access player data such as profile pictures, names, profile URLs, and server details. A Steam API Key is required for integration with Steam. You can create your key through the following link: Steam API Key.

  1. Visit the Steam API key registration page.
  2. Log in with your Steam account.
  3. Register a new API key by providing a domain name.
  4. Copy the generated API key and set it in your project's configuration as SteamApiKey.

3. Hosting Environment

This application needs to be hosted on a Linux or Windows machine, or in a cloud environment capable of hosting .NET 9 applications. The publishing process depends on the chosen hosting environment, but generally, you will need to generate the binary for the project:

dotnet publish L4D2PlayStats.Web/L4D2PlayStats.Web/L4D2PlayStats.We
A551
b.csproj -c Release -o /path/to/output

4. Configuration

The application requires a configuration file named appsettings.json with the following structure:

{
  "ServerId": "",
  "PlayStatsApiUrl": "",
  "SteamApiKey": "",
  "ServerIPs": ""
}
  • ServerId: The server ID generated by the "Left 4 Dead 2 Match Data API."
  • PlayStatsApiUrl: The endpoint of the "Left 4 Dead 2 Match Data API."
  • SteamApiKey: Your Steam API Key.
  • ServerIPs: IP:Port of your servers. It's recommended to use only one server for simplicity.

Required Plugins

To ensure the ranking system works properly, the following plugins must be installed on your server:

1. l4d2_playstats_sync.smx

This plugin sends data generated by l4d2_playstats to the "Left 4 Dead 2 Match Data API." You need to configure the following CVARs:

confogl_addcvar sm_stats_writestats 1
confogl_addcvar playstats_url "URL_MATCH_DATA_API"
confogl_addcvar playstats_access_token "SERVER_ID:SECRET"

2. l4d2_ranking.smx

This plugin displays the ranking to players when they type !ranking in the chat. It also shows the ranking at the start of a new game. Configure the following CVAR:

confogl_addcvar ranking_url "URL_SITE_RANKING"

3. l4d2_show_patent_icon.smx (Optional)

This plugin displays the player's rank above their head at the start of a new game. Configure the following CVARs:

sm_cvar sv_downloadurl ""
sm_cvar sv_allowdownload 1
confogl_addcvar patent_icon_api_url ""
confogl_addcvar patent_icon_version 2
confogl_addcvar patent_icon_max_level 15

The sv_downloadurl should point to a FastDL URL. FastDL is essentially a public location where the Left 4 Dead 2 client can download necessary files, such as the rank icons in this case. Currently, I use a public container within an Azure Storage Account for this purpose, but you can configure it however you prefer. The rank icon files can be found here: Patents Assets.

Example Screenshots

Below are some example screenshots showcasing the features of the site available at https://l4d2.com.br/.

Ranking Interface (Dark Mode)

The dark mode theme provides a visually appealing interface, reducing eye strain during night-time use.

Ranking Interface (dark mode)

Ranking Interface (Light Mode)

For users who prefer a brighter interface, the light mode offers a clean and modern design for viewing rankings and stats.

Ranking Interface (light mode)

Last Matches

Quickly view recent match results, including player performance and match statistics in an organized format.

Last Matches

Player Comparison

Compare the performance of different players, analyzing key stats side by side to see who performed better.

Player Comparison

Player Rank Displayed In-Game

View a player’s ranking directly in-game, providing seamless integration between the website and gameplay.

Player Rank Displayed In-Game

About

This application offers a ranking and statistics site for Left 4 Dead 2 matches using the "Left 4 Dead 2 Match Data API". It features player rankings, recent matches, and comparisons, available at https://l4d2.com.br/.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0