I have done this about 5 years ago. I decided to write again to make something happened. In order to bring more competition, fun and get more players we should have ranking system on the main page! I made python code reflecting how ranking could be built. It would show server overall ranking with name (current rank has no name, which also could be added). Every time we login, we would get this rank, rank name, points showing. Same on the website, main page always reflecting ranking. My python output looks like this:
Rank | Rank Name | Points
------------------------------------------------------------
1 | Bin Collector | 1000
2 | Bus Stop Cleaner | 2037
3 | Bus Stop Roof Mechanic | 3113
4 | Ticket Beggar | 4230
5 | Bus Route Assistant | 5389
6 | City Bus Rider | 6591
7 | Public Transport Buff | 7838
8 | Bus Seat Arranger | 9132
9 | Ticket Validator | 10475
10 | Bus Driver's Apprentice | 11867
11 | Bus Engine Destroyer | 13312
12 | Bus Tire Replacer | 14812
13 | Bus Battery Enthusiast | 16367
14 | Trucker's Helper | 17981
15 | Truck Engine Tinkerer | 19655
16 | Bus Parking Attendant | 21392
17 | Freight Enthusiast | 23194
18 | Big Rig Navigator | 25064
19 | Bumper to Bumper Specialist | 27004
20 | Bus Engine Enthusiast | 29017
21 | One-Hand Tar Drizzler | 31105
22 | Street Sweep Specialist | 33271
23 | Curb Painting Master | 35519
24 | Sidewalk Cracker | 37851
25 | Concrete Layer Extraordinaire | 40271
26 | Pothole Plumber | 42781
27 | Hose and Asphalt Commander | 45385
28 | Drainage Technician | 48087
29 | Tarmac King | 50890
30 | Road Digger Extraordinaire | 53799
31 | Ship Anchor Hauler | 56816
32 | Docking Specialist | 59947
33 | Nautical Supply Handler | 63195
34 | Captain's Assistant | 66565
35 | Portside Cleaner | 70061
36 | Ship Docking Technician | 73688
37 | Cargo Commander | 77452
38 | Seaworthy Champion | 81356
39 | Hull Scrubber | 85407
40 | Captain of the Seas | 89610
41 | Train Track Paver | 93970
42 | Freight Train Lover | 98494
43 | Station Porter | 103187
44 | Railroad Dispatcher | 108057
45 | Express Route Strategist | 113109
46 | Passenger Train Enthusiast | 118351
47 | Locomotive Specialist | 123789
48 | Rail Roadmaster | 129431
49 | Intercity Conductor | 135285
50 | Train Logistics Manager | 141358
51 | Pilot Assistant | 147659
52 | Runway Sweeper | 154196
53 | Jet Fuel Monitor | 160978
54 | Flight Route Designer | 168015
55 | Air Traffic Controller | 175316
56 | Aircraft Operations Overseer | 182890
57 | Flight Manager | 190748
58 | Landing Gear Master | 198902
59 | Airport Logistics Director | 207360
60 | Aviation Strategist | 216136
61 | Logistics Coordinator | 225242
62 | Route Optimizer | 234688
63 | Supply Chain Specialist | 244489
64 | Freight Logistics Expert | 254657
65 | Warehouse Overseer | 265207
66 | Logistics Planner | 276152
67 | Operations Analyst | 287508
68 | Delivery Efficiency Expert | 299290
69 | Fleet Director | 311513
70 | Fleet Operations Manager | 324195
71 | Grain Distribution Mogul | 337352
72 | Coal Supply Boss | 351003
73 | Steel Plant Overseer | 365165
74 | Lumber Company Executive | 379859
75 | Ironworks Specialist | 395104
76 | Valuable Cargo Manager | 410920
77 | Raw Material Magnate | 427330
78 | Iron Ore Strategist | 444355
79 | Production Materials Overseer | 462018
80 | Steel Mill Tycoon | 480344
81 | Mail Logistics Coordinator | 499356
82 | Goods Transport Coordinator | 519082
83 | Parcel Distribution Director | 539548
84 | VIP Passenger Manager | 560781
85 | High-End Freight Specialist | 582810
86 | Luxury Transport Expert | 605666
87 | Passenger Relations Officer | 629378
88 | VIP Cargo Consultant | 653980
89 | Postal Distribution Head | 679504
90 | Global Transport Executive | 705986
91 | Passenger Transport Leader | 733460
92 | Luxury Travel Manager | 761965
93 | VIP Transport Guru | 791539
94 | Goods Flow Overseer | 822221
95 | International Transport Head | 854055
96 | High-Level Freight Director | 887082
97 | Mail Transport Visionary | 921347
98 | Passenger Network Coordinator | 956898
99 | Logistics Field Marshal | 993782
100 | BOSS | 1032048
code:
# Parameters
# formula is current_points += 1000 + (current_points * growth_rate)
# for example : rank1 = 1000, rank2 = rank1 + 1000 + growth_rate, rank3 = rank2 + 1000 + growth_rate...
# Ranking goes up to 1 million, can be adjusted with growth_rate.
start_points = 1000 # Points for rank 1
growth_rate = 0.0375 # Growth rate for exponential part (3.75% growth each rank)
total_ranks = 100 # Total number of ranks to calculate
# Rank names array (updated)
names = [
"Bin Collector", "Bus Stop Cleaner", "Bus Stop Roof Mechanic", "Ticket Beggar", "Bus Route Assistant",
"City Bus Rider", "Public Transport Buff", "Bus Seat Arranger", "Ticket Validator", "Bus Driver's Apprentice",
"Bus Engine Destroyer", "Bus Tire Replacer", "Bus Battery Enthusiast", "Trucker's Helper", "Truck Engine Tinkerer",
"Bus Parking Attendant", "Freight Enthusiast", "Big Rig Navigator", "Bumper to Bumper Specialist", "Bus Engine Enthusiast",
"One-Hand Tar Drizzler", "Street Sweep Specialist", "Curb Painting Master", "Sidewalk Cracker", "Concrete Layer Extraordinaire",
"Pothole Plumber", "Hose and Asphalt Commander", "Drainage Technician", "Tarmac King", "Road Digger Extraordinaire",
"Ship Anchor Hauler", "Docking Specialist", "Nautical Supply Handler", "Captain's Assistant", "Portside Cleaner",
"Ship Docking Technician", "Cargo Commander", "Seaworthy Champion", "Hull Scrubber", "Captain of the Seas",
"Train Track Paver", "Freight Train Lover", "Station Porter", "Railroad Dispatcher", "Express Route Strategist",
"Passenger Train Enthusiast", "Locomotive Specialist", "Rail Roadmaster", "Intercity Conductor", "Train Logistics Manager",
"Pilot Assistant", "Runway Sweeper", "Jet Fuel Monitor", "Flight Route Designer", "Air Traffic Controller",
"Aircraft Operations Overseer", "Flight Manager", "Landing Gear Master", "Airport Logistics Director", "Aviation Strategist",
"Logistics Coordinator", "Route Optimizer", "Supply Chain Specialist", "Freight Logistics Expert", "Warehouse Overseer",
"Logistics Planner", "Operations Analyst", "Delivery Efficiency Expert", "Fleet Director", "Fleet Operations Manager",
"Grain Distribution Mogul", "Coal Supply Boss", "Steel Plant Overseer", "Lumber Company Executive", "Ironworks Specialist",
"Valuable Cargo Manager", "Raw Material Magnate", "Iron Ore Strategist", "Production Materials Overseer", "Steel Mill Tycoon",
"Mail Logistics Coordinator", "Goods Transport Coordinator", "Parcel Distribution Director", "VIP Passenger Manager",
"High-End Freight Specialist", "Luxury Transport Expert", "Passenger Relations Officer", "VIP Cargo Consultant", "Postal Distribution Head", "Global Transport Executive",
"Passenger Transport Leader", "Luxury Travel Manager", "VIP Transport Guru", "Goods Flow Overseer", "International Transport Head",
"High-Level Freight Director", "Mail Transport Visionary", "Passenger Network Coordinator", "Logistics Field Marshal", "BOSS"
]
# Function to calculate points for each rank
# This function takes into account a starting point value (start_points) and an exponential growth rate (growth_rate).
# The function then adds a fixed number of points (1000) to the previous rank's points and calculates exponential growth.
# For each rank, we calculate the points needed to progress to the next rank.
ranks = []
current_points = start_points # Starting points for Rank 1
for i in range(total_ranks):
ranks.append([i + 1, int(current_points)]) # Store rank number and calculated points
current_points += 1000 + (current_points * growth_rate) # Apply the exponential growth and fixed 1000 points increase
# Print rank table with rank number, rank name, and points
print(f"{'Rank':<4} | {'Rank Name':<35} | {'Points'}")
print("-" * 60)
for i in range(100):
print(f"{i + 1:4} | {names:<35} | {ranks[1]}")
Thanks,
Constructor