Skip to content

Commit

Permalink
updated messages, tracks and cars list and instance form to v6 of ser…
Browse files Browse the repository at this point in the history
…ver specs
  • Loading branch information
gotzl committed Jan 5, 2020
1 parent 8ebdfc7 commit 0211a7c
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 20 deletions.
36 changes: 23 additions & 13 deletions accservermanager/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,49 @@
"adminPassword": "Password to elevate via \u201cServer admin commands\u201d",
"allowAutoDQ": "If set to 0, the server won\u2019t automatically disqualify drivers, and instead hand out Stop&Go (30s) penalties. This way a server admin / race director has 3 laps time to review the incident, and either use /dq or /clear based on his judgement.",
"ambientTemp": "Sets the baseline ambient temperature in \u00b0C, see \u201cRace weekend simulation\u201d",
"centralEntryListPath": "Can override the default entryList path \u201ccfg/entrylist.json\u201d, so <hr/><a name=5></a> multiple ACC servers on the machine can use the same entrylist (and custom car files). Set a full path like \u201cC:/customEntryListSeriesA/\u201d, where the entrylist is stored. Attention: The path seperators have to be slashes (/), backslashes (\\) will not work.",
"centralEntryListPath": "Can override the default entryList path \u201ccfg/entrylist.json\u201d, so multiple ACC servers on the machine can use the same entrylist (and custom car files). Set a full path like \u201cC:/customEntryListSeriesA/\u201d, where the entrylist is stored. Attention: The path seperators have to be slashes (/), backslashes (\\) will not work.",
"cloudLevel": "Sets the baseline cloud level, see \u201cRace weekend simulation\u201d. Values (0.0, 0.1, \u2026. 1.0)",
"customCar": "If set to a filename, the car, team and appearance will be used no matter what the user chose (Exception: overrideCarModelForCustomCar). This is useful for leagues and events, where we want consistent car appearance and the chosen car model for the corresponding driver/team. The custom car file has to be located in a \u201ccars\u201d folder next to the entrylist.json (also works for centralEntryListPath). Leave blank (\u201c\u201d, =default) to let the user chose the car via car selection UI.",
"dayOfWeekend": "Race weekend day: 1 = Friday, 2 = Saturday, 3 = Sunday; see <a href=\"https://www.assettocorsa.net/forum/index.php?threads/the-server-admin-handbook-thread.58245/\">Race weekend simulation\u201d.</a>",
"defaultGridPosition": "If set to a value of 1 or greater, this car will obtain this grid position if a race starts without any qualifying session before (e.g. P -&gt; R). <hr/><a name=14></a><img src=\"ServerAdminHandbook_v3-14_1.jpg\"/>",
"driverCategory": "Bronze/Silver/Gold/Platinum category, if \u201coverrideDriverInfo\u201d is set to 1. See <a href=\"https://www.assettocorsa.net/forum/index.php?threads/the-server-admin-handbook-thread.58245/\">\u201cDriver Category list\u201d</a> for values",
"dayOfWeekend": "Race day (1 = Friday, 2 = Saturday, 3 = Sunday) \u2013 relevant to the grip and weather simulation.",
"defaultGridPosition": "If set to a value of 1 or greater, this car will obtain this grid position if a race starts without any qualifying session before (e.g. P -&gt; R). <hr/><a name=16></a><img src=\"ServerAdminHandbook_v6-16_1.jpg\"/>",
"driverCategory": "Bronze/Silver/Gold/Platinum category, if \u201coverrideDriverInfo\u201d is set to 1. See<a href=\"https://www.assettocorsa.net/forum/index.php?threads/the-server-admin-handbook-thread.58245/\"> \u201cDriver Category list\u201d</a> for values",
"driverStintTimeSec": "Defines the maximum time a driver can stay out without getting a penalty. Can be used to balance fuel efficient cars in endurance races. The stint time resets in the pitlane, no real stop is required. -1 will disable the stint times.",
"drivers": "List of drivers, see next table. Must at least contain one driver with the SteamId",
"dumpEntryList": "Will save an entry list at the end of any Qualifying session. This can be a quick way to collect a starting point to build an entry list, and is a way to save the defaultGridPositions which can be used to run a race without Qualifying session and predefined grid. Also see the corresponding admin command.",
"dumpLeaderboards": "If set to 1, any session will write down the result leaderboard in a \u201cresults\u201d folder (must be manually created). See <a href=\"https://www.assettocorsa.net/forum/index.php?threads/the-server-admin-handbook-thread.58245/\">\u201dSession results\u201d</a>",
"entries": "List of entries, see next table",
"firstName": "First name of the driver, if \u201coverrideDriverInfo\u201d is set to 1",
"forceEntryList": "Will reject drivers that are not in the entry list. Default is 0, which allows the partial definition of entries in a \u201cnormal\u201d server configuration. Cannot be used on public servers.",
"forcedCarModel": "If not set to -1: user cannot join with a different car, see \u201cCar model list\u201d for the values",
"hourOfDay": "Session starting hour of the day (values 0 - 23) <hr/><a name=7></a>",
"isRaceLocked": "If set to 0, the server will allow joining during a race session. Is not useful in <a href=\"https://www.assettocorsa.net/forum/index.php?threads/the-server-admin-handbook-thread.58245/\">\u201cPublic Multiplayer\u201d</a>, as the user-server matching will ignore ongoing race sessions.",
"hourOfDay": "Session starting hour of the day (values 0 - 23)",
"isMandatoryPitstopRefuellingRequired": "Defines if a mandatory pitstop requires refuelling.",
"isMandatoryPitstopSwapDriverRequired": "Defines if a mandatory pitstop requires a driver swap. Will only be effective for cars in driver swap situations; even in a mixed field this will be skipped for cars with a team size of 1 driver.",
"isMandatoryPitstopTyreChangeRequired": "Defines if a mandatory pitstop requires changing tyres.",
"isRaceLocked": "If set to 0, the server will allow joining during a race session. Is not useful in <a href=\"https://www.assettocorsa.net/forum/index.php?threads/the-server-admin-handbook-thread.58245/\">\u201cPublic Multiplayer\u201d</a>, as the user-server matching will ignore ongoing race sessions. <hr/><a name=5></a>",
"isRefuellingAllowedInRace": "Defines if refuelling is allowed during the race pitstops.",
"isRefuellingTimeFixed": "If set to true, any refuelling will take the same amount of time. If turned off, refuelling will consume time linear to the amount refuelled. Very useful setting to balance fuel efficient cars, especially if combined with other features.",
"isServerAdmin": "If set to 1, that user will be automatically elevated to server admin when he joins.",
"lanDiscovery": "Defines if the server will listen to LAN discovery requests. Can be turned off for dedicated servers.",
"lastName": "Last name of the driver, if \u201coverrideDriverInfo\u201d is set to 1",
"maxClients": "The maximum amount of connections a server will accept at a time. If you own the hardware server, you can just set any high number you want. If you rented a 16 or 24 slot server, your Hosting Provider probably has set this here and doesn\u2019t give you write-access to this configuration file",
"maxClientsOverride": "Possibility to override the \u201cmaxClients\u201d value in the <a href=\"https://www.assettocorsa.net/forum/index.php?threads/the-server-admin-handbook-thread.58245/\">\u201cconfiguration.json\u201d</a>. Can only reduce that value. Use it if you e.g. rented a 24 slot server, but want to restrict it for some reason. Defaults to 30.",
"mandatoryPitstopCount": "Defines the basic mandatory pit stops. If the value is greater zero, any car that did not execute the mandatory pitstops will be disqualified at the end of the race. The necessary actions can be further configured using the \u201cisMandatoryPitstopXYRequired\u201d properties. A value of zero disables the feature.",
"maxCarSlots": "Replaces \u201cmaxClientsOverride\u201d and \u201cspectatorSlots\u201d. Defines the amount of car slots the server can occupy; this value is overridden if the pit count of the track is lower, or with 30 for public MP. The gap between maxCarSlots and maxConnections defines how many spectators or other irregular connections (ie entry list entries) can be on the server.",
"maxConnections": "Replaces \u201cmaxClients\u201d. The maximum amount of connections a server will accept at a time. If you own the hardware server, you can just set any high number you want. If you rented a 16 or 24 slot server, your Hosting Provider probably has set this here and doesn\u2019t give you write-access to this configuration file.",
"maxDriversCount": "In driver swap situations, set this to the maximum number of drivers on a car. The maxTotalDrivingTime property will be scaled down to apply to teams with less drivers.",
"maxTotalDrivingTime": "Restricts the maximum driving time for a single driver. Is only useful for driver swap situations and allows to enforce a minimum driving time for each driver (IRL this is used to make sure mixed teams like Pro/Am have a fair distributions of the slower drivers). -1 disables the feature.",
"overrideCarModelForCustomCar": "If customCar is used, this setting will apply the car model configured if the value is set to 1 (which is the default). If set to 0, all values except the carModel are applied, so the user is free to pick a car but while team name and appearance will be applied.",
"overrideDriverInfo": "If set to 1, the driver\u2019s name and category will be overridden by what is setup in the entry list. If set to 0, it\u2019s up to the client joining.",
"password": "Password required to enter this server. If a password is set, the server is declared <a href=\"https://www.assettocorsa.net/forum/index.php?threads/the-server-admin-handbook-thread.58245/\">\u201cPrivate Multiplayer\u201d.</a>",
"password": "Password required to enter this server. If a password is set, the server is declare<a href=\"https://www.assettocorsa.net/forum/index.php?threads/the-server-admin-handbook-thread.58245/\">d \u201cPrivate Multiplayer\u201d.</a>",
"pitWindowLengthSec": "Defines a pit window at the middle of the race. Obviously covers the Sprint series format. -1 will disable the pit window. Use this combined with a mandatoryPitstopCount = 1. <hr/><a name=8></a>",
"playerID": "Steam64 Id for this client; Add a \u201cS\u201d in the front",
"postQualySeconds": "The time after the last driver is finished (or the sessionOverTimeSeconds passed) in Q sessions and the race start. Should not be set to 0, otherwise grid spawning is not secure.",
"postRaceSeconds": "Additional time after the race ended for everyone, before the next race weekend starts.",
"postRaceSeconds": "Additional time after the race ended for everyone, before the next race weekend starts. <hr/><a name=7></a>",
"preRaceWaitingTimeSeconds": "Preparation time before a race. Cannot be less than 30s.",
"qualifyStandingType": "1 = fastest lap, 2 = average lap (running Endurance mode for multiple Q sessions) . Use 1, averaging Qualy is not yet officially supported.",
"raceNumber": "The preferred race number if set, -1 if the driver may decide by picking his car. Values 1 - 998",
"racecraftRatingRequirement": "Defines the Safety Rating (RC) that a user must have to join this server (values -1, 0, \u2026. 99)",
"rain": "If weather randomness is off, defines the static rain level. With dynamic weather, it increases the rain chance. Values (0.0, 0.1, \u2026. 1.0)",
"randomizeTrackWhenEmpty": "If set to 1, the server will change to a random track when the last drivers leaves (which causes a reset to FP1). The \u201ctrack\u201d property will only define the default state for the first session.",
"registerToLobby": "When 0, this server won\u2019t register to the backend. Is useful for LAN sessions. If 0, the server is declared <a href=\"https://www.assettocorsa.net/forum/index.php?threads/the-server-admin-handbook-thread.58245/\">\u201cPrivate Multiplayer\u201d.</a>",
"registerToLobby": "When 0, this server won\u2019t register to the backend. Is useful for LAN sessions. If 0, the server is declare<a href=\"https://www.assettocorsa.net/forum/index.php?threads/the-server-admin-handbook-thread.58245/\">d \u201cPrivate Multiplayer\u201d.</a>",
"safetyRatingRequirement": "Defines the Safety Rating (SA) that a user must have to join this server (values -1, 0, \u2026. 99)",
"serverName": "The server name displayed in the ACC UI pages",
"sessionDurationMinutes": "Session duration in minutes",
Expand All @@ -43,10 +54,9 @@
"shortFormationLap": "Toggles the short and long formation lap. Long formation is only usable on private servers.",
"shortName": "Short name of the driver, if \u201coverrideDriverInfo\u201d is set to 1",
"spectatorPassword": "Password to enter the server as spectator. Must be different to \u201cpassword\u201d if both is set.",
"spectatorSlots": "Defines the amount of spectators that may join this server without owning a car; see <a href=\"https://www.assettocorsa.net/forum/index.php?threads/the-server-admin-handbook-thread.58245/\">\u201cAbout Spectators\u201d</a>",
"tcpPort": "ACC clients will use this port to establish a connection to the server",
"timeMultiplier": "Rate at which the session time advances in realtime. Values 0, 1, \u2026 24",
"track": "The track we run, see \u201cTrack name list\u201d. Setting a wrong value will also print out the available track keys in the log.",
"track": "The track we run, see \u201cTrack name list\u201d. Setting a wrong value will also print out the available track keys in the log. With the 1.1 update containing the 2019 season content, each track has a _2019 variant. Using this track will set the BoP and track grip correspondingly.",
"trackMedalsRequirement": "Defines the amount of track medals that a user has to have for the given track (values 0, 1, 2, 3)",
"trackTemp": "Obsolete: Track temperatures are always simulated based on ambient temperature, sun angle, clouds and other aspects.",
"udpPort": "Connected clients will use this Port to stream the car positions and is used for the ping test. In case you never see your server getting a ping value, this indicates that the udpPort is not accessible",
Expand Down
12 changes: 10 additions & 2 deletions accservermanager/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@


