11 Commits
Author SHA1 Message Date
legonzaur 0cac8fcf8c edit welcome message to use hostname 2023-09-03 13:49:49 +02:00
legonzaur 9134c66117 change version number 2023-09-03 13:49:42 +02:00
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 23 additions and 10 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",
"Description": "Gather kill statistics and sends them to Tone API server.",
"Version": "3.0.1",
"Version": "3.0.4",
"LoadPriority": 1,
"RequiredOnClient": false,
"ConVars": [
@@ -11,11 +11,11 @@
},
{
"Name": "Tone_URI",
"DefaultValue": "https://tone.sleepycat.date/v2"
"DefaultValue": "https://toneapi.ovh/v2"
},
{
"Name": "Tone_token",
"DefaultValue": "pasteyourtokenhere"
"DefaultValue": "CHECK_NORTHSTAR_WIKI_INSTRUCTIONS_ABOUT_CONVARS"
},
{
"Name": "killstat_custom_parameters",
+3 -3
View File
@@ -12,6 +12,7 @@ struct {
string servername
string Tone_token
bool connected
//remove this in the future
array<Parameter> customParameters
int matchId
@@ -23,7 +24,6 @@ void function killstat_Init() {
file.killstatVersion = GetConVarString("killstat_version")
file.Tone_URI = GetConVarString("Tone_URI")
file.Tone_token = GetConVarString("Tone_token")
file.Tone_token = "ZjlmZGM0YmEtZjI1Mi00MTNjLTg5MDEtNzI3NzZkNjE2YzRj"
file.connected = false
file.servername = GetConVarString("ns_server_name")
//register to Tone API if default or invalid token
@@ -64,7 +64,7 @@ string prefix = "\x1b[38;5;81m[TONE API]\x1b[0m "
void function JoinMessage(entity player) {
//Chat_ServerPrivateMessage(player, prefix + "This server collects data using the Tone API. Check your data here: \x1b[34mtoneapi.com/" + player.GetPlayerName()+ "\x1b[0m", false, false)
Chat_ServerPrivateMessage(player, prefix + "This server collects data using the WIP Tone API. View statistics at https://toneapi.github.io/ToneAPI_webclient/", false, false)
Chat_ServerPrivateMessage(player, prefix + "This server collects data using the WIP Tone API. View statistics at https://toneapi.ovh", false, false)
}
void function killstat_Begin() {
@@ -84,7 +84,7 @@ void function killstat_Record(entity victim, entity attacker, var damageInfo) {
return
table values = {}
//remove this in the future
foreach (Parameter p in file.customParameters) {
values[p] <- p.value
}