Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cac8fcf8c | ||
|
|
9134c66117 | ||
|
|
8ff9f9e5e8 | ||
|
|
4cd4dd1fa0 | ||
|
|
f673a7c0b8 | ||
|
|
bb8034e90a | ||
|
|
6a413d0f98 | ||
|
|
2f0c3effb4 | ||
|
|
c7a1cfc41a | ||
|
|
a5f96f307f | ||
|
|
d54583e224 |
@@ -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
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user