9 Commits
Author SHA1 Message Date
legonzaur 8ff9f9e5e8 change default URI 2023-09-03 13:26:34 +02:00
Legonzaur 4cd4dd1fa0 Update mod.json 2023-05-02 13:50:10 +02:00
Legonzaur f673a7c0b8 Update mod.json 2023-05-02 13:08:24 +02:00
Legonzaur bb8034e90a Update mod.json 2023-05-02 13:08:10 +02:00
legonzaur 6a413d0f98 update readme 2023-04-26 16:58:27 +02:00
legonzaur 2f0c3effb4 update Readme 2023-04-26 16:58:03 +02:00
Legonzaur c7a1cfc41a Update README.md 2023-04-25 18:54:27 +02:00
legonzaur a5f96f307f Merge branch 'main' of https://github.com/ToneAPI/ToneAPI_servermod 2023-04-25 16:08:13 +02:00
legonzaur d54583e224 remove test token from mod 2023-04-25 16:08:10 +02:00
3 changed files with 22 additions and 9 deletions
+17 -4
View File
@@ -1,7 +1,20 @@
# fvnkhead.killstat # What is Tone API?
To use, you MUST set `Tone_token` and `Tone_ID` convars Tone is an API that allows everyone to view their ingame stats for Northstar.
For now, DM @Legonzaur#2100 to get those informations The following projects allows users to visualize the API data
|Client |Platform |
|----------------------------------------------------------------------------|----------------------|
|[ToneAPI_webclient](https://github.com/ToneAPI/ToneAPI_webclient) |Webapp |
|[Pulse](https://github.com/ToneAPI/pulse) |Northstar Client mod |
|[Sonar](https://github.com/ToneAPI/Sonar) |Discord bot |
Alternatively, you can selfhost your own backend [here](https://github.com/Legonzaur/ToneAPI_backend) Documentation for the API can be found here : https://github.com/Legonzaur/ToneAPI_backend
# What is this mod ?
This mod is a serverside mod.
When a player makes a kill, it sends the data to the API
To use, you MUST set `Tone_token`
DM @Legonzaur#2100 to get a token
+3 -3
View File
@@ -1,7 +1,7 @@
{ {
"Name": "fvnkhead.killstat", "Name": "fvnkhead.killstat",
"Description": "Gather kill statistics and sends them to Tone API server.", "Description": "Gather kill statistics and sends them to Tone API server.",
"Version": "3.0.1", "Version": "3.0.2",
"LoadPriority": 1, "LoadPriority": 1,
"RequiredOnClient": false, "RequiredOnClient": false,
"ConVars": [ "ConVars": [
@@ -11,11 +11,11 @@
}, },
{ {
"Name": "Tone_URI", "Name": "Tone_URI",
"DefaultValue": "https://tone.sleepycat.date/v2" "DefaultValue": "https://toneapi.ovh/v2"
}, },
{ {
"Name": "Tone_token", "Name": "Tone_token",
"DefaultValue": "pasteyourtokenhere" "DefaultValue": "CHECK_NORTHSTAR_WIKI_INSTRUCTIONS_ABOUT_CONVARS"
}, },
{ {
"Name": "killstat_custom_parameters", "Name": "killstat_custom_parameters",
+2 -2
View File
@@ -12,6 +12,7 @@ struct {
string servername string servername
string Tone_token string Tone_token
bool connected bool connected
//remove this in the future
array<Parameter> customParameters array<Parameter> customParameters
int matchId int matchId
@@ -23,7 +24,6 @@ void function killstat_Init() {
file.killstatVersion = GetConVarString("killstat_version") file.killstatVersion = GetConVarString("killstat_version")
file.Tone_URI = GetConVarString("Tone_URI") file.Tone_URI = GetConVarString("Tone_URI")
file.Tone_token = GetConVarString("Tone_token") file.Tone_token = GetConVarString("Tone_token")
file.Tone_token = "ZjlmZGM0YmEtZjI1Mi00MTNjLTg5MDEtNzI3NzZkNjE2YzRj"
file.connected = false file.connected = false
file.servername = GetConVarString("ns_server_name") file.servername = GetConVarString("ns_server_name")
//register to Tone API if default or invalid token //register to Tone API if default or invalid token
@@ -84,7 +84,7 @@ void function killstat_Record(entity victim, entity attacker, var damageInfo) {
return return
table values = {} table values = {}
//remove this in the future
foreach (Parameter p in file.customParameters) { foreach (Parameter p in file.customParameters) {
values[p] <- p.value values[p] <- p.value
} }