# list of available tracks
TRACKS = (
TRACKS = [
('misano', 'Misano'),
('paul_ricard', 'Paul Ricard'),
('nurburgring', 'Nuerburgring GP'),
Expand All @@ -162,7 +162,9 @@
('barcelona', 'Catalunya (Barcelona)'),
('silverstone', 'Silverstone'),
('spa', 'Spa-Francorchamps'),
)
('zandvoort', 'Zandvoort'),
]
TRACKS.extend([('%s_2019'%t[0], '%s 2019'%t[1]) for t in TRACKS])

CAR_MODEL_TYPES = (
(0, 'Porsche 911 (991) GT3 R'),
Expand All @@ -181,8 +183,14 @@
(13, 'Lamborghini Gallardo R-EX'),
(14, 'Jaguar G3'),
(15, 'Lexus RC F GT3'),
(16, 'Lamborghini Huracan Evo (2019)'),
(17, 'Honda/Acura NSX GT3'),
(18, 'Lamborghini Huracán Super Trofeo (2015)'),
(19, 'Audi R8 LMS Evo (2019)'),
(20, 'AMR V8 Vantage (2019)'),
(21, 'Honda NSX Evo (2019)'),
(22, 'McLaren 720S GT3 (Special)'),
(23, 'Porsche 911 II GT3 R (2019)'),
)

