diff --git a/app.py b/app.py
index 34f3239..829a428 100644
--- a/app.py
+++ b/app.py
@@ -17,15 +17,18 @@ def index():
def get_guns():
updated_guns = []
for gun in guns:
+ original_damage = gun['damage']
# Calculate RPS, DPS, DPM, avgDPS
rps = gun['rpm'] / 60
- dps = gun['damage'] * rps
+ dps = original_damage * rps
reload_time_min = gun['reload_time'] / 60
- dpm = (gun['mag_size'] * gun['damage']) / (reload_time_min + (gun['mag_size'] / gun['rpm']))
+ dpm = (gun['mag_size'] * original_damage) / (reload_time_min + (gun['mag_size'] / gun['rpm']))
avg_dps = dpm / 60
+ total_damage = original_damage * gun['damage_multiplier']
# Add calculated stats to the gun data
gun.update({
+ 'total_damage': total_damage,
'rps': rps,
'dps': dps,
'dpm': dpm,
@@ -35,10 +38,12 @@ def get_guns():
return jsonify(updated_guns)
+
@app.route('/calculator')
def calculator():
return render_template('calculator.html')
+
@app.route('/about_us')
def about_us():
return render_template('about_us.html')
@@ -61,5 +66,6 @@ def average_dpm_calculation():
dpm = float(dpm_calculation())
return round(dpm / 60, 2)
+
if __name__ == '__main__':
- app.run(debug=True)
\ No newline at end of file
+ app.run(debug=True)
diff --git a/data.json b/data.json
index ffc45b1..a322098 100644
--- a/data.json
+++ b/data.json
@@ -112,7 +112,7 @@
{
"id": 12,
"name": "R870",
- "damage": 552,
+ "damage": 92,
"damage_multiplier": 6,
"rpm": 70,
"mag_size": 12,
@@ -122,7 +122,7 @@
{
"id": 14,
"name": "Scattergun",
- "damage": 232,
+ "damage": 58,
"damage_multiplier": 4,
"rpm": 300,
"mag_size": 7,
@@ -132,7 +132,7 @@
{
"id": 16,
"name": "Shorty",
- "damage": 116,
+ "damage": 29,
"damage_multiplier": 4,
"rpm": 185,
"mag_size": 8,
@@ -142,7 +142,7 @@
{
"id": 18,
"name": "AA12",
- "damage": 88,
+ "damage": 22,
"damage_multiplier": 4,
"rpm": 300,
"mag_size": 20,
@@ -412,7 +412,7 @@
{
"id": 46,
"name": "RC12",
- "damage": 200,
+ "damage": 50,
"damage_multiplier": 4,
"rpm": 225,
"mag_size": 10,
@@ -772,7 +772,7 @@
{
"id": 83,
"name": "SPAS-12",
- "damage": 192,
+ "damage": 24,
"damage_multiplier": 8,
"rpm": 150,
"mag_size": 8,
diff --git a/static/populateTable.js b/static/populateTable.js
index 02e7bac..5fb55e9 100644
--- a/static/populateTable.js
+++ b/static/populateTable.js
@@ -13,15 +13,14 @@ function populateTable(data) {
const row = table.insertRow();
row.insertCell(0).innerText = gun.id;
row.insertCell(1).innerText = gun.name;
- row.insertCell(2).innerText = gun.damage;
- row.insertCell(3).innerText = gun.damage_multiplier;
- row.insertCell(4).innerText = gun.rpm;
- row.insertCell(5).innerText = gun.mag_size;
- row.insertCell(6).innerText = gun.reload_time;
- row.insertCell(7).innerText = gun.guntype;
- row.insertCell(8).innerText = gun.rps.toFixed(2);
- row.insertCell(9).innerText = gun.dps.toFixed(2);
- row.insertCell(10).innerText = gun.dpm.toFixed(2);
- row.insertCell(11).innerText = gun.avg_dps.toFixed(2);
+ row.insertCell(2).innerText = gun.total_damage;
+ row.insertCell(3).innerText = gun.rpm;
+ row.insertCell(4).innerText = gun.mag_size;
+ row.insertCell(5).innerText = gun.reload_time;
+ row.insertCell(6).innerText = gun.guntype;
+ row.insertCell(7).innerText = gun.rps.toFixed(2);
+ row.insertCell(8).innerText = gun.dps.toFixed(2);
+ row.insertCell(9).innerText = gun.dpm.toFixed(2);
+ row.insertCell(10).innerText = gun.avg_dps.toFixed(2);
});
}
\ No newline at end of file
diff --git a/static/style.css b/static/style.css
index f51d8b2..b1c1878 100644
--- a/static/style.css
+++ b/static/style.css
@@ -7,6 +7,7 @@ body {
z-index: -1; /* Send the background behind the content */
font-family: Arial, sans-serif;
margin: 20px;
+ width: 100%
}
header nav {
@@ -114,7 +115,7 @@ nav {
/* Add a black background color to the top navigation */
.topnav {
position: absolute;
- right: 20px;
+ right: 50px;
top: 10px;
background-color: #333;
overflow: visible; /* Ensure dropdown content isn't clipped */
@@ -209,3 +210,8 @@ nav {
display: block;
}
}
+
+.about_us_text{
+ font-size: 20px;
+ width: 50%;
+}
\ No newline at end of file
diff --git a/templates/about_us.html b/templates/about_us.html
index 212f8c1..91b883b 100644
--- a/templates/about_us.html
+++ b/templates/about_us.html
@@ -47,7 +47,45 @@
-
+
+
+ About Us
+ Hey there! You seem to have stumbled upon the TRL Stat Page created by Fretux and Losernoob124!
+ Our Mission
+ This website exists because we want to provide the
+ TRL Community with an easy go-to way to calculate DPS and DPM values to help players make informed decisions
+ about their gameplay. Whether you're fine-tuning your new Deathwish Strategy or simply curious about firearm
+ performance, we’ve got you covered. If you have suggestions, feedback, or want to contribute new stats or
+ features, we’d love to hear from you, just contact us on Discord!
+
+ Our Story
+
+ In the beginning, the only way to calculate DPS/DPM stats for certain operatives was, by using the Spreadsheet
+ by Lanz1021 and a calculator, which quickly turned out to be (shockers) really annoying. TRL Stats started out
+ as a side project, initially started by Losernoob124 to calculate gun stats more easily, but given up one after
+ a couple of weeks. Eventually Fretux started working on it again and what initially was just a fun hobby grew
+ into something much bigger, and through the help of Stack Overflow and many hours of programming, we
+ turned it into a full-fledged website.
+
+ The Team
+
+ Fretux - Frontend Developer and Data Specialist. Responsible for the designing of the website and making
+ sure the gun stats are accurate and up to date.
+
+
+ Losernoob124 - Backend Developer. Responsible for all the scripts that make sure the website functions
+ correctly.
+
+ Frequently Asked Questions
+ How do you calculate DPS and DPM?
+ We put the data given by
+ Lanz1021's
+ Stat Sheet into a .JSON (Javascript Object Notation) file, which we use to calculate the DPS
+ (damage per second) and DPM (damage per minute) of each weapon via a formula that is also mentioned on Lanz1021' Spreadsheet.
+ How often are stats updated?
+ We update the weapon stats every time a new update is released for TRL.
+ Thank you for visiting TRL Stats.
+
\ No newline at end of file
diff --git a/templates/index.html b/templates/index.html
index d332a1b..2041337 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -57,7 +57,6 @@
ID |
Name |
Damage |
- Damage multiplier |
Rounds per minute |
Magazine Size |
Reload time |