I am not amazing. But here is the script if you want to use it...
Code: Select all
#!/usr/bin/env python
'''
Armagetron Scorebias Setter (ASS) v0.1
Replaces the scorebias you wasted time adjusting with the
slow, slow +/- keys. Wasted because Armagetron is absent-minded
and inevitably forgets. Wouldn't it be nice if your bias was
persistent and the score column was actually useful?
Ah, one can only dream...
This version only handles one server. Future versions will
allow you to keep a list of servers, ports, and individual
biases for each.
Just kidding, there is no future version.
Author: Get lost.
License: For what? There are more comments than code.
Date: 2013-12-05
'''
# The server you want
svr_address = "000.000.000.000"
# Open the file into a list
fn = open("frommaster.srv", "r")
x = fn.readlines()
# Find the server you want, then change the scorebias/score
for index, item in enumerate(x):
if item == "connection\t" + svr_address +"\n":
y = index + 8
z = index + 9
x[y] = "scorebias 1000\n"
x[z] = "score 0\n"
# Overwrite the file with changes
fn = open("frommaster.srv", "w")
for item in x:
fn.write(item)
fn.close()