ARK: Tribe Log Relay

ARK: Tribe Log Relay 2.01

No permission to download

Gives tribe owners the ability to have in-game tribe log events forwarded to a discord channel of their choosing.
Gives server owners/admins the ability to log all tribe activity to a private admin discord channel.
Gives server owners/admins the ability to log filtered content to a second admin channel or public channel.

Chat Commands:
Dependencies: If you are unable to load my plugin and get error 126 you need to install these.

Update Instructions:
  • Download and open the zip file.
  • Copy the "PluginInfo.json" file directly on top of your existing "PluginInfo.json".
  • Open your "config.json" and copy any changes over to the new "config.json". (Important)
  • Make sure the updated "config.json" is now in the plugin directory.
  • Stop your server and replace the "TribeLogRelay.dll".
  • Start your server again.

Configuration:
JSON:
{
    "General":{
        "ServerName":"CustomServerName",
        "AppendMapName": false,
        "ForceTribeMembership":true
    },
    "Commands":{
        "CommandText":"/TLR",
        "UsePermissions":false,
        "PermissionName":"TLR.Add"
    },
    "Discord":{
        "UseAdminLogging":false,
        "AdminDiscordWebhook":"",
        "AdminPublicDiscordWebhook":"",
        "DiscordLinkFormat":"https:\/\/discordapp.com\/api\/webhooks\/[^\/]+\/[^\/]+",
        "DiscordPingCooldown":0,
        "UseTribeID":true,
        "TribeFormat":"{1}:{0}"
    },
    "Detection":{
        "DetectCyrofreeze":true,
        "DetectCyroUnfreeze":true,
        "CryoItems":"PrimalItem_WeaponEmptyCryopod_C,SoulTrap_DS_C",
        "DetectTribenameChange":true,
        "DetectTribeOwnerChange":true,
        "DetectTribeLogin":true,
        "DetectTribeLogoff":true
    },
    "KeywordMatching":{
        "UseKeywordMatching":true,
        "Keywords":{
            "Your Tribe killed ":false,
            " was killed":true,
            " demolished a ":false,
            " claimed ":false,
            " unclaimed ":false,
            " was added to the Tribe!":false,
            " was removed from the Tribe!":false,
            " was auto-decay destroyed!":true,
            " starved to death!":true,
            " was destroyed!":true,
            " destroyed their ":false,
            "Tamed a":false,
            " was promoted ":false,
            " was demoted ":false,
            " set to Rank Group ":false,
            " uploaded ":false,
            " downloaded ":false,
            " froze ":false,
            " unfroze ":false,
            " destroyed your ":false,
            "Tribe name changed ":false,
            "Tribe owner changed ":false,
            " now online!":false,
            " gone offline!":false,
            " has been born.":true,
            " has been hatched.":true,
            " transferred to ":false,
            " transferred from ":false
        }
    },
    "AdminKeywordMatching":{
        "UseKeywordMatching":false,
        "Keywords":{
            "Your Tribe killed ":false,
            " was killed":false,
            " demolished a ":false,
            " was added to the Tribe!":false,
            " was removed from the Tribe!":false,
            " was destroyed!":false,
            " destroyed their ":false,
            " destroyed your ":false,
            "Tribe name changed ":false,
            "Tribe owner changed ":false
        }
    },
    "AdminPublicKeywordMatching":{
        "UseKeywordMatching":true,
        "Keywords":{
            "Your Tribe killed ":false,
            " was killed":false,
            " now online!":false,
            " gone offline!":false,
            " transferred to ":false,
            " transferred from ":false
        }
    },
    "Localization":{
        "TribeOwnerChanged":"Tribe owner changed from {0} to {1}",
        "TribeNameChanged":"Tribe name changed to ({0})",
        "UnCryo":"{0} unfroze {1}",
        "Cryo":"{0} froze {1}",
        "Login":"{0} is now online!",
        "Logoff":"{0} has gone offline!",
        "NewBaby":"'Baby {0}' has been born.",
        "EggHatched":"'{0}' has been hatched.",
        "TransferLeave":"{0} transferred to another ARK!",
        "TransferJoin":"{0} transferred from another ARK!"
    },
    "Messages":{
        "Sender":"TribeLogRelay",
        "ChangedWebhook":"Successfully set your tribes Discord Webhook!",
        "Invalid":"<RichColor Color=\"1, 0, 0, 1\">Webhook appears to be an invalid discord webhook!</>",
        "Error":"<RichColor Color=\"1, 0, 0, 1\">Webhook did not get updated, try again!</>",
        "NotAllowed":"<RichColor Color=\"1, 0, 0, 1\">Only the tribe owner is allowed to use this feature!</>",
        "NotFound":"<RichColor Color=\"1, 0, 0, 1\">Unable to locate your tribe entry! Contact the server admin.</>",
        "Usage":"\nTribe Owners Only!\nUsage: /tlr <discord webhook>\nVisit https://bit.ly/33Jw8i5 for information about Discord Webhooks.",
        "ForceTribe":"Tribe membership is required. You have been added to your own tribe."
    },
    "Notifications":{
        "NotificationDisplayTime":10.0,
        "NotificationScale":1.3
    },
    "Mysql":{
        "UseMysql":false,
        "MysqlHost":"localhost",
        "MysqlUser":"user",
        "MysqlPass":"pass",
        "MysqlDB":"dbname"
    }
}

