Developed fully functional CLI-interface database management system which allows users to create users, add matches to database, modify details, and query relevant stats to allow people to perform analysis for professional matches in the popular game Valorant.
This project requires MySQL Server to be installed.
apt
sudo apt-get install mysql-serverpacman
sudo pacman -S mysqlIf you run the Btrfs filesystem, you should consider disabling copy-on-write for the database directory for performance reasons
chattr +C /var/lib/mysql/-
Start MySQL by running the following command
mysql -u <user_name> -p
You will then be prompted to enter your password.
-
Create a database named VALORANTANALYZER using the following commands. This will create a new user and grant access and modification priveleges to the new user.
CREATE DATABASE VALORANTANALYZER CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER '<user>'@'localhost' IDENTIFIED BY '<password>'; GRANT ALL PRIVILEGES ON dota.* TO '<user>'@'localhost'; exit
-
If you wish to, dump the sample database into VALORANTANALYZER from
core/SQLmysql -u <user> -p dota < dump.mysql
NOTE Using python 3 is heavily recommended. Older version might cause issues.
-
To use the CLI, you must install the necessary modules. You may make a virtual environment for this. Note that you are quite free to omit this step.
python3 -m venv <venv_name> source <venv_name>/bin/activate pip3 install -r requirements.txt
-
Next, create a
.envfile incore/Pythonand populate it with the following contents. Replace the relevant details.MYSQL_HOST=<host> # Usually localhost MYSQL_PORT=<port> # Usually 3306 MYSQL_USER=<uname> -
Change directories to
core/Pythonand run the program usingpython3 valorant_analyzer.py
-
Insert player into table (inserts player into table)
-
Update player rating in table (updates a player rank rating after taking player name and tag)
-
Update player region in table (updates a players account region)
-
Update the lore of given agent (updates the lore of an agent)
-
Delete player from database (deletes player from the players database)
-
Get all teams a player has been a part of (lists all team ids of the player)
-
Get all the matches a team has played (lists all match ids of the team)
-
Get the signature abilities of an agent (names signature abilities of agent)
-
Partial search match for agent (returns all agent name matches to string passed)
-
Partial search match for player name (returns all player name matches to string passed)
-
Logout
-
Get the round stats of a player (lists all the relevant stats of a player in a round)
-
Get total wins/losses of player
-
Get total wins/losses of a player for a particular agent
-
Get list of matches played between two teams (returns all match ids with both teams together)
-
Get a list of all players with k/d >= x
-
Get a list of all agents for a specific player with k/d >= x
-
Get a list of all agents for a specific player with winrate >= x
