Webhooks
Webhooks allow external services to be notified when certain events happen. When the specified events happen, we’ll send a POST request to each of the URLs you provide.
WARNING
The server must be stopped while editing server files. You must save your edits and restart your server for any edits to take effect.
To setup Webhooks, you must edit the Game.ini
file. You can find this file in the following location:
INFO
WindowsServer
is the folder name for Windows servers. If you are using a different operating system, the folder name will be different but the other folders will be the same.
Underneath the [ServerWebhooks]
header, create an entry, for example: PlayerReport="https://discord-webhook-url-here/"
. You can choose to have as many or as few webhooks as you want. Remove the ones you don't want to use.
Example Game.ini
[ServerWebhooks]
; Set this to true if you want the server to call webhooks
bEnabled=true
; Discord or General
; Discord will format the messsage for posting directly to the channel
; General will format the message to be consumed by your own website / server / backend
Format="Discord"
PlayerReport="https://discord-webhook-url-here/"
PlayerLogin=""
PlayerLogout=""
PlayerLeave=""
PlayerKilled=""
PlayerQuestComplete=""
PlayerQuestFailed=""
PlayerRespawn=""
PlayerWaystone=""
PlayerChat=""
PlayerProfanity=""
PlayerHack=""
PlayerDamagedPlayer=""
PlayerJoinedGroup=""
PlayerLeftGroup=""
PlayerPurchase=""
ServerRestart=""
ServerRestartCountdown=""
ServerModerate=""
ServerError=""
AdminSpectate=""
AdminCommand=""
BadAverageTick=""
Creating Discord Webhooks
You can create a Discord webhook for your Discord channel by following these steps:
- Go into your desired channel settings and select "Integrations"
- Create a new webhook.
- Copy the webhook URL and paste it into your Game.ini file.
Webhook List
The following webhooks are available and the example JSON data that is sent to them. You can use this data to create your own webhook handlers as show here.
PlayerReport
Called when a player reports someone else in-game.
{
"ReporterPlayerName": "Test1",
"ReporterAlderonId": "048-236-424",
"ServerName": "Server",
"Secure": true,
"ReportedPlayerName": "Test2",
"ReportedAlderonId": "123-430-121",
"ReportedPlatform": "Desktop",
"ReportType": "Killed By User",
"ReportReason": "KOS (Killed on Sight)",
"RecentDamageCauserIDs": "123-430-121, 135-654-234",
"NearbyPlayerIDs": "123-430-121, 135-654-234",
"Title": "I got killed",
"Message": "please help!",
"Location": "(X=328866.125,Y=-130023.359375,Z=853.25)",
"Version": "0.0.0.12968",
"Platform": "Desktop"
}
PlayerLogin
Called when a player logs in to the server. This means they are in the character selection screen. NOT that they are on the map.
{
"ServerName": "Server",
"PlayerName": "Test1",
"AlderonId": "048-236-424",
"BattlEyeGUID": "05db16f3014acfdd6cc48dc7ce99168e",
"bServerAdmin": false
}
PlayerLogout
Called when a player logs out. This means they have fully disconnected from the server.
{
"ServerName": "Server",
"PlayerName": "Test1",
"AlderonId": "048-236-424",
"BattlEyeGUID": "05db16f3014acfdd6cc48dc7ce99168e"
}
PlayerLeave
Called when a player logs out to the character selection screen.
{
"PlayerName": "Test1",
"PlayerAlderonId": "048-236-424",
"FromDeath": false,
"SafeLog": true,
"CharacterName": "DiloIsCool",
"DinosaurType": "Dilophosaurus",
"DinosaurGrowth": 0.5,
"Location": "(X=328866.125,Y=-130023.359375,Z=853.25)"
}
PlayerKilled
Called when a player is killed.
{
"TimeOfDay": 1300,
"DamageType": "DT_ATTACK",
"VictimPOI": "Talons Point",
"VictimName": "Test1",
"VictimAlderonId": "048-236-424",
"VictimCharacterName": "DiloIsCool",
"VictimDinosaurType": "Dilophosaurus",
"VictimRole": "CoolRole",
"VictimIsAdmin": false,
"VictimGrowth": 0.5,
"VictimLocation": "(X=328866.125,Y=-130023.359375,Z=853.25)",
"KillerName": "Test2",
"KillerAlderonId": "123-430-121",
"KillerCharacterName": "DiloIsCooler",
"KillerDinosaurType": "Dilophosaurus",
"KillerRole": "NotAsCoolRole",
"KillerIsAdmin": false,
"KillerGrowth": 0.5,
"KillerLocation": "(X=328866.125,Y=-130023.359375,Z=853.25)"
}
There are 10 different DamageType
that can be sent. You can find the details below.
Details
DT_ATTACK
DT_OXYGEN
DT_BLEED
DT_THIRST
DT_HUNGER
DT_BREAKLEGS
DT_GENERIC
DT_TRAMPLE
DT_SPIKES
DT_ARMORPIERCING
PlayerQuestComplete
Called when a player completes a quest.
{
"Quest": "QuestName",
"QuestRewardGrowth": 0.1,
"QuestRewardMarks": 100,
"PlayerName": "Test1",
"PlayerAlderonId": "048-236-424",
"GroupQuest": true
}
PlayerQuestFailed
Called when a player fails a quest.
{
"Quest": "QuestName",
"PlayerName": "Test1",
"PlayerAlderonId": "048-236-424",
"GroupQuest": true
}
PlayerRespawn
Called when a player respawns. This is for when the player joins the game and is in the map.
{
"PlayerName": "Test1",
"PlayerAlderonId": "048-236-424",
"Role": "CoolRole",
"CharacterName": "DiloIsCool",
"DinosaurType": "Dilophosaurus",
"DinosaurGrowth": 0.5,
"Location": "(X=328866.125,Y=-130023.359375,Z=853.25)"
}
PlayerWaystone
Called when a player uses a waystone to teleport someone.
{
"InviterName": "Test1",
"InviterAlderonId": "048-236-424",
"TeleportedPlayerName": "Test2",
"TeleportedPlayerAlderonId": "123-430-121"
}
PlayerChat
Called when a player sends a chat message.
{
"ChannelId": 0,
"ChannelName": "Global",
"PlayerName": "Test1",
"Message": "Hello World!",
"AlderonId": "048-236-424",
"bServerAdmin": false,
"FromWhisper": false
}
PlayerProfanity
Called when a player sends a chat message with profanity.
{
"ChannelId": 0,
"ChannelName": "Global",
"PlayerName": "Test1",
"Message": "Hello World!",
"FilteredMessage": "Hello World!",
"AlderonId": "048-236-424",
"bServerAdmin": false
}
PlayerHack
Called when a player is detected of speed hacking or time dilation manipulation. These two different cases have different fields that can be seen below:
{
"ServerIP": "12.32.421.12:7777",
"ServerName": "Server",
"PlayerName": "Test1",
"PlayerAlderonId": "048-236-424",
"Platform": "android",
"CurrentTimeDiscrepancy": 0.38,
"LifetimeRawTimeDiscrepancy": -67.87,
"Lifetime": 1786.04,
"CurrentMoveError": 0.13,
"PercentageTimeDiscrepancy": 0.07,
"EstimatedHackerProbability": 14.62,
"Ping": 53.08
}
PlayerDamagedPlayer
Called when a player damages another player.
{
"SourceName": "Test1",
"SourceAlderonId": "048-236-424",
"SourceDinosaurType": "Dilophosaurus",
"SourceRole": "CoolRole",
"SourceIsAdmin": false,
"SourceGrowth": 0.5,
"DamageType": "DT_ATTACK",
"DamageAmount": 10,
"TargetName": "Test2",
"TargetAlderonId": "123-430-121",
"TargetDinosaurType": "Dilophosaurus",
"TargetRole": "NotAsCoolRole",
"TargetIsAdmin": false,
"TargetGrowth": 0.5
}
PlayerJoinedGroup
Called when a player joins a group.
{
"Player": "Test1",
"PlayerAlderonId": "048-236-424",
"Leader": "Test2",
"LeaderAlderonId": "123-430-121",
"GroupID": "3431"
}
PlayerLeftGroup
Called when a player leaves a group.
{
"Player": "Test1",
"PlayerAlderonId": "048-236-424",
"Leader": "Test2",
"LeaderAlderonId": "123-430-121",
"GroupID": "3431"
}
PlayerPurchase
Called when a player purchases/upgrades a skin and when an ability is purchased. Depending on the purchase, different fields are sent. You can find the details below.
{
"PlayerName": "Test1",
"PlayerAlderonId": "048-236-424",
"Role": "CoolRole",
"CharacterName": "DiloIsCool",
"DinosaurType": "Dilophosaurus",
"DinosaurGrowth": 0.5,
"SkinName": "SkinName",
"Cost": 100,
"CurrentMarks": 1000,
"UpgradeLevel": 1,
}
ServerRestart
Called with server restart warning notices to relay these in discord.
Nothing here to see...
ServerRestartCountdown
Called with server restart countdown notices to relay these in discord.
{
"RestartTimeRemaining": 300
}
Server restart countdowns are sent at certain intervals:
- Hours before: 2, 1
- Minutes before: 30, 10, 5, 1
- Seconds before: 10, 5, 4, 3, 2, 1
ServerModerate
Called for server moderation actions. There are a few different types with different payloads that can be sent. Namely, there are 3 different Type
with 2 different Action
that can be sent. You can find the details below.
Details
Ban (Add, Remove)
Whitelist (Add, Remove)
Mute (Add, Remove)
There are different payload for each type which can find the details below.
{
"Type": "Ban",
"Action": "Add",
"AlderonId": "048-236-424",
"IPAddress": "12.32.421.12",
"BanExpiration": 0,
"AdminReason": "Hacking",
"UserReason": "Hacking"
}
ServerError
Called when the server encounters an error.
{
"ServerIP": "12.32.421.12:7777",
"ServerName": "Server",
"UUID": "63a86971-0cb9-4569-a43a-4b05317f2d73",
"Provider": "AWS",
"Instance": "i-0b9e7b3b4b7b3b7b3",
"Session": "12aecb",
"ErrorMesssage": "Error message here",
}
AdminSpectate
Called when an admin activates the spectator mode.
{
"AdminName": "Test1",
"AdminAlderonId": "048-236-424",
"Action": "Entered Spectator Mode"
}
AdminCommand
Called when an admin runs a server command using chat.
{
"AdminName": "Test1",
"AdminAlderonId": "048-236-424",
"Role": "Admin",
"Command": "listplayers"
}
In the case that the Admin command is remotely executed such as through RCON, only these fields are present:
{
"AdminName": "Remotely executed",
"Command": "listplayers"
}
BadAverageTick
Called when the server detects a bad average tick rate.
{
"ServerIP": "12.32.421.12:7777",
"ServerName": "Server",
"UUID": "63a86971-0cb9-4569-a43a-4b05317f2d73",
"Provider": "AWS",
"Instance": "i-0b9e7b3b4b7b3b7b3",
"Session": "12aecb",
"AverageTickRate": 50,
"CurrentTickRate": 30,
"PlayerCount": 10
}