Detailed Configuration Info:
General:
  • ServerName: This will appear at the beginning of all discord messages to identify the server the message comes from.
    • Example Tribe Message: "@everyone (CustomServerName) Day 28, 07:22: Tribemember LethalTest - Lvl 1 was killed by a Kaprosuchus - Lvl 90!"
    • Example Admin Message: "(CustomServerName) (NewTribe) Day 28, 07:22: Tribemember LethalTest - Lvl 1 was killed by a Kaprosuchus - Lvl 90!"
  • AppendMapName: This will append the current map name the message was generated on to the server name.
    • true or false are the valid values.
    • Example Tribe Message: "@everyone (CustomServerName - Genesis) Day 28, 07:22: Tribemember LethalTest - Lvl 1 was killed by a Kaprosuchus - Lvl 90!"
    • Example Admin Message: "(CustomServerName- Genesis) (NewTribe) Day 28, 07:22: Tribemember LethalTest - Lvl 1 was killed by a Kaprosuchus - Lvl 90!"
  • ForceTribeMembership: Will force solo players into a solo tribe. Ensures everything they do can be logged and enforced.
    • true - creates a new tribe for them automatically using their name.
    • false - disables this feature and lets people be tribe-less if they wish.
UseAdminLogging: This will turn on the admin logging feature to send all tribe logs to AdminDiscordWebhook.

AdminDiscordWebhook: This is the webhook that will be used by the UseAdminLogging feature.

AdminPublicDiscordWebhook: Second webhook meant to be used for admins to display a portion of events in a public channel

DiscordLinkFormat: This is regex that verifies the format of the discord webhook is correct. You do not need to change this setting.

DiscordPingCooldown: Only affects tribe logs since admin logs do not contain mentions.
  • Setting to 0 disables the new feature and TLR will act as it always has.
  • Setting to 60 for instance is the number of seconds that must pass before another @everyone can be sent to discord. The message will still be delivered during the "cooldown" period minus the @everyone.
UseTribeID: (Only affects Admin Logging)
  • Setting to true will display the Tribe Name and Tribe Id
  • Setting to false will only display the TribeName
TribeFormat: This allows you to customize in the admin logging how to display the tribe info.
  • {0} = TribeName and {1} = TribeId
  • TribeFormat must contain both of the above values if UseTribeID is true
  • Examples using Tribe Name "LethalTribe" and Tribe Id "1234567890" with "UseTribeId" set to true
    • "{0}::{1}" will display as (LethalTribe::1234567890)
    • "{1}::{0}" will display as (1234567890::LethalTribe)
    • "Id:{1} Name:{0}" will display as (Id:1234567890:LethalTribe)

UsePermissions: If you would like to only allow certain users access to set tribe webhooks set this to true otherwise only Tribe Owners will have permission. Enabling this feature does remove the ability for Tribe Owners to use the command. More Info

PermissionName: This is the permission you will setup in-game attached to a group which is then assigned to players. More Info

UseKeywordMatching: This will send only tribe log messages that match entries in the Keywords list below. Admin logging does not use this feature and logs everything.

Keywords: If using "UseKeywordMatching" any keyword detected in a tribe log will send the message to the tribes discord. Keep in mind Keywords are only used for Tribe Discord messages and Admin Discord gets every message. You can add or remove anything from the list you want. If it is in the list it will send a message see below for True/False usage.
  • Format: "keyword":important
    • "keyword": This can be any text that can appear in the tribe log. I have already included many of them. This is the text that is used to figure out what needs to be sent if using the keywords matching feature.
    • important: Replace the word important with either true or false. If set to true it will add "@everyone" to the discord message effectively pinging users in discord for messages that contain the keyword. If set to false it does not ping users and sends a normal message.
Localization: Allows you to customze the additional logging features provided in this plugin. So the message can be in the native language of your server. See the changelog for what this looks like in Korean for another example.
  • "TribeOwnerChanged":"Tribe owner changed from {0} to {1}",
    • {0}=Previous Tribe Owner, {1}=New Tribe Owner
  • "TribeNameChanged":"Tribe name changed to ({0})",
    • {0}=New tribe name
  • "UnCryo":"{0} unfroze {1}"
    • {0}=PlayerName, {1}=DinoName/Level