SESSION_TYPES = (
Expand Down
6 changes: 4 additions & 2 deletions instances/InstanceForm.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class InstanceForm(forms.Form):
spectatorPassword = forms.CharField(max_length=100, required=False)
adminPassword = forms.CharField(max_length=100, required=False)

maxClients = forms.IntegerField(max_value=100, min_value=0, required=False)
spectatorSlots = forms.IntegerField(min_value=0, required=False)
maxConnections = forms.IntegerField(max_value=1000, min_value=0, required=False)

trackMedalsRequirement = forms.IntegerField(max_value=3, min_value=0, required=False)
safetyRatingRequirement = forms.IntegerField(max_value=99, min_value=-1, required=False)
Expand All @@ -32,12 +31,15 @@ class InstanceForm(forms.Form):
registerToLobby = forms.BooleanField(required=False)
randomizeTrackWhenEmpty = forms.BooleanField(required=False)

maxCarSlots = forms.IntegerField(max_value=1000, min_value=0, required=False)

allowAutoDQ = forms.BooleanField(required=False)
shortFormationLap = forms.BooleanField(required=False)
dumpEntryList = forms.BooleanField(required=False)

udpPort = forms.IntegerField(max_value=None, min_value=1000)
tcpPort = forms.IntegerField(max_value=None, min_value=1000)
lanDiscovery = forms.BooleanField(required=False)

# There is an issue with the 'required' error, so set this field
# to not-required. This is ok, since it is always pre-filled.
Expand Down
4 changes: 2 additions & 2 deletions instances/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ def write_config(name, inst_dir, form):
### use the values of the default *.json as basis
cfg = json.load(open(os.path.join(settings.ACCSERVER, 'cfg', name), 'r'))

conf_keys = ['udpPort','tcpPort', 'maxClients', 'registerToLobby']
conf_keys = ['udpPort','tcpPort', 'maxConnections', 'lanDiscovery', 'registerToLobby']
if name == 'settings.json':
keys = filter(lambda x:x not in (conf_keys+['csrfmiddlewaretoken', 'cfg','instanceName']),
keys = filter(lambda x:x not in (conf_keys+['csrfmiddlewaretoken', 'cfg', 'instanceName']),
form.cleaned_data.keys())
else: keys = conf_keys

Expand Down
2 changes: 1 addition & 1 deletion tools/extractMessages.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

if __name__== "__main__":
if len(sys.argv)!=2:
print('Usage: python extractMessages.py ../path/to/ServerAdminHandbook_v1s.html')
print('Usage: python extractMessages.py ../path/to/ServerAdminHandbook_v*s.html')
exit(1)

outer = """<b>Property.*\n<b>Remarks.*\n((?:.|\n)*?)<br\/>\n(?:<b>)?&#160;(?:<\/b>)?<br\/>"""
Expand Down

0 comments on commit 0211a7c

Please sign in to comment.