Messages: These are just used for providing in-game feedback to users. Make sure based on the config options you are using the messaging makes sense to a user. If you change the /command make sure it is noted in the messages etc.
  • Sender: Any messages sent to the player by the plugin will be prefixed with this text in the chatbox.
    • Example: "TribeLogRelay: Successfully set your tribes Discord Webhook!"
MySQL: These settings will only be used if you plan to use a MySQL database.
  • UseMysql: true or false (false uses the existing sqlite database and true requires you to have a MySql database setup. The rest of the settings are only needed if you set this setting to true.

Message Queue System v1.1+
Just wanted to put some additional context around this changelog note.
Reworked the message queue system to ensure it can handle large amounts of events at once. Admin logging if enabled is set so that it should not trigger the discord webhook rate limit. Using the same webhook for multiple things could lead to rate limiting preventing the webhook from getting messages from any source for a "cooldown" period.
Just some background before I begin. Discord Webhooks support 30 messages per minute with each message allowed to be upto 2000 characters. You will see why this is important shortly.

Here is my testing scenario:
  • Spawn in 100 tamed dodo's. Lay down 40-50 c4 then detonate them. This will create hundreds of log messages in game instantly that will be sent to discord.
How each version handled this scenario:
  • Version 1.0: Would only catch a few of these events because the events were sent to discord in real-time 1 at a time and missing the majority of the messages. The discord webhook would be overloaded and put into a rate limited state preventing messages from being delivered for X seconds.

  • Version 1.1: Will queue up the messages and deliver them in batches to maximize how much data can be sent to discord in a single message. So for instance it will send 1 message that contains up to 2000 characters (maximum size permitted for webhooks) of the tribe log messages. For this scenario I found it sending roughly 19 logs lines in a single message which greatly reduces the number of messages that need to be sent while still delivering them in a timely manner. In my tests it would deliver around 400 tribe log lines in a matter of a few seconds. So this new system should scale very well for busy servers with lots of action generating lots of log entries.
As stated above I have the Admin logging feature tuned to send the exact amount of messages allowed per minute so it should never get rate limited as long as that webhook is only used for a single server. Tribe webhooks are a bit different because they would need to generate a huge amount of logs (500 or so) within 60 seconds to cause them to get rate limited.

Hopefully this all makes sense. Let me know if you have any questions.

Donations: If you feel like donating for my time please use the button below.




Shoutouts to @WETBATMAN @Substitute @Michidu @OwnProx @Foppa and anyone else for either helping me on discord or sharing open source code to learn from.
Author
Lethal
Downloads
320
Views
3,960
First release
Last update
Rating
5.00 star(s) 11 ratings

More resources from Lethal

  • Lethal ORP
    Lethal ORP
    Lethal's Offline Raid Protection
  • ATLAS: Tribe Log Relay
    ATLAS: Tribe Log Relay
    Company Logs can send to a Company Discord and Admins can receive all Company Logs for auditing.
  • Items+ w/Overflow Protection
    Items+ w/Overflow Protection
    DC Protection, Item Weight, Limit Blueprint Crafts, Block Items and Uploads
  • No Wander+
    No Wander+
    Auto sets many dino settings automatically with Tribe preferences!
  • PvP+
    PvP+
    PvP quality of life changes and to fix exploitative raiding methods

Latest updates

  1. Tribe Log Relay v2.01

    Fix for 1114 loading error.
  2. Tribe Log Relay v2.00

  3. Tribe Log Relay v1.91

    Bug fix for gestation spamming a birth on lower rate servers.

Latest reviews

插件很棒·就是不能与假人插件共存。放一起必定报错·
The plug-in is great, but it cannot coexist with the dummy plug-in. Putting it together must report an error·
Love This so much! I implemented it on karaworlds cluster and it has been a godsend for helping us manage all our servers. This update looks awesome though gonna take me a bit to push it out to 14 servers. lol
My players love all your plugins, especially this one which makes offline raiding more difficult!
Very nice plugin, configurable, works well. Changes the way people are playing Ark.
Awesome Plugin! Fantastic for admins. The Force Tribe Membership option ensures everyone on my server is logged and I can use TribeID admin commands to support/enforce. Having all tribe logs go to discord is great because its a permanent archive that is easily searchable - much better than other logs.
is there a way to disable the @everyone ?
Works as intended, requested filter for admin log and got a positive answer within 5 minutes.
Absolutely love it! This is going to save us so much time!
10/10
like it! also with the @everyone notification if true
Top